File tree Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Expand file tree Collapse file tree 2 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -36,25 +36,4 @@ enum ComponentType {
36
36
case type
37
37
case types
38
38
case union
39
-
40
- /// An index used to sort components into the correct schema build order. This order goes
41
- /// from "least other type references" to "most". By building in this order we are able to satisfy
42
- /// hard ordering requirements (interfaces MUST be built before inheriting types), as well as
43
- /// reduce unnecessary TypeReferences.
44
- var buildOrder : Int {
45
- switch self {
46
- case . none: return 0
47
- case . scalar: return 1
48
- case . enum: return 2
49
- case . interface: return 3
50
- case . input: return 4
51
- case . connection: return 5
52
- case . type: return 6
53
- case . types: return 7
54
- case . union: return 8
55
- case . query: return 9
56
- case . mutation: return 10
57
- case . subscription: return 11
58
- }
59
- }
60
39
}
Original file line number Diff line number Diff line change @@ -12,16 +12,8 @@ public final class Schema<Resolver, Context> {
12
12
let typeProvider = SchemaTypeProvider ( )
13
13
typeProvider. federatedSDL = federatedSDL
14
14
15
- // Collect types mappings first
16
15
for component in components {
17
16
try component. setGraphQLName ( typeProvider: typeProvider)
18
- }
19
-
20
- // Order component by componentType build order
21
- let sortedComponents = components. sorted {
22
- $0. componentType. buildOrder <= $1. componentType. buildOrder
23
- }
24
- for component in sortedComponents {
25
17
try component. update ( typeProvider: typeProvider, coders: coders)
26
18
}
27
19
You can’t perform that action at this time.
0 commit comments