Relative Content

Tag Archive for graphqlapollo-clientfastify

Implementation of Automatic Persisted Query using Fastify

import { ApolloClient, InMemoryCache, HttpLink } from ‘@apollo/client’; import { createPersistedQueryLink } from ‘@apollo/client/link/persisted-queries’; import { sha256 } from ‘crypto-hash’; const linkChain = createPersistedQueryLink({ sha256 }).concat( new HttpLink({ uri: ‘http://localhost:4000/graphql’ }), ); const client = new ApolloClient({ cache: new InMemoryCache(), link: linkChain, }); Does this code work only for the apollo-server and standAloneServer or does […]