Skip to content

Commit

Permalink
Update request-customization.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jun 28, 2024
1 parent dc0f497 commit 2d04aeb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions website/src/pages/docs/features/request-customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ description: You can customize the request handling in GraphQL Yoga

# Request Customization

GraphQL Yoga uses specific request handling logic to handle incoming HTTP requests. For each type of
request, Yoga uses a specific parser to parse the incoming request and extract the GraphQL operation
For each type of request, GraphQL Yoga uses a specific parser to parse the incoming request and extract the GraphQL operation
from it. Then it applies some validation logic to the extracted object, then it passes it to the
GraphQL execution engine. Yoga follows GraphQL-over-HTTP standards for this validation and parsing
GraphQL execution engine. Yoga mostly follows GraphQL-over-HTTP standards for this validation and parsing
logic.
[See the compliance test results of GraphQL Yoga](https://github.com/graphql/graphql-http/blob/main/implementations/graphql-yoga/README.md)
[See the GraphQL-over-HTTP compliance test results of GraphQL Yoga](https://github.com/graphql/graphql-http/blob/main/implementations/graphql-yoga/README.md)

The parsers are expected to return `GraphQLParams` object that contains the following properties:

Expand Down Expand Up @@ -166,8 +165,8 @@ const useMyParser: Plugin = () => {
## Request Validation

Request validation is the process of validating the incoming request to ensure that it follows the
GraphQL-over-HTTP spec. Besides the required validation rules, Yoga applies some rules to ensure the
security and the performance of the server.
GraphQL-over-HTTP spec. Besides the required validation rules, Yoga applies some extra rules to ensure the
security and the performance of the server such as disallowing extra paramters in the request body. However, you can customize this kind of behaviors on your own risk.

### Extra Parameters in `GraphQLParams`

Expand Down

0 comments on commit 2d04aeb

Please sign in to comment.