-
Notifications
You must be signed in to change notification settings - Fork 305
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
Revisit GraphQlTester to align with GraphQlClient #317
Comments
rstoyanchev
added a commit
that referenced
this issue
Mar 7, 2022
rstoyanchev
added a commit
that referenced
this issue
Mar 7, 2022
rstoyanchev
added a commit
that referenced
this issue
Mar 7, 2022
rstoyanchev
added a commit
that referenced
this issue
Mar 7, 2022
As these are expected to be used as local variables, "Spec" reduces readability and the IDE creates variables called "spec", which increases that effect. Given those are nested within `GraphQlClient` and `GraphQlTester`, it makes sense to drop the spec part and local variable names such as request and response make sense. See gh-10, see gh-317
rstoyanchev
added a commit
that referenced
this issue
Mar 7, 2022
rstoyanchev
added a commit
that referenced
this issue
Mar 7, 2022
bclozel
added a commit
to spring-projects/spring-boot
that referenced
this issue
Mar 8, 2022
This commit switches to 1.0.0-SNAPSHOT for Spring GraphQL, before its upcoming 1.0.0-M6 version. This commit adapts to the changes introduced in spring-projects/spring-graphql#317 : now that `GraphQlClient` has been introduced, `GraphQlTester` has been aligned with the new infrastructure. The `@GraphQlTest` and `@SpringBootTest` testing support is now using different variants for each. All samples have been updated to use the proper GraphQL terminology, see and spring-projects/spring-graphql#310 . See gh-29637
rstoyanchev
added a commit
that referenced
this issue
Mar 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GraphQlTester
came first and supported HTTP only but not WebSocket so it never explored design issues from the mismatch between HTTP and WebSocket as underlying transports.GraphQlTester
needs to be updated to build on what's now available from the client work under #10, and to align it with the design approach. As part of that, it also needs to change for #310 for details, to use correct terminology, e.g.document
vsquery
.Two new contracts need to be incorporated,
GraphQlRequest
as the client side request representation of what goes on the wire andGraphQlTransport
that decouples the client (or tester) from request execution. For implementations, the HTTP transports for client vs tester areWebClient
vsWebTestClient
based respectively, while the WebSocket transport is common.GraphQlTester
took the approach of exposing transport details such as HTTP headers during request execution. WebSocket, however, is connection oriented with HTTP headers only relevant for the WebSocket handshake. Moreover, GraphQL over WebSocket defines a higher level mechanism with aconnection_init
andconnection_ack
message exchange after the WebSocket connection is established.GraphQlClient
is modelled with connection-oriented, multiplexed transports in mind as a common denominator. It expects transport details to be configured at build time, and supports mutation as a first class mechanism so it's easy to create multiple, independent client instances.GraphQlTester
will be aligned to follow the same approach.The text was updated successfully, but these errors were encountered: