Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataIdFromObject is never called #569

Open
ssyberg opened this issue Nov 16, 2023 · 1 comment
Open

dataIdFromObject is never called #569

ssyberg opened this issue Nov 16, 2023 · 1 comment
Assignees
Labels

Comments

@ssyberg
Copy link

ssyberg commented Nov 16, 2023

Environment

Describe the bug

dataIdFromObject is never called in inMemoryCacheOptions and hence it's impossible to set fallback cache ids

Expected behaviour

to be able to create fallback cache ids with dataIdFromObject

Reproduction

Add dataIdFromObject to inMemoryCacheOptions and add debugger or console logs and you'll see it never gets hit, you'll also notice if you use tools to view the client cache the cache ids are not altered by anything in this function

I've tried this with both useQuery and useAsyncQuery. I am able to override with individual typePolicies but this is extremely brittle since this is a system wide change we need to make.

Additional context

No response

Logs

No response

@ssyberg ssyberg added the bug label Nov 16, 2023
@Diizzayy Diizzayy self-assigned this Nov 16, 2023
@ssyberg
Copy link
Author

ssyberg commented Dec 11, 2023

Looks like there's been some progress on this in alpha 10, it is now being called, but it's still not quite working. I tried just calling return dataIdFromObject(object) which should effectively leave cache ids as their defaults and things break without any specific errors exposed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants