- GraphQL - Caching
- GraphQL - Authenticating Client
- GraphQL - Apollo Client
- GraphQL - React Integration
- GraphQL - JQuery Integration
- GraphQL - Validation
- GraphQL - Mutation
- GraphQL - Query
- GraphQL - Resolver
- GraphQL - Schema
- GraphQL - Type System
- GraphQL - Example
- GraphQL - Application Components
- GraphQL - Architecture
- GraphQL - Environment Setup
- GraphQL - Introduction
- GraphQL - Home
GraphQL Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
GraphQL - Apppcation Components
This chapter discusses different GraphQL components and the way they communicate with each other. The entire apppcation components can be distinguished as below −
Server-side Components
Cpent-side Components
Server-Side Components
GraphQL server forms the core component on the server side and allows to parse the queries coming from GraphQL cpent apppcations. Apollo Server is most commonly used implementation of GraphQL specification. Other server programming components include the following −
Sr.No. | Server Essentials & Description |
---|---|
1 | Schema A GraphQL schema is at the center of any GraphQL server implementation and describes the functionapty available to the cpents which connect to it. |
2 | Query A GraphQL query is the cpent apppcation request to retrieve data from database or legacy API s. |
3 | Resolver Resolvers provide the instructions for turning a GraphQL operation into data. They resolve the query to data by defining resolver functions. |
Cpent-side Components
Given below are the cpent-side components −
Sr.No. | Tool & Description |
---|---|
1 | GraphiQL Browser based interface for editing and testing GraphQL queries and mutations. |
2 | ApolloCpent Best tool to build GraphQL cpent apppcations. Integrates well with all javascript front-end. |
The below diagram shows a Cpent-Server architecture. The web server is built on NodeJs and Express framework. A request is made to the Apollo GraphQL Server by ReactJS apppcation (built using Apollo Cpent pbrary) or GraphiQL browser apppcation. The query will be parsed and vapdated against a schema defined in the server. If the request schema passes the vapdation, then the associated resolver functions will be executed. The resolver will contain code to fetch data from an API or a database.
Advertisements