File tree 3 files changed +8
-60
lines changed
3 files changed +8
-60
lines changed Original file line number Diff line number Diff line change 26
26
"@arangodb" : false
27
27
},
28
28
"devDependencies" : {
29
- "@types/body-parser" : " ^1.16.3" ,
30
29
"@types/colors" : " ^1.1.3" ,
31
30
"@types/cors" : " ^2.8.1" ,
32
31
"@types/graphql" : " ~0.11.5" ,
39
38
"@types/pluralize" : " 0.0.27" ,
40
39
"@types/strip-json-comments" : " 0.0.30" ,
41
40
"@types/uuid" : " ^3.4.2" ,
42
- "body-parser" : " ^1.17.2" ,
43
- "cors" : " ^2.8.3" ,
44
41
"dependency-check" : " ^2.9.1" ,
45
- "express" : " ~4.15.4" ,
46
42
"graphql" : " ~0.11.7" ,
47
- "graphql-server-core" : " ~1.1.0" ,
48
- "graphql-server-express" : " ^1.1.2" ,
43
+ "graphql-yoga" : " ^1.4.3" ,
49
44
"jasmine" : " ^2.5.3" ,
50
45
"jasmine-console-reporter" : " ^2.0.1" ,
51
46
"jasmine-promises" : " ^0.4.1" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import { ArangoDBAdapter } from '../..' ;
2
- import { GraphQLServer } from './graphql-server' ;
3
2
import { globalContext } from '../../src/config/global' ;
4
3
import * as path from 'path' ;
5
4
import { loadProjectFromDir } from '../../src/project/project-from-fs' ;
6
- import { InMemoryAdapter } from '../../src/database/inmemory/inmemory-adapter' ;
5
+ import { InMemoryAdapter } from '../../src/database/inmemory' ;
6
+ import { GraphQLServer } from 'graphql-yoga' ;
7
7
8
8
const port = 3000 ;
9
9
const databaseName = 'cruddl' ;
@@ -30,7 +30,10 @@ export async function start() {
30
30
await db . updateSchema ( schema ) ;
31
31
logger . info ( 'Schema is up to date' ) ;
32
32
33
- new GraphQLServer ( {
34
- port, schema : schema
33
+ const server = new GraphQLServer ( {
34
+ schema,
35
+ context : { authRoles : [ "allusers" , "logistics-reader" ] }
35
36
} ) ;
37
+ await server . start ( { port} ) ;
38
+ logger . info ( `Server started on http//localhost:${ port } ` ) ;
36
39
}
You can’t perform that action at this time.
0 commit comments