Skip to content

Commit f86b602

Browse files
committed
Keep order of definitions consistent with the spec
See graphql/graphql-spec#1037 (comment)
1 parent b0f467d commit f86b602

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/type/introspection.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ export const __Directive: GraphQLObjectType = new GraphQLObjectType({
9191
type: GraphQLString,
9292
resolve: (directive) => directive.description,
9393
},
94-
isRepeatable: {
95-
type: new GraphQLNonNull(GraphQLBoolean),
96-
resolve: (directive) => directive.isRepeatable,
97-
},
9894
locations: {
9995
type: new GraphQLNonNull(
10096
new GraphQLList(new GraphQLNonNull(__DirectiveLocation)),
@@ -117,6 +113,10 @@ export const __Directive: GraphQLObjectType = new GraphQLObjectType({
117113
: field.args.filter((arg) => arg.deprecationReason == null);
118114
},
119115
},
116+
isRepeatable: {
117+
type: new GraphQLNonNull(GraphQLBoolean),
118+
resolve: (directive) => directive.isRepeatable,
119+
},
120120
}) as GraphQLFieldConfigMap<GraphQLDirective, unknown>,
121121
});
122122

@@ -257,11 +257,6 @@ export const __Type: GraphQLObjectType = new GraphQLObjectType({
257257
/* c8 ignore next */
258258
'description' in type ? type.description : undefined,
259259
},
260-
specifiedByURL: {
261-
type: GraphQLString,
262-
resolve: (obj) =>
263-
'specifiedByURL' in obj ? obj.specifiedByURL : undefined,
264-
},
265260
fields: {
266261
type: new GraphQLList(new GraphQLNonNull(__Field)),
267262
args: {
@@ -333,6 +328,11 @@ export const __Type: GraphQLObjectType = new GraphQLObjectType({
333328
type: __Type,
334329
resolve: (type) => ('ofType' in type ? type.ofType : undefined),
335330
},
331+
specifiedByURL: {
332+
type: GraphQLString,
333+
resolve: (obj) =>
334+
'specifiedByURL' in obj ? obj.specifiedByURL : undefined,
335+
},
336336
isOneOf: {
337337
type: GraphQLBoolean,
338338
resolve: (type) => {

0 commit comments

Comments
 (0)