-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Mutations receive raw data without field read type policies applied #10081
Comments
any news there or how to patch it? |
We now have one instance where this happens during a query. It depends on the data somehow and is repeatable. For one entity type, some instances have this issue but not all. Is there any clue so far what's causing it? Edit: This new query issue turned out to be caused by an attached entity that implemented an interface, and not adding it in the list of |
I thought I was crazy. Still doing this in 3.7.7. |
I'm also facing this issue (using |
A workaround is to add:
when initializing |
Facing a similar issue and while the workaround suggested by @such does work it would be better to get a fix for this issue instead. |
Intended outcome:
I have defined a
read
field policy for a type. When I call a mutation through the client (not the hook) usingclient.mutate(...)
, I expect to have that field policy applied to the promise's result. In this case, the object with the read policy is an embedded object without any key fields.I rewrote this to use
useMutation
, and itsonCompleted
callback also receives the raw data without the read policy applied.Actual outcome:
The returned promise receives the raw data from the server without the read policy applied even though the read policy is executed before resolving the promise.
TheStrangely, so doesuseMutation
hook behaves as expected.client.query(...)
.How to reproduce the issue:
I have created reproduction sandboxes for
client.mutate
anduseMutation
. The important bits are inindex.jsx
, specificallyrenamePerson
andconst client = ...
.time
field is astring
.It should be a
Date
object which is what the read policy returns.Versions
The sandbox uses version 3.6.8. This is from my application:
The text was updated successfully, but these errors were encountered: