Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add additional runtime errors for pre-coercion OneOf errors #4195

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

yaacovCR
Copy link
Contributor

This changes the implementation to match the specification.

Adds additional tests as well.

@yaacovCR yaacovCR requested a review from a team as a code owner September 18, 2024 13:00
Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit cdd0b55
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/6710ffe3a121e80008a3ac3b
😎 Deploy Preview https://deploy-preview-4195--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@yaacovCR yaacovCR added the PR: bug fix 🐞 requires increase of "patch" version number label Sep 18, 2024
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this! It seems right; but let's improve the error messages

src/execution/__tests__/oneof-test.ts Outdated Show resolved Hide resolved
src/execution/__tests__/oneof-test.ts Outdated Show resolved Hide resolved
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

Just being picky over capitalisation now...

Do we generally capitalise Object Type / Interface Type and so on in error messages? If so, the suggestions to reduce capitalization should be dismissed.

src/validation/rules/ValuesOfCorrectTypeRule.ts Outdated Show resolved Hide resolved
src/validation/rules/ValuesOfCorrectTypeRule.ts Outdated Show resolved Hide resolved
src/validation/rules/ValuesOfCorrectTypeRule.ts Outdated Show resolved Hide resolved
src/execution/__tests__/oneof-test.ts Outdated Show resolved Hide resolved
Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

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

This looks correct to me; great work!

src/execution/__tests__/variables-test.ts Outdated Show resolved Hide resolved
src/execution/__tests__/variables-test.ts Show resolved Hide resolved
src/execution/__tests__/variables-test.ts Outdated Show resolved Hide resolved
src/execution/__tests__/variables-test.ts Outdated Show resolved Hide resolved
src/execution/__tests__/variables-test.ts Outdated Show resolved Hide resolved
src/execution/__tests__/variables-test.ts Outdated Show resolved Hide resolved
src/execution/__tests__/variables-test.ts Show resolved Hide resolved
src/utilities/coerceInputValue.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bug fix 🐞 requires increase of "patch" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants