11package graphql.incremental
22
3- import graphql.GraphqlErrorBuilder
43import graphql.execution.ResultPath
54import spock.lang.Specification
65
6+ import static graphql.GraphqlErrorBuilder.newError
7+
78class StreamPayloadTest extends Specification {
89 def " null data is included" () {
910 def payload = StreamPayload . newStreamedItem()
@@ -25,11 +26,11 @@ class StreamPayloadTest extends Specification {
2526 .items([" twow is that a bee" ])
2627 .path([" hello" ])
2728 .errors([])
28- .addError(GraphqlErrorBuilder . newError()
29+ .addError(newError()
2930 .message(" wow" )
3031 .build())
3132 .addErrors([
32- GraphqlErrorBuilder . newError()
33+ newError()
3334 .message(" yep" )
3435 .build(),
3536 ])
@@ -65,12 +66,12 @@ class StreamPayloadTest extends Specification {
6566 def payload = StreamPayload . newStreamedItem()
6667 .items([" twow is that a bee" ])
6768 .path(ResultPath . fromList([" test" , " echo" ]))
68- .addError(GraphqlErrorBuilder . newError()
69+ .addError(newError()
6970 .message(" wow" )
7071 .build())
7172 .addErrors([])
7273 .errors([
73- GraphqlErrorBuilder . newError()
74+ newError()
7475 .message(" yep" )
7576 .build(),
7677 ])
@@ -103,8 +104,8 @@ class StreamPayloadTest extends Specification {
103104 def items2 = [" test2" , " test3" ]
104105 def path1 = [" test" , " echo" ]
105106 def path2 = [" test" , " echo" , " foo" ]
106- def errors1 = [GraphqlErrorBuilder . newError(). message(" error1" ). build()]
107- def errors2 = [GraphqlErrorBuilder . newError(). message(" error2" ). build()]
107+ def errors1 = [newError(). message(" error1" ). build()]
108+ def errors2 = [newError(). message(" error2" ). build()]
108109 def extensions1 = [echo : " 1" ]
109110 def extensions2 = [echo : " 2" ]
110111
0 commit comments