apollographql / apollo-client

:rocket:  A fully-featured, production ready caching GraphQL client for every UI framework and GraphQL server.
https://apollographql.com/client
MIT License
19.38k stars 2.66k forks source link

`watchFragment` reports result as complete when `from` object is not identifiable #12003

Open jerelmiller opened 3 months ago

jerelmiller commented 3 months ago

Issue Description

When running client.watchFragment, the result returned from the observable reports the result as complete: true when the from object is not identifiable (i.e. cache.identify returns undefined). The data object is empty and is correct, but we should also reflect this in the complete and missing properties as well.

Link to Reproduction

https://github.com/apollographql/apollo-client/pull/12002

Reproduction Steps

See the failing test for the example

@apollo/client version

3.11.4