...
1 package extension
2
3 import (
4 "context"
5
6 "github.com/vektah/gqlparser/v2/gqlerror"
7
8 "github.com/99designs/gqlgen/graphql"
9 )
10
11
12 type Introspection struct{}
13
14 var _ interface {
15 graphql.OperationContextMutator
16 graphql.HandlerExtension
17 } = Introspection{}
18
19 func (c Introspection) ExtensionName() string {
20 return "Introspection"
21 }
22
23 func (c Introspection) Validate(schema graphql.ExecutableSchema) error {
24 return nil
25 }
26
27 func (c Introspection) MutateOperationContext(ctx context.Context, rc *graphql.OperationContext) *gqlerror.Error {
28 rc.DisableIntrospection = false
29 return nil
30 }
31
View as plain text