Nullability WG ·
Nullability WG meetings · Jump to notesAgenda
GraphQL CCN WG – January 2024
To read about the purpose of this subcommittee, please see the README.
This is an open meeting in which anyone in the GraphQL community may attend.
- Date & Time:
January 31th 2024 19:00 - 20:00 UTC
- View the calendar, or subscribe (Google Calendar, ical file).
- Please Note: The date or time may change. Please check this agenda the week of the meeting to confirm. While we try to keep all calendars accurate, this agenda document is the source of truth.
- Video Conference Link: https://zoom.us/j/95723407712?pwd=ZHhQakxqd1JlTnZJNTJXdlN3UFdQUT09
- Live Notes: Google Doc
Attendees
| Name | GitHub | Organization | Location |
|---|---|---|---|
| Alex Reilly (Host) | @twof | Independent | San Francisco, CA, US |
| Martin Bonnin | @martinbonnin | Apollo | Paris, FT |
| Benoit Lubek | @BoD | Apollo | Lyon, FR |
| Benjie Gillam | @benjie | Graphile | Chandler's Ford, UK |
| Jordan Eldredge | @captbaritone | Meta (Relay) | Alameda, CA, US |
| Calvin Cestari | @calvincestari | Apollo (Apollo iOS) | Vancouver, BC, CA |
| Ernie Turner | @ernieturner | Coinbase | Bozeman, MT, US |
Agenda
- Agree to Membership Agreement, Participation & Contribution Guidelines and Code of Conduct (1m, Host)
- Introduction of attendees (5m, Host)
- Determine volunteers for note taking (1m, Host)
- Review agenda (2m, Host)
- Review previous meeting's action items (5m, Host)
Notes
Client Controlled Nullability WG - January 2024
Watch the replay: GraphQL Working Group Meetings on YouTube
Attendees:
- Alex Reilly
- Benjie Gillam
- Martin Bonnin
- Ernie Turner
- Jordan Eldredge
- Calvin Cestari
- Stephen Spalding
Notes:
- Agenda:
- Jordan:
- What I learned implementing
@semanticNonNullfrom Grats - Also wants to know about error handling feedbacks
- What I learned implementing
- Ernie:
- Questions about the proposals
- Jordan:
- Previous action items:
- None
- Ernie:
- Looking at the Apollo stuff looking at the semanticNonNull on array types
- It looked like Grats and Apollo had implemented the directive slightly different from one another with regards to lists
- Is there a discussion about which approach is better?
- Jordan:
- There were two versions, but the array one Apollo uses is the new one, and the one Grats uses is the old one
- Grats is going to switch to the Apollo syntax
- We’re both still exploring the space, but we want to find the one the community is going to coalesce around
- Martin:
- I think it’s better with the array, it’s implemented in Apollo Kotlin this week
- The array syntax has an interaction with the catch directive
- Jordan:
- Segue into semantic nullability and list items generally
- The place where we want semantic nonnull are the places where they want the error handling behavior of the existing syntax (I think this is what was said?)
- This doesn’t apply to array items, the executor can’t tell that an individual item in an array threw
- Martin:
- There is at least one implementation where they’re doing that. It’s DGS (Java)
- Jordan:
- Languages that have result types might be able to support that
- Benjie:
- GraphQL.js operates on promises and any of them can error
- You could be streaming results, and one of those results errors, but the stream continues
- So I can think of a few cases where this is still needed in list items
- Jordan:
- We might still need it, but it would be less common
- Martin:
- Grats is a code-first server, given that TS has full support for
nullability, how do you express that a field can actually be null, how do
you express
!
- Grats is a code-first server, given that TS has full support for
nullability, how do you express that a field can actually be null, how do
you express
- Jordan:
- It treats non-nullable as nullable so it can do error handling
- You can opt back into it with a tag
- StrictSemanticNullability option that turns it into nullable, but also adds @semanticNonNull
- If you want to make it an exclamation mark, you can tag it and opt out of the strict semantic nullability
- Jordan:
- I want to see what Apollo has learned during their error handling work
- Martin:
- People like it but they want it to be part of the syntax. @semanticNonNull is overly verbose
- We have a couple of teams that are doing prototypes
- People like semanticNonNull, but catch is a little more mixed on feedback
- If you put catch on a field, you have to put it on all fields across fragments
- We also want to experiment with colocating fragments, but we haven’t started yet
- It’s going to be a tough sell for Android devs because they’re into layering
- Jordan:
- We’re working on rolling out catch and supporting it in our native clients
- Talking with a team where there is frequently missing data, what they would prefer is not catch-to-error or catch-to-null
- They want a result type always defined in the schema
- They have also said they want to fall back to stale data
- It’s unclear if that would be best defined at schema, component or server level
- This team uses a normalized store
- Ernie:
- It feels like the schema level is a bit heavy handed for that, needs more examples
- Jordan:
- I thought you did something like that at Coinbase
- Ernie:
- Yeah we do that, but I hadn’t tied it back to the catch directive
- Jordan:
- One other thing we could touch on, Benjies RFC, in the interest of moving fast, what’s keeping us from moving forward. Anything you’re blocked on?
- Benjie:
- The question is around syntax, and if there’s going to be this global directive that toggles behavior
- I don’t think anyone’s completely happen with either solution
- I’m going to change the syntax again
- We’ve got a reasonably high confidence that something
likethis is the solution
- Jordan:
- I want to collect a list of pros and cons
- Benjie:
- Looks like it boils down to the difference between both proposals is having
a schema directive or the
~!(so global flag vs less usual syntax) - Ideas for what the SemanticNonNull syntax could look like
- Looks like it boils down to the difference between both proposals is having
a schema directive or the
- Jordan:
- Is it
user~!or~user!? - I’ll set up some time for us to brainstorm on this.
- Is it
- Benjie:
- I think we should brainstorm, come up with the least bad syntax, and then put out a poll for those
- Alex:
- What are we bringing to the WG meeting tomorrow?
- Jordan:
- SHOULD vs MUST (note: https://spec.graphql.org/draft/#sel-HAPHRPJABABwHloX)
- Action Items:
- Set up brainstorming session (Jordan is taking this one)