RFC 0 / Strawman

allow empty selections

Opened on2020-01-21
Updated on2021-10-26

At a glance

Spec PR description

Sometimes, product code might only be interested in the existence of an object. Currently, this forces a workaround of either querying __typename or adding a bool field like has_thing.

It seems natural and not too confusing to allow empty selections:

query {
  event {
    location {}
  }
}

The response should either return null or an empty object for location.

(The spec changes are incomplete.)

Timeline

  • Spec PR created on 2020-01-21 by kassens
  • Commit pushed on 2020-01-21 by kassens: [RFC] allow empty selections