RFC 1 / Proposal

Allow singular variables in list locations

Opened on
Updated on

At a glance

Project
GraphQL Spec
Identifier
#509
Stage
RFC 1 / Proposal
Champion
@taion
Updated
2026-06-12
Latest activity
Advanced to RFC 1 on
Source

Pull request description

This is a follow-up to discussion in https://github.com/graphql/graphql-relay-js/issues/20#issuecomment-416809871.

The current coercion rules, for convenience, allow passing in singular literals in positions expecting lists. However, they do not allow passing in singular variables.

This proposal would allow passing in singular variables as well. The coercion rules already ensure reasonable behavior when this happens. Enabling this allows easier evolution of APIs, as it would enable converting singular filtering/ordering fields per the linked issues to plural ones without breaking clients.

cc @dschafer

Timeline

October 2018

September 2018

  • On the agenda for GraphQL WG

    13 listed attendees · 10 agenda items · 7 linked RFCs

    • Opening of the meeting
    • Introduction of attendees
    • Review agenda (5m)
    • Determine volunteers for note taking (5m)
    • Discussion of Allowing singular variables for lists (10m) #509
    • Discussion of Variable Definition Directives (5m) #510
    • Update on #429 - limiting the scope of "Directives Are Unique Per Location" validation. (OI 10m) #470 #471 #472
    • Update on Compatibility Acceptance Tests (CATs). (OI 10m)
    • Proposal to support description on Schema (IG 5m) #466
    • Next steps for "Define custom scalars in terms of built-in scalars" (spec changes, graphql-js) (IG 15m) #326
  • @taion committed "Remove CoerceVariableValues" on

August 2018