Skip to content

Commit ce1e1aa

Browse files
refactor: use Kind enum to filter ast defs
1 parent 58f4377 commit ce1e1aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export function topologicalSortAST(schema: GraphQLSchema, ast: DocumentNode): Do
130130

131131
// SCHEMA_DEFINITION does not have a name.
132132
// https://spec.graphql.org/October2021/#sec-Schema
133-
const astDefinitions = ast.definitions.filter(def => def.kind !== 'SchemaDefinition');
133+
const astDefinitions = ast.definitions.filter(def => def.kind !== Kind.SCHEMA_DEFINITION);
134134

135135
astDefinitions.forEach((definition) => {
136136
if (hasNameField(definition) && definition.name)

0 commit comments

Comments
 (0)