query GetAuthor {
author(id: "123") {
name
}
}
{
author: {
id: "123",
name: "John Doe"
}
}
import { InMemoryCache } from 'apollo-cache-inmemory';
const cache = new InMemoryCache({
dataIdFromObject: obj => obj.id,
});
const client = new ApolloClient({
cache,
// other options here
});