Closed jet2jet closed 11 months ago
That's a really nice catch and a great diagnosis! I've confirmed that the line you mentioned contains a typo (which is more easily spotted when comparing it to resolveLink
) and wrote a quick unit test next to the one that checks that resolveLink
behaves correctly, to prevent this from regressing again. Cheers! ❤️
Describe the bug
When using nested local resolver (resolver not under root
Query
), returned data may benull
even though data has been fetched correctly.If I changed the line below:
https://github.com/urql-graphql/urql/blob/%40urql/exchange-graphcache%406.3.2/exchanges/graphcache/src/operations/query.ts#L612
... it seems to work correctly.
# I saw that in commit 6031d913732f5e480cdbc2e3c2c537dc7e5d6d42
skipNull
was changed toisOwnedData
, but in the only above line!
was added.Reproduction
https://github.com/jet2jet/urql-local-resolver-test
npm run start
ID
field and pressGet
Todo is null...
is displayedUrql version
urql v4.0.5 @urql/exchange-graphcache v6.3.2
Validations