diff --git a/merge.go b/merge.go index 1f103073..edca49a4 100644 --- a/merge.go +++ b/merge.go @@ -59,7 +59,7 @@ func buildFieldURLMap(services ...*Service) FieldURLMap { result := FieldURLMap{} for _, rs := range services { for _, t := range rs.Schema.Types { - if t.Kind != ast.Object || isGraphQLBuiltinName(t.Name) || t.Name == serviceObjectName { + if !t.IsCompositeType() || isGraphQLBuiltinName(t.Name) || t.Name == serviceObjectName { continue } for _, f := range mergeableFields(t) { diff --git a/merge_test.go b/merge_test.go index 3d1743ae..2ec68db1 100644 --- a/merge_test.go +++ b/merge_test.go @@ -448,6 +448,7 @@ func TestBuildFieldURLMapSingleSchema(t *testing.T) { Location1: loc1, Expected: FieldURLMap{ "Query.gizmo": loc1, + "Named.name": loc1, "Gizmo.id": loc1, "Gizmo.name": loc1, }, @@ -496,6 +497,8 @@ func TestBuildFieldURLMapTwoSchemasNoBoundaryType(t *testing.T) { "Gizmo.name": loc1, "Gimmick.id": loc2, "Gimmick.size": loc2, + "Named.name": loc1, + "Sized.size": loc2, }, } fixture.Check(t) @@ -561,6 +564,9 @@ func TestBuildFieldURLMapTwoSchemasWithBoundaryType(t *testing.T) { "Query.gizmo": loc1, "Gizmo.name": loc1, "Gizmo.size": loc2, + "Named.name": loc1, + "Sized.size": loc2, + "Node.id": loc2, }, } fixture.Check(t)