GraphQL is a query language for your API, and a server-side runtime for executing queries using a type system you define for your data. GraphQL isn't tied to any specific database or storage engine and is instead backed by your existing code and data.
GraphQL solves several problems commonly faced when building APIs, including:
@ -9,8 +9,3 @@ GraphQL solves several problems commonly faced when building APIs, including:
- **Inefficient versioning:** With REST, creating a new endpoint for each version of an API can quickly become cumbersome and hard to maintain. GraphQL allows for seamless versioning by adding new fields and types, rather than creating new endpoints.
- **Lack of flexibility:** REST APIs are typically fixed, meaning that the client has to work with the data structure provided by the API. GraphQL allows the client to request exactly the data it needs and receive it in a predictable format, increasing flexibility.
"Thinking in Graphs" is a mindset or approach when working with GraphQL. It refers to the way that data is organized and queried in GraphQL, which is based on the concept of a graph.
@ -8,5 +8,4 @@ The GraphQL server is responsible for handling the incoming queries and mutation
Learn more from the following links:
- [GraphQL Codegen adds a new Java Backend plugin](https://medium.com/the-guild/graphql-codegen-adds-a-new-apollo-android-and-a-new-java-backend-plugins-57832b024e7b)
- [How to use GraphQL to build Backend?](https://blog.bitsrc.io/how-to-use-graphql-to-build-backend-for-frontends-bffs-4b7e5a0105d0)
- [How to use GraphQL in Backend?](https://www.howtographql.com/)
@ -5,5 +5,3 @@ In GraphQL, it is possible to perform multiple mutations in a single query by in
Learn more from the following links:
- [Guide to Multiple fields in mutations](https://graphql.org/learn/queries/#multiple-fields-in-mutations)
- [Multiple fields in mutations](https://dgraph.io/docs/graphql/mutations/mutations-overview/)
- [Multiple mutations in a single GraphQL request](https://www.ibm.com/docs/en/filenet-p8-platform/5.5.x?topic=mutations-multiple-in-single-graphql-request)
Event-based subscriptions in GraphQL are a way to push real-time updates to the client based on specific events that occur on the server. These events can be triggered by external sources such as user actions, sensor data, or other systems, or by internal actions such as database updates.
With event-based subscriptions, the client can subscribe to a specific event or set of events and receive updates in real-time as soon as the event occurs. This allows the client to receive notifications about important changes in the system without the need to constantly poll the server for updates.
Learn more from the following links:
- [Event-stream based GraphQL Subscriptions](https://gist.github.com/OlegIlyenko/a5a9ab1b000ba0b5b1ad)
In GraphQL, a resolver is a function that is responsible for fetching the data for a field in a query or mutation. Resolvers are defined in the schema and are executed by the GraphQL server when a query or mutation is received.
A synchronous resolver is a type of resolver that runs and completes its execution before returning any value. It directly returns the result of the computation, without waiting for any external event such as a database query or a third-party API call.
Learn more from the following links:
- [Get Started with Synchronous](https://graphql.org/learn/asynchronous/)
@ -7,8 +7,3 @@ There are several ways to implement batching in GraphQL:
- Using a batching library: This approach involves using a library such as apollo-link-batch-http, which provides a way to batch multiple queries or mutations into a single request.
- Using a middleware: This approach involves using a middleware such as graphql-batch, which allows you to batch multiple queries or mutations into a single request.
- Using a serverless function: This approach involves using a serverless function such as AWS Lambda, which allows you to batch multiple queries or mutations into a single request.
To learn more, visit the following links:
- [Guide to Batching Client GraphQL](https://www.apollographql.com/blog/apollo-client/performance/batching-client-graphql-queries/)
URQL is a highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow. It's built to be both easy to use for newcomers to GraphQL, and extensible, to grow to support dynamic single-app applications and highly customized GraphQL infrastructure.
Mercurius is an open-source library for building real-time GraphQL servers in Node.js. It provides a simple and flexible way to build GraphQL servers by providing a set of tools and features for handling real-time subscriptions.
One of the key features of Mercurius is that it is built on top of the popular WebSockets protocol and it allows the client to subscribe to real-time updates from the server. It also supports batching and caching of queries and mutations, which allows for efficient and fast data transfer between the client and server.
Learn more from the following links:
- [What Is Mercurious? - GraphQL Server](https://www.youtube.com/watch?v=9nd11l7KpFI)
- [Documentations of Mercurius](https://mercurius.dev/#/)