Replies: 1 comment 10 replies
-
Hmm I wonder if this is because urql isn't adding a dependency when const resolveTypenameByNodeId = (cache: Cache, subjectId: string): string => {
// Quick resolves to validate our assumption
cache.resolve({
id: subjectId,
__typename: 'Task',
}, 'id')
cache.resolve({
id: subjectId,
__typename: 'Runner',
}, 'id')
return cache.resolve({
id: subjectId,
__typename: 'Task',
}, '__typename')
|| cache.resolve({
id: subjectId,
__typename: 'Runner',
}, '__typename');
}; if so we might need to investigate that condition to see if it can be removed or bypassed. |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a local handler that I use to unify components that use the same interface. Previously in Apollo I could just read fragments from the cache over the interface, but in urql I need to make a specifically local resolver to fetch this data from the cache (I don't see any other reasonable way). The interface itself and how it is used:
Then I get this on the client for the local resolver
If the deploy property in the parent is not null everything is reactively updated, even if you put null and then update the data. However, if the property is initially in parent null the data will not be updated reactively.
All this worked before the 4 major version of urql. Maybe I'm doing something wrong? Is there any way to simplify it? I didn't find the right answer in the documentation.
Beta Was this translation helpful? Give feedback.
All reactions