The Wix GraphQL API

The Wix GraphQL API streamlines access to a Wix site’s data through GraphQL, a query language that allows the combination of multiple queries or mutations into a single request. Queries and mutations are read and write operations that allow for targeted data retrieval and modification within objects, without the need to handle the entire object.

The GraphQL API is exposed over REST and can be used in the same applications as our REST API, for querying and modifying the same data.

To use the Wix GraphQL API, simply call our REST API’s GraphQL endpoint with your GraphQL query details in the request body.

To get started, see the Wix GraphQL API reference.

Advantages of using the Wix GraphQL API

Use the Wix GraphQL API if you have complex query requirements or want to retrieve only specific data from larger objects. In these situations, using GraphQL can improve application performance, reduce server response times, and simplify your code.

Authentication and permissions

The simplest way to authenticate your app's Wix GraphQL API calls is by implementing Wix's OAuth solution.

To use Wix APIs, site owners must grant you explicit permission to access their data. They do this when they install your app on their site. Therefore, you must provide a list of permissions you need from the site owner on the Permissions page in the Wix Dev Center. You can see which permissions each endpoint requires in its Permissions Scopes section in the REST API reference.

Read more about permissions.

Events

To handle events in your app, consider implementing webhooks using the REST API.

Service plugins

To integrate service plugins (formerly SPIs) into your app, you need to implement REST endpoints. For more information, see Service Provider Interfaces.

Was this helpful?
Yes
No