GraphQL tooling

Introduction

Rémy THEROUX
iAdvize developers
2 min readDec 6, 2019

--

GraphQL APIs are pretty new in programming ecosystem. We mainly used to deal with REST APIs. At iAdvize we made the choice to move from REST to GraphQL so partners and developers must now use this new API.

We have choosen to move to GraphQL to simplify the way you can retrieve many resources. In a classic REST API you have to make many HTTP calls to retrieve all the resources you need. It could have been optimized by using include technic but it is limited. With GraphQL you can retrieve all the resources you need in a unique HTTP call and only the fields you need.

You can go further by following GraphQL official introduction

GraphiQL explorer

To ease the adoption we integrated GraphiQL, a client that lets you make requests to our API. This one has been augmented with GraphiQL Explorer that allows you to build request easily by navigating into our GraphQL schema. You can find these tools in our developers platform documentation page.

The GraphiQL explorer tool has been integrated to Graphiql and open sourced by Onegraph, big thanks to them.

You can see 3 parts in the screenshot:

  • Header one where you can add headers, don’t forget to set your API key and activate the header by clicking on the checkbox at left.
  • Explorer lists all resources and sub resources. You can build your query by clicking on each fields. It is very confortable as all parameters, links… are listed and you don’t have to write the query manually.
  • GraphiQL is divided in 2 parts itself. The left one represents the request query and the right one the response. In the example you can see usage of a query variable that lets you reuse same query in different contexts.

Voyager

In the header section you will find a link to the voyager tool. This tool has been open sourced by API Gurus, thanks a lot.

Voyager — Display GraphQL schema as a graph

It brings you a different view of our GraphQL possibilities. Here the links between resources are highlighted so you can easily understand how each resource interact each others.

I hope these tools will help you onboard on our GraphQL API, we are constantly improving our developers experience so don’t hesitate to make feedback.

Links to tools code source

GraphiQL Explorer — https://github.com/OneGraph/graphiql-explorer

GraphQL Voyager — https://github.com/APIs-guru/graphql-voyager

--

--