Graphql is a query language for APIs and a runtime for fulfilling those queries with your existing data. Graphql provides a complete and understandable description of your data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enable powerful developer tools. At its core, GraphQL enables declarative data fetching. Instead of multiple endpoints that return fixed data structures, a GraphQL server only exposes a single endpoint and responds precisely with the data a client asked for.
At the core of every GraphQL API, there is a GraphQL schema. Graphql schemas are usually written in Schema Definition Language. Every GraphQl schema has three special root types:
- Query
- Mutation
- Subscription