Skip to content

Add error case tests for usage collector - #8322

Open
jdolle wants to merge 1 commit into
mainfrom
test-usage-collector
Open

Add error case tests for usage collector#8322
jdolle wants to merge 1 commit into
mainfrom
test-usage-collector

Conversation

@jdolle

@jdolle jdolle commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Background

Our collector throws when it encounters unexpected conditions I.e. missing types or fields required to resolve the coordinate.

Description

This PR adds tests to verify this is happening and to document this case.
There is some debate on whether or not this function should throw or handle these cases silently. I believe throwing is still correct because it allows the caller to decide what to do about this case. It's feasible that this function could be used in cases where we don't want to swallow the error.

I believe the recent change to the capture function handles the collector issue correctly and this test is all that we should add.

Checklist

  • Testing

@jdolle
jdolle requested a review from n1ru4l August 4, 2026 17:21
@jdolle jdolle self-assigned this Aug 4, 2026
@theguild-bot

Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/apollo 0.48.4-alpha-20260804172259-fad3dc8320490efc9e22822dbd11b24108abac43 npm ↗︎ unpkg ↗︎
@graphql-hive/cli 0.61.4-alpha-20260804172259-fad3dc8320490efc9e22822dbd11b24108abac43 npm ↗︎ unpkg ↗︎
@graphql-hive/core 0.22.2-alpha-20260804172259-fad3dc8320490efc9e22822dbd11b24108abac43 npm ↗︎ unpkg ↗︎
@graphql-hive/envelop 0.40.9-alpha-20260804172259-fad3dc8320490efc9e22822dbd11b24108abac43 npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-plugin-console-sdk 0.1.2-alpha-20260804172259-fad3dc8320490efc9e22822dbd11b24108abac43 npm ↗︎ unpkg ↗︎
@graphql-hive/yoga 0.49.2-alpha-20260804172259-fad3dc8320490efc9e22822dbd11b24108abac43 npm ↗︎ unpkg ↗︎
hive 11.10.1-alpha-20260804172259-fad3dc8320490efc9e22822dbd11b24108abac43 npm ↗︎ unpkg ↗︎

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tags: 11.10.1-alpha-fad3dc8, fad3dc8, fad3dc8320490efc9e22822dbd11b24108abac43

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.

2 participants