Skip to content

Instantly share code, notes, and snippets.

@piglovesyou
Last active July 25, 2020 10:59
Show Gist options
  • Save piglovesyou/47d3eb13b3b42c172245d15d8de3ec8d to your computer and use it in GitHub Desktop.
Save piglovesyou/47d3eb13b3b42c172245d15d8de3ec8d to your computer and use it in GitHub Desktop.
graphql-let config design
# Allow multiple schema files
schema:
- 'src/schema/**/*.graphqls'
- '!src/schema/schema.graphqls'
# `schemaEntrypoint`: Generates bound GraphQL schema, from which users will import:
# - typeDefs for GraphQL server
# - schema types for resolver implementation
# Required if:
# - `schema` is local file path(s)
# - `schema` contains a glob expression
# - `schemaPlugins` is specified
# Warn if:
# - The extension is different from `schema`
schemaEntrypoint: src/schema/schema.graphqls
# Generates ${schemaEntrypoint}.d.ts
schemaPlugins:
- typescript
- typescript-resolvers
documents: '**/*.graphql'
# Identical to `plugins`. `plugins` will be deprecated, but will work in long term
documentPlugins:
- typescript
- typescript-operations
- typescript-react-apollo
# Used if you use Babel Plugin "graphql-let/babel".
gqlDtsEntrypoint: node_modules/@types/index.d.ts
# Shared config for both `schemaPlugins` and `documentPlugins`
config:
reactApolloVersion: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment