💡what is graphql ?

firstly it's a query language for APIs. Unlike traditional REST APIs, GraphQL allows clients to request only the specific data they need, reducing over-fetching or under-fetching of information.

graphql

In GraphQL, we make fetch requests to a single endpoint [https://example.com/graphql],

which means that from a single endpoint, we can send requests and receive responses. Unlike REST APIs, which might require a unique endpoint for each function or resource

rest vs graphql

😄 Graphql language

Simple syntax of graphql :

checkout more about graphql syntax
Input
	{ getinfo{                             
       	 	name
    		id
  		}
	}
Output
{
  "data": {
    "getinfo": {
      "name": "noobie"
    }
  }
}

Last updated