GraphQL : Postman
What is GraphQL ?
It is a query language for API
SOAP :XML
RESTful:JSON
GraphQL:JSON
Each address represent resource in case of SOAP API
/users/john
it will return all details associated with this resource
Incase of RESTful api it is focused on resource based so very type of data to extract we can use different request.
/users/john/address
/users/john/bankaccount
GraphQL :Query based approach to fetch data only one request needed to fetch needed data .
Example :
query {
cars {
id
make
model
year
}
}
The query is requesting information about cars.
Within the cars field, the query is asking for the id, make, model, and year of each car
Comments
Post a Comment