GraphQL WG ·
GraphQL WG meetings · Jump to notesAgenda
GraphQL WG – January 2022
The GraphQL Working Group meets monthly to discuss proposed additions to the GraphQL Specification and other relevant topics to core GraphQL projects. This is an open meeting in which anyone in the GraphQL community may attend.
- Date & Time: March 3rd 2022 19:00 - 21: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/593263740
- Password: graphqlwg
- Live Notes: Google Doc
Attendees
| Name | GitHub | Organization | Location |
|---|---|---|---|
| Lee Byron | @leebyron | GraphQL Foundation | San Francisco, CA, US |
| Michael Staib | @michaelstaib | ChilliCream | Zurich, CH |
| Alex Reilly | @twof | Yelp | San Francisco, CA, US |
| Adron Hall | @adron | Amazon | Seattle, WA, US |
| Rob Richard | @robrichard | 1stDibs | New York, NY, US |
| Roman Ivantsov | @rivantsov | Microsoft | Redmond, WA, US |
| Yaacov Rydzinski | @yaacovCR | Individual | Neve Daniel, IL |
| Matt Mahoney | @mjmahone | Meta (Facebook) | New York, NY, US |
| Jordan Eldredge | @captbaritone | Meta (Facebook) | San Francisco, CA, US |
| Hugh Willson | @hwillson | Apollo | Ottawa, ON, CA |
| Saihajpreet Singh | @saihaj | The Guild | Ottawa, ON, CA |
| Morris Matsa | @mmatsa | IBM | Boston, US |
| Doc Jones | @doc-jones | Postman | Raleigh, NC, US |
| Uri Goldshtein | @urigo | The Guild | Tel Aviv, IL |
| Anthony Miller | @anthonymdev | Apollo | Las Vegas, NV, US |
| Calvin Cestari | @calvincestari | Apollo | Vancouver, BC, CA |
| Benjie Gillam ✏️ | @benjie | Graphile | Chandler's Ford, UK |
Agenda
- Agree to Membership Agreement, Participation & Contribution Guidelines and Code of Conduct (1m, Lee)
- Introduction of attendees (5m, Lee)
- Determine volunteers for note taking (1m, Lee)
- Review agenda (2m, Lee)
- Review previous meeting's action items (5m, Lee)
- Client Controlled Nullability discussion (45m, Alex Reilly)
- Impementation
- Spec
- The goal of this discussion is to reach consensus on each of the following items. This will be a structured discussion where we will go through each item, identify any of the options that would be a hard blocker for the participants' respective use cases, and then vote on the remaining options. The goal is not to identify all possible options, or the perfect option, but the one the works the most for the most people. Development will proceed in the above-linked experimental implementation using the decisions made during this discussion.
- We will briefly go over the proposal and the options during the discussion, but it is suggested that you read the spec and the discussion threads prior to attendence to help the discussion go more smoothly.
- Defer & stream discussion (30m, Rob Richard)
- GraphiQL Lead Maintainer(s) Wanted (10 Minutes, Matt Mahoney)
- Current lead @acao wants to ramp up 2 or more maintainers to keep GraphiQL's momentum
- There is an existing roadmap of work for people to pick up
- Would be healthier for the project to have many owners, whereas now most work runs through @acao
Notes
GraphQL WG Notes - March 2022
Watch the replay: GraphQL Working Group Meetings on YouTube
Agenda
Agree to Membership Agreement, Participation & Contribution Guidelines and Code of Conduct (1m, Lee)
Introduction of attendees (5m, Lee)
Determine volunteers for note taking (1m, Lee)
Review agenda (2m, Lee)
Review previous meeting's action items (5m, Lee)
Client Controlled Nullability discussion (45m, Alex Reilly)
- Implementation
- Spec
- The goal of this discussion is to reach consensus on each of the following items. This will be a structured discussion where we will go through each item, identify any of the options that would be a hard blocker for the participants' respective use cases, and then vote on the remaining options. The goal is not to identify all possible options, or the perfect option, but the one the works the most for the most people. Development will proceed in the above-linked experimental implementation using the decisions made during this discussion.
- List Syntax Discussion
- Null Propagation Discussion
- Nullable Designator Discussion
- Error Handling Discussion
- We will briefly go over the proposal and the options during the discussion, but it is suggested that you read the spec and the discussion threads prior to attendance to help the discussion go more smoothly.
Defer & stream discussion (30m, Rob Richard)
- Non-nullable field errors in defer/stream payloads
- Return arrays from stream payloads
- Validation of label arguments
GraphiQL Lead Maintainer(s) Wanted (10 Minutes, Matt Mahoney)
- Current lead @acao wants to ramp up 2 or more maintainers to keep GraphiQL's momentum
- There is an existing roadmap of work for people to pick up
- Would be healthier for the project to have many owners, whereas now most work runs through @acao
Agree to Membership Agreement, Participation & Contribution Guidelines and Code of Conduct (1m, Lee)
- Specification Membership Agreement
- Participation Guidelines
- Contribution Guide
- Code of Conduct
Determine volunteers for note taking (1m, Lee)
- Benjie
Review previous meeting's action items (5m, Lee)
- Ready for review
- All open action items (by last update)
- All open action items (by meeting)
Client Controlled Nullability discussion (45m, Alex Reilly)
- CCN is a way for clients to state that they don't want to handle a field being null - just throw out the response so we don't have to handle it.
- Doc: https://docs.google.com/document/d/10HHvO25058jrRVa3knboc51T9rng5HUyD_ELjVO-9aU/edit
- Want to know if any of the choices break what you need from CCN. Don't care about preferences, only actual breaks.
- List nullability
[[!]!]?is most popular- Benjie: if the top one is valid on a field, would
?also be valid? - Alex: it has to match the list depth
- Roman: I prefer the last one
- Lee: these are the extreme corner cases, in most cases we won't need to deal with this level of nesting
- Lee: if we add the type name to the query then it expands the constraint surface and potentially adds more sources for breaking changes.
- Benjie: that doesn't mesh with what Alex said - if it's a list field then it has to include the
[]if CCN is in use. If the[]were optional then the?becomes ambiguous like the the middle two options - it's not clear if you're making the inner or outer type nullable. - Alex: indeed, I've decided to be as strict as possible to start with and we can soften it later
- Voting:
- 1: 9
- 2: 0
- 3: 0
- 4: 1
- Lee: we're mostly in agreement that the top option is the one we want to explore, but there's still variability in that design space, so we may need to scope it out of the proposal.
- Anthony: list nullability syntax is an important part of this feature - I don't care on the syntax, but we need to include it.
- Lee: I agree - it'd be hard to explain why we didn't support lists.
- Lee: if all your other threads have resolved and lists is the last one going, we could potentially ship without it.
- voting:
- 1: 0
- 2: 1
- 3: 7
- Next-up: null propagation
- Concerns re: wiping out child/sibling fields.
- Concerns re: fragments - wiping out fields outside the fragment
- Three options:
- ! acts like non-nullable in SDL
- ! is nondestructive
- Basically parser only, the client must be smart enough to handle it.
- ! propagates to nearest ?
- Jordan: in Relay we have two flavours of @required; one acts like the schema bubbling (bubbling to nearest nullable parent); one that throws (blows up the whole component). Most people choose the throw option. Throws are relatively contained in Relay. 90% of people say "if this is nullable I can't do anything - blow up the whole response"
- Matt: originally we were expecting Relay's null propagation like the schema to be the standard way, we were surprised what people actually did.
- Jordan: Any client that has a normalized store would need to compile away the
!and use it on the client - the source of truth couldn't be reconstructed. - Michael: downside is you send data you don't need.
- Benjie: I think we should rule out option 2
- <general agreement>
- Jordan: this comes back to how this is entangled with fragments.
- Matt: I'm not convinced
?propagation is as much of a footgun in practice. - Michael: why
?and not just nearest nullable field? - Alex: nuance: it'll blow up everything between
?and!even if fields in the chain are nullable. - Lee: I'm fairly in support of this last option. When describing the schema it should not be typical that an error occurs. The goal should be a server that causes exceptions. An
!is meaningfully different - you're saying that the server might have data output that I want to create different behaviour for. This is why Relay found that people use this option a lot more. Either you need!on every item in the path, or you let the client do?...!. How much of this is a footgun? Can we tweak the behaviour. - Anthony: does it fix the fragment isolation issue?
- Jordan: it does not, but we could make fragment boundaries a error boundary.
- Benjie: for clarity, if you have
!in option 3 but no?then does the entire response blow up? - <Yes>
- Lee: footguns.
- Field merging and fragment boundaries. They need the same CCN otherwise they cannot merge.
- ! and ? probably need to show up as pairs - we should solve this with documentation -
!is like a throw and?is like a catch.
- Benjie: we could use different symbols for option 3 if we wanted to, e.g. if
!isn't clear. - Roman: Why not directives?
!could be shortcut for directive. - Alex: I'd like not to discuss naming / syntax right now.
- Votes:
- 1: 0
- 2: 1
- 3: 9
- "1 or 3": 2
- Nullable designator
- Since we chose option 3,
?necessarily marks a field nullable. - Skipping due to previous discussion
- Since we chose option 3,
- Error handling
- Many clients throw out the entire response if an error occurs.
- Options
- Status quo: no custom handling (same as currently)
- CCN errors are distinct - treated as "less serious" or "handled by default"
- e.g. excluding errors
- e.g. including if flag is enabled on execution
- e.g. namespacing a field
- e.g. add a isHandled property to all errors
- e.g. separate array of handledErrors
- Query syntax to catch errors
- (if not handled, same as Status Quo)
- I'm using @catch as a stand-in syntax to separate ? for null handling versus error handling.
- Benjie: does
@catchmean that the field becomes nullable? - Alex: no. nulls propagate but errors do not - they go straight to the errors array.
- Lee: feels like the first one isn't particularly useful now given previous discussions
- Matt: if we stick errors in error array when "it blows up and is caught" that's fine - a client can still decide to blow up, it's a client choice. I don't think we should over-pivot on "some clients blow up when they don't need to."
- Michael: if there's a list there could be a lot of errors that could overwhelm you and blow up the result - there should be a way to catch these errors.
- Matt: this could almost be used as an attack vector - request 100 items with paths that you know are null and use
!and?to make the server produce a lot of errors for you. - Anthony: the handledErrors might be a better option because then you won't have to loop through errors checking for the "isClientControlledNullability" property.
- Roman: it's not errors - it's just a client assertion at the end.
- Lee: and when we add a ? then we may just want to throw away these assertions. I like the change in terminology to assertions.
- Roman: two kinds of errors - client side errors (validation, bad variables), server errors (when resolvers failed). CCN is much like the client-side errors.
- Matt: this is probably the most up in the air of the topics discussed.
- Anthony: a lot of these errors could be generated - aggregating them into a single error might be the most efficient.
- Roman: lets take discussion back to the discussion threads
GraphiQL Lead Maintainer(s) Wanted (10 Minutes, Matt Mahoney)
- I'm presenting this at Rikki's request. Rikki wants to move away from the "lead" portions of GraphiQL, she doesn't want to be the sole person that all PRs/etc go through. Uri's interested. GraphiQL has a lot of momentum, has designs, lots of roadmap detail, very exciting. We want GraphiQL to be healthy enough that a leader can step back from organising and there'll still be momentum
- Lee: Tim is interested. Will sit down with him next week to discuss.
- Matt: I believe Rikki's already talking to him. The more people interested and active the better.
- Lee: if you know anyone interested, send them our way!
- Saihaj: at The Guild we're already helping with v1 maintenance and we'd like to help with V2.
Defer & stream discussion (30m, Rob Richard)
- Regarding errors: feels like @stream/@defer act as an error boundary because they have to. Nulls not an issue for @defer because it should always be an object, so returning null is clear. Stream is less clear because the null could be a valid stream item. One option was to wrap stream payload data in an array. This could also be useful for batching.
- Yaacov: I put together an implementation that can do both types of batching.
- Yaacov [chat]:
- My suggestions for batched/parallel streaming implemented in pr on graphql-executor: https://github.com/yaacovCR/graphql-executor/pull/154#issuecomment-1058448178
- Lee: two things - client indicating intent (number of items in first payload); server wants to chunk in most efficient payload sizes
- Rob: if the async iterables can return batches then when the client wants the next payload they can get the list - there's no delay.
- Benjie: seems essential that the data type of the data in the streamed payload should be a list - otherwise we have to provide a path with every single list items which could substantially inflate the response size. Further this solves the null issue - if the data is null then it's an issue in the stream (same as defer)
- Matt: Facebook didn't have that issue because it just swallows nulls in lists. It's fair for OSS to have to handle this.
- Rob: so the
dataforstreamshould always be a list with one entry, and if a non-null bubbles up then we setdatatonull. - Matt: maybe it should be "items" rather than "data"?
- Michael: "data" is always an object, "items" could be a list
- Benjie: This also helps the client understand the payload without knowing the query - "data" gets merged, "items" gets appended - that way we don't need a redundant "atIndex" or other data since it just gets appended.
- Michael: Lee did talk about there being an option for items to be streamed out of order.
- Matt: if we're going to break symmetry, maybe we should really break symmetry.
- Michael: it could solve a lot of issues for the client understanding what needs to be done.
- Roman: do we need these details in the spec? [paraphrased] There's lots of options, why not allow servers to do whatever they want?
- Matt: given there are so many situations I think that's WHY we need to be very specific
- Michael: and the client needs to understand what it will receive.
- [Discussion changes to labels]
- Lee: Seems like labels should be static
- Matt: what if a client is running the same operation with different variables twice, it might want different labels.
- Lee: but why do you use it?
- Matt: it's because we don't have keyed fragments.
- Lee: it feels like a hack because we don't have some other feature, rather than something absolutely required for stream/defer.
- Rob: and add a rule that enforces that it has to be static and cannot be a variable
- Lee: that would be my pitch
- Rob: I'll go ahead with that.
- Lee: "if you want to look at the payloads coming in your streamed response and link them to specific nodes in your AST where stream/defer occurred then this is how you'd do it".
- Matt: yeah, this is equivalent to clientMutationId
- Lee: I can imagine future clients using this in interesting ways, like loading indicator behaviour.
- Michael: because we can omit that, you can't really do that. You might wait for a label that never comes. That's why we moved to the keyed fragment approach because you know a certain fragment is fulfilled - it's fulfilled so you can update your store.
- Lee: do we want to have an indication of what labels are coming. If there's no
hasNextthen there's not going to be any labels coming, but ifhasNextis true it's not clear - maybe we should havedeferredLabelsthat indicates that a future payload is going to have that payload. - Michael: I think the keyed fragment feature would be better?
- Matt: it would be, but it's just not what we've actually done.
- Lee: either way, label should not be required.