Graphback can generate source code, migrate your database or start fully functional server basing just on your GraphQL Model. Graphback Config allows you to control and configure all those use cases for your own needs.
The Core of Graphback will take your GraphQL Schema types annotated by
model and perform various operations on them like:
- Code generation
- Database migrations
- InMemory GraphQL API.
All those operations could be controlled by
crud flags that enable or disable various data access methods in plugins and runtime.
Graphback allows you to customize all processes by using the open configuration standard GraphQL Config.
Each project needs to have a
.graphqlrc.yml file available in the root folder. In new projects this will be added for you. For existing projects you can run
graphback config to generate one for you - see Adding to existing project.
Typical configuration looks like this:
crud flags and running
graphback generate will update the
resolvers using the latest 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 CRUD configuration per type
Generator config applies the config to all the types in your schema. Graphback allows you to change these for any single type using annotations.
or to enable it:
All config options can be added to 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 values in
Graphback can migrate your database structure using your GraphQL schema.
Note: Full database migration support is currently only supported for PostgreSQL databases. See Database Compatibility.