Skip to content

Commit e5c1ad1

Browse files
committed
Reorder fields to match graphql-js
1 parent 3faa670 commit e5c1ad1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/graphql/introspection/type_type.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
"they describe. Abstract types, Union and Interface, provide the Object types "\
99
"possible at runtime. List and NonNull types compose other types."
1010

11-
field :name, types.String
12-
field :description, types.String
1311
field :kind do
1412
type !GraphQL::Introspection::TypeKindEnum
1513
resolve ->(target, a, c) { target.kind.name }
1614
end
15+
field :name, types.String
16+
field :description, types.String
1717
field :fields, field: GraphQL::Introspection::FieldsField
18-
field :ofType, field: GraphQL::Introspection::OfTypeField
19-
field :inputFields, field: GraphQL::Introspection::InputFieldsField
18+
field :interfaces, field: GraphQL::Introspection::InterfacesField
2019
field :possibleTypes, field: GraphQL::Introspection::PossibleTypesField
2120
field :enumValues, field: GraphQL::Introspection::EnumValuesField
22-
field :interfaces, field: GraphQL::Introspection::InterfacesField
21+
field :inputFields, field: GraphQL::Introspection::InputFieldsField
22+
field :ofType, field: GraphQL::Introspection::OfTypeField
2323
end

spec/graphql/schema/printer_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@
175175
}
176176
177177
type __Type {
178+
kind: __TypeKind!
178179
name: String
179180
description: String
180-
kind: __TypeKind!
181181
fields(includeDeprecated: Boolean = false): [__Field!]
182-
ofType: __Type
183-
inputFields: [__InputValue!]
182+
interfaces: [__Type!]
184183
possibleTypes: [__Type!]
185184
enumValues(includeDeprecated: Boolean = false): [__EnumValue!]
186-
interfaces: [__Type!]
185+
inputFields: [__InputValue!]
186+
ofType: __Type
187187
}
188188
189189
enum __TypeKind {

0 commit comments

Comments
 (0)