File tree Expand file tree Collapse file tree 2 files changed +1
-58
lines changed Expand file tree Collapse file tree 2 files changed +1
-58
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,6 @@ import {
33
33
} from '../type/definition' ;
34
34
35
35
import { astFromValue } from '../utilities/astFromValue' ;
36
- import { isMutationType } from './typeComparators' ;
37
- import { isQueryType } from './typeComparators' ;
38
- import { isSubscriptionType } from './typeComparators' ;
39
36
40
37
type Options = { |
41
38
/**
@@ -90,13 +87,7 @@ function printFilteredSchema(
90
87
const directives = schema . getDirectives ( ) . filter ( directiveFilter ) ;
91
88
const typeMap = schema . getTypeMap ( ) ;
92
89
const types = objectValues ( typeMap )
93
- . sort ( ( type1 , type2 ) => {
94
- if ( isMutationType ( schema , type1 ) ) return - 1 ;
95
- if ( isQueryType ( schema , type1 ) ) return - 1 ;
96
- if ( isSubscriptionType ( schema , type1 ) ) return - 1 ;
97
90
98
- return type1 . name . localeCompare ( type2 . name ) ;
99
- } )
100
91
. filter ( typeFilter ) ;
101
92
102
93
return (
Original file line number Diff line number Diff line change @@ -119,52 +119,4 @@ export function doTypesOverlap(
119
119
120
120
// Otherwise the types do not overlap.
121
121
return false ;
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
- }
122
+ }
You can’t perform that action at this time.
0 commit comments