Skip to content

Validate enum keys before serialization - #186

Merged
kdaviduik merged 1 commit into
Shopify:masterfrom
madmath:secfix/15-enum-validation
Oct 29, 2026
Merged

kdaviduik merged 1 commit into
Shopify:masterfrom
madmath:secfix/15-enum-validation

Conversation

@madmath

@madmath madmath commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Keep inline enum arguments within GraphQL's Name grammar.

This package is deprecated. Maintainer review is needed; whether to ship a change remains a maintainer decision. Previously accepted malformed keys now throw synchronously, including during response decoding, so compatibility needs review. This does not add schema-membership validation.

Verification with the repository's existing Babel/Rollup toolchain on Node 22.15.0 and Yarn 1.22.22:

  • npm test: 276 passing on unchanged master; 277 passing / 1 expected failure with only the new tests; 278 passing with the fix, including lint checks.
  • npm run build:dev and npm run build:prod: pass with legacy toolchain warnings.
  • git diff --check: pass.

The pinned Node 8.15.0 runtime could not run on this machine; browser tests were not run.

Co-authored-by: River <river@shopify.com>
@madmath
madmath marked this pull request as ready for review October 29, 2026 15:15
@madmath

madmath commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@stephanie-shopify could you review this change? Please see the description for compatibility questions and verification limitations.

@kdaviduik kdaviduik left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kdaviduik
kdaviduik merged commit 0caf689 into Shopify:master Oct 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants