Skip to content

Commit 91eb501

Browse files
refactor: Add types before operations
This is an execution no-op but allows SDL printing to order correctly.
1 parent a14329e commit 91eb501

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/GraphQL/Type/Schema.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ public final class GraphQLSchema {
7373
// Build type map now to detect any errors within this schema.
7474
var initialTypes: [GraphQLNamedType] = []
7575

76+
if !types.isEmpty {
77+
initialTypes.append(contentsOf: types)
78+
}
79+
7680
if let query = queryType {
7781
initialTypes.append(query)
7882
}
@@ -87,10 +91,6 @@ public final class GraphQLSchema {
8791

8892
initialTypes.append(__Schema)
8993

90-
if !types.isEmpty {
91-
initialTypes.append(contentsOf: types)
92-
}
93-
9494
var typeMap = TypeMap()
9595

9696
for type in initialTypes {

0 commit comments

Comments
 (0)