mirror of
https://github.com/zhigang1992/workers-graphql-server.git
synced 2026-01-12 09:43:41 +08:00
bump apollo (3.3.0) and graphql (15.6.0)
This commit is contained in:
2093
package-lock.json
generated
2093
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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'),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user