Skip to content
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

[Fusion vNext] Add support for @skip / @include #7788

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

tobias-tengler
Copy link
Collaborator

@tobias-tengler tobias-tengler commented Dec 1, 2024

If root selections on an operation are conditional, they will be translated into a new Condition node that will make it very easy for the execution to skip over entire operation trees, if a condition is not met. Same goes for fields that are selected from a different subgraph, if they're conditional the entire lookup operation will be placed below a Condition node.
Conditional sub-selections will be forwarded using the appropriate directive.
Static conditions like name @skip(if: true) will cause the field to be entirely removed from the selection, name @skip(if: false) will cause just the "dead" directive to be removed.

This doesn't include support for (inline) fragments yet.

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@1b0e798). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7788   +/-   ##
=======================================
  Coverage        ?   74.33%           
=======================================
  Files           ?     2870           
  Lines           ?   149903           
  Branches        ?    17418           
=======================================
  Hits            ?   111432           
  Misses          ?    32668           
  Partials        ?     5803           
Flag Coverage Δ
unittests 74.33% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tobias-tengler tobias-tengler force-pushed the tte/fusion-vnext-conditional-nodes branch from 8b47701 to 1478367 Compare December 1, 2024 20:16
@tobias-tengler tobias-tengler changed the title [WIP] [Fusion vNext] Add support for @skip / @include [Fusion vNext] Add support for @skip / @include Dec 1, 2024
@tobias-tengler tobias-tengler marked this pull request as ready for review December 1, 2024 20:20
@tobias-tengler tobias-tengler added the 👓 ready-for-review The PR is ready for review. label Dec 1, 2024
@tobias-tengler tobias-tengler force-pushed the tte/fusion-vnext-conditional-nodes branch from 1478367 to 45ae235 Compare December 1, 2024 20:45
@tobias-tengler tobias-tengler force-pushed the tte/fusion-vnext-conditional-nodes branch from 45ae235 to 783f305 Compare December 2, 2024 10:24
@michaelstaib michaelstaib merged commit 9736539 into main Dec 6, 2024
5 checks passed
@michaelstaib michaelstaib deleted the tte/fusion-vnext-conditional-nodes branch December 6, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants