-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add tests for remaining transforms with defer #590
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # test/src/test/kotlin/graphql/nadel/tests/next/fixtures/defer/transforms/DeferredDeepRenameTestSnapshot.kt # test/src/test/kotlin/graphql/nadel/tests/next/fixtures/defer/transforms/RenamedTypeIsDeferredTestSnapshot.kt
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.
The tests don't look right to me, can you please have a look at my comments?
...phql/nadel/tests/next/fixtures/defer/transforms/DeferWithTransformThrowsErrorTestSnapshot.kt
Show resolved
Hide resolved
...n/graphql/nadel/tests/next/fixtures/defer/transforms/DeferredRenamedInputTypeTestSnapshot.kt
Show resolved
Hide resolved
result = """ | ||
| { | ||
| "data": { | ||
| "aErrors": {} |
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.
There's not incremental data in the assertion here as well.
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.
In this test, there is not supposed to be incremental data, because there is no data in the aErrors field.
This test is to ensure that the BError type does not get returned in the aErrors field
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.
I'm still missing the deferred behaviour in some tests.
If that's part of the scenario you're testing, could add a description to the test class explaining why nothing is being deferred?
| query (${'$'}v0: PathType!) { | ||
| me { | ||
| profilePicture { | ||
| path(type: ${'$'}v0) |
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.
Why is @path
not being deferred?
service = "A", | ||
query = """ | ||
| { | ||
| aErrors { |
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.
I'm confused by this one... What deferred behaviour are we testing?
adding defer test for the remaining transforms: