GraphQL WG ·
GraphQL WG meetings · Jump to notesAgenda
GraphQL WG – June 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: June 2nd 2022 18: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/593263740
- Password: graphqlwg
- Live Notes: Google Doc
Attendees
| Name | GitHub | Organization | Location |
|---|---|---|---|
| Lee Byron | @leebyron | GraphQL Foundation | San Francisco, CA, US |
| Adron Hall | @adron | Amazon | Seattle, WA, US |
| Ben Kraft | @benjaminjkraft | none | San Francisco, CA, US |
| Michael Staib | @michaelstaib | ChilliCream | Zurich, CH |
| Martin Bonnin | @martinbonnin | Apollo. | Paris, FR |
| Benoit Lubek | @BoD | Apollo | Paris, FR |
| Alex Reilly | @twof | Yelp | San Francisco, CA, US |
| Benjie Gillam ✏ | @benjie | Graphile | Chandler's Ford, UK |
| Bobbie Cochrane. | @bobbiejc | StepZen | Oriental, NC |
| Yaacov Rydzinski | @yaacovcr | Individual | Neve Daniel, IL |
| Nick DeJaco | @ndejaco2 | Amazon | Seattle, WA, US |
| Tim Suchanek | @timsuchanek | GraphCDN | Austin, TX, US |
| Rob Van Gennip | @ravangen | Shopify | Toronto, ON, CA |
| Roman Ivantsov | @rivantsov | Microsoft | Seattle, WA, US |
| Marc-Andre Giroux | @xuorig | Netflix | Montreal, Canada |
| Stephen Spalding | @fotoetienne | Netflix | Los Gatos, CA, US |
| Hugh Willson | @hwillson | Apollo | Ottawa, ON, Canada |
| Ivan Goncharov | @IvanGoncharov | Apollo | Lviv, UA |
| Dariusz Kuc | @dariuszkuc | Apollo | Chicago, IL, US |
| Matt Mahoney | @mjmahone | Meta | New York, NY, US |
| Doc Jones. | @doc-jones. | Postman. | Raleigh, NC, US |
| Gabriel McAdams | @ghmcadams | None | San Jose, CA, US |
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)
- Proposal: Composite Schemas Working Group (10m, Benjie)
- Aim: gather feedback and interested parties; determine if the WG is warranted
- LLM-matched RFC: https://github.com/graphql/graphql-wg/blob/main/rfcs/CompositeSchemas.md
- add
@experimentaldirective (20m, Martin) - clarify root operation types (5m, Ben)
- CCN status update (10m, Alex Reilly)
- Should I target the GraphQL-JS 17 instead of 16?
- Quick naming vote maybe
- LLM-matched RFC: graphql/graphql-spec#895
@oneOfupdate (20m, Benjie Gillam)- Recent changes:
__Type.oneOf->__Type.isOneOfand forbiddingextend input Foo @oneOf - Effect on implementations of adding
@oneOfdirective: is it a breaking change? - Added @oneOf objects RFC - main question for input
@oneOfis over presence vs non-presence - LLM-matched RFC: graphql/graphql-spec#825
- Recent changes:
- "Unions implementing interface" update (10m, Yaacov Rydzinski)
- Implementation question for Union fields (link: https://github.com/graphql/graphql-spec/pull/939#issuecomment-1139553941)
- "Unions of interfaces and/or unions" (15m, Yaacov Rydzinski)
- Spec PR (link: https://github.com/graphql/graphql-spec/pull/950)
- General spec issues (15m, Roman Ivantsov)
- Small things, 5m (discussion link: https://github.com/graphql/graphql-wg/discussions/969)
- Bigger things - presentation, 10m
- Adding "meta" fields to SDL and introspection (15m, Ivan Goncharov)
- Aim: it's super early proposal, so I want gather feedback if it's a better alternative to exposing directives through introspection.
- Presentation
Notes
GraphQL WG Notes - June 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) 5. Ready for review 6. All open action items (by last update) 7. All open action items (by meeting)
- Proposal: Composite Schemas Working Group (10m, Benjie) 8. Aim: gather feedback and interested parties; determine if the WG is warranted
- add @experimental directive (20m, Martin)
- clarify root operation types (5m, Ben)
- CCN status update (10m, Alex Reilly) 9. Should I target the GraphQL-JS 17 instead of 16? 10. Quick naming vote maybe
- @oneOf update (20m, Benjie Gillam) 11. Recent changes: **Type.oneOf -> **Type.isOneOf and forbidding extend input Foo @oneOf 12. Effect on implementations of adding @oneOf directive: is it a breaking change? 13. Added @oneOf objects RFC - main question for input @oneOf is over presence vs non-presence
- "Unions implementing interface" update (10m, Yaacov Rydzinski) 14. Implementation question for Union fields (link: graphql/graphql-spec#939 (comment))
- "Unions of interfaces and/or unions" (15m, Yaacov Rydzinski) 15. Spec PR (link: graphql/graphql-spec#950)
- General spec issues (15m, Roman Ivantsov) 16. Small things, 5m (discussion link: #969) 17. Bigger things - presentation, 10m
- Adding "meta" fields to SDL and introspection (15m, Ivan Goncharov) 18. Aim: it's super early proposal, so I want gather feedback if it's a better alternative to exposing directives through introspection.
Determine volunteers for note taking (1m, Lee)
- Benjie
- Stephen
Review agenda (2m, Lee)
- [No comments]
Review previous meeting's action items (5m, Lee)
- Ready for review
- All open action items (by last update)
- All open action items (by meeting)
- [2021-03-04] Add a non-normative note that GraphQL request != HTTP request 19. Benjie: PR made
- [2022-05-05] Add security document to .github repo 20. done
- [2022-05-05] CCN - discussion thread on naming 21. Alex: Thread created
- [2022-05-05] Intersection type proposal: refine the tests 22. closed
- Benjie: also please have a look at https://github.com/graphql/graphql-wg/issues/988
Proposal: Composite Schemas Working Group (10m, Benjie)
- Aim: gather feedback and interested parties; determine if the WG is warranted
- Benjie: A lot of different ways of taking multiple schemas and merging them into one big one. Quite common to build a larger one from smaller ones. (examples listed in the linked proposal). For the common functionalities, it would be cool if we can define a specification.
- Lee: We do a lot of parallel working groups. Would like to think about these as sub-committees. For things that deserve more time, get into the weeds, then report progress as the main meeting. You can decide cadence appropriate to the phase.
- Benjie: One key thing - reporting back. We lack that at the moment. This meeting isn’t a period for discussion of these things. It’s reporting and here’s how to get involved.
- Lee: Action, next step?
- Benjie: An official stamp?
- Lee: SGTM. Seems very worthwhile.
- Yaacov: A lot of interesting subtopics. E.g. transforming schemas. It’s great to explore that but we might end up with a couple different add-ons that fit together in some way.
- Benjie: At the moment, thinking one or more separate specs and could also contribute to main spec.
add @experimental directive (20m, Martin)
- [19:25]
- [ Martin shows slides]
- @experimental issue #943.
- Discovered whilst working on a conference API. Example: “adding a start date/end date” - time is hard! How do we do this? Introduced an “Instant” custom scalar. We’re not 100% confident it will work/scale, but we want people to be able to experiment but not ship to production.
- Hence: @experimental directive. It’s the counterpart of @deprecated; it adds a reason and indicates that it can be changed in a backward-incompatible manner.
- In Kotlin the codegen can add
@Experimentalannotation (from Apollo). In a Kotlin project, you’ll get the warning directly in your IDE, and in the command line. You can@OptIn(...)to ignore the warning. - GitHub uses “schema previews” feature via the Accept header.
- Netflix uses
@deprecated(reason:"Experimental") - Questions:
- Do we need a reason?
- Do we need more metadata?
- Should we include experimental fields in introspection?
- How do we expose experimental status in introspection?
- Gabriel: this is a highly needed directive; but could we make a broader/more flexible one (e.g. "with comment") that could apply to experimental or any other use case. Experimental doesn't "mean anything" - it just supplies a comment. To have an official directive that doesn't do anything seems dangerous.
- Lee: agree, we should decide on the mechanism. Kotlin started with deprecated, then changed it to "opt in". This would imply behavioral changes you might want - this is how deprecation works.
- Lee: with deprecated stuff it makes sense there's a list that is added to. Might be dangerous to opt in to everything all at once - all or none doesn't seem like the right mechanism. Do we need an experimental reason. Flag name? Could be a different behavior to deprecated where you opt in to a list of features.
- Michael: I think GraphQL Ruby has these features?
- Marc: that's what the Accept header would do - use the GraphQL Ruby feature flags.
- Marc: There's a catch-22 here, some people will choose not to use it, but others will want to and then it can't be removed. (Either it gets big usage and then it's not experimental, or it gets no usage in which case the experiment hasn't got any data.)
- Gabriel: deprecated has the similar feel - though you can remove it any time you still have to time the removal with all your users. Your schema is about communication. Experimental has the same feel; it adds great value when communicating about the schema.
- Roman: seems like this is for POCs. When there are multiple teams using the internal API it's a good way to communicate with people outside the closed circle that this is something that might not be there.
- Roman: this signals not to use it - removing in V3, be prepared. Not for production.
- Roman: why in the main spec? Could be a standalone directive and it would be fine.
- Benjie: these directives should be shared so that common tooling such as GraphiQL can make use of them - either via the Spec proper or a shared sub-spec.
- Lee: indeed, the question is over whether it affects introspection. If it's just metadata then it's easy to add.
- Stephen: Benjie articulated why we'd have it in the spec; it is just metadata, and just representing it in a generic way in introspection would be fine. But it being standardised does allow tools like GraphiQL to incorporate some default functionality for it, and there's value in that. How this is handled will vary in different companies; we have @experimental in Netflix and the subtleties are very different for our enterprise apps versus consumer apps. For consumer apps we do a lot of A-B tests in production; the answer to "can we use this in production" may depend on your company.
- Stephen: Experimental implies a contract that differs from the normal contract - this is likely to change.
- Lee: agreed. Martin, do you have enough information to stew on this?
- Martin: what are the next steps? Should I make a spec PR?
- Lee: my read is that there's interest that this is a problem, and there are examples of people doing this. We've also heard some of the pitfalls. Rather than coming at this from "we should have @experimental directive" we should come at it from the point of view of the problem. [...] If it's useful to do this via a PR then feel free.
- Roman: the outcome depends on other things - exposing directives/metafields/etc. Lets follow this other thread.
- Michael: the introspection is dependent on that, but the formal specification is it's own thing.
- Roman: if you determine that certain fields has the experimental flag through introspection then this changes a lot of the conversation.
- Michael: but formalising the @experimental directive could have its own value.
- Martin: I see @experimental versus @optIn is an interesting discussion; I'll come up with a couple of proposals for this and you can tell me what you think.
- Lee: sounds great; thanks for the presentation.
clarify root operation types (5m, Ben)
- Ben: if you have a schema and it doesn't define
MutationorSubscriptionthen the spec says "the schema doesn't support mutations and subscriptions" but there's no validation rule for this; and thus many GraphQL implementations will validate operations against operations that don't exist (and allow garbage). - I've added a PR for a validation rule that requires that the type of the operation exists.
- Benjie: PR is very simple. I’m very much in favor
- Lee: tagged RFC1. Feels like it's close to the criteria for RFC2. Anyone got any comments?
- Ben: the thing I didn't put in the PR is the spec also says that you have to have a Query type, but there's no validation rule for that. The schema side seems a little less consistent about where it puts the validation rules. And it seems real schemas will have a Query type. Should we make that explicit as well.
- Lee: I think we discussed this before.
- [discussion]
- Michael [chat]: https://spec.graphql.org/October2021/#sec-Schema
- Lee: I think we do validate that Query exists. But this is request validation rather than schema validation.
- Matt: schema level validation and execution level validation are different - if you join them then having no Query is not possible, but if you don't then it's good to cover that in execution validation.
- Ben: yes, and as written the case of no Query is covered.
- Lee: it's RFC1 now. We agree it's a reasonable problem to solve. RFC2 is making sure the implementation is the right one; I'll do a read through of the spec text that you gave too - hopefully we can advance this relatively quickly.
CCN status update (10m, Alex Reilly)
- Should I target the GraphQL-JS 17 instead of 16?
- Quick naming vote maybe
- Alex: there's a few discussion threads up. #994 is what we call the syntax, #965 is discussing the name of the proposal itself. I need a name to call it in the conference next week, so I'm going to close the polls at noon tomorrow and pick whatever name wins.
- Alex: GraphQL.js v17 - should I target that or 16?
- Lee: that's probably a question for Ivan.
- Ivan: most of the time we don't do bugfixes - we add stuff/do experimental things. So we have a development version and a stable version. Target the development version, backporting it should be relatively simple.
- Alex: we're pretty close to merging lexing/parsing - just need to solidify the syntax names.
- Michael: PR link?
- Alex: I'll also open a thread to discuss the alpha.
- Alex: One other thing that came up during implementation is it looks like with the new null propagation behavior we voted for, the operators on fields will strictly need to match in order to be merged now, which wasn't the case with the previous null propagation behavior. I'll write something up about that in the null propagation discussion thread.
- [19:58] The WG voted by a narrow margin to take a 4 minute break. 🎉 to power on, 👍 to take a break; the thumbs have it!
- [20:02]
@oneOf update (20m, Benjie Gillam)
- Recent changes: **Type.oneOf -> **Type.isOneOf and forbidding extend input Foo @oneOf
- Effect on implementations of adding @oneOf directive: is it a breaking change?
- Added @oneOf objects RFC - main question for input @oneOf is over presence vs non-presence
- Benjie: Advanced to RFC 2 last month. A few changes 23. Ivan review impl, recommended rename introspection field (isOneOf to match isDeprecated) 24. Can no longer apply oneOf to input object extension. Extension validation rules do not retrospectively apply to original object.
- Benjie: @oneOf is already used in the ecosystem. We had said before we can introduce new directives. However, for implementations, would this be seen as a breaking change that requires a major version bump? Is that a decision for each impl?
- Michael: It’s an experimental feature, so it’s not a breaking change.
- Roman: How is it breaking?
- Benjie: In user schemas they might already have their own oneOf defined.
- Lee: Makes sense. We could align this spec cut with major version release. We’ve done that before. No strong opinion here.
- Benjie: I’ve also introduced RFC #948 OneOf Objects. If we were to decide fields present but null for objects should we do the same for inputs? The current proposal is more restrictive so we can add more later.
- Lee: Does this preclude us from providing an input with a null value intentionally?
- Roman: We can already distinguish between absence and null
- Benjie: This is intended to represent a polymorphic object. It’s either a cat or a dog
- Benjie: Would appreciate a comment in the issue with a use-case for null values in the input union
- Michael: There was a short youtube video for the feature in hot-chocolate and this was the first question - how do we provide null?
- Roman: Be strict on what you provide, strict on what you accept. Don’t throw an error - let the resolver figure it out.
- Lee: Imagine an old client but a new server. New server is aware of oneOf. Old client is not yet aware. If server introduces type non-nullable types, the client would think that you need to provide a value for all non-null fields. oneOf is a codification of an existing pattern. Servers are already doing this under the hood. They can’t mark them all as required.
- Stephen: There are trade-offs with conflating nullability and presence/absence, but this is a trade-off that we’ve already chosen in GraphQL by choosing simplicity. In order to allow null values in an input object we would require clients and servers to distinguish between presence and null which could have implications for alternative serializations that drop null fields as an optimization.
- Lee: One thought we should explore - side step this whole thing. Rather than this being a new input validation that rejects null values say that if your type resolver sees null it should reject it.
- Roman: If we remove @oneOf from everywhere, things keep working. It’s an extra validation. This means that syntax change is unjustified. For example, if I removed this directive from the schema it still works.
- Benjie: next steps
"Unions implementing interface" update (10m, Yaacov Rydzinski)
- Implementation question for Union fields (link: graphql/graphql-spec#939 (comment))
- Yaacov: We're making some advancements towards expressing that a union implements an interface. We wanted to see the impact of this on introspection, and we also want to be able to query fields directly on the union because it honors that contract.
- Yaacov: I had assumed that the
fieldskey on introspection for a union that implements interfaces should return these fields but I ran into issues doing this, but Benjie suggested that maybe this isn't what we meant at all. - Yaacov: Benjie said the union doesn't add fields, doesn't define any in the SDL, so introspection shouldn't either.
- Lee: it's interesting; this would be the first place where these things become decoupled, currently everything that implements the fields has to indicate them because they may be equivalent or they may be a subtype.
- Yaacov: if we don't include the fields then it's not obvious when reading the schema what fields are available.
- What's the shape? Just looking at the
uniondefinition line in SDL it's not clear which fields are available. - Seems like this raises interesting problems but not necessarily problems that we need to solve right now.
- Lee: our bar for net value should be set fairly high - they introduce complexity but add value; if there's more complexity then it's not unreasonable to explore it less vigorously.
"Unions of interfaces and/or unions" (15m, Yaacov Rydzinski)
- Spec PR (link: graphql/graphql-spec#950)
- [20:34]
- I've sketched out an option for how you might allow unions to include interfaces as entries
- This feels easier than the other change, doesn't introduce the complexities into introspection/etc.
- Lee: this one has non-obvious introspection consequences - we currently guarantee that the
possibleTypesare all object types; if we convert to object types then we'll lose this information in GraphiQL/when converting back to SDL/etc. - Lee: we decided that even though it's more constrained you never have to crawl, bad situations cannot occur, etc. This makes me nervous.
- Yaacov: I think it'll make unions easier for the community.
- Benjie: why couldn't this be done with build tooling? Is it because you want to be able to render it out in GraphiQL?
- Yaacov: this would help you with the type hierarchy but wouldn't affect the validity of queries. May not be as much in demand as I felt it was.
- Lee: it feels like it's not just a build-time thing; it feels like there's a constraint solve that's not expressible in the type system today.
- Lee: I like the constraints approach better, this one makes me nervous.
- Yaacov: I'm mostly investigating questions on the spec repo: "why isn't this possible?"
General spec issues (15m, Roman Ivantsov)
- Small things, 5m (discussion link: #969)
- Bigger things - presentation, 10m
- Roman: no feedback since I posted this last week. Small things - not about how GraphQL works, but more about how we express it.
- Lee: we have a github tag for this, you should file these as PRs. "Editorial". Don't list them all in one discussion thread which makes it really hard to weigh in. Split them up, if there's a typo it should be merged really quickly, if it's more in depth then you can make a proposal. Sometimes we make mistakes and we can fix those with editorial - e.g. you indicated that we made a mistake around newlines occurring.
- Roman: my ask wasn't to discuss them but to know the process. I'll send PRs for the typos, but should I open separate discussions for the others?
- Lee: either raise a PR or a discussion for each one, PR is easier.
- ACTION - Roman: file these PRs/discussions.
- [20:48]
- [Starts screen sharing] Bigger issues.
- My impressions as a newcomer when reading GraphQL spec - things that don't make sense.
- Definition of what is GraphQL - for building client applications. "I'm a server developer - am I in the wrong place? Is it like React?"
- It's a language but there's things in the spec that aren't about the language. And there are two languages.
- (Note taker: I was unable to keep up with note taking/summarizing, recommend you watch the YouTube presentation, starting 17-ish (?) minutes before the end of the meeting)
- Lee: I strongly disagree that we should remove algorithms. The spec is the algorithms. We have a paragraph in the spec:
- Conformance requirements expressed as algorithms can be fulfilled by an implementation of this specification in any way as long as the perceived result is equivalent. Algorithms described in this document are written to be easy to understand. Implementers are encouraged to include equivalent but optimized implementations.
- Matt, Michael [chat]: A lot of value in the algorithms
- Benjie [chat]: ^ this paragraph is CRITICAL.
- Greg [chat]: Agree on the part that the spec is quite prescriptive on how certain things need to be supported. Common understanding is that the algorithms are illustrative rather than prescriptive, the implementation may choose the best way to implement as long as it matches the specified outcome.
- Lee: everything else is open to discussion.
- Roman: can we vote on extending this to next Thursday?
- Lee: let's take that offline, next Thursday most of us are at the conference.
- [21:05] End
[Note-takers note: there was a fair number of comments in chat I couldn't transpose, sorry!]
Adding "meta" fields to SDL and introspection (15m, Ivan Goncharov)
- Aim: it's super early proposal, so I want gather feedback if it's a better alternative to exposing directives through introspection.
- [We had to bump this to next meeting]
- Ivan: my topic was last minute to bumping it to next month is fine; I've put a link in the notes: 26. https://docs.google.com/presentation/d/1qGc2rZKeim699tT-2G1xDESZP3Kd6tvj9V27tQfyJhg/edit?usp=sharing