...

Source file src/github.com/99designs/gqlgen/graphql/context_root_field_test.go

Documentation: github.com/99designs/gqlgen/graphql

     1  package graphql
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/require"
     8  )
     9  
    10  func TestGetRootFieldContext(t *testing.T) {
    11  	require.Nil(t, GetRootFieldContext(context.Background()))
    12  
    13  	rc := &RootFieldContext{}
    14  	require.Equal(t, rc, GetRootFieldContext(WithRootFieldContext(context.Background(), rc)))
    15  }
    16  

View as plain text