diff --git a/v2/pkg/engine/plan/schemausageinfo_test.go b/v2/pkg/engine/plan/schemausageinfo_test.go index 624ff7d0d..cd612054f 100644 --- a/v2/pkg/engine/plan/schemausageinfo_test.go +++ b/v2/pkg/engine/plan/schemausageinfo_test.go @@ -33,6 +33,18 @@ func TestGetSchemaUsageInfo(t *testing.T) { Item: &resolve.Object{ Nullable: true, Fields: []*resolve.Field{ + { + Name: []byte("__typename"), + Value: &resolve.String{ + Path: []string{"__typename"}, + Nullable: false, + }, + Info: &resolve.FieldInfo{ + Name: "__typename", + ParentTypeNames: []string{"Human", "Droid"}, + Source: source, + }, + }, { Name: []byte("name"), Value: &resolve.String{ @@ -85,6 +97,14 @@ func TestGetSchemaUsageInfo(t *testing.T) { IDs: []string{"https://swapi.dev/api"}, }, }, + { + Path: []string{"searchResults", "__typename"}, + TypeNames: []string{"Human", "Droid"}, + FieldName: "__typename", + Source: TypeFieldSource{ + IDs: []string{"https://swapi.dev/api"}, + }, + }, { Path: []string{"searchResults", "name"}, TypeNames: []string{"Human", "Droid"},