-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Only use query, not writeToStore。My errors ---- Missing field __typename and other field。 #5202
Comments
I think I have the same issue. We are building an API with deltas for changes in workflows states. But the Python API returns a subset of the selection. It means our query has something like: deltas {
workflows {
tasks {}
jobs {}
}
} But a response may have: deltas {
workflows {
tasks { ... }
# sorry, no jobs!
}
} When that happens, I get a similar warning in the browser console. We might get a lot of these messages, cluttering the browser console. Making it harder to find errors, and apparently causing some slowness when the console is displayed. From what I could tell by debugging and reading parts of the code, the apollo-client/src/cache/inmemory/writeToStore.ts Lines 240 to 249 in f26b98c
It will check the Also tried setting the |
p.s.: quick hack to be able to keep developing without so many entries in the console output: console.log = function () {}
console.warn = function () {} |
Would be nice if there's a way to ignore GraphQL violations in the result-data/response, i.e. by setting result validation to |
It's a little bit dirty but try |
Hi @yohan-atlan we've always used this option as our system shows workflows statuses, which are hard to cache. (links from the branch I am working at the moment to add deltas to a query, and that is using the hack mentioned above to silence the warnings) From what I recall from quickly looking at the sources in WebStorm, the message would be always logged, even without a cache. It appeared to me that it would still access the InMemoryCache, no matter what settings I had. I tried creating a client with no cache, but it failed. I guess the cache is used internally for query handling perhaps? I just tested with 2.6.8 - I was using 2.6.4 on that branch - and the issue still happens. |
A lot of the Apollo Client internals have changed since v3 was launched. We recommend trying a more modern version of |
When i query data from Java backend, they give me some datas which are short of some fields。
Java RD says: Java Frame missing field when this filed returns null .
So that Apollo client give me
data: null
.Could you advise me on this issue?
The text was updated successfully, but these errors were encountered: