-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: GraphQL fragments #3066
feat: GraphQL fragments #3066
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3066 +/- ##
===========================================
+ Coverage 79.40% 79.45% +0.05%
===========================================
Files 345 345
Lines 26534 26557 +23
===========================================
+ Hits 21068 21100 +32
+ Misses 3948 3942 -6
+ Partials 1518 1515 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 13 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Reviewed but have a question. Should we also be supporting inline fragments? https://spec.graphql.org/October2021/#sec-Inline-Fragments Fragments also support variables, if we want to support that too |
Nice catch! We should be able to support inline fragments as well as variables. I'll add some tests to verify. Update: Both work and are tested now. |
testUtils "github.com/sourcenetwork/defradb/tests/integration" | ||
) | ||
|
||
func TestQuerySimpleWithFragmentsSucceeds(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: I'm not sure if you had changed them last time it was suggested but TestQuerySimple_WithFragments_Succeeds
would read a little better and would be easier to go straight to the most descriptive part (WithFragment
) of the test name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I'm surprised how simple supporting fragments turned out to be.
Relevant issue(s)
Resolves #3047
Description
This PR enables support for GraphQL fragments.
Tasks
How has this been tested?
Added integration tests
Specify the platform(s) on which this was tested: