Pitchlyapp / meteor-apollo2

An example showing how to use Apollo 2.0 with GraphQL server + subscriptions
20 stars 4 forks source link

Screen not updated. #5

Closed ifs-pvt closed 6 years ago

ifs-pvt commented 7 years ago

OS: Windows 7. Steps:

  1. Cloned
  2. Installed as per instruction
  3. Started meteor - without issues
  4. Opened localhost:3000 and saw "Current database value for this user" section with empty fields
  5. Entered text fields and clicked "Update" - no result
ifs-pvt commented 7 years ago

Forgot: GraphiQL query returns default data: { "data": { "person": { "id": "userid1", "name": "Michael Brook", "eyeColor": "brown", "occupation": "Programmer" } } }

michaelcbrook commented 6 years ago

This is most likely due to this reported issue here: https://github.com/Pitchlyapp/meteor-apollo2/issues/4

Changes have been made that should hopefully resolve your issue, in particular, changing

import Cache from 'apollo-cache-inmemory'; to import { InMemoryCache } from 'apollo-cache-inmemory';

and

const cache = new Cache(window.__APOLLO_STATE); to const cache = new InMemoryCache(window.__APOLLO_STATE);

This is because new versions of the NPM packages broke the previous way.