Consider making the `query` parameter optional?

Open
#216 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Domain
api

Research direction

Start by reading the linked pull-request discussion and the GraphQL over HTTP specification language around the query parameter, then review the graphql-yoga discussion about empty query parameters. Done means reaching and documenting a decision on whether omitted query parameters can support persisted operations while remaining spec-compliant.

Written by the indexing model from the issue text.

Description

Reference:
https://github.com/graphql/graphql-over-http/pull/175#discussion_r917932366

just pulling this out in case there is not another issue to track

in my view, query should be optional so that persisted operations, automatic or otherwise, could be considered spec-compliant.

The spec language would say something like that “the document to be executed, when sent within the http request, should be contained within the optional query parameter. When not included, the implementation can use an implementation defined method of determining the operation…”

otherwise, spec compliant implementations might be tempted to send empty query parameters to be compliant. See: https://github.com/dotansimha/graphql-yoga/pull/1589#discussion_r944641768

Tagging below discussants from those issues:
@enisdenjo
@ardatan
@glasser
@benjie

Dominant language
JavaScript
Stars
428
Forks
70
Avg merge
11m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from graphql/graphql-over-http

All issues in graphql/graphql-over-http

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.