File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 1
- const { GitHub } = require ( 'graphql-binding-github ' )
1
+ const { Github } = require ( '../../dist/index ' )
2
2
const { GraphQLServer } = require ( 'graphql-yoga' )
3
3
4
+ console . log ( { Github} )
5
+
4
6
const favoriteRepos = [
5
7
{ owner : 'graphcool' , name : 'graphql-yoga' } ,
6
8
{ owner : 'graphql' , name : 'graphql-js' } ,
7
9
]
8
10
9
11
const token = process . env . GITHUB_TOKEN || ''
10
- const github = new GitHub ( token )
12
+ const github = new Github ( token )
11
13
12
- const typeDefs = '.schemas/app.graphql'
14
+ const typeDefs = './ schemas/app.graphql'
13
15
const resolvers = {
14
16
Query : {
15
17
hello : ( parent , { name } ) => `Hello ${ name || 'World' } !` ,
@@ -19,7 +21,7 @@ const resolvers = {
19
21
)
20
22
} ,
21
23
} ,
22
- ...github . remoteResolvers ( typeDefs ) ,
24
+ ...github . getAbstractResolvers ( typeDefs ) ,
23
25
}
24
26
25
27
const server = new GraphQLServer ( { resolvers, typeDefs } )
Original file line number Diff line number Diff line change 8
8
" schema"
9
9
],
10
10
"scripts" : {
11
- "prepare" : " npm run build" ,
11
+ "prepare" : " npm run build; cp src/schema.graphql dist/schema.graphql " ,
12
12
"build" : " rm -rf dist && tsc -d" ,
13
13
"test" : " echo No tests yet"
14
14
},
17
17
"apollo-link-http" : " 1.5.3" ,
18
18
"cross-fetch" : " 2.1.1" ,
19
19
"graphql" : " 0.13.2" ,
20
- "graphql-binding" : " ^1.4.0-beta.21 " ,
20
+ "graphql-binding" : " ^1.4.0-beta.22 " ,
21
21
"graphql-tools" : " 2.23.1"
22
22
},
23
23
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -160,19 +160,19 @@ get-stream@^3.0.0:
160
160
version "3.0.0"
161
161
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
162
162
163
- graphql-binding@^1.4.0-beta.21 :
164
- version "1.4.0-beta.21 "
165
- resolved "https://registry.yarnpkg.com/graphql-binding/-/graphql-binding-1.4.0-beta.21 .tgz#c048dcd0e4e1756dff814ca7faed91dd9df674d3 "
163
+ graphql-binding@^1.4.0-beta.22 :
164
+ version "1.4.0-beta.22 "
165
+ resolved "https://registry.yarnpkg.com/graphql-binding/-/graphql-binding-1.4.0-beta.22 .tgz#6a0d15b81d4d9c45f5e088e4750e77586c6a3dcb "
166
166
dependencies :
167
- graphql-import "^0.5.0 "
167
+ graphql-import "^0.5.2 "
168
168
graphql-tools "3.0.0"
169
169
iterall "1.2.2"
170
170
object-path-immutable "^1.0.1"
171
171
resolve-cwd "^2.0.0"
172
172
ts-node "^6.0.2"
173
173
yargs "^11.0.0"
174
174
175
- graphql-import@^0.5.0 :
175
+ graphql-import@^0.5.2 :
176
176
version "0.5.2"
177
177
resolved "https://registry.yarnpkg.com/graphql-import/-/graphql-import-0.5.2.tgz#d7e05dc07d2d66e8d8c4bd408650f9fdaeddb8f8"
178
178
dependencies :
You can’t perform that action at this time.
0 commit comments