[RFC] @skip/include directive: ability to define default/fallback value #475
Labels
👻 Needs Champion
RFC Needs a champion to progress (See CONTRIBUTING.md)
💭 Strawman (RFC 0)
RFC Stage 0 (See CONTRIBUTING.md)
Let's say my app have a React component with an associated GraphQL fragment.
This fragment is used in 10 distinct queries. As of today, field
x
always has to be fetched, but a new business requirement ask to not fetch this field, just for one of the 10 queries.I can add the following to my fragment:
But now, I have to provide a $skipX variable for all of my 10 queries, which seem doable but annoying.
I've like to have a syntax like
so that I only have to modify the variables of a single query
What do you think about this?
Is there any alternative to my need which does not require modifying all my existing queries?
The text was updated successfully, but these errors were encountered: