Graphback CRUD Schema plugin
SchemaCRUDPlugin creates your GraphQL schema with all input types, Query, Mutation and Subscription fields following recommended patters in GraphQL CRUD.
The plugin also creates your CRUD resolvers that can be used with your GraphQL schema.
This is the default plugin used by Graphback, so you do not need to install it to your GraphQL API.
SchemaCRUDPlugin allows you to write your generated schema to a
.graphql file, so if you want to avail of this feature you will need to install the plugin.
Installing with npm:
SchemaCRUDPlugin will not generate any schema file, instead creating an in-memory schema. You might sometimes need the schema file for compatibility with other libraries or frameworks, so Graphback allows you to automate the persistence of the schema to a file in your project:
You can also specify the directory of the schema:
Graphback will create a file called
Extending schema using other plugins
You can extend
SchemaCRUDPlugin if you want to alter the customise the schema or resolver generation.