Skip to content

Commit

Permalink
Clarify AddHttpRequestInterceptor usage (#2811)
Browse files Browse the repository at this point in the history
  • Loading branch information
tunurgitr authored Jan 4, 2021
1 parent 013e7e2 commit 3bdb132
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ services.AddQueryRequestInterceptor(
**New:**

```csharp
services.AddHttpRequestInterceptor(
services.AddGraphQLServer()
...
.AddHttpRequestInterceptor(
(context, executor, builder, ct) =>
{
// your code
Expand All @@ -127,7 +129,9 @@ services.AddHttpRequestInterceptor(
You can also extend `DefaultHttpRequestInterceptor` and inject it like the following.

```csharp
services.AddHttpRequestInterceptor<MyCustomExecutor>();
services.AddGraphQLServer()
...
.AddHttpRequestInterceptor<MyCustomExecutor>();
```

> A request interceptor is a service that is used by all hosted schemas.
Expand Down

0 comments on commit 3bdb132

Please sign in to comment.