File tree 4 files changed +16
-25
lines changed
4 files changed +16
-25
lines changed Original file line number Diff line number Diff line change 1
1
import express from 'express' ;
2
- import graphqlHTTP from 'express-graphql' ;
2
+ import { graphqlHTTP } from 'express-graphql' ;
3
3
import schema from './schema' ;
4
4
5
5
const expressPort = process . env . port || process . env . PORT || 4000 ;
Original file line number Diff line number Diff line change 28
28
},
29
29
"devDependencies" : {
30
30
"@types/express" : " 4.17.12" ,
31
- "@types/express-graphql" : " ^0.9.0" ,
32
31
"@types/jest" : " 26.0.23" ,
33
32
"@typescript-eslint/eslint-plugin" : " 4.25.0" ,
34
33
"@typescript-eslint/parser" : " 4.25.0" ,
35
- "aws-sdk" : " 2.918 .0" ,
34
+ "aws-sdk" : " 2.924 .0" ,
36
35
"eslint" : " 7.27.0" ,
37
36
"eslint-config-airbnb-base" : " 14.2.1" ,
38
37
"eslint-config-prettier" : " 8.3.0" ,
Original file line number Diff line number Diff line change @@ -110,8 +110,17 @@ export class AwsParam {
110
110
} ) ;
111
111
}
112
112
113
+ const typename = `${ name } Input` ;
114
+
115
+ if ( schemaComposer . has ( typename ) ) {
116
+ console . warn (
117
+ `Type ${ typename } already exists. It seems that aws-sdk has types with same names. Reusing already existed type for GraphQL schema.`
118
+ ) ;
119
+ return schemaComposer . get ( typename ) as any ;
120
+ }
121
+
113
122
const itc = schemaComposer . createInputTC ( {
114
- name : ` ${ name } Input` ,
123
+ name : typename ,
115
124
fields,
116
125
} ) ;
117
126
Original file line number Diff line number Diff line change 1110
1110
dependencies :
1111
1111
" @types/node" " *"
1112
1112
1113
- " @types/express-graphql@^0.9.0 " :
1114
- version "0.9.0"
1115
- resolved "https://registry.yarnpkg.com/@types/express-graphql/-/express-graphql-0.9.0.tgz#6f891c11785204bff3a27cae00180c4228550eb8"
1116
- integrity sha512-+n13emasFUtIn5kpJUTIUy4tAiJBRnHSChpA8OVmKvdKYbzzK6iI/zsnWEKP8qQJDpiUh48wrRKIXNC+5U/t+w==
1117
- dependencies :
1118
- express-graphql "*"
1119
-
1120
1113
" @types/express-serve-static-core@* " :
1121
1114
version "4.17.9"
1122
1115
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.9.tgz#2d7b34dcfd25ec663c25c85d76608f8b249667f1"
@@ -1705,10 +1698,10 @@ at-least-node@^1.0.0:
1705
1698
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
1706
1699
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
1707
1700
1708
- aws-sdk@2.918 .0 :
1709
- version "2.918 .0"
1710
- resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.918 .0.tgz#e4323de000262beb762e9c139f89e07282462f17 "
1711
- integrity sha512-ZjWanOA1Zo664EyWLCnbUlkwCjoRPmSIMx529W4gk1418qo3oCEcvUy1HeibGGIClYnZZ7J4FMQvVDm2+JtHLQ ==
1701
+ aws-sdk@2.924 .0 :
1702
+ version "2.924 .0"
1703
+ resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.924 .0.tgz#daefcd11729638d9c9279633a0cc5ba1c98fee64 "
1704
+ integrity sha512-EwJmZDNhEY1/hrihile8+EdrYrT5VKcLuL5F+OA9L+AYWxNou0i4fP36N5KFtMikkAGB31qhAuRDPcr132RnUw ==
1712
1705
dependencies :
1713
1706
buffer "4.9.2"
1714
1707
events "1.1.1"
@@ -3359,16 +3352,6 @@ expect@^27.0.2:
3359
3352
jest-message-util "^27.0.2"
3360
3353
jest-regex-util "^27.0.1"
3361
3354
3362
- express-graphql@* :
3363
- version "0.11.0"
3364
- resolved "https://registry.yarnpkg.com/express-graphql/-/express-graphql-0.11.0.tgz#48089f0d40074d7783c65ff86dd9cae95afea2ef"
3365
- integrity sha512-IMYmF2aIBKKfo8c+EENBNR8FAy91QHboxfaHe1omCyb49GJXsToUgcjjIF/PfWJdzn0Ofp6JJvcsODQJrqpz2g==
3366
- dependencies :
3367
- accepts "^1.3.7"
3368
- content-type "^1.0.4"
3369
- http-errors "1.8.0"
3370
- raw-body "^2.4.1"
3371
-
3372
3355
3373
3356
version "0.12.0"
3374
3357
resolved "https://registry.yarnpkg.com/express-graphql/-/express-graphql-0.12.0.tgz#58deabc309909ca2c9fe2f83f5fbe94429aa23df"
You can’t perform that action at this time.
0 commit comments