Consider adding SomeEntity there or defining a custom merge function for it. We have some client-wide types with merge: true defined in the default client as typePolicies (this means that Apollo will merge existing and incoming responses in the case of subsequent queries). When SomeEntity type doesn’t have an id property in the GraphQL schema, to fix this warning we need to define a custom merge function. We are already checking id presence for every GraphQL type that has an id, so this shouldn’t be the case (unless you see this warning when running unit tests in this case please ensure your mocked responses contain an id whenever it’s requested). To address this problem, either ensure all objects of SomeEntityhave an id or a custom merge function. If you are making multiple queries to the same Apollo client object you might encounter the following error: Cache data may be lost when replacing the someProperty field of a Query object. Multiple client queries for the same object
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |