ClientCRUDPlugin plugin uses your GraphQL schema to generate queries, mutations, subscriptions and fragments for use in your client-side application. The generated documents are compatible with all major GraphQL providers, such as Apollo GraphQL and urql.
To execute this plugin on-demand, you will use the Graphback CLI. Install it as a devDependency in your project.
It is recommended to use the Graphback CLI for certain Graphback plugins, such as those that can modify files which your application depends on. This will prevent hidden accidental file modifications that would otherwise happen during start-up, which might cause issues in your application.
To load the
ClientCRUDPlugin plugin, it should be configuration in a
.graphqlrc GraphQL Config file. The Grahback CLI can dynamically load and execute plugins from a
SchemaCRUDPlugin should be defined before
graphback-schema to ensure the latest schema is used to generate client documents.
See SchemaCRUDPlugin for an installation and configuration guide.
yarn graphback generate to execute plugins from the
.graphqlrc config file on-demand.
The client documents will be created in a file called
Below is a full list of the available configuration options for this plugin.
|Relative path to the GraphQL documents to be created.|
Supported file extensions:
|Optional. When |