In JavaScript, it's common to use the gql tag, which (in Apollo's case) will walk the operation and insert __typename on each object selection (presumably for its caching mechanism).
Unfortunately, this doesn't play well with subscriptions, where we'll get this error: Subscription field must have exactly 1 selection, found 2.
The error makes sense, except (perhaps?) for the __typename restriction. Should that selection be special-cased when checking for the 1-selection restriction?
In JavaScript, it's common to use the
gql
tag, which (in Apollo's case) will walk the operation and insert__typename
on each object selection (presumably for its caching mechanism).So this query:
becomes:
Unfortunately, this doesn't play well with subscriptions, where we'll get this error:
Subscription field must have exactly 1 selection, found 2.
The error makes sense, except (perhaps?) for the
__typename
restriction. Should that selection be special-cased when checking for the 1-selection restriction?