From ae972770e4a397cd9008bfe48e8ab61b15350c84 Mon Sep 17 00:00:00 2001 From: Pranay Pratyush Date: Sat, 12 Dec 2020 09:36:11 +0530 Subject: [PATCH 1/2] Fixed errors due to postgraphile package restructure --- package.json | 5 +- src/atomic-mutations-plugin.ts | 2 +- yarn.lock | 83 ++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 83e8ede..01c9263 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,10 @@ "url": "https://github.com/EmperorRXF/postgraphile-plugin-atomic-mutations/issues" }, "homepage": "https://github.com/EmperorRXF/postgraphile-plugin-atomic-mutations", - "dependencies": {}, + "dependencies": { + "graphile-utils": "^4.10.0", + "postgraphile-core": "^4.10.0" + }, "devDependencies": { "@types/jest": "^25.2.1", "@types/node": "^13.13.5", diff --git a/src/atomic-mutations-plugin.ts b/src/atomic-mutations-plugin.ts index edbd1b9..b46518c 100644 --- a/src/atomic-mutations-plugin.ts +++ b/src/atomic-mutations-plugin.ts @@ -1,6 +1,6 @@ import { parse } from 'graphql'; import { IncomingMessage } from 'http'; -import { makeWrapResolversPlugin } from 'postgraphile'; +import { makeWrapResolversPlugin } from 'graphile-utils'; interface PostGraphileContext { mutationAtomicityContext: MutationAtomicityContext; diff --git a/yarn.lock b/yarn.lock index a49647d..4bc74e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -270,6 +270,13 @@ resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-4.5.0.tgz#e8fe036d322dfe1715675aab171979981e28ac9e" integrity sha512-OoIgewLowjegJzz3tpcRE5LpQKqsap1ETFaZtC1r9p36h5ieUJnWTxCTpB7XIsU9muMTt7MMt8x0E5apS47QIQ== +"@graphile/lru@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-4.9.0.tgz#f101cbaaaf8a0ae6cb661e8cdc579a11c253cc10" + integrity sha512-VAIFIwTVShUaeXKKEErO5+m12+s6GG/6ZwqyM8eilbz/XGypKBhBFbljoidABMwJdmvfGve+gYK8V0dvzS38tQ== + dependencies: + tslib "^2.0.1" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" @@ -1995,6 +2002,21 @@ graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== +graphile-build-pg@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.10.0.tgz#d0371f63d7470a3241ac80b9a3105f35c682d89a" + integrity sha512-hKuRjh/bx0tUh8c62G+NZDE4vJybkpLAXNdXW49WMQnF72krit7YaerU9dbGa/ve1U2DOHE1MkDJscWyU26Jvg== + dependencies: + "@graphile/lru" "4.9.0" + chalk "^2.4.2" + debug "^4.1.1" + graphile-build "4.10.0" + graphql-iso-date "^3.6.0" + jsonwebtoken "^8.5.1" + lodash ">=4 <5" + lru-cache ">=4 <5" + pg-sql2 "4.9.0" + graphile-build-pg@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.7.0.tgz#6ee86e0623bad433c61812119ac22aa420788841" @@ -2011,6 +2033,21 @@ graphile-build-pg@4.7.0: pg-sql2 "4.7.0" postgres-interval "^1.2.0" +graphile-build@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.10.0.tgz#f54346f23bb625af362b6b9a2487569ec43dd064" + integrity sha512-Ev0OJu5dHVFAjPB5gpaZXoK6Fmu6tilHabo/zc6FZOwVpMz5WAWXW8X04IIGLYAgZz7O4oBDYxvgBPc5C1QZZQ== + dependencies: + "@graphile/lru" "4.9.0" + chalk "^2.4.2" + debug "^4.1.1" + graphql-parse-resolve-info "4.10.0" + iterall "^1.2.2" + lodash ">=4 <5" + lru-cache "^5.0.0" + pluralize "^7.0.0" + semver "^6.0.0" + graphile-build@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.7.0.tgz#138ebd706f6418dcec08b7301c769267bf242a24" @@ -2026,6 +2063,15 @@ graphile-build@4.7.0: pluralize "^7.0.0" semver "^6.0.0" +graphile-utils@^4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphile-utils/-/graphile-utils-4.10.0.tgz#70780b0456d80d51e91f4b39a5187356e2256e1d" + integrity sha512-SYgguryvu6bhsNn5hUO2VQe3dYl6Ov1vlEWqajiX3XfG0zZTz3KhUZHJ7Usjb1VoiPD0vLZ3EcGybsuVq0acTA== + dependencies: + debug "^4.1.1" + graphql ">=0.9 <0.14 || ^14.0.2 || ^15.4.0" + tslib "^2.0.1" + graphile-utils@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphile-utils/-/graphile-utils-4.7.0.tgz#f1b4b77a84741bbcbb69c1f3d2c009bd9c7336f6" @@ -2039,6 +2085,14 @@ graphql-iso-date@^3.6.0: resolved "https://registry.yarnpkg.com/graphql-iso-date/-/graphql-iso-date-3.6.1.tgz#bd2d0dc886e0f954cbbbc496bbf1d480b57ffa96" integrity sha512-AwFGIuYMJQXOEAgRlJlFL4H1ncFM8n8XmoVDTNypNOZyQ8LFDG2ppMFlsS862BSTCDcSUfHp8PD3/uJhv7t59Q== +graphql-parse-resolve-info@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.10.0.tgz#3f61fa4bcbcad65d017f503fac4075f07624a69f" + integrity sha512-4KWA4oiVnC1bduPZzmuUsTT9SZf/sbdrOAtOsHz747H6Azs4xPgj7/DPXCgdYvKrd4Ci9fNDcem4mOVV2Lct1w== + dependencies: + debug "^4.1.1" + tslib "^2.0.1" + graphql-parse-resolve-info@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.7.0.tgz#0f769684f5430f9d14964fb7dea56fbfaf54953f" @@ -2053,6 +2107,11 @@ graphql-parse-resolve-info@4.7.0: dependencies: iterall "^1.2.2" +"graphql@>=0.9 <0.14 || ^14.0.2 || ^15.4.0": + version "15.4.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.4.0.tgz#e459dea1150da5a106486ba7276518b5295a4347" + integrity sha512-EB3zgGchcabbsU9cFe1j+yxdzKQKAbGUWRb13DsrsMN1yyfmmIq+2+L5MqVWcDCE4V89R5AyUOi7sMOGxdsYtA== + graphql@^15.0.0: version "15.0.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.0.0.tgz#042a5eb5e2506a2e2111ce41eb446a8e570b8be9" @@ -3516,6 +3575,16 @@ pg-sql2@4.7.0: "@types/pg" ">=6 <8" debug ">=3 <5" +pg-sql2@4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/pg-sql2/-/pg-sql2-4.9.0.tgz#e46d4267192af69ac861e38e64b0df9632b1169c" + integrity sha512-buNlFvR1Sq/7UY90CnxfKHcs21/J6CyN+iqAxFHy1Ppbc4uUSIdqwIEhB4y19yBsrqcIMa+pt0i+wJ0ecm4aXg== + dependencies: + "@graphile/lru" "4.9.0" + "@types/pg" ">=6 <8" + debug ">=3 <5" + tslib "^2.0.1" + pg-types@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" @@ -3585,6 +3654,15 @@ postgraphile-core@4.7.0: graphile-build "4.7.0" graphile-build-pg "4.7.0" +postgraphile-core@^4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/postgraphile-core/-/postgraphile-core-4.10.0.tgz#eea2672413d85d62da1670db141fc9e4f709b52b" + integrity sha512-AX2a8Xzk+6VwgCNuiUINs8DAC4Oq+b3D1NmA8d4Tzh9yoZlKp2tJ+oqEsCdcnzSHAVn6nIH2JgMqu481DxOHiw== + dependencies: + graphile-build "4.10.0" + graphile-build-pg "4.10.0" + tslib "^2.0.1" + postgraphile@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/postgraphile/-/postgraphile-4.7.0.tgz#b6ec4ca5762b5d78c5b6c53b29a26fc89a4445e0" @@ -4448,6 +4526,11 @@ tslib@^1.5.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== +tslib@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" + integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== + tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" From a3b4f9eca3c4434acd85ab68c038beeca3068bb1 Mon Sep 17 00:00:00 2001 From: Pranay Pratyush Date: Sat, 12 Dec 2020 09:36:11 +0530 Subject: [PATCH 2/2] Fixed errors due to postgraphile package restructure --- package.json | 5 +- src/atomic-mutations-plugin.ts | 2 +- yarn.lock | 83 ++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 83e8ede..01c9263 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,10 @@ "url": "https://github.com/EmperorRXF/postgraphile-plugin-atomic-mutations/issues" }, "homepage": "https://github.com/EmperorRXF/postgraphile-plugin-atomic-mutations", - "dependencies": {}, + "dependencies": { + "graphile-utils": "^4.10.0", + "postgraphile-core": "^4.10.0" + }, "devDependencies": { "@types/jest": "^25.2.1", "@types/node": "^13.13.5", diff --git a/src/atomic-mutations-plugin.ts b/src/atomic-mutations-plugin.ts index edbd1b9..b46518c 100644 --- a/src/atomic-mutations-plugin.ts +++ b/src/atomic-mutations-plugin.ts @@ -1,6 +1,6 @@ import { parse } from 'graphql'; import { IncomingMessage } from 'http'; -import { makeWrapResolversPlugin } from 'postgraphile'; +import { makeWrapResolversPlugin } from 'graphile-utils'; interface PostGraphileContext { mutationAtomicityContext: MutationAtomicityContext; diff --git a/yarn.lock b/yarn.lock index a49647d..4bc74e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -270,6 +270,13 @@ resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-4.5.0.tgz#e8fe036d322dfe1715675aab171979981e28ac9e" integrity sha512-OoIgewLowjegJzz3tpcRE5LpQKqsap1ETFaZtC1r9p36h5ieUJnWTxCTpB7XIsU9muMTt7MMt8x0E5apS47QIQ== +"@graphile/lru@4.9.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@graphile/lru/-/lru-4.9.0.tgz#f101cbaaaf8a0ae6cb661e8cdc579a11c253cc10" + integrity sha512-VAIFIwTVShUaeXKKEErO5+m12+s6GG/6ZwqyM8eilbz/XGypKBhBFbljoidABMwJdmvfGve+gYK8V0dvzS38tQ== + dependencies: + tslib "^2.0.1" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" @@ -1995,6 +2002,21 @@ graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== +graphile-build-pg@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.10.0.tgz#d0371f63d7470a3241ac80b9a3105f35c682d89a" + integrity sha512-hKuRjh/bx0tUh8c62G+NZDE4vJybkpLAXNdXW49WMQnF72krit7YaerU9dbGa/ve1U2DOHE1MkDJscWyU26Jvg== + dependencies: + "@graphile/lru" "4.9.0" + chalk "^2.4.2" + debug "^4.1.1" + graphile-build "4.10.0" + graphql-iso-date "^3.6.0" + jsonwebtoken "^8.5.1" + lodash ">=4 <5" + lru-cache ">=4 <5" + pg-sql2 "4.9.0" + graphile-build-pg@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphile-build-pg/-/graphile-build-pg-4.7.0.tgz#6ee86e0623bad433c61812119ac22aa420788841" @@ -2011,6 +2033,21 @@ graphile-build-pg@4.7.0: pg-sql2 "4.7.0" postgres-interval "^1.2.0" +graphile-build@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.10.0.tgz#f54346f23bb625af362b6b9a2487569ec43dd064" + integrity sha512-Ev0OJu5dHVFAjPB5gpaZXoK6Fmu6tilHabo/zc6FZOwVpMz5WAWXW8X04IIGLYAgZz7O4oBDYxvgBPc5C1QZZQ== + dependencies: + "@graphile/lru" "4.9.0" + chalk "^2.4.2" + debug "^4.1.1" + graphql-parse-resolve-info "4.10.0" + iterall "^1.2.2" + lodash ">=4 <5" + lru-cache "^5.0.0" + pluralize "^7.0.0" + semver "^6.0.0" + graphile-build@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphile-build/-/graphile-build-4.7.0.tgz#138ebd706f6418dcec08b7301c769267bf242a24" @@ -2026,6 +2063,15 @@ graphile-build@4.7.0: pluralize "^7.0.0" semver "^6.0.0" +graphile-utils@^4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphile-utils/-/graphile-utils-4.10.0.tgz#70780b0456d80d51e91f4b39a5187356e2256e1d" + integrity sha512-SYgguryvu6bhsNn5hUO2VQe3dYl6Ov1vlEWqajiX3XfG0zZTz3KhUZHJ7Usjb1VoiPD0vLZ3EcGybsuVq0acTA== + dependencies: + debug "^4.1.1" + graphql ">=0.9 <0.14 || ^14.0.2 || ^15.4.0" + tslib "^2.0.1" + graphile-utils@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphile-utils/-/graphile-utils-4.7.0.tgz#f1b4b77a84741bbcbb69c1f3d2c009bd9c7336f6" @@ -2039,6 +2085,14 @@ graphql-iso-date@^3.6.0: resolved "https://registry.yarnpkg.com/graphql-iso-date/-/graphql-iso-date-3.6.1.tgz#bd2d0dc886e0f954cbbbc496bbf1d480b57ffa96" integrity sha512-AwFGIuYMJQXOEAgRlJlFL4H1ncFM8n8XmoVDTNypNOZyQ8LFDG2ppMFlsS862BSTCDcSUfHp8PD3/uJhv7t59Q== +graphql-parse-resolve-info@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.10.0.tgz#3f61fa4bcbcad65d017f503fac4075f07624a69f" + integrity sha512-4KWA4oiVnC1bduPZzmuUsTT9SZf/sbdrOAtOsHz747H6Azs4xPgj7/DPXCgdYvKrd4Ci9fNDcem4mOVV2Lct1w== + dependencies: + debug "^4.1.1" + tslib "^2.0.1" + graphql-parse-resolve-info@4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.7.0.tgz#0f769684f5430f9d14964fb7dea56fbfaf54953f" @@ -2053,6 +2107,11 @@ graphql-parse-resolve-info@4.7.0: dependencies: iterall "^1.2.2" +"graphql@>=0.9 <0.14 || ^14.0.2 || ^15.4.0": + version "15.4.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.4.0.tgz#e459dea1150da5a106486ba7276518b5295a4347" + integrity sha512-EB3zgGchcabbsU9cFe1j+yxdzKQKAbGUWRb13DsrsMN1yyfmmIq+2+L5MqVWcDCE4V89R5AyUOi7sMOGxdsYtA== + graphql@^15.0.0: version "15.0.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.0.0.tgz#042a5eb5e2506a2e2111ce41eb446a8e570b8be9" @@ -3516,6 +3575,16 @@ pg-sql2@4.7.0: "@types/pg" ">=6 <8" debug ">=3 <5" +pg-sql2@4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/pg-sql2/-/pg-sql2-4.9.0.tgz#e46d4267192af69ac861e38e64b0df9632b1169c" + integrity sha512-buNlFvR1Sq/7UY90CnxfKHcs21/J6CyN+iqAxFHy1Ppbc4uUSIdqwIEhB4y19yBsrqcIMa+pt0i+wJ0ecm4aXg== + dependencies: + "@graphile/lru" "4.9.0" + "@types/pg" ">=6 <8" + debug ">=3 <5" + tslib "^2.0.1" + pg-types@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" @@ -3585,6 +3654,15 @@ postgraphile-core@4.7.0: graphile-build "4.7.0" graphile-build-pg "4.7.0" +postgraphile-core@^4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/postgraphile-core/-/postgraphile-core-4.10.0.tgz#eea2672413d85d62da1670db141fc9e4f709b52b" + integrity sha512-AX2a8Xzk+6VwgCNuiUINs8DAC4Oq+b3D1NmA8d4Tzh9yoZlKp2tJ+oqEsCdcnzSHAVn6nIH2JgMqu481DxOHiw== + dependencies: + graphile-build "4.10.0" + graphile-build-pg "4.10.0" + tslib "^2.0.1" + postgraphile@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/postgraphile/-/postgraphile-4.7.0.tgz#b6ec4ca5762b5d78c5b6c53b29a26fc89a4445e0" @@ -4448,6 +4526,11 @@ tslib@^1.5.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== +tslib@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.3.tgz#8e0741ac45fc0c226e58a17bfc3e64b9bc6ca61c" + integrity sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ== + tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"