Rapid development with GraphQL

GraphQL is a query language created by Facebook in 2012 and it is intended to provide an alternative to conventional REST API architecture. It uses a query language that describes how to request data (called a Schema) and what the expected returns should include. The core difference is that GraphQL is designed to have one endpoint per page, instead of one for each microservice. This reduces complexity and development effort tremendously. Most of the business logic has been abstracted away into the GraphQL layer and the client only needs to worry about how to display the data.

GraphQL has many benefits over the traditional REST APIs. One of the key advantages is that clients are able to describe precisely what they expect from the server and to access the data in a consistent manner. Only data that is requested, will be returned, saving loading time.

Another big benefit, as already mentioned above, is the ability to retrieve many resources in a single request and the GraphQL server will return a JSON string, containing all the data necessary to render the screen. GO1's GraphQL endpoint enables the rapid-development of integrations.

For further information please refer to the below resources.

API Reference:

The Apollo Playground and API Reference for the GraphQL server can be found here:

https://api.go1.com/v2/graphql/query

To see the Schema, please add enter the following into the tab "HTTP HEADERS" in the bottom left corner.

(Information on how to retrieve an access token can be found here)

{ 
  "Authorization": "Bearer {{OAUTH_ACCESS_TOKEN}}" 
}  

Available queries in Go1's GraphQL Endpoint:
  • discover() supports the display of learning recommendations by categories and topics. It is commonly used to display as a landing page providing an overview and entry point to browse the content offering.
  • search() provides a way to search and browse the content of the portal. It returns a list of learning objects and their metadata as well as available filtering and sorting options.

Further reading: