-
Notifications
You must be signed in to change notification settings - Fork 100
@client query depends on server data #307
Comments
@MattReimer We're working on a new version of client.addLocalStateInitializers({
async projectTaxes(client) {
// ... run your query, prime the cache, etc.
},
}); Would this work for you? |
Yeah! I think this would be fantastic. Sounds exactly like what I need. |
@hwillson that makes sense. |
@hwillson Hi! I've seen your "we're working on a new version of |
me wants to know too Scott |
@Borales @smolinari We'll have something to share hopefully very soon! The beta is almost ready; we just have a few more edge cases to address, as well as additional tests and documentation work. Most of the outstanding issues in this repository have been addressed by the new local state project (the issues in this repo that are tagged with |
@hwillson any news about release date? |
@hwillson - would love to test out the beta, ran into this problem with our product |
It's November 7th. Please do give us an update about the update. :) Scott |
Looks like |
Ohh.. that is a lot of opinionation to be packing into the core. Scott |
https://summit-2018-apollo-client.netlify.com/ "What's next for Apollo Client" presentation slides from yesterday (there are a few words about state management - it's going to be merged into |
Any news on this, ran into same problem looking for solution, even something quick and dirty to solve problem. Is there a way to use ‘client’ in resolver to make query? |
@pulpfree the client is available in the |
I have a case where my derived state depends on a query to the server. I realize that
cache.readQuery
only reads from the cache so if I haven't already run theprojQuery
I won't get anything back.Sure enough I get the dreaded error:
So how can I write my resolver with a dependency to the server data? All I have t make queries here is the
cache
object and that doesn't seem to have aquery
function attached to it?My resolver that I use with
withClientState
looks like this:The text was updated successfully, but these errors were encountered: