Introduction
The GraphQL data provider enables you to build Refine applications with GraphQL APIs. It uses urql as the GraphQL client and provides full support for queries, mutations, and subscriptions.Installation
Install the GraphQL data provider and required dependencies:Basic Usage
Client Configuration
You can configure the GraphQL client with custom options:Operations
Get List
Fetch a list of records with filtering and sorting:Get One
Fetch a single record by ID:Get Many
Fetch multiple records by their IDs:Create
Create a new record using a mutation:Update
Update an existing record:Delete
Delete a record:Live Provider
The GraphQL data provider supports real-time subscriptions using GraphQL subscriptions:Authentication
Add authentication headers to your GraphQL client:Error Handling
The GraphQL data provider handles GraphQL errors automatically:Complete Example
Next Steps
Data Providers Overview
Learn about other data providers
Hasura Provider
Use GraphQL with Hasura