Hi and thank you for GraphQL and the wonderful Apollo iOS library 👍
Imagine that your server has a list of books which you can query like this:
query {
books {
id
name
}
}
And then you have a mutation using which you can create a book:
mutation book(name: "MyBook) {
id
name
}
Which sends back the created book. We also have set up our cacheKeyForObject property like so:
client.cacheKeyForObject = { [$0["__typename"], $0["id"]] }
We are also retaining our watcher object so we are sure it is not getting deallocated however, the watcher is not getting called telling us that a new book has been inserted and cached.
Could somebody please shed some light as to what we could be missing or if this scenario is even supported?
Thanks very much
Hi and thank you for GraphQL and the wonderful Apollo iOS library 👍
Imagine that your server has a list of books which you can query like this:
And then you have a mutation using which you can create a book:
Which sends back the created book. We also have set up our
cacheKeyForObjectproperty like so:We are also retaining our watcher object so we are sure it is not getting deallocated however, the watcher is not getting called telling us that a new book has been inserted and cached.
Could somebody please shed some light as to what we could be missing or if this scenario is even supported?
Thanks very much