File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 44 Resolver ,
55 ObjectTypeComposerFieldConfigAsObjectDefinition ,
66 inspect ,
7+ SchemaPrinterOptions ,
78} from 'graphql-compose' ;
89
910const FIELD = 'field' ;
@@ -124,16 +125,20 @@ export async function testOperationErrors(
124125 return res ?. errors ;
125126}
126127
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 {
132135 const sc = opts . schemaComposer || new SchemaComposer ( ) ;
133136 sc . Query . setField ( FIELD , opts . fc ) ;
134137 sc . buildSchema ( ) ;
135138 return sc . Query . toSDL ( {
139+ ...opts ,
136140 deep : opts . deep ?? true ,
137141 omitDescriptions : true ,
142+ omitSpecifiedByUrl : true ,
138143 } ) ;
139144}
You can’t perform that action at this time.
0 commit comments