diff --git a/package.json b/package.json index c641f0fb6..5fe87f408 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "eslint_d": "^9.1.2", "flow-bin": "^0.106.3", "flow-copy-source": "^2.0.9", - "graphql": ">=0.6 <16", + "graphql": ">=0.6 <16 || ^16.3.0", "jest": "25.x", "lerna": "^3.18.4", "pg": ">=6.1.0 <9", @@ -54,12 +54,14 @@ "prettier": "^2.1.1", "typescript": "^4.0.2" }, - "workspaces": ["packages/*"], + "workspaces": [ + "packages/*" + ], "engines": { "node": ">=8.6", "yarn": ">=1.3.2" }, "resolutions": { - "graphql": "^15.4.0" + "graphql": "^16.3.0" } } diff --git a/packages/graphile-build/__tests__/__snapshots__/emptyMutation.test.js.snap b/packages/graphile-build/__tests__/__snapshots__/emptyMutation.test.js.snap index 673973258..3bdcd9bd2 100644 --- a/packages/graphile-build/__tests__/__snapshots__/emptyMutation.test.js.snap +++ b/packages/graphile-build/__tests__/__snapshots__/emptyMutation.test.js.snap @@ -28,5 +28,4 @@ interface Node { """ id: ID! } - `; diff --git a/packages/graphile-build/__tests__/__snapshots__/enum.test.js.snap b/packages/graphile-build/__tests__/__snapshots__/enum.test.js.snap index ba32476f9..41107a25d 100644 --- a/packages/graphile-build/__tests__/__snapshots__/enum.test.js.snap +++ b/packages/graphile-build/__tests__/__snapshots__/enum.test.js.snap @@ -36,5 +36,4 @@ enum MyEnum { THREE @deprecated(reason: "We no longer support numbers smaller than PI") FOUR } - `; diff --git a/packages/graphile-build/__tests__/__snapshots__/fieldData.test.js.snap b/packages/graphile-build/__tests__/__snapshots__/fieldData.test.js.snap index 0c7f60c1d..123ebe5c0 100644 --- a/packages/graphile-build/__tests__/__snapshots__/fieldData.test.js.snap +++ b/packages/graphile-build/__tests__/__snapshots__/fieldData.test.js.snap @@ -90,7 +90,6 @@ enum DummyConnectionSortBy { CAPS_ASC CAPS_DESC } - `; exports[`no arguments 1`] = ` diff --git a/packages/graphile-build/__tests__/__snapshots__/watch.test.js.snap b/packages/graphile-build/__tests__/__snapshots__/watch.test.js.snap index ca7a2bb7c..45e6dc626 100644 --- a/packages/graphile-build/__tests__/__snapshots__/watch.test.js.snap +++ b/packages/graphile-build/__tests__/__snapshots__/watch.test.js.snap @@ -33,7 +33,6 @@ interface Node { type Dummy0 { n: Int! } - `; exports[`generated schema n = 0, n = 3 2`] = ` @@ -69,5 +68,4 @@ interface Node { type Dummy3 { n: Int! } - `; diff --git a/packages/graphile-build/package.json b/packages/graphile-build/package.json index 4c39c186b..fbe5ce27f 100644 --- a/packages/graphile-build/package.json +++ b/packages/graphile-build/package.json @@ -51,7 +51,7 @@ "jest-serializer-graphql-schema": "4.10.0" }, "peerDependencies": { - "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0" + "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0" }, "files": [ "node8plus", diff --git a/packages/graphile-utils/package.json b/packages/graphile-utils/package.json index 91d4f95c0..d7e159e71 100644 --- a/packages/graphile-utils/package.json +++ b/packages/graphile-utils/package.json @@ -31,7 +31,7 @@ "homepage": "https://github.com/graphile/graphile-engine/tree/master/packages/graphile-utils", "dependencies": { "debug": "^4.1.1", - "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0", + "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0", "tslib": "^2.0.1" }, "engines": { diff --git a/packages/graphile-utils/src/fieldHelpers.ts b/packages/graphile-utils/src/fieldHelpers.ts index fa084ff07..68dbea74d 100644 --- a/packages/graphile-utils/src/fieldHelpers.ts +++ b/packages/graphile-utils/src/fieldHelpers.ts @@ -88,7 +88,7 @@ export function makeFieldHelpers( return build.pgAddStartEndCursor(rows[0]); } else { const liveRecord = - resolveInfo.rootValue && resolveInfo.rootValue.liveRecord; + resolveInfo.rootValue && (resolveInfo.rootValue as any).liveRecord; if ( build.options.subscriptions && !isConnection && diff --git a/packages/graphile-utils/src/makeExtendSchemaPlugin.ts b/packages/graphile-utils/src/makeExtendSchemaPlugin.ts index 8d8742375..70cd119cb 100644 --- a/packages/graphile-utils/src/makeExtendSchemaPlugin.ts +++ b/packages/graphile-utils/src/makeExtendSchemaPlugin.ts @@ -39,7 +39,6 @@ import type { StringValueNode, TypeNode, ValueNode, - GraphQLList, GraphQLEnumType, GraphQLDirective, InputObjectTypeExtensionNode, @@ -676,7 +675,7 @@ export default function makeExtendSchemaPlugin( return null; } else if (value.kind === "ListValue") { // This is used in directives, so we cannot assume the type is known. - const childType: GraphQLList | null = + const childType: GraphQLType | null = type && graphql.isListType(type) ? type.ofType : null; return value.values.map(value => getValue(value, childType)); } else if (value.kind === "GraphileEmbed") { diff --git a/packages/graphql-parse-resolve-info/package.json b/packages/graphql-parse-resolve-info/package.json index af3ec2475..7232250da 100644 --- a/packages/graphql-parse-resolve-info/package.json +++ b/packages/graphql-parse-resolve-info/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/graphile/graphile-engine/tree/master/packages/graphql-parse-resolve-info", "peerDependencies": { - "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0" + "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0" }, "devDependencies": { "@types/debug": "^4.1.4", diff --git a/packages/graphql-parse-resolve-info/src/index.ts b/packages/graphql-parse-resolve-info/src/index.ts index acbc60fd5..639b44fa4 100644 --- a/packages/graphql-parse-resolve-info/src/index.ts +++ b/packages/graphql-parse-resolve-info/src/index.ts @@ -232,7 +232,7 @@ function fieldTreeFromAST( const newTreeRoot: ResolveTree = { name, alias, - args, + args: args as any, // GraphQL v16 compat fieldsByTypeName: isCompositeType(fieldGqlType) ? { [fieldGqlType.name]: {}, diff --git a/packages/jest-serializer-graphql-schema/package.json b/packages/jest-serializer-graphql-schema/package.json index 8e927b933..635c1b49f 100644 --- a/packages/jest-serializer-graphql-schema/package.json +++ b/packages/jest-serializer-graphql-schema/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/graphile/graphile-engine/tree/master/packages/jest-serializer-graphql-schema#readme", "peerDependencies": { - "graphql": "^14.0.2 || ^15.4.0" + "graphql": "^14.0.2 || ^15.4.0 || ^16.3.0" }, "devDependencies": { "@types/node-fetch": "^2.5.2", diff --git a/packages/pg-pubsub/package.json b/packages/pg-pubsub/package.json index ecf265663..2bb142aa1 100644 --- a/packages/pg-pubsub/package.json +++ b/packages/pg-pubsub/package.json @@ -38,12 +38,12 @@ }, "peerDependencies": { "graphile-build": "4.x", - "graphql": ">=0.6 <16", + "graphql": ">=0.6 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0", "postgraphile": "^4.4.0-beta.10" }, "devDependencies": { "@types/jest": "25.x", - "graphql": ">=0.6 <16", + "graphql": ">=0.6 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0", "jest": "25.x", "jest-serializer-graphql-schema": "4.10.0", "mock-req": "^0.2.0", diff --git a/packages/postgraphile-core/package.json b/packages/postgraphile-core/package.json index 558adb315..71ac8103d 100644 --- a/packages/postgraphile-core/package.json +++ b/packages/postgraphile-core/package.json @@ -36,7 +36,7 @@ "typescript": "^4.0.2" }, "peerDependencies": { - "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0", + "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0", "pg": ">=6.1.0 <9" }, "files": [ diff --git a/yarn.lock b/yarn.lock index 675662032..eecc24822 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5275,6 +5275,35 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== +graphile-build-pg@4.12.1: + version "4.12.1" + resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.12.1.tgz#f6102a60968076beedfefeb102e8558255e65921" + integrity sha512-Rd9QBtbyLJ425VUeHggFCvh3s3oKR58mUU6JYK0sQTRjYbxrE/eWDNAQZQLuWeemfSHvgS5W0EzppkHjkoiWiQ== + dependencies: + "@graphile/lru" "4.11.0" + chalk "^2.4.2" + debug "^4.1.1" + graphile-build "4.12.0" + jsonwebtoken "^8.5.1" + lodash ">=4 <5" + lru-cache ">=4 <5" + pg-sql2 "4.12.1" + +graphile-build@4.12.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.12.0.tgz#726bdb1338f13b30cdec35ee3b0c9af8aa7f7dab" + integrity sha512-P4urOvOf4C8uzuuCq8BjFb+qffQvWUnZamrEyRC/0BfKKPkZhQ/HYqe9M7JkwiH8uFekHaTXDBrdR+OPoZEdhw== + dependencies: + "@graphile/lru" "4.11.0" + chalk "^2.4.2" + debug "^4.1.1" + graphql-parse-resolve-info "4.12.0" + iterall "^1.2.2" + lodash ">=4 <5" + lru-cache "^5.0.0" + pluralize "^7.0.0" + semver "^6.0.0" + graphql-config@^3.0.2: version "3.4.1" resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-3.4.1.tgz#59f937a1b4d3a3c2dcdb27ddf5b4d4d4b2c6e9e1" @@ -5309,10 +5338,10 @@ graphql-ws@^5.1.2: resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.5.3.tgz#1495c1c1ad7dcd3cf76a46db629810a55d3b2d18" integrity sha512-Okp3gE3vq9OoeqsYVbmzKvPcvlinKNXrfVajH7D3ul1UdCg2+K2zVYbWKmqxehkAZ+GKVfngK5fzyXSsfpe+pA== -"graphql@>=0.6 <16", "graphql@>=0.9 <0.14 || ^14.0.2 || ^15.4.0", "graphql@^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.2 || ^15.0.0", graphql@^15.4.0: - version "15.6.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.6.1.tgz#9125bdf057553525da251e19e96dab3d3855ddfc" - integrity sha512-3i5lu0z6dRvJ48QP9kFxBkJ7h4Kso7PS8eahyTFz5Jm6CvQfLtNIE8LX9N6JLnXTuwR+sIYnXzaWp6anOg0QQw== +"graphql@>=0.6 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0", "graphql@>=0.6 <16 || ^16.3.0", "graphql@>=0.9 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0", "graphql@^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.2 || ^15.0.0", graphql@^16.3.0: + version "16.3.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05" + integrity sha512-xm+ANmA16BzCT5pLjuXySbQVFwH3oJctUVdy81w1sV0vBU0KgDdBGtxQOUd5zqOBk/JayAFeG8Dlmeq74rjm/A== growly@^1.3.0: version "1.3.0" @@ -8119,6 +8148,15 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postgraphile-core@4.12.1: + version "4.12.1" + resolved "https://registry.yarnpkg.com/postgraphile-core/-/postgraphile-core-4.12.1.tgz#fcee9d54b02a56666a8026df56e0b0540e712cf4" + integrity sha512-BukrJ3j+H4dtEaCCZOPjLZ6+DJnAYHPOvFpDC85w9T4xlpLFCx7/E8ZlZFm7z/P6f/s8SS8EpL7lazms6uB8FQ== + dependencies: + graphile-build "4.12.0" + graphile-build-pg "4.12.1" + tslib "^2.0.1" + postgraphile@^4.10.0-alpha.0: version "4.12.4" resolved "https://registry.yarnpkg.com/postgraphile/-/postgraphile-4.12.4.tgz#c07395618e12f3e35f401ec7c75d7e34e48de69b"