apollographql / apollo-link-state

✨ Manage your application's state with Apollo!
MIT License
1.4k stars 100 forks source link

'graphql' does not contain an export named 'print' #308

Closed cj closed 6 years ago

cj commented 6 years ago

To re-create, follow the instructions here https://github.com/facebook/create-react-app/issues/5103 to create a new create-react-app v2. Then just setup apollo-link-state, run yarn start and you'll get the following error:

Failed to compile.

./node_modules/apollo-link-state/lib/utils.js 21:51-56
  'graphql' does not contain an export named 'print'.

To solve this all you need to do this https://github.com/graphql/graphql-js/issues/1272#issuecomment-396597064 here on its own line https://github.com/apollographql/apollo-link-state/blob/master/packages/apollo-link-state/src/utils.ts#L3.

Timer commented 6 years ago

Should be fixed in react-scripts@2.0.1, please try.

cj commented 6 years ago

@Timer That works too. Thank you for fixing that so quickly, hope you have a great weekend! 😃

Timer commented 6 years ago

You too!