Adding content to 105-execution

content/graphql
syedmouaazfarrukh 2 years ago
parent 1ca0afbed9
commit e3a6fda3c7
  1. 13
      src/roadmaps/graphql/content/105-execution/100-root-fields.md
  2. 11
      src/roadmaps/graphql/content/105-execution/102-validation.md
  3. 15
      src/roadmaps/graphql/content/105-execution/103-producing-the-result.md
  4. 9
      src/roadmaps/graphql/content/105-execution/index.md

@ -1 +1,12 @@
# Root fields
# Root Fields
In GraphQL, the root fields are the top-level fields that are available to clients in a query or mutation. They are defined in the schema and are the entry point for client requests. The root fields represent the operations that can be performed on the data, such as querying for data or modifying data.
There are two types of root fields in GraphQL:
- **Query:** defines the fields that can be queried to retrieve data from the server.
- **Mutation:** defines the fields that can be used to create, update, or delete data on the server.
Learn more from the following links:
- [Get Started with Root Feilds](https://graphql.org/learn/execution/#root-fields-resolvers)

@ -1 +1,10 @@
# Validation
# Validation
In GraphQL, validation refers to the process of ensuring that a query or mutation adheres to the rules defined in the schema. This includes verifying that the query or mutation only accesses fields and types that are defined in the schema, and that the input values for fields are of the correct type and within the specified constraints.
GraphQL servers perform validation on all incoming queries and mutations to ensure that they are valid before executing them. If a query or mutation is invalid, the server will return an error, indicating which parts of the query or mutation are invalid and why.
Learn more from the following links:
- [Get Started with Validation in GraphQL](https://graphql.org/learn/validation/)
- [Validation in GraphQL](https://www.youtube.com/watch?v=cCBFY1yShUA)

@ -1 +1,14 @@
# Producing the result
# Producing The Result
In GraphQL, producing the result refers to the process of generating the final response to a query or mutation. This includes executing the resolvers for the selected fields, gathering the data, and formatting the response according to the requirements of the query or mutation.
When a client sends a query or mutation to a GraphQL server, the server performs several steps to produce the result:
Parsing: The query or mutation is parsed and converted into an abstract syntax tree (AST)
Validation: The query or mutation is validated against the schema to ensure that it is well-formed and adheres to the schema definition.
Execution: The resolvers for the selected fields are executed, and the data is retrieved from the data source.
Formatting: The data is formatted and organized into the final response, according to the requirements of the query or mutation.
Learn more from the following links:
- [Get Started with GraphQL](https://graphql.org/learn/)

@ -1 +1,8 @@
# Execution
# Execution
In GraphQL, execution refers to the process of executing a query or mutation and returning the result to the client. The execution process includes several steps such as parsing, validation, and data retrieval, that are performed by the GraphQL engine to produce the final response to the client.
Learn more from the following links:
- [Get Started with Execution in GraphQL](https://graphql.org/learn/execution/)
- [Intro to Execution](https://graphql.org/graphql-js/execution/)
Loading…
Cancel
Save