-
Notifications
You must be signed in to change notification settings - Fork 786
Revert "Use Partial<TData> rather than TData | {} (#2313)" #2423
Conversation
This reverts commit 2f15d9f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great - thanks @rosskevin!
@hwillson @rosskevin This is because before this could be done: With 2.2.0, the above code would give inner a type of With 2.2.1, the above code isn't allowed at all because Is it intended to have a breaking change in a minor release? |
@jackh726 I didn't know the data was previously What I ended up with to see if data was loaded was Definitely no intended breakage, but it would be good to get some consensus on a way forward. @excitement-engineer may have some thoughts too. |
While GraphQL allows for partial result, I doubt many use this feature. Related and interesting problem: previously we just checked if data was But it seems this is no longer enough either, as sometimes data will only have a |
It would be great if there was a simple boolean field saying if data is available or not (I don't think this is just problem with the typings). |
This reverts commit 2f15d9f.
Checklist:
#2313 introduced use of Partial for
TData
on a query result which makes all properties optional and is not correct or equal to the previousTData | {}
.@hwillson we should get a patch out asap as this is a breaking change in
2.2.0
for all users who are strongly typed./cc @tgriesser @donataswix