github.com/apipluspower/gqlgen@v0.15.2/graphql/handler/extension/introspection_test.go (about)

     1  package extension
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  
     7  	"github.com/apipluspower/gqlgen/graphql"
     8  	"github.com/stretchr/testify/require"
     9  )
    10  
    11  func TestIntrospection(t *testing.T) {
    12  	rc := &graphql.OperationContext{
    13  		DisableIntrospection: true,
    14  	}
    15  	require.Nil(t, Introspection{}.MutateOperationContext(context.Background(), rc))
    16  	require.Equal(t, false, rc.DisableIntrospection)
    17  }