Skip to content

Commit d40dbb5

Browse files
committed
feat(misc): Move graphql packages to mono repo root. Add isDeprecated false to generated fields.
1 parent f4d8462 commit d40dbb5

File tree

9 files changed

+4267
-119
lines changed

9 files changed

+4267
-119
lines changed

examples/simple/package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"author": "Intelight",
1010
"main": "lib/index.js",
11-
"types": "lib/index.d.ts",
11+
"typings": "lib/index.d.ts",
1212
"license": "UNLICENSED",
1313
"private": true,
1414
"scripts": {
@@ -40,13 +40,9 @@
4040
"test/**/*.{js,jsx,ts,tsx}"
4141
]
4242
},
43-
"resolutions": {
44-
"graphql": "0.13.0",
45-
"graphql-tools": "2.22.0-alpha.0"
46-
},
4743
"devDependencies": {
4844
"@intelight/tslint": "0.0.9",
49-
"@types/graphql": "0.11.7",
45+
"@types/graphql": "0.12.4",
5046
"jest": "22.4.2",
5147
"nodemon": "^1.17.1",
5248
"rimraf": "2.6.2",
@@ -58,7 +54,6 @@
5854
"dependencies": {
5955
"apollo-server-express": "^1.3.2",
6056
"body-parser": "^1.18.2",
61-
"express": "^4.16.2",
62-
"graphql-tools": "2.22.0-alpha.0"
57+
"express": "^4.16.2"
6358
}
6459
}

examples/simple/src/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { graphiqlExpress, graphqlExpress } from 'apollo-server-express';
22
import * as bodyParser from 'body-parser';
33
import * as express from 'express';
4-
import { printSchema } from 'graphql';
5-
import model, { ModelDirective } from 'graphql-model-directive';
4+
import modelDirectives, { ModelDirective } from 'graphql-model-directive';
65
import { MongoStorage } from 'graphql-model-mongo';
76
import { makeExecutableSchema } from 'graphql-tools';
87

@@ -24,16 +23,14 @@ const typeDefs = `
2423

2524
const schema = makeExecutableSchema({
2625
typeDefs,
27-
directives: {
28-
model: ModelDirective,
26+
schemaDirectives: {
27+
...modelDirectives,
2928
} as any,
3029
});
3130

3231
const app = express();
3332

3433
app.use('/graphql', bodyParser.json(), graphqlExpress({ schema }));
35-
app.get('/graphiql', graphiqlExpress({ endpointURL: '/graphql' })); // if you want GraphiQL enabled
34+
app.get('/graphiql', graphiqlExpress({ endpointURL: '/graphql' }));
3635

3736
app.listen(PORT);
38-
39-
console.log(printSchema(schema));

0 commit comments

Comments
 (0)