File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 4
4
Resolver ,
5
5
ObjectTypeComposerFieldConfigAsObjectDefinition ,
6
6
inspect ,
7
+ SchemaPrinterOptions ,
7
8
} from 'graphql-compose' ;
8
9
9
10
const FIELD = 'field' ;
@@ -124,16 +125,20 @@ export async function testOperationErrors(
124
125
return res ?. errors ;
125
126
}
126
127
127
- export function testSDL ( opts : {
128
- fc : ObjectTypeComposerFieldConfigAsObjectDefinition < any , any , any > | Resolver ;
129
- schemaComposer ?: SchemaComposer < any > ;
130
- deep ?: boolean ;
131
- } ) : string {
128
+ export function testSDL (
129
+ opts : {
130
+ fc : ObjectTypeComposerFieldConfigAsObjectDefinition < any , any , any > | Resolver ;
131
+ schemaComposer ?: SchemaComposer < any > ;
132
+ deep ?: boolean ;
133
+ } & SchemaPrinterOptions
134
+ ) : string {
132
135
const sc = opts . schemaComposer || new SchemaComposer ( ) ;
133
136
sc . Query . setField ( FIELD , opts . fc ) ;
134
137
sc . buildSchema ( ) ;
135
138
return sc . Query . toSDL ( {
139
+ ...opts ,
136
140
deep : opts . deep ?? true ,
137
141
omitDescriptions : true ,
142
+ omitSpecifiedByUrl : true ,
138
143
} ) ;
139
144
}
You can’t perform that action at this time.
0 commit comments