[Note]GraphQL – Quick Guide (tutorialspoint.com) This chapter discusses the different GraphQL components and how they communicate with each other. The entire application component can be distinguished as follows:

  • Server-side component
  • Client-side components

Server component

The GraphQL server forms the core component on the server side and allows the parsing of queries from the GraphQL client application. Apollo Server is the most commonly used GraphQL specification implementation. Other server programming components include the following:

The serial number Server highlights and descriptions
1 Schema
The GraphQL schema is central to any GraphQL server implementation and describes the functionality available to clients connected to it.
2 Query
GraphQL queries are client application requests that retrieve data from a database or legacy API.
3 Resolver
The parser provides instructions to convert GraphQL operations into data. They parse the query into data by defining parser functions.

Client component

Here are the client components:

The serial number Tools and Description
1 GraphiQL
Browser-based interface for editing and testing.
2 ApolloClient
The best tool for building GraphQL client applications.

Graphiql is a browser-based interface for editing and testing GraphQL queries and changes. 2ApolloClient is the best tool for building GraphQL client applications. Integrates well with all javascript front ends.

The following figure showsClient-server architecture. The Web server is built on top of the NodeJs and Express frameworks. The ReactJS application (built using the Apollo client library) or the GraphiQL browser application makes a request to the Apollo GraphQL server. The query is parsed and validated against the schema defined in the server. If the request pattern is validated, the associated parser function is executed. The parser will contain code to get data from the API or database.