Skip to content

Further alignment with GraphQL spec terminology #310

Closed
@rstoyanchev

Description

@rstoyanchev

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions