GraphQL WG ·
GraphQL WG meetings · Jump to notesAgenda
GraphQL WG — November 2024 (Primary)
The GraphQL Working Group meets regularly to discuss changes to the GraphQL Specification and other core GraphQL projects. This is an open meeting in which anyone in the GraphQL community may attend.
This is the primary monthly meeting, which typically meets on the first Thursday of the month. In the case we have additional agenda items or follow ups, we also hold additional secondary meetings later in the month.
- Date & Time: November 7, 2024, 10:30 AM – 12:00 PM PST
- 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: Live Notes
Attendees
| Name | GitHub | Organization | Location |
|---|---|---|---|
| Lee Byron (Host) | @leebyron | GraphQL Foundation | San Francisco, CA, US |
| Martin Bonnin | @martinbonnin | Apollo | Paris, FR |
| Greg Wardwell | @gwardwell | Wayfair | Fort Wayne, IN, USA |
| Rob Richard | @robrichard | 1stDibs | New Jersey, US |
| Kewei Qu | @Keweiqu | Meta | Menlo Park, CA, US |
| Benoit Lubek | @BoD | Apollo | Paris, FR |
| Alex Reilly | @twof | Independent | San Francisco, CA, US |
| Benjie Gillam | @benjie | Graphile | Chandler's Ford, UK |
| Jeff Auriemma (arriving late) | @bignimbus | Apollo | Monroe, CT, US |
| Yaacov Rydzinski | @yaacovcr | Individual | Neve Daniel |
| Calvin Cestari | @calvincestari | Apollo | Vancouver, BC |
| Stephen Spalding | @fotoetienne | Netflix | Los Gatos, CA, 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 prior secondary meetings (5m, Host)
- Review previous meeting's action items (5m, Host)
- Make
reasonnon-nullable in@deprecated(@martinbonnin, 5 min) - Discuss enhancing deprecation (@gwardwell, 15 min)
- LLM-matched related RFCs: graphql/graphql-spec#300
- Align on next steps for expanded client use cases (union member and interface implementation deprecation)
- Align on next steps for service/development use cases (deprecation as communication for distributed schema development)
- Issue for context: https://github.com/graphql/graphql-spec/issues/1119
- Open object type deprecation PR: https://github.com/graphql/graphql-spec/pull/997
- Incremental Delivery update (@robrichard, 15 min)
- Asking for review of spec edits
- PR open against integration branch, containing only sections 3 & 7
- Full PR
- Nullability WG Update (@twof, 10 min)
- Directive Meta-Field Proposal (@yaacovCR, 5 min)
- Subscriptions and Source Event Stream Errors (@yaacovCR, 15m)
- Can graphql-js throw on source stream errors? See: https://github.com/graphql/graphql-js/issues/4001
- Relation to proposed event stream edits by @leebyron at https://github.com/graphql/graphql-spec/pull/1099
- Interface field argument default values (@yaacovCR, 15m)
Notes
GraphQL WG Notes - November 2024
Watch the replays: GraphQL Working Group Meetings on YouTube
Agenda: https://github.com/graphql/graphql-wg/blob/main/agendas/2024/11-Nov/07-wg-primary.md
Make reason non-nullable in @deprecated (@martinbonnin, 5 min)
@deprecated(reason: null)doesn't make sense. Suggest we make it non-nullable, technically a breaking change.- Consistently nullable in many places in the spec, and will need fixing in many places. Also mentions optionality in many places.
-
deprecationReasonoptionally provides a reason why this input field or argument is deprecated. - ^ This is made incorrect by this change, need to remove "optionally"
Discuss enhancing deprecation (@gwardwell, 15 min)
- Proposing to overhaul deprecation, and figure out the correct approach.
- There are gaps in introspection:
- Removing an interface or a type from a union: show that removing an inline fragment is deprecated and should go away
- Lee: conceptually anything in the schema should be able to be deprecated. We started with what we had and we've been moving slowly ahead from there. There's often complexities and edge cases that differ on a feature by feature basis.
- Kewei: deleting a type from a union would be breaking.
- Greg: deprecating the fact that type is a member of the union would give clients guidance to move away from using it so that ultimately the client can remove the field
- Kewei: but you can't change shipped clients.
- Greg: that shipped code should be replaced by new shipped code - unlocks new opportunity
- Lee: in line w/ how deprecation works today, Kewei this resonates - once binary is out in the world it can take a long time if a historical build contains getTheThing and you want to deprecate it - server can’t delete it, it’s breaking. If you break it, it’s deprecated. Can remove it from introspection
- If you deprecate it, it's a signal to clients that they should not use it any more.
- Deprecating a type in a union is a promise that the server will never ever return that type in the union ever again. You would not want the server to deprecate a union member but then actually return it.
- By extension: a union cannot deprecate all of its member types
- Cannot have an empty union - must be able to return something - prob a validation rule - at least one member of a union must not be deprecated. All kinds of fun things.
- Benjie: do it on a feature-by-feature basis
- Lee: not to scare you away from it, eat the elephant one bite at a time
- Greg: Easy slicing, server deprecation use case - tells people to stop using something w/in graph - stop returning scalars you want to go away - objects, same thing - stop contributing or extending them
- (i.e. this is a note to schema designers not to schema consumers.)
- Should we slice them individually?
- Benjie: this seems like a note to schema authors, not necessarily consumers
- Greg: I’d expect IDEs to be able to make use of these. Could have client-side utility. But for scalar, there’s not a lot of client value there - but lots of value on the server
- Benjie: should probably be a different directive. Suggested
@discontinuedin chat - doesn’t necessarily mean “deprecated” from a client POV, just don’t add more on the server side - Lee: why a separate directive? I might be confused there
- Benjie: thinking of a situation. Doesn’t make sense from a client POV for a scalar to be deprecated on the client, not going to change anything, may not necessarily be your intent to hide them from clients
- Jeff: client-side schema extensions may be a potential overlap here
- Lee: could have a validation rule to prevent deprecated objects/entities from being included in non-deprecated objects/entities
- Stephen: …
- Lee: deprecate vs intend to deprecate?
- Calvin: Having to read notes in a schema to see if something is discontinued is one thing - how do we take that to clients in the IDE environment?
- Benjie: intent would be to the SDL use case - no autocompletes, for example
- Greg: at Wayfair we have a lot of subgraphs (governance?)
- Benjie: if you deprecate a scalar, it’s kind of meaningless to the client
- Lee: could be a tooling solution
- Benjie: (...) (expresses some nuance)
- Greg: with the new federation spec - entering into a new “contract” with how the graph operates. Being able to communicate the state of schemas in a distributed manner. Could be a distributed spec
- Lee: a few paths -
- Lee: using comment blocks? Descriptions? It’s a bit hacky but it’s a great experimentation ground.
- Greg: maybe a doc style
- Lee: #300 is probably the ultimate solution but there’s value in this proposal as well
- From chat:
- Benjie: It's spec issue #300 again (metadata)
- Jeff: Yeah there could be a tooling solution here, maybe using comment blocks, at least as a first step. We might learn enough to help drive forward the case for a spec addition? Idk
- Benjie: Basically: it should be in the SDL that you can produce from introspection. I think advancing #300 and then standardizing some common directives (a little like the GraphQL scalars project) would work well.
- One of GraphQL's greatest values is sharing rules across the ecosystem so that standardized tooling can leverage them :)
- In
gqlcheckwe keep a "baseline" of what was in place when the rule was initialized so that all those instances are allow-listed but no more can be introduced. https://github.com/graphile/gqlcheck @deprecatedside-steps this need by ensuring that everything is @deprecated all the way up, but this new directive would be the inverse and wouldn't have that.
Incremental Delivery update (@rob, 15 min)
- Rob: it’s implemented in graphql-js for a while
- Made an integration branch w a subset of changes
- We can focus on one area at a time, month by month get through the whole thing
- Looks like a lot of changes, there are a few changes
- List of a few examples for review. Get eyes on it
- graphql-spec#300
- Lee: reminds me of the old compliance tests (codified version of that appendix)
- Given this query, you get this sequence of responses. Big fan of the idea of an appendix
- Massive change, lots of work and edge cases. Balance between legibility and readability
- Could be technically correct but also prone to misinterpretation. Examples are extremely valuable to that end
- In lieu of a compliance test framework, this could be super valuable
- Please read! :)
Nullability update (Alex, 15 min)
- We ran a poll and chose the
?for optionals, nothing for semantically non-nullable, and!for (strict) non-null - Currently working on an implementation
- There's a pair of blog posts that need a bit of tweaking before the go out
- Benjie's post was for developers of clients like Relay, etc
- Alex's for end users
- Once the implementation is done, will be working on spec edits to go along with that
- I think we’re pretty well aligned on the details at this point
- Lee: backstory on syntax? Been a debate
- Alex: ran a poll w/ three options (nullable, semantically non-null, non-null)
Foo,Foo!,Foo!!Foo?,Foo,Foo!Foo,Foo*,Foo!
- Benjie: what does it mean for people writing queries? Do we need a document directive in the executable documents?
- Lee: I have a hunch that the cost of changing the executable document is higher. Being cautious about how we introduce this feels like the good thing to do.
- Benjie: please test the functionality. It’s all in Relay, some Apollo tools, and other places.
- Alex: we also have other tools such as toe and sock!
- Benjie: more tools to play with so you can experience all this cool stuff today!
Directive Meta-Field Proposal (@yaacovCR, 5 min)
- Yaacov: this is not a huge proposal
- Yaacov: This is a new meta field to know about a single directive without getting all of them
- Lee: **type(name: String) should have been **Schema.type(name: String)
- Lee: we could deprecated the top level __type
- Only 2 places with **: **typename and __Schema
- There are many places where we need to set includeDeprecated. We could to __schema(includeDeprecated: true)
- Right now it’s possible to have an inconsistent schema by passing different includeDeprecated values
- Yaacov: I can tackle pieces of it bit by bit
- Benjie: We have similar need for semantic nullability (though currently doing
it on the
__Field.typefield is sufficient. - Lee: We could have __Schema.sdl
- Benjie: but what version of GraphQL we use for for that SDL?
(Yaacov: last topic is the most interesting one, as we do not have a lot of time, we’ll probably skip it)
Subscriptions and Source Event Stream Errors (@yaacovCR, 15m)
- Yaacov: The state of the reference implementation is if the server can’t have the iterartor, graphql-js will raise a nicely formatted request error.
- We still have an interesting case if there is an error when trying to get a value => graphql-js just throws here.
- The spec says something like “it should return an error” without much precision.
- In JS you can always catch the error but we got requests to handle this differently
- If the source stream throws, does “complete with an error” mean graphql-js throws at well?
- Lee: graphqls-js should only throw if you would return 500. GraphQL-js does not throw on field error
- From chat: Benjie
subscribe()should returnPromise<{ errors: [...] }>not throw - Lee: I think my rewrite takes care of that case. Grab the error and expose it as a GraphQL error
- Benjie: Could be bug in https://github.com/graphql/graphql-spec/blob/streams-editorial/spec/Section%206%20--%20Execution.md#subscription
- Lee: the intent is for that mapSourceToEven be a response stream that never ends in failure. Only event and completes.
- The source stream can error but the map function accounts for that … well, actually maybe not. There might be a more substantial change to do there.
- Yaacov: the spec as it is now does not prohibit changing that
- Benjie:
Complete {responseStream} with {error}.should maybe beComplete {responseStream} with a response object containingerrors: [{error}].` - Yaacov basically, it depends on how graphql-ws (or similar) would handle it => @enisdenjo suggested that we handle it within graphql-js