diff --git a/.changeset/lovely-eagles-wonder.md b/.changeset/lovely-eagles-wonder.md new file mode 100644 index 00000000000..3676b5c79ec --- /dev/null +++ b/.changeset/lovely-eagles-wonder.md @@ -0,0 +1,5 @@ +--- +'@graphql-codegen/cli': patch +--- + +Remove unused `tryToBuildSchema` function diff --git a/packages/graphql-codegen-cli/src/utils/try-to-build-schema.ts b/packages/graphql-codegen-cli/src/utils/try-to-build-schema.ts deleted file mode 100644 index 4070535dfbe..00000000000 --- a/packages/graphql-codegen-cli/src/utils/try-to-build-schema.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { DocumentNode, GraphQLSchema, buildASTSchema } from 'graphql'; -import { debugLog } from './debugging'; - -export function tryToBuildSchema(schema: DocumentNode): GraphQLSchema { - try { - return buildASTSchema(schema); - } catch (e) { - debugLog(`Unable to build AST schema from DocumentNode, will try again later...`, e); - - return null; - } -}