@graphcommerce/graphql-codegen-relay-optimizer-plugin
v9.0.1
Published
GraphQL Code Generator plugin for optimizing your GraphQL queries relay style.
Downloads
6,418
Readme
@n1ru4l/graphql-codegen-relay-optimizer-plugin
Description
GraphQL Codegen Plugin for bringing the benefits of Relay to GraphQL Codegen.
Current List of Features
- Optimize Queries
TL;DR: reduce query size
- Inline Fragments
- Flatten Transform
- Skip Redundant Node Transform
- FragmentArguments
Install Instructions
yarn add -D -E @n1ru4l/graphql-codegen-relay-optimizer-plugin
Usage Instructions
codegen.yml
overwrite: true
schema: schema.graphql
generates:
src/generated-types.tsx:
documents: 'src/documents/**/*.graphql'
config:
skipDocumentsValidation: true
plugins:
- '@n1ru4l/graphql-codegen-relay-optimizer-plugin'
- 'typescript'
- 'typescript-operations'
- 'typescript-react-apollo'