This repository has been archived by the owner on Feb 9, 2023. It is now read-only.
Releases: kimyvgy/apollo-server-integration-cloudflare-workers
Releases · kimyvgy/apollo-server-integration-cloudflare-workers
v2.0.1
v2.0.0
FEATURES
startServerAndCreateCloudflareHandler
will return an request handler (GraphQLRequestHandler
) instead of theResponse
BREAKING CHANGE:
Before:
const response = startServerAndCreateCloudflareHandler(server, {
cors: { // cors configuration },
context: async () => {
const cache = options.kvCache ? new KVCache() : server.cache;
const dataSources: ApolloDataSources = {
pokemonAPI: new PokemonAPI({ cache }),
};
return { dataSources };
}
});
After:
const handleGraphQLRequest = startServerAndCreateCloudflareHandler(server, {
cors: options.cors,
context: async () => {
const cache = options.kvCache ? new KVCache() : server.cache;
const dataSources: ApolloDataSources = {
pokemonAPI: new PokemonAPI({ cache }),
};
return { dataSources };
}
});
const response = await handleGraphQLRequest(request);