Skip to content

Conversation

@cecchi
Copy link

@cecchi cecchi commented Nov 1, 2025

🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.

Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
the pull request.

Description

  • Adds an option to useOnResolve to skip resolvers that use the default resolver.
  • Adds a corresponding option to useOpentelemetry to skip tracing fields that use the default resolver. This is equivalent to the ignoreTrivialResolveSpans option in @opentelemetry/instrumentation-graphql

Fixes #2132

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added unit tests for both the enabled and disabled state of this flag.

Test Environment:

  • OS: Mac 26
  • NodeJS: 22.4.1

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Further comments

Unfortunately I did not realize @Akryum had proposed part of the same change in #2133 until I started to write this PR. This PR includes tests and the corresponding change to useOpentelemetry, so hopefully it can be merged.

@cecchi cecchi changed the title feat[useOnResolve] add skipDefaultResolvers option feat: add option to ignore default resolvers in opentelemetry Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

useOnResolve: allow skipping default resolvers

1 participant