Skip to content

Commit ef9489f

Browse files
authored
chore(graphql-tools-fork): switch to fork (#340)
chore(graphql-tools-fork): switch to fork
2 parents 3a3141b + 21585d6 commit ef9489f

15 files changed

+97
-72
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,16 @@
2929
"test": "npm-run-all test-*"
3030
},
3131
"dependencies": {
32-
"graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0",
32+
"graphql": "^14.2.0",
3333
"graphql-import": "^0.7.1",
34-
"graphql-tools": "4.0.5",
34+
"graphql-tools-fork": "^8.1.0",
3535
"iterall": "1.2.2",
3636
"object-path-immutable": "^3.0.0",
3737
"resolve-cwd": "^2.0.0",
3838
"ts-node": "^7.0.1",
3939
"yargs": "^12.0.2"
4040
},
4141
"devDependencies": {
42-
"@types/graphql": "14.0.7",
4342
"@types/mkdirp": "0.5.2",
4443
"@types/node": "10.14.17",
4544
"@types/yargs": "12.0.12",

src/Delegate.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ import {
88
GraphQLUnionType,
99
GraphQLInterfaceType,
1010
} from 'graphql'
11-
import { delegateToSchema, ReplaceFieldWithFragment } from 'graphql-tools'
12-
import { IResolvers } from 'graphql-tools/dist/Interfaces'
11+
import {
12+
delegateToSchema,
13+
ReplaceFieldWithFragment,
14+
IResolvers,
15+
} from 'graphql-tools-fork'
1316
import {
1417
BindingOptions,
1518
Options,

src/bin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function getSchemaFromInput(input) {
7474
const schema = buildSchema(sdl)
7575
return {
7676
isDefaultExport: false,
77-
schema
77+
schema,
7878
}
7979
}
8080

src/codegen/FlowGenerator.test.ts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Generated by [AVA](https://ava.li).
1111
`// @flow␊
1212
import { makeBindingClass, Options } from 'graphql-binding'␊
1313
import { GraphQLResolveInfo, GraphQLSchema } from 'graphql'␊
14-
import { IResolvers } from 'graphql-tools/dist/Interfaces'␊
14+
import { IResolvers } from 'graphql-tools-fork'␊
1515
import * as schema from '../schema'␊
1616
1717
export interface Query {␊
@@ -491,7 +491,7 @@ Generated by [AVA](https://ava.li).
491491
export type ID_Output = string␊
492492
493493
/*␊
494-
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
494+
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.␊
495495
*/␊
496496
export type Int = number ␊
497497
-6 Bytes
Binary file not shown.

src/codegen/FlowGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ ${description.split('\n').map(l => ` * ${l}\n`)}
386386
return `\
387387
import { makeBindingClass, Options } from 'graphql-binding'
388388
import { GraphQLResolveInfo, GraphQLSchema } from 'graphql'
389-
import { IResolvers } from 'graphql-tools/dist/Interfaces'
389+
import { IResolvers } from 'graphql-tools-fork'
390390
import ${
391391
this.isDefaultExport ? '' : '* as '
392392
}schema from '${this.getRelativeSchemaPath()}'`

src/codegen/Generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ${this.renderExports()}`
4141
)
4242
}
4343
getRelativeSchemaPath() {
44-
const result = path
44+
const result = path.posix
4545
.relative(
4646
path.dirname(this.outputBindingPath) + '/',
4747
this.inputSchemaPath,

src/codegen/TypescriptGenerator.test.ts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Generated by [AVA](https://ava.li).
1010
1111
`import { makeBindingClass, Options } from 'graphql-binding'␊
1212
import { GraphQLResolveInfo, GraphQLSchema } from 'graphql'␊
13-
import { IResolvers } from 'graphql-tools/dist/Interfaces'␊
13+
import { IResolvers } from 'graphql-tools-fork'␊
1414
import * as schema from '../schema'␊
1515
1616
export interface Query {␊
@@ -482,7 +482,7 @@ Generated by [AVA](https://ava.li).
482482
export type ID_Output = string␊
483483
484484
/*␊
485-
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
485+
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.␊
486486
*/␊
487487
export type Int = number␊
488488
-8 Bytes
Binary file not shown.

src/codegen/TypescriptGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ ${description.split('\n').map(l => ` * ${l}\n`)}
373373
return `\
374374
import { makeBindingClass, Options } from 'graphql-binding'
375375
import { GraphQLResolveInfo, GraphQLSchema } from 'graphql'
376-
import { IResolvers } from 'graphql-tools/dist/Interfaces'
376+
import { IResolvers } from 'graphql-tools-fork'
377377
import ${
378378
this.isDefaultExport ? '' : '* as '
379379
}schema from '${this.getRelativeSchemaPath()}'`

0 commit comments

Comments
 (0)