A possible solution is to use ApolloLink:
// gqlHandleResponse is our handler from the library
const addDateLink = new ApolloLink((operation, forward) =>
forward(operation).map(gqlHandleResponse),
);
// eslint-disable-next-line unicorn/prefer-spread
const link = addDateLink.concat(
httpLink.create({
uri,
}),
);
return {
cache: new InMemoryCache(),
link,
};