Introduction to GraphQL
Where else is GraphQL used? Facebook, GitHub
GraphQL on the other hand usually has one endpoint, always
POST. The magic is in the query passed in the post data.
Assume the following:
"name": "Happy University"
A couple things:
- The query to a single endpoint, via
- The response is JSON
- The response structure matches the query
What's more is, GraphQL schemas enforce a structured, typed API, and provides instrumentation. This can best be put into example by seeing GraphiQL - a client for graphql - with the query above:
- Query: Usually reading
- Mutation: Usually create, updating or deleting