Skip to content

feat(UserInputError): handle unhandled errors.#5508

Merged
glasser merged 2 commits into
apollographql:mainfrom
5achinJani:feat/user-input-errors
Jul 21, 2021
Merged

feat(UserInputError): handle unhandled errors.#5508
glasser merged 2 commits into
apollographql:mainfrom
5achinJani:feat/user-input-errors

Conversation

@5achinJani

Copy link
Copy Markdown
Contributor

It handles the unhandled user input errors mentioned in #5353 and closes #5353

@glasser glasser added this to the MM-2021-07 milestone Jul 20, 2021
@glasser

glasser commented Jul 21, 2021

Copy link
Copy Markdown
Member

Oops, I did tell you to work on release-3.0 but we merged it since then! I think we keep old release branches open in order to make cherry-picks on them, though maybe that's not helpful. Let me see if I can rebase your branch on top of main.

required type & non-null errors handled.
@glasser glasser force-pushed the feat/user-input-errors branch from 2110b3f to 652e14a Compare July 21, 2021 23:00
@glasser glasser changed the base branch from release-3.0 to main July 21, 2021 23:00
@glasser

glasser commented Jul 21, 2021

Copy link
Copy Markdown
Member

OK, the rebasing worked.

FWIW there's a related issue in graphql-js (graphql/graphql-js#3169) and this PR graphql/graphql-js#3193 would let us implement this in a less hacky way. But we'd need this code anyway for back-compat with current graphql-js releases.

- Update comment to mention new checks and link to graphql-js issue
- Reduce repetition in the logic (hopefully this increases rather than
  decreases clarity?)
- prettier (required on main after rebasing)
- CHANGELOG
@glasser

glasser commented Jul 21, 2021

Copy link
Copy Markdown
Member

I tweaked it a bit (eliminating some repeated code, which hopefully improves readability rather than making it worse, and some comments etc). Thanks!

@glasser glasser enabled auto-merge (squash) July 21, 2021 23:13
@glasser glasser added the size/small Estimated to take LESS THAN A DAY label Jul 21, 2021
@glasser glasser disabled auto-merge July 21, 2021 23:27
@glasser glasser merged commit 12f46fc into apollographql:main Jul 21, 2021
@hwillson hwillson removed this from the MM-2021-07 milestone Jul 29, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size/small Estimated to take LESS THAN A DAY

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some variable-related errors should be BAD_USER_INPUT rather than INTERNAL_SERVER_ERROR

3 participants