import { ApolloClient } from 'apollo-client'; import { InMemoryCache } from 'apollo-cache-inmemory'; import { SchemaLink } from 'apollo-link-schema'; // Import the schema object from previous code snippet above import schema from './path/to/your/schema'; const client = new ApolloClient({ cache: new InMemoryCache(), link: new SchemaLink({ schema }) }); // Then, put this client in ApolloProvider import { ApolloProvider } from 'react-apollo'; // Wherever we want a component to display mocked data // MyComponent uses the Query component internally