diff --git a/package-lock.json b/package-lock.json index 7542369524..1ae6c24c21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,14 +57,6 @@ } } }, - "@ardatan/aggregate-error": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@ardatan/aggregate-error/-/aggregate-error-0.0.6.tgz", - "integrity": "sha512-vyrkEHG1jrukmzTPtyWB4NLPauUw5bQeg4uhn8f+1SSynmrOcyvlb1GKQjjgoBzElLdfXCRYX8UnBlhklOHYRQ==", - "requires": { - "tslib": "~2.0.1" - } - }, "@babel/cli": { "version": "7.10.0", "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.10.0.tgz", @@ -1159,165 +1151,32 @@ "tiny-lru": "7.0.6" } }, - "@graphql-tools/batch-delegate": { - "version": "6.2.6", - "resolved": "https://registry.npmjs.org/@graphql-tools/batch-delegate/-/batch-delegate-6.2.6.tgz", - "integrity": "sha512-QUoE9pQtkdNPFdJHSnBhZtUfr3M7pIRoXoMR+TG7DK2Y62ISKbT/bKtZEUU1/2v5uqd5WVIvw9dF8gHDSJAsSA==", - "requires": { - "@graphql-tools/delegate": "^6.2.4", - "dataloader": "2.0.0", - "tslib": "~2.0.1" - } - }, - "@graphql-tools/delegate": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-6.2.4.tgz", - "integrity": "sha512-mXe6DfoWmq49kPcDrpKHgC2DSWcD5q0YCaHHoXYPAOlnLH8VMTY8BxcE8y/Do2eyg+GLcwAcrpffVszWMwqw0w==", - "requires": { - "@ardatan/aggregate-error": "0.0.6", - "@graphql-tools/schema": "^6.2.4", - "@graphql-tools/utils": "^6.2.4", - "dataloader": "2.0.0", - "is-promise": "4.0.0", - "tslib": "~2.0.1" - } - }, "@graphql-tools/merge": { - "version": "6.2.17", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-6.2.17.tgz", - "integrity": "sha512-G5YrOew39fZf16VIrc49q3c8dBqQDD0ax5LYPiNja00xsXDi0T9zsEWVt06ApjtSdSF6HDddlu5S12QjeN8Tow==", + "version": "8.2.11", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.11.tgz", + "integrity": "sha512-fsjJVdsk9GV1jj1Ed2AKLlHYlsf0ZadTK8X5KxFRE1ZSnKqh56BLVX93JrtOIAnsiHkwOK2TC43HGhApF1swpQ==", "requires": { - "@graphql-tools/schema": "^8.0.2", - "@graphql-tools/utils": "8.0.2", - "tslib": "~2.3.0" - }, - "dependencies": { - "@graphql-tools/merge": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.0.1.tgz", - "integrity": "sha512-YAozogbjC2Oun+UcwG0LZFumhlCiHBmqe68OIf7bqtBdp4pbPAiVuK/J9oJqRVJmzvUqugo6RD9zz1qDTKZaiQ==", - "requires": { - "@graphql-tools/utils": "8.1.1", - "tslib": "~2.3.0" - }, - "dependencies": { - "@graphql-tools/utils": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.1.1.tgz", - "integrity": "sha512-QbFNoBmBiZ+ej4y6mOv8Ba4lNhcrTEKXAhZ0f74AhdEXi7b9xbGUH/slO5JaSyp85sGQYIPmxjRPpXBjLklbmw==", - "requires": { - "tslib": "~2.3.0" - } - } - } - }, - "@graphql-tools/schema": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.1.1.tgz", - "integrity": "sha512-u+0kxPtuP+GcKnGNt459Ob7iIpzesIJeJTmPPailaG7ZhB5hkXIizl4uHrzEIAh2Ja1P/VA8sEBYpu1N0n6Mmg==", - "requires": { - "@graphql-tools/merge": "8.0.1", - "@graphql-tools/utils": "8.1.1", - "tslib": "~2.3.0", - "value-or-promise": "1.0.10" - }, - "dependencies": { - "@graphql-tools/merge": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.0.1.tgz", - "integrity": "sha512-YAozogbjC2Oun+UcwG0LZFumhlCiHBmqe68OIf7bqtBdp4pbPAiVuK/J9oJqRVJmzvUqugo6RD9zz1qDTKZaiQ==", - "requires": { - "@graphql-tools/utils": "8.1.1", - "tslib": "~2.3.0" - } - }, - "@graphql-tools/utils": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.1.1.tgz", - "integrity": "sha512-QbFNoBmBiZ+ej4y6mOv8Ba4lNhcrTEKXAhZ0f74AhdEXi7b9xbGUH/slO5JaSyp85sGQYIPmxjRPpXBjLklbmw==", - "requires": { - "tslib": "~2.3.0" - } - } - } - }, - "@graphql-tools/utils": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.0.2.tgz", - "integrity": "sha512-gzkavMOgbhnwkHJYg32Adv6f+LxjbQmmbdD5Hty0+CWxvaiuJq+nU6tzb/7VSU4cwhbNLx/lGu2jbCPEW1McZQ==", - "requires": { - "tslib": "~2.3.0" - } - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - } + "@graphql-tools/utils": "8.6.10", + "tslib": "~2.4.0" } }, "@graphql-tools/schema": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-6.2.4.tgz", - "integrity": "sha512-rh+14lSY1q8IPbEv2J9x8UBFJ5NrDX9W5asXEUlPp+7vraLp/Tiox4GXdgyA92JhwpYco3nTf5Bo2JDMt1KnAQ==", - "requires": { - "@graphql-tools/utils": "^6.2.4", - "tslib": "~2.0.1" - } - }, - "@graphql-tools/stitch": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@graphql-tools/stitch/-/stitch-6.2.4.tgz", - "integrity": "sha512-0C7PNkS7v7iAc001m7c1LPm5FUB0/DYw+s3OyCii6YYYHY8NwdI0roeOyeDGFJkFubWBQfjc3hoSyueKtU73mw==", + "version": "8.3.11", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.11.tgz", + "integrity": "sha512-esMEnbyXbp8B5VEI4o395+x0G7Qmz3JSX5onFBF8HeLYcqWJasY5vBuWkO18VxrZpEnvnryodP6Y00bVag9O3Q==", "requires": { - "@graphql-tools/batch-delegate": "^6.2.4", - "@graphql-tools/delegate": "^6.2.4", - "@graphql-tools/merge": "^6.2.4", - "@graphql-tools/schema": "^6.2.4", - "@graphql-tools/utils": "^6.2.4", - "@graphql-tools/wrap": "^6.2.4", - "is-promise": "4.0.0", - "tslib": "~2.0.1" + "@graphql-tools/merge": "8.2.11", + "@graphql-tools/utils": "8.6.10", + "tslib": "~2.4.0", + "value-or-promise": "1.0.11" } }, "@graphql-tools/utils": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-6.2.4.tgz", - "integrity": "sha512-ybgZ9EIJE3JMOtTrTd2VcIpTXtDrn2q6eiYkeYMKRVh3K41+LZa6YnR2zKERTXqTWqhobROwLt4BZbw2O3Aeeg==", - "requires": { - "@ardatan/aggregate-error": "0.0.6", - "camel-case": "4.1.1", - "tslib": "~2.0.1" - }, - "dependencies": { - "camel-case": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz", - "integrity": "sha512-7fa2WcG4fYFkclIvEmxBbTvmibwF2/agfEBc6q3lOpVu0A13ltLsA+Hr/8Hp6kp5f+G7hKi6t8lys6XxP+1K6Q==", - "requires": { - "pascal-case": "^3.1.1", - "tslib": "^1.10.0" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - } - } - } - } - }, - "@graphql-tools/wrap": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-6.2.4.tgz", - "integrity": "sha512-cyQgpybolF9DjL2QNOvTS1WDCT/epgYoiA8/8b3nwv5xmMBQ6/6nYnZwityCZ7njb7MMyk7HBEDNNlP9qNJDcA==", + "version": "8.6.10", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.10.tgz", + "integrity": "sha512-bJH9qwuyM3BP0PTU6/lvBDkk6jdEIOn+dbyk4pHMVNnvbJ1gZQwo62To8SHxxaUTus8OMhhVPSh9ApWXREURcg==", "requires": { - "@graphql-tools/delegate": "^6.2.4", - "@graphql-tools/schema": "^6.2.4", - "@graphql-tools/utils": "^6.2.4", - "is-promise": "4.0.0", - "tslib": "~2.0.1" + "tslib": "~2.4.0" } }, "@graphql-typed-document-node/core": { @@ -3157,7 +3016,7 @@ "backoff": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", - "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", + "integrity": "sha512-wC5ihrnUXmR2douXmXLCe5O3zg3GKIyvRi/hi58a/XyRxVI+3/yM0PYueQOZXPXQ9pxBislYkw+sF9b7C/RuMA==", "requires": { "precond": "0.2" } @@ -4429,7 +4288,7 @@ "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "copy-descriptor": { "version": "0.1.1", @@ -4585,11 +4444,6 @@ "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", "dev": true }, - "dataloader": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.0.0.tgz", - "integrity": "sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ==" - }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -5491,7 +5345,7 @@ "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" }, "end-of-stream": { "version": "1.4.4", @@ -5641,7 +5495,7 @@ "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" }, "escape-string-regexp": { "version": "1.0.5", @@ -5936,7 +5790,7 @@ "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" }, "event-emitter": { "version": "0.3.5", @@ -6750,7 +6604,7 @@ "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" }, "from2": { "version": "2.3.0", @@ -7089,9 +6943,9 @@ "dev": true }, "graphql": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz", - "integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==" + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.5.0.tgz", + "integrity": "sha512-qbHgh8Ix+j/qY+a/ZcJnFQ+j8ezakqPiHwPiZhV/3PgGlgf96QMBB5/f2rkiC9sgLoy/xvT6TSiaf2nTHJh5iA==" }, "graphql-list-fields": { "version": "2.0.2", @@ -7099,9 +6953,9 @@ "integrity": "sha512-9TSAwcVA3KWw7JWYep5NCk2aw3wl1ayLtbMpmG7l26vh1FZ+gZexNPP+XJfUFyJa71UU0zcKSgtgpsrsA3Xv9Q==" }, "graphql-relay": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/graphql-relay/-/graphql-relay-0.7.0.tgz", - "integrity": "sha512-P8eS3IbZRhbfbcfud1Q6VPrIru4hchkb15MuOij+WQo9r0chD5NBIxiVjuRE2iG2EMHxIOrZb8LnMe82+YdITA==" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/graphql-relay/-/graphql-relay-0.10.0.tgz", + "integrity": "sha512-44yBuw2/DLNEiMypbNZBt1yMDbBmyVPVesPywnteGGALiBmdyy1JP8jSg8ClLePg8ZZxk0O4BLhd1a6U/1jDOQ==" }, "graphql-tag": { "version": "2.12.6", @@ -7965,11 +7819,6 @@ } } }, - "is-promise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==" - }, "is-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", @@ -8645,7 +8494,7 @@ "ldap-filter": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/ldap-filter/-/ldap-filter-0.3.3.tgz", - "integrity": "sha1-KxTGiiqdQQTb28kQocqF/Riel5c=", + "integrity": "sha512-/tFkx5WIn4HuO+6w9lsfxq4FN3O+fDZeO9Mek8dCD8rTUpqzRa766BOBO7BcGkn3X86m5+cBm1/2S/Shzz7gMg==", "requires": { "assert-plus": "^1.0.0" } @@ -9285,14 +9134,6 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "requires": { - "tslib": "^2.0.3" - } - }, "lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -9659,7 +9500,7 @@ "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "merge-stream": { "version": "2.0.0", @@ -9676,7 +9517,7 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" }, "micromatch": { "version": "3.1.10", @@ -10280,15 +10121,6 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "requires": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, "node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -13061,9 +12893,9 @@ } }, "core-js-pure": { - "version": "3.22.7", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.7.tgz", - "integrity": "sha512-wTriFxiZI+C8msGeh7fJcbC/a0V8fdInN1oS2eK79DMBGs8iIJiXhtFJCiT3rBa8w6zroHWW3p8ArlujZ/Mz+w==" + "version": "3.22.8", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.8.tgz", + "integrity": "sha512-bOxbZIy9S5n4OVH63XaLVXZ49QKicjowDx/UELyJ68vxfCRpYsbyh/WNZNfEfAk+ekA8vSjt+gCDpvh672bc3w==" }, "idb-keyval": { "version": "6.0.3", @@ -13108,15 +12940,6 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, - "pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "requires": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -13158,7 +12981,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "path-type": { "version": "4.0.0", @@ -13477,7 +13300,7 @@ "precond": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", - "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=" + "integrity": "sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ==" }, "prelude-ls": { "version": "1.1.2", @@ -14631,7 +14454,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" } } }, @@ -15750,9 +15573,9 @@ } }, "tslib": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", - "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "tsutils": { "version": "3.21.0", @@ -16096,9 +15919,9 @@ } }, "value-or-promise": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.10.tgz", - "integrity": "sha512-1OwTzvcfXkAfabk60UVr5NdjtjJ0Fg0T5+B1bhxtrOEwSH2fe8y4DnLgoksfCyd8yZCOQQHB0qLMQnwgCjbXLQ==" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", + "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==" }, "vary": { "version": "1.1.2", diff --git a/package.json b/package.json index a952c7da96..6b42186b25 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,10 @@ ], "license": "BSD-3-Clause", "dependencies": { - "@graphql-tools/stitch": "6.2.4", - "@graphql-tools/utils": "6.2.4", "@graphql-yoga/node": "2.6.0", + "@graphql-tools/merge": "8.2.11", + "@graphql-tools/schema": "8.3.11", + "@graphql-tools/utils": "8.6.10", "@parse/fs-files-adapter": "1.2.2", "@parse/push-adapter": "4.1.2", "bcryptjs": "2.4.3", @@ -31,10 +32,10 @@ "deepcopy": "2.1.0", "express": "4.18.1", "follow-redirects": "1.15.0", - "graphql": "15.8.0", + "graphql": "16.5.0", "graphql-list-fields": "2.0.2", - "graphql-relay": "0.7.0", "graphql-tag": "2.12.6", + "graphql-relay": "0.10.0", "intersect": "1.0.1", "jsonwebtoken": "8.5.1", "jwks-rsa": "2.1.2", @@ -58,6 +59,7 @@ "ws": "8.6.0" }, "devDependencies": { + "graphql-tag": "2.12.6", "@actions/core": "1.2.6", "@apollo/client": "3.6.1", "@babel/cli": "7.10.0", diff --git a/spec/AuthenticationAdapters.spec.js b/spec/AuthenticationAdapters.spec.js index dff8b42258..6587afc239 100644 --- a/spec/AuthenticationAdapters.spec.js +++ b/spec/AuthenticationAdapters.spec.js @@ -500,9 +500,11 @@ describe('AuthenticationProviders', function () { const provider = getMockMyOauthProvider(); Parse.User._registerAuthenticationProvider(provider); await Parse.User._logInWith('myoauth'); - expect(spy).toHaveBeenCalledWith({ usage: 'auth.myoauth', solution: 'auth.myoauth.enabled: true' }); + expect(spy).toHaveBeenCalledWith({ + usage: 'auth.myoauth', + solution: 'auth.myoauth.enabled: true', + }); }); - }); describe('instagram auth adapter', () => { diff --git a/spec/ParseGraphQLServer.spec.js b/spec/ParseGraphQLServer.spec.js index 7b7808ef27..41041468de 100644 --- a/spec/ParseGraphQLServer.spec.js +++ b/spec/ParseGraphQLServer.spec.js @@ -12,6 +12,7 @@ const { getMainDefinition } = require('apollo-utilities'); const { createUploadLink } = require('apollo-upload-client'); const { SubscriptionClient } = require('subscriptions-transport-ws'); const { WebSocketLink } = require('@apollo/client/link/ws'); +const { mergeSchemas } = require('@graphql-tools/schema'); const { ApolloClient, InMemoryCache, @@ -10459,7 +10460,7 @@ describe('ParseGraphQLServer', () => { }); describe('Custom API', () => { - describe('GraphQL Schema Based', () => { + describe('SDL based', () => { let httpServer; const headers = { 'X-Parse-Application-Id': 'test', @@ -10582,7 +10583,7 @@ describe('ParseGraphQLServer', () => { }); }); - describe('SDL Based', () => { + describe('GraphQL Schema Based', () => { let httpServer; const headers = { 'X-Parse-Application-Id': 'test', @@ -10879,8 +10880,7 @@ describe('ParseGraphQLServer', () => { httpServer = http.createServer(expressApp); parseGraphQLServer = new ParseGraphQLServer(parseServer, { graphQLPath: '/graphql', - graphQLCustomTypeDefs: ({ autoSchema, stitchSchemas }) => - stitchSchemas({ subschemas: [autoSchema] }), + graphQLCustomTypeDefs: ({ autoSchema }) => mergeSchemas({ schemas: [autoSchema] }), }); parseGraphQLServer.applyGraphQL(expressApp); diff --git a/src/Controllers/SchemaController.js b/src/Controllers/SchemaController.js index 1d857b47fd..179de37b6e 100644 --- a/src/Controllers/SchemaController.js +++ b/src/Controllers/SchemaController.js @@ -158,7 +158,7 @@ const requiredColumns = Object.freeze({ write: { _Product: ['productIdentifier', 'icon', 'order', 'title', 'subtitle'], _Role: ['name', 'ACL'], - } + }, }); const invalidColumns = ['length']; diff --git a/src/GraphQL/ParseGraphQLSchema.js b/src/GraphQL/ParseGraphQLSchema.js index e66104ffd7..154e774897 100644 --- a/src/GraphQL/ParseGraphQLSchema.js +++ b/src/GraphQL/ParseGraphQLSchema.js @@ -1,8 +1,8 @@ import Parse from 'parse/node'; import { GraphQLSchema, GraphQLObjectType, DocumentNode, GraphQLNamedType } from 'graphql'; -import { stitchSchemas } from '@graphql-tools/stitch'; +import { mergeSchemas } from '@graphql-tools/schema'; +import { mergeTypeDefs } from '@graphql-tools/merge'; import { isDeepStrictEqual } from 'util'; -import { SchemaDirectiveVisitor } from '@graphql-tools/utils'; import requiredParameter from '../requiredParameter'; import * as defaultGraphQLTypes from './loaders/defaultGraphQLTypes'; import * as parseClassTypes from './loaders/parseClassTypes'; @@ -203,9 +203,8 @@ class ParseGraphQLSchema { if (this.graphQLCustomTypeDefs) { schemaDirectives.load(this); - if (typeof this.graphQLCustomTypeDefs.getTypeMap === 'function') { - // In following code we use underscore attr to avoid js var un ref + // In following code we use underscore attr to keep the direct variable reference const customGraphQLSchemaTypeMap = this.graphQLCustomTypeDefs._typeMap; const findAndReplaceLastType = (parent, key) => { if (parent[key].name) { @@ -280,51 +279,18 @@ class ParseGraphQLSchema { this.graphQLSchema = await this.graphQLCustomTypeDefs({ directivesDefinitionsSchema: this.graphQLSchemaDirectivesDefinitions, autoSchema: this.graphQLAutoSchema, - stitchSchemas, + graphQLSchemaDirectives: this.graphQLSchemaDirectives, }); } else { - this.graphQLSchema = stitchSchemas({ - schemas: [ - this.graphQLSchemaDirectivesDefinitions, - this.graphQLAutoSchema, + this.graphQLSchema = mergeSchemas({ + schemas: [this.graphQLAutoSchema], + typeDefs: mergeTypeDefs([ this.graphQLCustomTypeDefs, - ], - mergeDirectives: true, + this.graphQLSchemaDirectivesDefinitions, + ]), }); + this.graphQLSchema = this.graphQLSchemaDirectives(this.graphQLSchema); } - - // Only merge directive when string schema provided - const graphQLSchemaTypeMap = this.graphQLSchema.getTypeMap(); - Object.keys(graphQLSchemaTypeMap).forEach(graphQLSchemaTypeName => { - const graphQLSchemaType = graphQLSchemaTypeMap[graphQLSchemaTypeName]; - if ( - typeof graphQLSchemaType.getFields === 'function' && - this.graphQLCustomTypeDefs.definitions - ) { - const graphQLCustomTypeDef = this.graphQLCustomTypeDefs.definitions.find( - definition => definition.name.value === graphQLSchemaTypeName - ); - if (graphQLCustomTypeDef) { - const graphQLSchemaTypeFieldMap = graphQLSchemaType.getFields(); - Object.keys(graphQLSchemaTypeFieldMap).forEach(graphQLSchemaTypeFieldName => { - const graphQLSchemaTypeField = graphQLSchemaTypeFieldMap[graphQLSchemaTypeFieldName]; - if (!graphQLSchemaTypeField.astNode) { - const astNode = graphQLCustomTypeDef.fields.find( - field => field.name.value === graphQLSchemaTypeFieldName - ); - if (astNode) { - graphQLSchemaTypeField.astNode = astNode; - } - } - }); - } - } - }); - - SchemaDirectiveVisitor.visitSchemaDirectives( - this.graphQLSchema, - this.graphQLSchemaDirectives - ); } else { this.graphQLSchema = this.graphQLAutoSchema; } diff --git a/src/GraphQL/loaders/defaultGraphQLTypes.js b/src/GraphQL/loaders/defaultGraphQLTypes.js index 7fe9a05527..6824f75ba6 100644 --- a/src/GraphQL/loaders/defaultGraphQLTypes.js +++ b/src/GraphQL/loaders/defaultGraphQLTypes.js @@ -1210,12 +1210,12 @@ const loadArrayResult = (parseGraphQLSchema, parseClassesArray) => { resolveType: value => { if (value.__type === 'Object' && value.className && value.objectId) { if (parseGraphQLSchema.parseClassTypes[value.className]) { - return parseGraphQLSchema.parseClassTypes[value.className].classGraphQLOutputType; + return parseGraphQLSchema.parseClassTypes[value.className].classGraphQLOutputType.name; } else { - return ELEMENT; + return ELEMENT.name; } } else { - return ELEMENT; + return ELEMENT.name; } }, }); diff --git a/src/GraphQL/loaders/defaultRelaySchema.js b/src/GraphQL/loaders/defaultRelaySchema.js index 87f19955ba..0a8f0f7620 100644 --- a/src/GraphQL/loaders/defaultRelaySchema.js +++ b/src/GraphQL/loaders/defaultRelaySchema.js @@ -39,7 +39,7 @@ const load = parseGraphQLSchema => { } }, obj => { - return parseGraphQLSchema.parseClassTypes[obj.className].classGraphQLOutputType; + return parseGraphQLSchema.parseClassTypes[obj.className].classGraphQLOutputType.name; } ); diff --git a/src/GraphQL/loaders/schemaDirectives.js b/src/GraphQL/loaders/schemaDirectives.js index 43a8fe273b..f354167317 100644 --- a/src/GraphQL/loaders/schemaDirectives.js +++ b/src/GraphQL/loaders/schemaDirectives.js @@ -1,8 +1,7 @@ -import gql from 'graphql-tag'; -import { SchemaDirectiveVisitor } from '@graphql-tools/utils'; +import { mapSchema, getDirective, MapperKind } from '@graphql-tools/utils'; import { FunctionsRouter } from '../../Routers/FunctionsRouter'; -export const definitions = gql` +export const definitions = ` directive @resolve(to: String) on FIELD_DEFINITION directive @mock(with: Any!) on FIELD_DEFINITION `; @@ -10,46 +9,48 @@ export const definitions = gql` const load = parseGraphQLSchema => { parseGraphQLSchema.graphQLSchemaDirectivesDefinitions = definitions; - class ResolveDirectiveVisitor extends SchemaDirectiveVisitor { - visitFieldDefinition(field) { - field.resolve = async (_source, args, context) => { - try { - const { config, auth, info } = context; - - let functionName = field.name; - if (this.args.to) { - functionName = this.args.to; - } - - return ( - await FunctionsRouter.handleCloudFunction({ - params: { - functionName, - }, - config, - auth, - info, - body: args, - }) - ).response.result; - } catch (e) { - parseGraphQLSchema.handleError(e); + const resolveDirective = schema => + mapSchema(schema, { + [MapperKind.OBJECT_FIELD]: fieldConfig => { + const directive = getDirective(schema, fieldConfig, 'resolve')?.[0]; + if (directive) { + const { to: targetCloudFunction } = directive; + fieldConfig.resolve = async (_source, args, context, gqlInfo) => { + try { + const { config, auth, info } = context; + const functionName = targetCloudFunction || gqlInfo.fieldName; + return ( + await FunctionsRouter.handleCloudFunction({ + params: { + functionName, + }, + config, + auth, + info, + body: args, + }) + ).response.result; + } catch (e) { + parseGraphQLSchema.handleError(e); + } + }; } - }; - } - } - - parseGraphQLSchema.graphQLSchemaDirectives.resolve = ResolveDirectiveVisitor; - - class MockDirectiveVisitor extends SchemaDirectiveVisitor { - visitFieldDefinition(field) { - field.resolve = () => { - return this.args.with; - }; - } - } + return fieldConfig; + }, + }); + + const mockDirective = schema => + mapSchema(schema, { + [MapperKind.OBJECT_FIELD]: fieldConfig => { + const directive = getDirective(schema, fieldConfig, 'mock')?.[0]; + if (directive) { + const { with: mockValue } = directive; + fieldConfig.resolve = async () => mockValue; + } + return fieldConfig; + }, + }); - parseGraphQLSchema.graphQLSchemaDirectives.mock = MockDirectiveVisitor; + parseGraphQLSchema.graphQLSchemaDirectives = schema => mockDirective(resolveDirective(schema)); }; - export { load }; diff --git a/src/GraphQL/loaders/schemaTypes.js b/src/GraphQL/loaders/schemaTypes.js index bd057f0217..ea8a24aca5 100644 --- a/src/GraphQL/loaders/schemaTypes.js +++ b/src/GraphQL/loaders/schemaTypes.js @@ -29,19 +29,19 @@ const SCHEMA_FIELD = new GraphQLInterfaceType({ }, resolveType: value => ({ - String: SCHEMA_STRING_FIELD, - Number: SCHEMA_NUMBER_FIELD, - Boolean: SCHEMA_BOOLEAN_FIELD, - Array: SCHEMA_ARRAY_FIELD, - Object: SCHEMA_OBJECT_FIELD, - Date: SCHEMA_DATE_FIELD, - File: SCHEMA_FILE_FIELD, - GeoPoint: SCHEMA_GEO_POINT_FIELD, - Polygon: SCHEMA_POLYGON_FIELD, - Bytes: SCHEMA_BYTES_FIELD, - Pointer: SCHEMA_POINTER_FIELD, - Relation: SCHEMA_RELATION_FIELD, - ACL: SCHEMA_ACL_FIELD, + String: SCHEMA_STRING_FIELD.name, + Number: SCHEMA_NUMBER_FIELD.name, + Boolean: SCHEMA_BOOLEAN_FIELD.name, + Array: SCHEMA_ARRAY_FIELD.name, + Object: SCHEMA_OBJECT_FIELD.name, + Date: SCHEMA_DATE_FIELD.name, + File: SCHEMA_FILE_FIELD.name, + GeoPoint: SCHEMA_GEO_POINT_FIELD.name, + Polygon: SCHEMA_POLYGON_FIELD.name, + Bytes: SCHEMA_BYTES_FIELD.name, + Pointer: SCHEMA_POINTER_FIELD.name, + Relation: SCHEMA_RELATION_FIELD.name, + ACL: SCHEMA_ACL_FIELD.name, }[value.type]), });