Open nathanschwarz opened 1 year ago
Hi @nathanschwarz 👋🏻 thanks for letting us know about this - can you help us understand more about your use case here? I'm curious as to why you'd query a field with @client
without defining a field policy. Thanks!
hi @bignimbus ✋ ! Thank you for taking time on the matter !
I'm working on a project which is heavily relying on local fields (more than 20). I made a typo error while defining a new field policy (forgot a s
in the field name). At this point my whole application started crashing since all local fields went missing.
Since all errors where popping progressively on some non related local fields I was completely clueless about why it was happening, and started looking for the issue elsewhere. Took me a while to figure it out.
This is something that should be at least documented somewhere.
But it makes more sense not to discard all local fields / type policies if one is "missing".
In my case, if only the wrongly defined field was missing I would have notice the issue right away.
Thanks for the quick reply @nathanschwarz - I agree that more documentation is warranted here. I'm not certain what, if any, behavior changes are warranted here. I'll leave this issue open in case others want to give feedback. In the meantime if you have any suggestions as to how we should document this behavior we'd be interested in hearing them!
Issue Description
@local
directive, if one of the field resolver wasn't implemented, all local fields are missing.undefined
Link to Reproduction
https://codesandbox.io/s/adoring-diffie-4krgf6?file=/src/index.jsx:0-2604
Reproduction Steps
typePolicies