GraphQL
Use GraphQL when clients need to select fields, traverse model relationships, or subscribe to changes.
@webda/graphql generates its schema from the Webda model metadata and exposes queries, mutations, and subscriptions.
Enable GraphQL
Install @webda/graphql and configure Webda/GraphQLService with your endpoint URL.
Follow the module setup for the configuration and GraphiQL options.
Shape the API
- Schema generation explains how model metadata becomes GraphQL types.
- Queries and mutations covers reading and changing data.
- Subscriptions covers live updates.
For a complete example, follow the blog GraphQL tutorial.