File tree Expand file tree Collapse file tree 2 files changed +1
-57
lines changed Expand file tree Collapse file tree 2 files changed +1
-57
lines changed Original file line number Diff line number Diff line change @@ -86,15 +86,7 @@ function printFilteredSchema(
86
86
) : string {
87
87
const directives = schema . getDirectives ( ) . filter ( directiveFilter ) ;
88
88
const typeMap = schema . getTypeMap ( ) ;
89
- const types = objectValues ( typeMap )
90
- . sort ( ( type1 , type2 ) => {
91
- if ( isMutationType ( schema , type1 ) ) return - 1 ;
92
- if ( isQueryType ( schema , type1 ) ) return - 1 ;
93
- if ( isSubscriptionType ( schema , type1 ) ) return - 1 ;
94
-
95
- return type1 . name . localeCompare ( type2 . name ) ;
96
- } )
97
- . filter ( typeFilter ) ;
89
+ const types = objectValues ( typeMap ) . filter ( typeFilter ) ;
98
90
99
91
return (
100
92
[ printSchemaDefinition ( schema ) ]
Original file line number Diff line number Diff line change @@ -120,51 +120,3 @@ export function doTypesOverlap(
120
120
// Otherwise the types do not overlap.
121
121
return false ;
122
122
}
123
-
124
- /**
125
- * Checks if type is query
126
- *
127
- * @internal
128
- */
129
- export function isQueryType ( schema : GraphQLSchema , type : GraphQLCompositeType ) {
130
- const schemaType = schema . getQueryType ( ) ;
131
- if ( schemaType ) {
132
- return schemaType . name === type . name ;
133
- }
134
-
135
- return false ;
136
- }
137
-
138
- /**
139
- * Checks if type is mutation
140
- *
141
- * @internal
142
- */
143
- export function isMutationType (
144
- schema : GraphQLSchema ,
145
- type : GraphQLCompositeType ,
146
- ) {
147
- const schemaType = schema . getMutationType ( ) ;
148
- if ( schemaType ) {
149
- return schemaType . name === type . name ;
150
- }
151
-
152
- return false ;
153
- }
154
-
155
- /**
156
- * Checks if type is subscription
157
- *
158
- * @internal
159
- */
160
- export function isSubscriptionType (
161
- schema : GraphQLSchema ,
162
- type : GraphQLCompositeType ,
163
- ) {
164
- const schemaType = schema . getSubscriptionType ( ) ;
165
- if ( schemaType ) {
166
- return schemaType . name === type . name ;
167
- }
168
-
169
- return false ;
170
- }
You can’t perform that action at this time.
0 commit comments