Skip to main content

Migrating from REST to GraphQL

Differences in API logic

Migrating from REST to GraphQL represents a significant shift in API logic. The differences between REST as a style and GraphQL as a specification make it difficult—and often undesirable—to replace REST API calls with GraphQL API queries on a one-to-one basis. We've included specific examples of migration below.

To migrate your code from the REST API to the GraphQL API:

Significant advantages of GraphQL include:

  • Getting the data you need and nothing more
  • Nested fields
  • Strong typing