Schema AST
schema-ast
plugin prints the merged schema as string. If multiple schemas are provided, they will be merged and printed as one schema.
Installation
$ yarn add -D @graphql-codegen/schema-ast
Examples
# ...
schema:
- 'http://localhost:3000/graphql'
- './src/**/*.graphql'
- 'scalar MyCustomScalar'
generates:
path/to/file.graphql:
plugins:
- schema-ast
Configuration
boolean
, default value: false
)
includeDirectives (Include directives to Schema output.
Usage Example
schema:
- './src/schema.graphql'
generates:
path/to/file.graphql:
plugins:
- schema-ast
config:
includeDirectives: true
boolean
, default value: false
)
commentDescriptions (Set to true in order to print description as comments (using # instead of """)
Usage Example
schema: http://localhost:3000/graphql
generates:
schema.graphql:
plugins:
- schema-ast
config:
commentDescriptions: true