Use apollo-server-koa directly instead of the graphql-server-koa alias.
This removes an unessesary package from node_modules.
This commit is contained in:
parent
20e79ba465
commit
81506cd76c
8
api/package-lock.json
generated
8
api/package-lock.json
generated
@ -2462,14 +2462,6 @@
|
|||||||
"source-map-support": "0.5.3"
|
"source-map-support": "0.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"graphql-server-koa": {
|
|
||||||
"version": "1.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/graphql-server-koa/-/graphql-server-koa-1.3.2.tgz",
|
|
||||||
"integrity": "sha1-nc+8yxk5a+R9pytIIz5Aka0N/zQ=",
|
|
||||||
"requires": {
|
|
||||||
"apollo-server-koa": "1.3.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"graphql-tools": {
|
"graphql-tools": {
|
||||||
"version": "2.20.0",
|
"version": "2.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-2.20.0.tgz",
|
"resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-2.20.0.tgz",
|
||||||
|
|||||||
@ -6,10 +6,10 @@
|
|||||||
"npm": ">=5.4"
|
"npm": ">=5.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"apollo-server-koa": "^1.3.2",
|
||||||
"apollo-upload-server": "^4.0.2",
|
"apollo-upload-server": "^4.0.2",
|
||||||
"dotenv": "^5.0.0",
|
"dotenv": "^5.0.0",
|
||||||
"graphql": "^0.12.3",
|
"graphql": "^0.12.3",
|
||||||
"graphql-server-koa": "^1.3.2",
|
|
||||||
"graphql-tools": "^2.20.0",
|
"graphql-tools": "^2.20.0",
|
||||||
"kcors": "^2.2.1",
|
"kcors": "^2.2.1",
|
||||||
"koa": "^2.4.1",
|
"koa": "^2.4.1",
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import compress from 'koa-compress'
|
|||||||
import KoaRouter from 'koa-router'
|
import KoaRouter from 'koa-router'
|
||||||
import koaBody from 'koa-bodyparser'
|
import koaBody from 'koa-bodyparser'
|
||||||
import { apolloUploadKoa } from 'apollo-upload-server'
|
import { apolloUploadKoa } from 'apollo-upload-server'
|
||||||
import graphqlServerKoa from 'graphql-server-koa'
|
import apolloServerKoa from 'apollo-server-koa'
|
||||||
import graphqlTools from 'graphql-tools'
|
import graphqlTools from 'graphql-tools'
|
||||||
import typeDefs from './schema.mjs'
|
import typeDefs from './schema.mjs'
|
||||||
import resolvers from './resolvers.mjs'
|
import resolvers from './resolvers.mjs'
|
||||||
@ -13,7 +13,7 @@ const router = new KoaRouter().post(
|
|||||||
'/graphql',
|
'/graphql',
|
||||||
koaBody(),
|
koaBody(),
|
||||||
apolloUploadKoa(),
|
apolloUploadKoa(),
|
||||||
graphqlServerKoa.graphqlKoa({
|
apolloServerKoa.graphqlKoa({
|
||||||
schema: graphqlTools.makeExecutableSchema({ typeDefs, resolvers })
|
schema: graphqlTools.makeExecutableSchema({ typeDefs, resolvers })
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user