https://github.com/erictaylor/graphql-codegen-schema-ast
GraphQL Code Generator plugin for generating a .graphql file from given schema with more options.
https://github.com/erictaylor/graphql-codegen-schema-ast
codegen graphql graphql-codegen schema-ast
Last synced: 12 months ago
JSON representation
GraphQL Code Generator plugin for generating a .graphql file from given schema with more options.
- Host: GitHub
- URL: https://github.com/erictaylor/graphql-codegen-schema-ast
- Owner: erictaylor
- License: mit
- Created: 2021-06-13T03:22:55.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-13T04:19:56.000Z (almost 5 years ago)
- Last Synced: 2025-02-03T18:09:32.321Z (about 1 year ago)
- Topics: codegen, graphql, graphql-codegen, schema-ast
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
This is a plugin for `@graphql-codegen/cli` that works like `@graphql-codegen/ast` but will more options.
## Installation
```
yarn add -D @erictaylor/graphql-codegen-schema-ast
```
## API Reference
#### `includeDirectives`
type: `boolean` default: `false`
Include directives to Schema output.
#### `includeIntrospection`
type: `boolean` default: `false`
Include introspection types to Schema output.
#### `commentDescriptions`
type: `boolean` default: `false`
Set to true in order to print description as comments (using # instead of """)
#### `sort`
type: `boolean` default: `false`
Set to true in order to get the schema lexicographically sorted before printed.
#### `federation`
type: `boolean`
## Usage
```yml
schema:
- "./src/schema.graphql"
generates:
path/to/file.graphql:
plugins:
- "@erictaylor/graphql-codegen-schema-ast"
config:
includeDirectives: true
includeIntrospection: true
```