Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prisma-labs/graphql-config-extension-prisma
https://github.com/prisma-labs/graphql-config-extension-prisma
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/prisma-labs/graphql-config-extension-prisma
- Owner: prisma-labs
- Created: 2018-01-13T21:04:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T05:42:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T21:29:16.457Z (about 1 month ago)
- Language: TypeScript
- Size: 1.7 MB
- Stars: 6
- Watchers: 5
- Forks: 3
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# graphql-config-extension-prisma
[![CircleCI](https://circleci.com/gh/prisma/graphql-config-extension-prisma.svg?style=shield)](https://circleci.com/gh/prisma/graphql-config-extension-prisma) [![npm version](https://badge.fury.io/js/graphql-config-extension-prisma.svg)](https://badge.fury.io/js/graphql-config-extension-prisma)
Injects endpoints and headers into a GraphQL Config instance based on a given prisma.yml
## Usage in `.graphqlconfig.yml`
```yml
projects:
database:
extensions:
prisma: prisma.yml
```## Usage in Node.js
```ts
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](https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html) and [graphql-playgorund-electron](https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-electron).