Skip to main content

Contentful + GraphQL

Contentful is a CMS that provides a REST API and a GraphQL API on all plans of their service, including their free service.

Unlike a traditional GraphQL server where resolvers and schemas are written manually, Contentful is able to generate theirs at request time. This enables an always up to date schema that is aligned with content model changes made on the database.

To use Contentful's API and GraphQL follow these instructions.

However, this has its drawbacks. As Rapha is increasingly evaluating our online services as omnichannel there is the need to request data from multiple APIs, linking reference points from eCommerce API, with the CMS and the Rides App API. There needs to be a method of amalgamating all these data points into one consolodate request domain or URL.

There are two methods to do this with GraphQL:

  1. Federation
  2. Schema Stitching