Graphback takes input model and generates CRUD operations as queries and mutations.
findAll. These operations can be generated for each
type in your model.
Further Graphback also generates three predefined subscriptions, namely
We can use them in clients to receive live updates for every change that is happening on the server.
Graphback allows the user to customize the generation process by using
Graphback uses flags to allow user to choose between the CRUD operations and subscriptions. These are present in
graphback.json, created by
config command or by graphql-cli,
in the root of your project folder under the
generation key. The default config is
Changing these flags and performing
generate, regenerates your
resolvers with provided config.
Note: For subscriptions, the user needs to change the value of the respective operations to
true. For example, changing
truewon't work unless,
Changing configuration for the type
Generator config applies the config to all the types in your schema.
Graphback allows you to change these for any single type using
All config options can be replicated by specifying the
You can use these annotations to have more control over individual elements. For example:
will create the
delete mutation for
Note: Annotations override the configuration flags to
User can use this directive to disable CRUD operation generation for that type. Applying this directive will not create any
Subscription for that type.