File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @graphql-tools/wrap ' : patch
3+ ---
4+
5+ Only warn about deprecated ` introspectSchema ` once
Original file line number Diff line number Diff line change @@ -46,10 +46,15 @@ export type SchemaFromExecutorOptions = Partial<IntrospectionOptions> &
4646 Parameters < typeof buildClientSchema > [ 1 ] &
4747 ParseOptions ;
4848
49+ let hasWarned = false ;
50+
4951export const introspectSchema = function introspectSchema ( ...args ) {
50- console . warn (
51- `\`introspectSchema\` is deprecated, and will be removed in the next major. Please use \`schemaFromExecutor\` instead.`
52- ) ;
52+ if ( ! hasWarned ) {
53+ hasWarned = true ;
54+ console . warn (
55+ `\`introspectSchema\` is deprecated, and will be removed in the next major. Please use \`schemaFromExecutor\` instead.`
56+ ) ;
57+ }
5358 return schemaFromExecutor ( ...( args as Parameters < typeof schemaFromExecutor > ) ) ;
5459} as typeof schemaFromExecutor ;
5560
You can’t perform that action at this time.
0 commit comments