Use GraphQL protocol

Overview

Out-of-the-box implementation of GraphQL protocol is available as of Sitefinity CMS version 14.2.  
The GraphQL protocol is integrated with the existing user interface for managing RESTful API services in Sitefinity CMS.

Install the GraphQL NuGet package

GraphQL is not included in the default installation of Sitefinity CMS. It is distributed as an optional package, which implements the integration. To enable and set up GraphQL, perform the following:

  1. Download Progress.Sitefinity.GraphQL NuGet package from Sitefinity CMS NuGet packages repository.
    The NuGet package is in prerelease state, so make sure that you filter by prerelease packages.
  2. Install the package in your Sitefinity CMS project.
  3. Build and run your project.

Create a GraphQL web service

You must create a new web service by following procedure Create a RESTful API service.

Browse the GraphQL web service

After creating a web service, you can browse the schema of the Sitefinity GraphQL service (api/{urlofservice}/graphql) using third-party tools like:

  • GraphiQL explorer
  • Postman

For information about using GraphiQL explorer, see GraphiQL explorer example on GitHub.
For information about using Postman, see Postman documentation » Querying with GraphQL.

NOTE: When using third-party tools that have a web interface, make sure to set the Allow access from other domains property of the web service (enables CORS). 

Limitations

The GraphQL protocol implementation in Sitefinity CMS only supports queries. Mutations are currently not supported.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?