Skip to content

Optimistic updates with optional fields and relationships #2578

Answered by kitten
sarink asked this question in Q&A

You must be logged in to vote

There's a bit of a missing piece here, which I wanted to address a while ago. There should indeed be two things in the optimistic API that we currently don't support:

  • We only really are in trouble if we're missing keyable fields or typenames, so we should only error or warn when that's the case
  • We should ignore other missing fields that are undefined
  • Currently, we look up fields by alias in your optimistic return value. However, we should instead look up fields by name and call functions with the arguments the field has been passed, if we have any

So, long story short, currently you do need a lot of knowledge if you want to return a complete result. However, it's actually completely saf…

Replies: 2 comments 1 reply

You must be logged in to vote
0 replies
Answer selected by kitten

You must be logged in to vote
1 reply
@kitten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants