Skip to content

[Fusion] Add support for result from different subgraph on interfaces #8293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Enterprize1
Copy link
Contributor

@Enterprize1 Enterprize1 commented May 19, 2025

Closes #7365.

When requesting a result from a different subgraph on an interface with multiple implementing types the request to the second subgraph was planned multiple times (once for each implementing type). This lead the compose-step to return null for the data from the second subgraph as the data was requested and added multiple times for each object returned by the interface list.

(Hope that explains the problem, if not maybe comparison of the query plan for the test I added before and after the change in ExecutionStepDiscoveryMiddleware.cs could provide some clarification :) )

Now only a single request to the second subgraph is planned for all types implementing the interface by deduplicating the contents of the backlog during execution step discovery.

@Enterprize1
Copy link
Contributor Author

The failed checks seem unrelated to me, the Fusion.CommandLine test failed before on the main-version-15 branch.

@tobias-tengler
Copy link
Member

Thank you for the contribution 😊
Funnily enough we had the same problem at my company and I started to write some tests for the issue in #8272.
With your fix applied all the problematic tests there seem to pass 🎉

@michaelstaib michaelstaib changed the base branch from main-version-15 to fusion-15-interface-fix May 23, 2025 12:11
@michaelstaib michaelstaib merged commit 8607cec into ChilliCream:fusion-15-interface-fix May 23, 2025
100 of 104 checks passed
@michaelstaib michaelstaib added this to the HC-15.1.6 milestone May 23, 2025
@PascalSenn
Copy link
Member

Thanks you for the contribution, @Enterprize1! 🚀

Preview version 15.1.6-p.1 should be available on NuGet in about 15–20 minutes.

If you haven’t already, feel free to join our Slack community and say hello! 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants