Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 1.12 KB

README.md

File metadata and controls

32 lines (22 loc) · 1.12 KB

graphql-config-extension-prisma

CircleCI npm version

Injects endpoints and headers into a GraphQL Config instance based on a given prisma.yml

Usage in .graphqlconfig.yml

projects:
  database:
    extensions:
      prisma: prisma.yml

Usage in Node.js

import { patchConfig } from 'graphql-config-extension-prisma'
import { getGraphQLConfig, GraphQLConfigData } from 'graphql-config'

const config: GraphQLConfigData = getGraphQLConfig().config
const patchedConfig: GraphQLConfigData = patchConfig(
  config,
  process.cwd(),
)

Current Usages

This is currently being used in the graphql-playground-html and graphql-playgorund-electron.