GraphQL
GraphQL
GraphQL takes the ideas that were originally developed to query databases and applies them to the internet. A single GraphQL query can return connected data. Like SQL, you can use GraphQL queries to change or remove data.

Query Queries are how we ask the GraphQL server for data. Think of Query as analogous to GET requests in REST. Queries are strings that are sent on the body of an HTTP POST request. Note that all GraphQL types are sent on a POST request. The type of operation is actually determined by the GraphQL type we are sending on the body of the request.
Mutation Mutation is the second kind of “root type” which lets us write data to the DB. Think of Mutation as analogous to POST and PUT requests of REST.
Subscription The third type of operation available in GraphQL is Subscription. A subscription gives the client the ability to listen to real-time updates on data. Subscriptions use web sockets under the hood.
typeDef is an object that defines the list of types available. Type definitions define the “shape” of your data and specify which ways the data can be fetched from the GraphQL server.
A resolver is a function that returns data for a particular field. Resolver functions return data in the type and shape specified by the schema. Resolvers can be asynchronous and can fetch or update data from a REST API, database, or any other service.