Packages

@graphql-tools/graphql-file-loader

9.1.2 · 10 Nov 2026MIT13.9M / weekRepositoryHomepagenpmAtom feed

Your version

131 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 9.x · latest line
  2. 9.1.1 – 9.1.22 releases that only update dependencies@graphql-tools/utils 13.2.2@graphql-tools/import 8.0.9@graphql-tools/load-files 8.0.9Show each
  3. 9.1.0

    26 Oct 2026
    • loadDocuments / loadTypedefs now accept errorHandling so a single invalid file does not have to hide the rest of the load.

      A glob that mixes a valid operation with broken SDL used to throw the first Syntax Error and drop every other file:

      # valid.query.graphql
      query ValidQuery {
        a
      }
      # broken-a.query.graphql
      query {
        a
      await loadDocuments('**/*.query.graphql', {
        loaders: [new GraphQLFileLoader()],
      });
      // throws Syntax Error

      errorHandling chooses what happens next. The default is unchanged (throw the first error).

      aggregate waits until every source is attempted, then throws AggregateError with each parse/load failure:

      await loadDocuments('**/*.query.graphql', {
        loaders: [new GraphQLFileLoader()],
        errorHandling: 'aggregate',
      });

      return does not throw. Failed sources stay in the result as { location, error } without a document, next to the sources that parsed:

      const sources = await loadDocuments('**/*.query.graphql', {
        loaders: [new GraphQLFileLoader(), new CodeFileLoader()],
        errorHandling: 'return',
      });
      
      sources[0].document; // ValidQuery
      sources[1].document; // undefined
      sources[1].error; // GraphQLError: Syntax Error

      Source now has an optional error field. @graphql-tools/graphql-file-loader and @graphql-tools/code-file-loader honor the same option. CodeFileLoader's existing noSilentErrors default is unchanged unless errorHandling is set.

      Custom loader failures and incomplete inline documents (query Foo {) follow the same option. errorHandling: 'throw' raises the first failure, not AggregateError.

  4. 9.0.0 – 9.0.67 releases with no change for you6 dependency updates, 1 without a note@graphql-tools/utils 13.1.3@graphql-tools/import 8.0.6@graphql-tools/load-files 8.0.6Show each
  5. 8.x
  6. 8.1.24

    15 Oct 2026
    • Dependencies updates:

  7. 8.1.23

    12 Oct 2026
    • Dependencies updates:

  8. 8.1.21 – 8.1.222 releases that only update dependencies@graphql-tools/utils 12.0.3@graphql-tools/import 7.2.2Show each
  9. 8.1.20

    7 Sep 2026
    • # import "./file.graphql" (space after #) is a valid default import, and #import is processed even when it is not the first non-blank line of the file.

  10. 8.1.9 – 8.1.1911 releases that only update dependencies@graphql-tools/utils 12.0.0@graphql-tools/import 7.1.19Show each
  11. 8.1.8

    28 Nov 2025
  12. 8.1.7

    21 Nov 2025
  13. 8.1.1 – 8.1.66 releases that only update dependencies@graphql-tools/utils 10.10.3@graphql-tools/import 7.1.6Show each
  14. 8.1.0

    26 Aug 2025
    • #7310
      692cfeb
      Thanks @HunterLarco! - GraphQL schemas in large projects,
      especially monorepos, suffer from fragile and verbose relative import paths that become difficult
      to maintain as projects grow. This change brings TypeScript's popular
      tsconfig.json#paths aliasing syntax to GraphQL
      imports, enabling clean, maintainable import statements across your GraphQL schema files.

      Before - Brittle relative imports:

      #import "../../../shared/models/User.graphql"
      #import "../../../../common/types/Product.graphql"

      After - Clean, semantic aliases:

      #import "@models/User.graphql"
      #import "@types/Product.graphql"

      Configuration Example

      {
        mappings: {
          '@models/*': path.join(__dirname, './models/*'),
          '@types/*': path.join(__dirname, './shared/types/*'),
        }
      }

      This change is introduced in a backwards compatible way to ensure no existing use cases are broken
      while using familiar patterns to typescript developers for structuring import aliases.

  15. 8.0.13 – 8.0.2210 releases that only update dependencies@graphql-tools/utils 10.9.1@graphql-tools/import 7.0.21Show each
  16. 8.0.12

    16 Jan 2025
  17. 8.0.8 – 8.0.114 releases that only update dependencies@graphql-tools/utils 10.7.2@graphql-tools/import 7.0.11Show each

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.