-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3570 from gnawf/always-include-incremental-props
Always include incremental props even if null
- Loading branch information
Showing
6 changed files
with
71 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/groovy/graphql/incremental/DeferPayloadTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package graphql.incremental | ||
|
||
|
||
import spock.lang.Specification | ||
|
||
class DeferPayloadTest extends Specification { | ||
def "null data is included"() { | ||
def payload = DeferPayload.newDeferredItem() | ||
.data(null) | ||
.build() | ||
|
||
when: | ||
def spec = payload.toSpecification() | ||
|
||
then: | ||
spec == [ | ||
data : null, | ||
path : null, | ||
] | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/test/groovy/graphql/incremental/StreamPayloadTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package graphql.incremental | ||
|
||
import spock.lang.Specification | ||
|
||
class StreamPayloadTest extends Specification { | ||
def "null data is included"() { | ||
def payload = StreamPayload.newStreamedItem() | ||
.items(null) | ||
.build() | ||
|
||
when: | ||
def spec = payload.toSpecification() | ||
|
||
then: | ||
spec == [ | ||
items: null, | ||
path : null, | ||
] | ||
} | ||
} |