Composite Schemas WG ·

Composite Schemas WG meetings · Jump to notes

Agenda

View agenda on GitHub

Composite Schemas WG — May 2025 (Week 2)

The Composite Schemas subcommittee meets weekly to progress the "Composite Schemas Specification" project.

The first meeting each month is the primary monthly meeting; to enable a greater cadence of progress we also have weekly meetings which tend to be more informal.

Attendees

NameGitHubOrganizationLocation
Michael Staib (Host)@michaelstaibChilliCreamZurich, CH
Shane Myrick@smyrickApolloSeattle, WA, USA
Martijn Walraven@martijnwalravenApolloAmsterdam, NL
Derek Kuc@dariuszkucApolloChicago, IL, USA
Pascal Senn@pascalsennChilliCreamZurich, CH
Sachin Shinde@sachindshindeApolloSan Francisco, CA, USA
Kamil Kisiela@kamilkisielaThe GuildWarsaw, PL
Stephen Spalding@fotoetienneNetflixLos Gatos, CA, US

Agenda

  1. Agree to Membership Agreement, Participation & Contribution Guidelines and Code of Conduct (1m, Host)
  2. Introduction of attendees (5m, Host)
  3. Determine volunteers for note taking (1m, Host)
  4. Review agenda (2m, Host)
  5. Check for ready for review agenda items (5m, Host)
  6. Execution Algorithm : Plan Options (15m, Pascal)

Zoom summary

View zoom summary on GitHub

Meeting Summary for Composite Schemas WG

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: 2025-05-08T16:00:25Z
  • Meeting end: 2025-05-08T17:00:17Z
  • Summary start: 2025-05-08T16:00:55Z
  • Summary end: 2025-05-08T17:00:15Z

The team discussed the GraphQL Spec membership Agreement, the participation guidelines, the GraphQL code of conduct, and the contribution guide. They also discussed the process of initializing plan options, the algorithm for traversing paths and options, and the optimization of their algorithm. The team also discussed the redundancy of a nested loop in their code, the structure of their code, the need for a more generic approach to schema resolution, and the need to improve the readability of their code.

Next Steps

  • Pascal to refine and iterate on the plan options algorithm, incorporating feedback from the discussion.
  • Pascal to prepare an updated version of the plan options algorithm for review in next week's meeting.
  • Team to continue discussion on the plan options algorithm in the next meeting, focusing on refining and clarifying the logic.
  • Pascal to start thinking about how to incorporate the plan options algorithm into the overall spec draft once it's finalized.

Summary

GraphQL Spec Membership Agreement Discussion

In the meeting, Michael, Pascal, Shane, Martijn, Derek, Sachin, Kamil, and Stephen discussed various topics. Michael led the meeting, ensuring everyone agreed to the GraphQL Spec membership Agreement, the participation guidelines, the GraphQL code of conduct, and the contribution guide. Pascal was set to discuss the planning algorithm, but due to some conflicts, the conversation ended early.

Initializing Plan Options Process

Pascal discussed the process of initializing plan options, including all possible source schemas. He explained how the path is split into a sequence of tuples, with each path element initializing a new set of options. For each source schema, the process checks if the schema defines the current type and field. If not, it continues to the next candidate schema. If the schema equals the current schema, the resolved schema is set. If a lookup from the candidate schema to the target schema is found, the resolved schema is set. If no lookup is found, the process continues to the next candidate schema. Martijn questioned the starting point of the process, suggesting that it should start from one of the source schemas rather than directly going into one of the candidate schemas.

Algorithm for Traversing Paths and Options

Pascal and Martijn discussed the algorithm for traversing paths and options. They agreed that the algorithm should start from a set of options and traverse through them, with each option representing a potential path. They also discussed the need to check if a path can be reached from a given point, and how this can be done by checking all possible source schemas. Martijn pointed out that the algorithm currently checks all source schemas twice, which is unnecessary. Pascal agreed and suggested that the algorithm should only check the candidate schemas that define the current type and field. Shane added that they already know the valid compose schemas, so they only need to check the possible subgraphs that can be iterated to define the path.

Optimizing Algorithm for Path Computation

Pascal, Martijn, and Shane discussed the optimization of their algorithm. They considered collapsing certain loops and removing unnecessary steps to improve efficiency. Pascal explained that the path elements are a set or list of tuples representing the fully computed path. They also discussed the importance of the current option and the need to check all available schemas for follow-up options. Martijn suggested generalizing the algorithm to avoid special casing the initial step. The team agreed to further refine the algorithm to make it more generic and efficient.

Nested Loop Redundancy Discussion

The team discussed the redundancy of a nested loop in their code, with Martijn suggesting a restructuring to avoid confusion. Derek proposed two approaches: either acknowledging the redundancy as an optimization or treating the initialization step as a custom step before the regular algorithm. The team agreed to consider these options and potentially redefine the type of an option to include subgraphs and initial options. Sachin mentioned the current query plan involves a fake subgraph.

Code Structure and Lookup Discussion

Martijn and Sachin discussed the structure of their code, specifically the use of a null flow graph and the concept of an initial option. They also touched on the idea of starting from a pass, which would be like a root field. Pascal suggested that there needs to be something in the option, and that the current schema should be used in the lookup. Martijn questioned the need for knowing where they're starting from for lookups. The team also discussed the idea of skipping the first element and treating the next question as finding an option through lookup.

Generic Schema Resolution Process Discussion

Pascal and Martijn discussed the need for a more generic approach to schema resolution, considering intermediate steps and nested types. They agreed that the resolution process involves finding a chain of lookups to resolve the keys needed to reach a candidate schema. Pascal suggested that the process could involve multiple steps, including checking if there's an entry point to resolve the schema, if the keys are available in the current option, and if there's any path through other subgraphs to resolve the keys. They also discussed the possibility of generalizing the process beyond just lookups.

Improving Code Readability and Planning Options

The team discussed the need to improve the readability of their code, particularly in relation to the 'options' term. They considered changing it to 'source schema' or 'current schema' to make it clearer. They also discussed the need to resolve requirements and potentially make recursive calls to plan options. The team agreed to continue with multiple 'if' statements for better readability, and to consider using ternaries. They also touched on the topic of a new Pope, but it was unclear how this related to their work.

Resolving Profile Birthdate Requirement

Pascal and Martijn discussed the need for more specific requirements and the necessity of resolving them from the current stage. They also discussed the need to plan options for each requirement, with Martijn emphasizing the importance of considering the current position and the set of possible options. Shane clarified that the requirement is for the profile type's birthdate, not the path query. The team agreed that they need to resolve the requirement through the gateway, not through a lookup.

Discussing Plan Options Algorithm

In the meeting, the team discussed the plan options algorithm and its initial state. They considered the need to pass in the source and how to exclude it. Pascal suggested removing all schemas that do not define lookup for type. Martijn agreed that this could be a sub-function they reuse. They also discussed the need to start with all possibilities and remove the ones which doesn't have a lookup. The team agreed that they need to check if something is reachable and pass in the type. They also discussed the need to return true or false from the function and the importance of the set of candidate schemas. The team decided to take another 15 minutes next week to continue their discussion.