Meeting Summary for Working Group Meeting
NOTICE: This summary was auto-generated by Zoom's "AI". AI-generated
content may be inaccurate or misleading. Always check for accuracy. If in
doubt, please consult the meeting recording at
https://youtube.com/@GraphQLFoundation/playlists
- Meeting start: 2026-07-16T17:32:00Z
- Meeting end: 2026-07-16T18:58:13Z
- Summary start: 2026-07-16T17:32:00Z
- Summary end: 2026-07-16T18:58:12Z
This meeting was a specification review session focused on reviewing the execution section of the GraphQL specification, specifically the collect fields and collect subfields functions. Rob presented the changes in PR 1234, which was the first time the group was reviewing the execution section as a whole. Benjie provided detailed feedback on the specification text, particularly around the concept of "defer usage" and how it differs from variable usage in terms of document-level vs runtime behavior. They discussed the complexity of handling deferred directives within list fields and how GraphQL JS implements memoization to optimize performance. Benjie suggested simplifying the language around data structures and clarifying the behavior of visited fragments to better match GraphQL JS implementation. The discussion covered technical details about how fragment visits are tracked and how the specification should reflect the actual behavior of existing implementations.
Next Steps
-
Rob: Rewrite the paragraph describing "defer usage" to clarify its meaning and align it with the existing use of "usage" in the spec.
-
Rob: Simplify the definition of "defer usage" to not specify it as an unordered map, but rather describe the information it contains (label and parent defer usage).
-
Rob: Add a more descriptive definition for "field detail" in the glossary.
-
Rob: Move the algorithm entry point (lines 442 and 443) down to just above line 479.
-
Rob: Delete the block describing the return values of the algorithm (collected fields map and new defer usages), as it is redundant.
-
Rob: Change the variable initialization for "defer directive" to ensure it is always defined (e.g., let defer directive be null, then conditionally assign it).
-
Rob: Update the handling of "visited fragments" in the algorithm to mirror the trinary logic used in GraphQL.js (as per the link provided in chat).
-
Rob: Tidy up the algorithm and data structure definitions, considering simplifying them to not specify data structures like maps, if it improves clarity.
-
Rob: Post in the Discord channel once all changes have been made to the spec for further review.
-
Benjie: Run the grammatical structure for returning multiple values by Lee for confirmation.
Summary
Specification Change Review Meeting
Rob and Benjie reviewed a specification change related to the execution section, specifically focusing on the collect fields and collect subfields functions. Benjie noted that returning multiple values from a spoke algorithm was an interesting aspect of the changes and mentioned he would review the grammatical structure with Lee. Rob explained that the data structures used in the specification were becoming more complex, with detailed introductory sections defining each data structure and its fields. Benjie questioned the definition of "defer usage" in the specification.
Defer Directives in List Fields
Rob and Benjie discussed the behavior of defer directives within list fields, clarifying that a single defer usage can create multiple delivery groups when used within a list. They determined that the defer usage operates at the document level, similar to a variable usage, while delivery groups are the runtime components that multiply. Benjie agreed to help clarify the wording around this concept, noting that the alignment with existing usage terminology was positive.
Field Selection Algorithm Implementation
Benjie and Rob discussed the implementation of a field selection algorithm that colors field selections based on their position in the document structure, with different colors representing different levels of defer directives. They clarified that defer usages are associated with operations rather than documents, and Rob explained that only one operation gets executed at a time. The discussion ended with Benjie asking about whether different fragment usages within nested structures would be considered the same defer usage, noting that they would likely be treated differently due to potential nesting within other defer directives.
GraphQL Defer Usage Discussion
Rob and Benjie discussed the differences in defer usage, particularly how it applies to fragments and field collections in GraphQL. They explored how the memoization in GraphQL JS optimizes the execution of deferred operations across list items, ensuring that subfields are only collected once even when executed multiple times. The conversation revealed that while the current specification doesn't handle this optimization, GraphQL JS implements it to improve performance.
GraphQL Defer Usage Specifications
Rob and Benjie discussed the differences between how GraphQL JS and the specification handle defer usages in list values. They identified that GraphQL JS uses memoization to avoid creating multiple defer usages for each list item, while the specification allows for multiple defer usages to be created. Benjie noted that the current specification wording about defer usages is inaccurate and needs to be rewritten to better reflect the intended behavior. They agreed that the specification should not mandate memoization but should focus on ensuring the behavior is not observable to users.
Data Structure Specification Simplification
Benjie and Rob discussed simplifying the data structure description in the specification, agreeing that implementers should have more flexibility in choosing data structures without specifying unordered maps. Benjie identified that the field detail definition needs a more descriptive explanation and should avoid using undefined terms. They also noted that the algorithm structure in the spec should follow a clearer format, with the entry point (lines 442-443) moving to a position just above line 479.
GraphQL Collect Fields Implementation Discussion
Benjie and Rob discussed the implementation of collect fields and defer usages in GraphQL. Benjie expressed concerns about redundant documentation and questioned whether memoization would prevent duplicate defer usages for the same field. Rob clarified that while different selection sets would generate different defer usages, the visited fragments mechanism might handle duplicate fragment visits. They agreed that the documentation should strongly recommend memoization rather than using "may," as proper memoization is crucial for performance and would prevent excessive defer usage creation.
GraphQL Collect Fields Algorithm Improvements
Benjie and Rob discussed improvements to the GraphQL specification's collect fields algorithm, particularly focusing on handling deferred fragment spreads. Benjie suggested making the implementation more robust by using a trinary approach to track fragment visitation status, similar to what GraphQL JS currently does. They agreed to follow the GraphQL JS implementation rather than creating alternative solutions, with Benjie recommending that Rob document the current algorithm's approach to visited fragments. The discussion concluded with plans for Rob to tidy up the algorithm definitions and update the visited fragments handling to match the GraphQL JS implementation.