filmov
tv
.NET GraphQL Server From Scratch | Part 3 | Defining our GraphQL Middleware

Показать описание
Defining our GraphQL Middleware
For our GraphQL server we are going to intercept all requests in the middleware layer. This removes the overhead of a traditional MVC application which isn't necessary considering all the heavy lifting is built into GraphQL.
We'll start by creating a new class to contain our middleware and will add an extension method on IApplicationBuilder that will provide a clean DSL for configuring it.
For our GraphQL server we are going to intercept all requests in the middleware layer. This removes the overhead of a traditional MVC application which isn't necessary considering all the heavy lifting is built into GraphQL.
We'll start by creating a new class to contain our middleware and will add an extension method on IApplicationBuilder that will provide a clean DSL for configuring it.