Skip to content

Commit 8270ca3

Browse files
authored
Servers must preserve lexical ordering between SDL and introspection
graphql#577 (comment)
1 parent 8ac091a commit 8270ca3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

spec/Section 4 -- Introspection.md

+17
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ would return
5656
}
5757
```
5858

59+
5960
## Reserved Names
6061

6162
Types and fields required by the GraphQL introspection system that are used in
@@ -99,6 +100,22 @@ identify which actual type of the possible types has been returned.
99100
This field is implicit and does not appear in the fields list in any defined type.
100101

101102

103+
## Ordering
104+
105+
Servers must preserve lexical ordering between SDL and introspection.
106+
107+
For the given SDL:
108+
109+
```graphql
110+
type MyType {
111+
field1(arg1: String, arg2: Int): Boolean
112+
field2: Boolean
113+
}
114+
```
115+
116+
The introspection result must produce an ordered array of fields `[field1, field2]` for `MyType`
117+
and an ordered array of arguments `[arg1, arg2]` for `MyType.field1.
118+
102119
## Schema Introspection
103120

104121
The schema introspection system is accessible from the meta-fields `__schema`

0 commit comments

Comments
 (0)