Skip to content

chore(deps): update graphql-tools monorepo - #650

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/graphql-tools-monorepo
Oct 29, 2026
Merged

renovate[bot] merged 1 commit into
mainfrom
renovate/graphql-tools-monorepo

Conversation

@renovate

@renovate renovate Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@graphql-tools/schema (source) 11.0.6 → 11.0.7 age confidence
@graphql-tools/utils (source) 13.1.3 → 13.2.0 age confidence

Release Notes

ardatan/graphql-tools (@​graphql-tools/schema)

v11.0.7

Compare Source

Patch Changes
  • #​8601 902d870 Thanks @​ardatan! - mergeSchemas and makeExecutableSchema now accept onFieldTypeConflict, the same callback mergeTypeDefs already had.

    When two schemas define the same field with different types, default merge throws. When only nullability differs, it keeps the earlier type.

    # first schema
    type Post {
      id: ID!
      title: String!
      content: String!
      published: Boolean!
    }
    
    # second schema
    type Post {
      id: ID!
      title: String
      content: Int
      fieldA: Int
      fieldB: String
    }

    content: String! vs content: Int throws. title: String! vs title: String keeps String!.

    mergeSchemas({
      schemas: [firstSchema, secondSchema],
      onFieldTypeConflict: (_existing, incoming) => incoming,
    });

    The merged Post takes title: String and content: Int from the second schema, keeps published from the first, and adds fieldA / fieldB. Types that exist on only one schema, such as User on the first, stay.

    The same callback applies to field arguments. Returning the incoming field uses the second schema's argument types and still keeps arguments that exist on only one side. Returning the existing field with reverseArguments: true keeps the first schema's argument types and still appends new arguments.

  • Updated dependencies [6da2904, 7770067, f956bfe]:

ardatan/graphql-tools (@​graphql-tools/utils)

v13.2.0

Compare Source

Minor Changes
  • #​8606 6da2904 Thanks @​ardatan! - 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.

Patch Changes
  • #​8588 7770067 Thanks @​ardatan! - rewireTypes (used by mapSchema and addTypes) now recreates only the types that actually reference a replaced type.

    mapSchema already changes just the mapped types. rewireTypes then walked every type and built a new GraphQLObjectType / enum / scalar so field pointers stayed consistent. That is correct, and it is overkill when a pipeline maps one type on a large schema: unrelated types, unused enums, and unused scalars were cloned on every pass.

    The crawl now finds types whose field, argument, interface, or union members point at a different object than the type map (including wrapper types created during mapping), then rebuilds only that set. Specified directives stay as-is. Types that do not reach a replacement keep the same JavaScript object.

    createStub returns the graphql-js specified scalars for String / ID / Int / Float / Boolean instead of building an object or input with that name. Stitch typeFromAST uses createStub for every field type.

    const schema = buildSchema(/* GraphQL */ `
      scalar Unused
      enum Color { RED }
      type Query { foo: Foo }
      type Foo { id: ID }
    `)
    
    const mapped = mapSchema(schema, {
      [MapperKind.OBJECT_TYPE]: type =>
        type.name === 'Foo'
          ? new GraphQLObjectType({ ...type.toConfig(), description: 'mapped' })
          : undefined,
    })
    
    mapped.getType('Unused') === schema.getType('Unused')
    mapped.getType('Color') === schema.getType('Color')
  • #​8608 f956bfe Thanks @​ardatan! - transformInputValue now keeps falsy list items when GraphQL coerces a singleton into a list.

    A [String] / [Int] / [Boolean] field can receive "", 0, or false instead of a one-element array. The previous asArray helper treated those as empty and produced [], so rename and other input transforms dropped a valid value. null is still returned as-is. A real list is still walked item by item.


Configuration

📅 Schedule: (in timezone Europe/Zurich)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot merged commit 3bfb474 into main Oct 29, 2026
34 checks passed
@renovate
renovate Bot deleted the renovate/graphql-tools-monorepo branch October 29, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants