I am writing a graphql server component on AWS Lambda (NOT using graphql-server). On the client side I\'m using apollo-client. On the response of the lambda function I\'m sett
the first, fault we are doing is importing ApolloClient from 'apollo-boost'. Actually we have to import ApolloClient from 'apollo-client'.
import ApolloClient from 'apollo-client';
Because, ApolloClient from apollo-boost only supports a smaller subset of configuration options. ApolloClient from apollo-client gives you all the configuration options.
then we can provide link and cache only to Apollo-client instance
import { InMemoryCache } from "apollo-cache-inmemory";
import { createHttpLink } from 'apollo-link-http';
const client = new ApolloClient({
link: new createHttpLink(
{
uri: "Your QraphQL Link"
}
),
cache: new InMemoryCache(),
});