Skip to content

Commit 8b9a38a

Browse files
refactor: IntrospectionTypes are actual types
1 parent 3e5a81e commit 8b9a38a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Sources/GraphQL/Type/Introspection.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -496,17 +496,17 @@ let TypeNameMetaFieldDef = GraphQLFieldDefinition(
496496
}
497497
)
498498

499-
let introspectionTypeNames = [
500-
__Schema.name,
501-
__Directive.name,
502-
__DirectiveLocation.name,
503-
__Type.name,
504-
__Field.name,
505-
__InputValue.name,
506-
__EnumValue.name,
507-
__TypeKind.name,
499+
let introspectionTypes: [GraphQLNamedType] = [
500+
__Schema,
501+
__Directive,
502+
__DirectiveLocation,
503+
__Type,
504+
__Field,
505+
__InputValue,
506+
__EnumValue,
507+
__TypeKind,
508508
]
509509

510510
func isIntrospectionType(type: GraphQLNamedType) -> Bool {
511-
return introspectionTypeNames.contains(type.name)
511+
return introspectionTypes.map { $0.name }.contains(type.name)
512512
}

0 commit comments

Comments
 (0)