Skip to content
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

Further alignment with GraphQL spec terminology #310

Closed
rstoyanchev opened this issue Feb 26, 2022 · 0 comments
Closed

Further alignment with GraphQL spec terminology #310

rstoyanchev opened this issue Feb 26, 2022 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

The term "query" is ambiguous and although one round of cleanup was applied in 44a034e, it remained on RequestInput because "query" is the name of the request parameter in the GraphQL over HTTP (preliminary) spec and likewise in the GraphQL over WebSocket spec.

That said, GraphQL over HTTP also has this:

Be aware that query is a misleading name as it can contain a string describing multiple operations, each of which may be a query, mutation or subscription. A better name would have been document, but the term query is well established.

While the name on the wire is impractical to change, we still have an opportunity to align with the GraphQL spec by renaming query to document in RequestInput, as well as in GraphQlClient and GraphQlTester. For a good summary of the relevant terms (request, document, operation, etc), see the description of the PR that applied the same changes to the GraphQL spec.

As part of this we can also extract a GraphQlRequest super class of RequestInput that contains only what is in the GraphQL request and that can be used within GraphQlClient and GraphQlTester.

@rstoyanchev rstoyanchev added the type: enhancement A general enhancement label Feb 26, 2022
@rstoyanchev rstoyanchev added this to the 1.0.0-M6 milestone Feb 26, 2022
@rstoyanchev rstoyanchev self-assigned this Feb 26, 2022
rstoyanchev added a commit that referenced this issue Mar 7, 2022
Introduce a TestRequestInput subclass to make the creation of
RequestInput in tests convenient.

See gh-310
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant