Skip to content

Bump @graphql-tools/mock from 9.1.12 to 10.1.1 - #202

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/graphql-tools/mock-10.1.1
Open

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/graphql-tools/mock-10.1.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 1, 2026

Copy link
Copy Markdown
Contributor

Bumps @graphql-tools/mock from 9.1.12 to 10.1.1.

Changelog

Sourced from @​graphql-tools/mock's changelog.

10.1.1

Patch Changes

10.1.0

Minor Changes

  • #8570 171adc3 Thanks @​ardatan! - Query and Mutation mocks now receive the field's resolved arguments. Subscription mocks receive the same map when resolve runs (an event is yielded); the default subscriber does not yield.

    A mock is a type factory, not a resolver. The value that identifies an operation field is its argument map after GraphQL coercion: user(id: ID!) always has id, whether the client sent a literal or a variable. That is what you assert on (jest.fn() / toHaveBeenCalledWith) and what you use to return the right mock.

    context is the same request-wide object for every field (auth, loaders). It does not distinguish user(id: "1") from user(id: "2"). Use the resolvers option of addMocksToSchema when you need context, info, or the mock store; the rest of the fields can still come from mocks.

    mocks.Query = jest.fn(() => ({ ... })) is called with { id: 'user-1' } when user(id:) is resolved. Nested type mocks such as User stay factories with no arguments.

  • #8566 2e28f6c Thanks @​ardatan! - Lists generated by the mock store can set a length with defaultListLength, and MockList now passes each item's index to its mock function.

    Without an explicit list mock the store always produced two items. addMocksToSchema({ schema, defaultListLength: 0 }) (or createMockStore) now controls that length. Auto-generated list items pass their index to scalar mocks, and new MockList(n, (index) => ...) receives index so items can vary by position.

  • #8568 822a0c7 Thanks @​ardatan! - MockStore get and set now accept GraphQL input object types.

    Input types were rejected as "not an object or interface", so mutation inputs could not be stored for later CRUD-style mocks. The store now treats input objects like other named object types.

Patch Changes

  • #8565 8c50a7d Thanks @​ardatan! - Mocks set on list items now apply to fields that take arguments.

    The store keys a field with its arguments (membership:{"param":"test"}). Nested mocks such as { membership: null } were stored under the bare field name, so a query that passed arguments generated a new default instead of using the override. Lookups now fall back to the un-argued field when the exact argument key is missing.

  • Updated dependencies [7fbc6e7, fe44242, 5ceed9d]:

    • @​graphql-tools/utils@​13.1.3
    • @​graphql-tools/schema@​11.0.6

10.0.5

Patch Changes

... (truncated)

Commits
  • 3a57d89 chore(release): update monorepo packages versions (#8587)
  • 0554a7f refactor: use fakePromise/fakeRejectPromise for iterator return/throw (#8586)
  • f7b0beb chore(release): update monorepo packages versions (#8567)
  • 171adc3 feat(mock): pass field args to Query/Mutation mocks (#8570)
  • 822a0c7 feat(mock): allow MockStore get and set for input types (#8568)
  • 2e28f6c feat(mock): add defaultListLength and pass index to MockList (#8566)
  • 8c50a7d fix(mock): apply list-item mocks to fields that take arguments (#8565)
  • 9a7f690 chore(release): update monorepo packages versions (#8562)
  • fa0bb8e chore(release): update monorepo packages versions (#8553)
  • daec359 chore(release): update monorepo packages versions (#8551)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@graphql-tools/mock](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/mock) from 9.1.12 to 10.1.1.
- [Release notes](https://github.com/ardatan/graphql-tools/releases)
- [Changelog](https://github.com/ardatan/graphql-tools/blob/master/packages/mock/CHANGELOG.md)
- [Commits](https://github.com/ardatan/graphql-tools/commits/@graphql-tools/mock@10.1.1/packages/mock)

---
updated-dependencies:
- dependency-name: "@graphql-tools/mock"
  dependency-version: 10.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants