Notepanel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
The Fraud Data API is developed using GraphQL technology. GraphQL is a new API standard that provides a more efficient, powerful and flexible alternative to REST (Representational State Transfer)*. |
Introduction
GraphQL is a data query language for APIs that can be used with any language and framework. It can be used anywhere a client communicates with an API and makes API communications more efficient. GraphQL was developed to meet the need for more flexibility and efficiency in client/server communications.
...
Retrieve data (via a “query”)
Add, update, or delete data (via a “mutation”)
Specify the exact data you want
GraphQL is a new API standard that provides a more efficient, powerful and flexible alternative to REST (Representational State Transfer)*.
*Courtesy of GraphQL EdEx Course
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Introduction to GraphQL APIThere are many resources available to help you learn GraphQL. In their documentation, you’ll find a series of articles that explain essential GraphQL concepts and how they work. They also have a Community page full of resources to reference and groups to join. For more practical guides, visit the How to GraphQL tutorial website. They also have a free online course with edX, Exploring GraphQL: A Query Language for APIs. |
GraphQL vs. REST API
Components of GraphQL:
Has a schema
Uses some different terms from REST (i.e. “mutation” to perform CRUD operations (i.e. POST in REST); “query” instead of GET, etc.)
Different approach from REST (more work is done on the server side instead of the front end)
REST has been the standard for designing web APIs for the last decade. It is:
Popular way for client’s to retrieve data using HTTP
Introduced ideas like stateless server and structured resource access
Has a strict specification for how servers will make data available, but in practice has been widely interpreted/implemented
GraphQL is organized in terms of schema and type system versus Rest API endpoints.
...