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

[nullability] Allow to use @catch on field definitions #48

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

martinbonnin
Copy link
Contributor

Allow to use @catch on field definitions:

type User {
  email @catch(to: RESULT)
}

And for type extensions:

extend type User @catchField(name: "email", to: RESULT)

See #47

@martinbonnin martinbonnin requested a review from a team as a code owner February 13, 2024 15:26
Copy link
Contributor

@BoD BoD left a comment

Choose a reason for hiding this comment

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

👍

Parent positions can recover using `RESULT` or `NULL`.
If no parent position recovers, the parsing stops.
"""
THROW
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we rename this to EXCEPTION while we're at it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm a bit hesitant because IIRC relay uses THROW. That's something we certainly want to bikeshed and until we do, i'd just keep the current naming to avoid too much back & forth

@martinbonnin martinbonnin merged commit 2188c5f into main Feb 20, 2024
7 checks passed
@martinbonnin martinbonnin deleted the nullability-v0.3 branch February 20, 2024 15:14
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