This repository was archived by the owner on Mar 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -662,3 +662,11 @@ overrides:
662
662
import/no-commonjs : off
663
663
no-await-in-loop : off
664
664
no-console : off
665
+ - files : ' examples/**'
666
+ parserOptions :
667
+ sourceType : module
668
+ rules :
669
+ internal-rules/no-dir-import : off
670
+ node/no-unpublished-import : off
671
+ import/no-extraneous-dependencies : [error, { devDependencies: true }]
672
+ no-console : off
Original file line number Diff line number Diff line change 1
- /* eslint-disable */
2
1
import express from 'express' ;
3
- import graphqlHTTP from '../src/' ;
4
2
import { buildSchema } from 'graphql' ;
5
3
4
+ import { graphqlHTTP } from '../src' ;
5
+
6
6
// Construct a schema, using GraphQL schema language
7
- var schema = buildSchema ( `
7
+ const schema = buildSchema ( `
8
8
type Query {
9
9
hello: String
10
10
}
11
11
` ) ;
12
12
13
13
// The root provides a resolver function for each API endpoint
14
- var root = {
14
+ const rootValue = {
15
15
hello : ( ) => 'Hello world!' ,
16
16
} ;
17
17
18
- var app = express ( ) ;
18
+ const app = express ( ) ;
19
19
app . use (
20
20
'/graphql' ,
21
21
graphqlHTTP ( {
22
- schema : schema ,
23
- rootValue : root ,
22
+ schema,
23
+ rootValue,
24
24
graphiql : true ,
25
25
} ) ,
26
26
) ;
You can’t perform that action at this time.
0 commit comments