File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 37
37
"apollo-link" : " ^1.0.7" ,
38
38
"apollo-server-express" : " ^1.3.2" ,
39
39
"apollo-upload-server" : " ^4.0.0-alpha.1" ,
40
+ "body-parser-graphql" : " 1.0.0" ,
40
41
"cors" : " ^2.8.4" ,
41
42
"express" : " ^4.16.2" ,
42
43
"graphql" : " ^0.12.0" ,
Original file line number Diff line number Diff line change 1
1
import * as express from 'express'
2
+ import * as bodyParser from 'body-parser-graphql'
2
3
import * as cors from 'cors'
3
4
import * as fs from 'fs'
4
5
import { importSchema } from 'graphql-import'
@@ -50,7 +51,7 @@ export class GraphQLServer {
50
51
51
52
this . express . post (
52
53
this . options . endpoint ,
53
- express . json ( ) ,
54
+ bodyParser . graphql ( ) ,
54
55
apolloUploadExpress ( this . options . uploads ) ,
55
56
)
56
57
Original file line number Diff line number Diff line change @@ -178,7 +178,13 @@ bluebird@^3.5.1:
178
178
version "3.5.1"
179
179
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
180
180
181
- body-parser@1.18.2 :
181
+ body-parser-graphql@1.0.0 :
182
+ version "1.0.0"
183
+ resolved "https://registry.yarnpkg.com/body-parser-graphql/-/body-parser-graphql-1.0.0.tgz#997de1792ed222cbc4845d404f4549eb88ec6d37"
184
+ dependencies :
185
+ body-parser "^1.18.2"
186
+
187
+ body-parser@1.18.2, body-parser@^1.18.2 :
182
188
version "1.18.2"
183
189
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
184
190
dependencies :
@@ -549,6 +555,15 @@ graphql-import@^0.1.7:
549
555
graphql "^0.12.3"
550
556
lodash "^4.17.4"
551
557
558
+ graphql-import@^0.1.9 :
559
+ version "0.1.9"
560
+ resolved "https://registry.yarnpkg.com/graphql-import/-/graphql-import-0.1.9.tgz#9161f4f7ea92337b60fd40e22e64d3a68c212729"
561
+ dependencies :
562
+ " @types/graphql" " 0.11.7"
563
+ " @types/lodash" " ^4.14.85"
564
+ graphql "^0.12.3"
565
+ lodash "^4.17.4"
566
+
552
567
graphql-playground-html@^1.3.13 :
553
568
version "1.3.13"
554
569
resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.3.13.tgz#ac1b0491af1052fb0cbb090e054f6f6fa2797486"
You can’t perform that action at this time.
0 commit comments