Skip to content

No initial query from server #35

@Twisterking

Description

@Twisterking

Hi @morrys !

Thanks again for this awesome package! I need your help ... again.

Following situation:

  • 2 apps: one main app running MongoDB and a react-app, second app running react and your apollo-offline package and all that
  • second app navigates to React component viewing some documents via a standard <Query/> - documents matching the query are displayed and cached - all good!
  • second app navigates to another view
  • main server inserts some documents into a mongoDB collection also matching the query used by the second app in the <Query/> component
  • after this insert, the second app navigates to the same <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? 😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions