-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
No initial query from server #35
Comments
hi @Twisterking, In version 2 of apollo-client there are no invalidation logics of cache elements (they are integrating it in version 3) so, you can evaluate these three options:
|
Thanks a bunch for your very quick answer! 😃 |
I'm considering implementing sync logic (like https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-delta-sync.html) but I'm waiting for the official release of apollo-client 3.0 and to have multiple use cases to create a good implementation. |
Okay thank you very much! You already helped me a lot with the FetchPolicy! 😃 I have one more problem you might be able to help me with:
What confuses me the most is the following: Both use the exact same query, subscription and variables ... on my server I have the following code: listbody: {
// https://github.com/cult-of-coders/apollo-live-server#creating-subscriptions
resolve: ({ event, doc }, args, context, ast) => {
console.log('listbody sub resolve:', { event, doc, args });
doc.__typename = 'ListElement';
if(event == 'added' || event == 'changed') {
Object.assign(doc, {
item: Items.findOne(doc.itemId)
});
}
return { event, doc };
},
subscribe(_, args, context, ast) {
const { listId, limit, skip } = args;
console.log('SUB listbody args:', args);
const observable = ListsBody.find({ list_id: listId });
return asyncIterator(observable, {
sendInitialAdds: true
});
}
} when I have my broken component mounted, the Can you please explain to me how this is possible? I thought that server-side code should basically be independent of which components are mounted on the client. I just don't understand what I am doing wrong! 😢 PS: If you maybe cloud have a quick look via skype/teamviewer, I would be so so grateful! Thanks a bunch yet again mate! |
have you verified that both components in the network made the same request? to organize us you can write me on slack: graphql.slack.com |
I can't ... using websockets/DDP with https://github.com/Swydo/ddp-apollo :-( |
Hi @morrys !
Thanks again for this awesome package! I need your help ... again.
Following situation:
apollo-offline
package and all that<Query/>
- documents matching the query are displayed and cached - all good!<Query/>
component<Query/>
view again - the new inserts do not show up! The<Query/>
still only shows the results in the cache, but is NOT querying the server again to get the the just inserted new documents.To put it a bit differently:
For some reason your Apollo client seems to NOT query the server after mounting a new
<Query/>
of some sort, it always just shows the documents from the cache. If the server data updated since this cache was saved, these changes do NOT show up.What the hell am I doing wrong? 😢
The text was updated successfully, but these errors were encountered: