Issues importing from react-apollo and apollo-client

I am trying to connect an app to a GraphQL-endpoint that I have set up on Amazon Web Services. I try to connect to the endpoint with Apollo Client starting off with an example code I have found on Apollos’ website:

import React from 'react';
import { AppRegistry } from 'react-native';
import { ApolloClient } from 'apollo-client';
import { ApolloProvider } from 'react-apollo';

// Create the client as outlined in the setup guide
const client = new ApolloClient();

const App = () => (
  <ApolloProvider client={client}>
    <MyRootComponent />

AppRegistry.registerComponent('MyApplication', () => App);

I can not get it to work since Expo Snack seems to have issues resolving apollo-client and react-apollo.


These errors occur whenever I try to add these libraries into package.json. Please note that I am completely new to Apollo Client, so I might be approaching this completely wrong.

Hey @chrismeister,

I pinged internally about this. Either one of the other team members or myself will circle back once we have more information.



Hey @chrismeister,
It looks like versions of apollo-client past 2.3.5 are trying to pull in graphql@0.14, which doesn’t exist.
apollo-imports - Snack has the react-apollo and apollo-client imports resolving.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.