GraphQL

We use GraphQL for our API. For the un-initiated we think it's the greatest thing since sliced bread! No, no, we don't, we are not zealots, but we do enjoy working with GraphQL.

Below is a quick refresher for anyone unfamiliar with it.

Interacting with GraphQL

The Routefusion API is a GraphQL api. GraphQL is a standard for communication over HTTP. If you would like to learn more about GraphQL here is a good place to start 😄

Communicating with our API is as simple as any other HTTP request. GraphQL has standardized a few things so you do not need to think about them.

  1. Request methods are always POST requests
  2. The URL is always /graphql
  3. Requests always take a JSON body
  4. Queries fetch data
  5. Mutations create, or change, data

GraphQL playground

One of the things we love about GraphQL is it gives you an amazing "playground" to test queries in and engage real time with the API.

To access and play around 😉, go to the link below and add the HTTP header { "Authorization": "Bearer <your token>" } to the HTTP HEADERS section located on the bottom left of the playground.

Routefusion GraphQL Playground