What is GraphQl?

Order What You Want: Imagine you’re at a restaurant. With GraphQL, you can order exactly what you want from the menu, and you get just that. You don’t get a whole meal if you only wanted a drink.

Hope you get what I am trying to say. So basically Grap…


This content originally appeared on DEV Community and was authored by Muhammad Sameer

Order What You Want: Imagine you’re at a restaurant. With GraphQL, you can order exactly what you want from the menu, and you get just that. You don’t get a whole meal if you only wanted a drink.

Hope you get what I am trying to say. So basically GraphQl is a query Lanuage for API. GraphQL provides a complete and understandable description of the 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 enables powerful developer tools.

https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j8k5pvt5kczmxwzdbweg.png

Graphql is often confused with being a database. This is a mis conceptuation Graphql is just a query language for APIs

Benifits of Using Graphql over REST API

1. Precise Data Fetching:
You can request exactly the data you need and nothing more. This reduces the amount of data transferred over the network, making your app faster and more efficient.

2. Single Endpoint:
GraphQL uses a single endpoint to handle all types of queries, mutations, and subscriptions, simplifying the API structure and reducing complexity.

3. Nested and Related Data:
You can fetch related data in a single request, avoiding the need for multiple API calls. This is particularly useful for complex applications with interconnected data.

4. Real-time Data:
GraphQL supports subscriptions, allowing clients to receive real-time updates when data changes. This is useful for applications that need to display live data, such as chat apps or live sports scores.


This content originally appeared on DEV Community and was authored by Muhammad Sameer


Print Share Comment Cite Upload Translate Updates
APA

Muhammad Sameer | Sciencx (2024-06-25T12:16:58+00:00) What is GraphQl?. Retrieved from https://www.scien.cx/2024/06/25/what-is-graphql-6/

MLA
" » What is GraphQl?." Muhammad Sameer | Sciencx - Tuesday June 25, 2024, https://www.scien.cx/2024/06/25/what-is-graphql-6/
HARVARD
Muhammad Sameer | Sciencx Tuesday June 25, 2024 » What is GraphQl?., viewed ,<https://www.scien.cx/2024/06/25/what-is-graphql-6/>
VANCOUVER
Muhammad Sameer | Sciencx - » What is GraphQl?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/25/what-is-graphql-6/
CHICAGO
" » What is GraphQl?." Muhammad Sameer | Sciencx - Accessed . https://www.scien.cx/2024/06/25/what-is-graphql-6/
IEEE
" » What is GraphQl?." Muhammad Sameer | Sciencx [Online]. Available: https://www.scien.cx/2024/06/25/what-is-graphql-6/. [Accessed: ]
rf:citation
» What is GraphQl? | Muhammad Sameer | Sciencx | https://www.scien.cx/2024/06/25/what-is-graphql-6/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.