bump apollo (3.3.0) and graphql (15.6.0)

This commit is contained in:
Rob Playford
2021-10-03 10:12:57 +01:00
parent 2421227ce6
commit b7ae583908
5 changed files with 413 additions and 1709 deletions

View File

@@ -1 +0,0 @@
module.exports = {}

2093
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,9 +5,9 @@
"version": "1.1.1",
"author": "Kristian Freeman <kristian@bytesized.xyz>",
"dependencies": {
"apollo-datasource-rest": "^0.3.2",
"apollo-server-cloudflare": "^2.21.0",
"graphql": "^14.2.1"
"apollo-datasource-rest": "^3.2.0",
"apollo-server-cloudflare": "^3.3.0",
"graphql": "^15.6.0"
},
"devDependencies": {
"prettier": "^2.4.1",

View File

@@ -21,8 +21,9 @@ const createServer = graphQLOptions =>
...(graphQLOptions.kvCache ? kvCache : {}),
})
const handler = (request, graphQLOptions) => {
const handler = async(request, graphQLOptions) => {
const server = createServer(graphQLOptions)
await server.start()
return graphqlCloudflare(() => server.createGraphQLServerOptions(request))(request)
}

View File

@@ -18,24 +18,5 @@ module.exports = {
type: 'javascript/auto',
},
],
},
resolve: {
alias: {
// While Apollo Server doesn't use the 'fs' Node.js builtin itself,
// its dependency - graphql-upload - does leverage it.
// An intention is for Apollo Server 3.x to no longer directly rely on
// graphql-upload, so this may be re-visited when that release occurs.
fs: path.resolve(__dirname, './null.js'),
// The 'net' and 'tls' Node.js built-in usage within Apollo Server
// is merely to run `instanceof` checks against an existing,
// user-supplied "server" instance when subscriptions are desired to
// be bound to an already-created server. For the purposes of
// Cloudflare, where none of these Node.js builtins exist, this
// instanceof check is irrelevant because such a class could not
// exist.
net: path.resolve(__dirname, './null.js'),
tls: path.resolve(__dirname, './null.js'),
},
}
}