The Wix GraphQL API exposes Wix REST APIs as a single unified GraphQL schema, allowing you to query and mutate data from the Wix Platform with all the benefits of GraphQL.
🐣 New to GraphQL? Check out the GraphQL Documentation to learn more.
The Wix SDK allows you to consume the Wix GraphQL API easily, with built-in support for authentication, type inference and more.
📚 For the full documentation and API reference for the Wix GraphQL API, visit the Wix GraphQL API Documentation.
An initialized WixClient
exposes a graphql
function that can be used to query and mutate data from the Wix GraphQL API. The graphql
function accepts a GraphQL query or mutation and returns a Promise
that resolves to the result of the query or mutation.
1
The graphql
function also supports type inference for the result and variables of a GrahphQL query. If you are using a solution for type inference in your project (such as GraphQL Code Generator) you can pass the inferred types to the graphql
function and it will use them to type the result and variables of the query.
1