Skip to content

Commit

Permalink
Merge pull request #1451 from sanjeevchopra/patch-1
Browse files Browse the repository at this point in the history
doc only change: updated sample code for disabling introspection
  • Loading branch information
mtibben authored Jul 29, 2021
2 parents 0119743 + 0e9d9c3 commit 9a214e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/content/reference/introspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Introspection can also be enabled on a per-request context basis. For example, y
srv := handler.NewDefaultServer(es)
srv.AroundOperations(func(ctx context.Context, next graphql.OperationHandler) graphql.ResponseHandler {
if !userForContext(ctx).IsAdmin {
graphql.GetOperationContext(ctx).DisableIntrospection = true
graphql.GetRequestContext(ctx).DisableIntrospection = true
}

return next(ctx)
Expand Down

0 comments on commit 9a214e8

Please sign in to comment.