Graphback CRUD Client plugin
Graphback client plugin allows users to generate client-side queries based on the model and CRUD settings. Developers can embed generated queries into their client-side applications. Generated queries are compatible with all major GraphQL plugins like Apollo and URQL.
Client-side queries can be consumed inside any application. When using any GraphQL Clients queries can be compiled and passed to the client methods. For example:
Plugin allows to create files in many formats to suit the needs of your application. The client documents for graphql format are generated in a single file and this should be used by generators, like; GraphQL Code Generator Apollo Generator
You can also generate the client documents in typescript for direct use if you are not using a generator
Example plugin configuration in YAML:
Note: Plugin require
crudconfiguration specified as part of the
How it works
Graphback asks whether you want to generate client-side queries in the
graphback config command. Answering 'yes' will setup client generator plugin in your config.
For a data model having
graphback generate will generate queries and mutations that are enabled in crud config section.