refactor: upgrade GraphQL dependencies (#7970)
This commit is contained in:
263
package-lock.json
generated
263
package-lock.json
generated
@@ -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": {
|
"@babel/cli": {
|
||||||
"version": "7.10.0",
|
"version": "7.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.10.0.tgz",
|
||||||
@@ -1159,165 +1151,32 @@
|
|||||||
"tiny-lru": "7.0.6"
|
"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": {
|
"@graphql-tools/merge": {
|
||||||
"version": "6.2.17",
|
"version": "8.2.11",
|
||||||
"resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-6.2.17.tgz",
|
"resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.11.tgz",
|
||||||
"integrity": "sha512-G5YrOew39fZf16VIrc49q3c8dBqQDD0ax5LYPiNja00xsXDi0T9zsEWVt06ApjtSdSF6HDddlu5S12QjeN8Tow==",
|
"integrity": "sha512-fsjJVdsk9GV1jj1Ed2AKLlHYlsf0ZadTK8X5KxFRE1ZSnKqh56BLVX93JrtOIAnsiHkwOK2TC43HGhApF1swpQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@graphql-tools/schema": "^8.0.2",
|
"@graphql-tools/utils": "8.6.10",
|
||||||
"@graphql-tools/utils": "8.0.2",
|
"tslib": "~2.4.0"
|
||||||
"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/schema": {
|
"@graphql-tools/schema": {
|
||||||
"version": "6.2.4",
|
"version": "8.3.11",
|
||||||
"resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-6.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.11.tgz",
|
||||||
"integrity": "sha512-rh+14lSY1q8IPbEv2J9x8UBFJ5NrDX9W5asXEUlPp+7vraLp/Tiox4GXdgyA92JhwpYco3nTf5Bo2JDMt1KnAQ==",
|
"integrity": "sha512-esMEnbyXbp8B5VEI4o395+x0G7Qmz3JSX5onFBF8HeLYcqWJasY5vBuWkO18VxrZpEnvnryodP6Y00bVag9O3Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@graphql-tools/utils": "^6.2.4",
|
"@graphql-tools/merge": "8.2.11",
|
||||||
"tslib": "~2.0.1"
|
"@graphql-tools/utils": "8.6.10",
|
||||||
}
|
"tslib": "~2.4.0",
|
||||||
},
|
"value-or-promise": "1.0.11"
|
||||||
"@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==",
|
|
||||||
"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/utils": {
|
"@graphql-tools/utils": {
|
||||||
"version": "6.2.4",
|
"version": "8.6.10",
|
||||||
"resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-6.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.10.tgz",
|
||||||
"integrity": "sha512-ybgZ9EIJE3JMOtTrTd2VcIpTXtDrn2q6eiYkeYMKRVh3K41+LZa6YnR2zKERTXqTWqhobROwLt4BZbw2O3Aeeg==",
|
"integrity": "sha512-bJH9qwuyM3BP0PTU6/lvBDkk6jdEIOn+dbyk4pHMVNnvbJ1gZQwo62To8SHxxaUTus8OMhhVPSh9ApWXREURcg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ardatan/aggregate-error": "0.0.6",
|
"tslib": "~2.4.0"
|
||||||
"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==",
|
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@graphql-typed-document-node/core": {
|
"@graphql-typed-document-node/core": {
|
||||||
@@ -3157,7 +3016,7 @@
|
|||||||
"backoff": {
|
"backoff": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz",
|
"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": {
|
"requires": {
|
||||||
"precond": "0.2"
|
"precond": "0.2"
|
||||||
}
|
}
|
||||||
@@ -4429,7 +4288,7 @@
|
|||||||
"cookie-signature": {
|
"cookie-signature": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
||||||
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
|
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
||||||
},
|
},
|
||||||
"copy-descriptor": {
|
"copy-descriptor": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
@@ -4585,11 +4444,6 @@
|
|||||||
"integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==",
|
"integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==",
|
||||||
"dev": true
|
"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": {
|
"dateformat": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",
|
||||||
@@ -5491,7 +5345,7 @@
|
|||||||
"encodeurl": {
|
"encodeurl": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
"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": {
|
"end-of-stream": {
|
||||||
"version": "1.4.4",
|
"version": "1.4.4",
|
||||||
@@ -5641,7 +5495,7 @@
|
|||||||
"escape-html": {
|
"escape-html": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
"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": {
|
"escape-string-regexp": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
@@ -5936,7 +5790,7 @@
|
|||||||
"etag": {
|
"etag": {
|
||||||
"version": "1.8.1",
|
"version": "1.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||||
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
|
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
|
||||||
},
|
},
|
||||||
"event-emitter": {
|
"event-emitter": {
|
||||||
"version": "0.3.5",
|
"version": "0.3.5",
|
||||||
@@ -6750,7 +6604,7 @@
|
|||||||
"fresh": {
|
"fresh": {
|
||||||
"version": "0.5.2",
|
"version": "0.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||||
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
|
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="
|
||||||
},
|
},
|
||||||
"from2": {
|
"from2": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
@@ -7089,9 +6943,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"graphql": {
|
"graphql": {
|
||||||
"version": "15.8.0",
|
"version": "16.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/graphql/-/graphql-16.5.0.tgz",
|
||||||
"integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw=="
|
"integrity": "sha512-qbHgh8Ix+j/qY+a/ZcJnFQ+j8ezakqPiHwPiZhV/3PgGlgf96QMBB5/f2rkiC9sgLoy/xvT6TSiaf2nTHJh5iA=="
|
||||||
},
|
},
|
||||||
"graphql-list-fields": {
|
"graphql-list-fields": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
@@ -7099,9 +6953,9 @@
|
|||||||
"integrity": "sha512-9TSAwcVA3KWw7JWYep5NCk2aw3wl1ayLtbMpmG7l26vh1FZ+gZexNPP+XJfUFyJa71UU0zcKSgtgpsrsA3Xv9Q=="
|
"integrity": "sha512-9TSAwcVA3KWw7JWYep5NCk2aw3wl1ayLtbMpmG7l26vh1FZ+gZexNPP+XJfUFyJa71UU0zcKSgtgpsrsA3Xv9Q=="
|
||||||
},
|
},
|
||||||
"graphql-relay": {
|
"graphql-relay": {
|
||||||
"version": "0.7.0",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/graphql-relay/-/graphql-relay-0.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/graphql-relay/-/graphql-relay-0.10.0.tgz",
|
||||||
"integrity": "sha512-P8eS3IbZRhbfbcfud1Q6VPrIru4hchkb15MuOij+WQo9r0chD5NBIxiVjuRE2iG2EMHxIOrZb8LnMe82+YdITA=="
|
"integrity": "sha512-44yBuw2/DLNEiMypbNZBt1yMDbBmyVPVesPywnteGGALiBmdyy1JP8jSg8ClLePg8ZZxk0O4BLhd1a6U/1jDOQ=="
|
||||||
},
|
},
|
||||||
"graphql-tag": {
|
"graphql-tag": {
|
||||||
"version": "2.12.6",
|
"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": {
|
"is-regexp": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
|
||||||
@@ -8645,7 +8494,7 @@
|
|||||||
"ldap-filter": {
|
"ldap-filter": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/ldap-filter/-/ldap-filter-0.3.3.tgz",
|
"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": {
|
"requires": {
|
||||||
"assert-plus": "^1.0.0"
|
"assert-plus": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -9285,14 +9134,6 @@
|
|||||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
"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": {
|
"lowercase-keys": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
|
||||||
@@ -9659,7 +9500,7 @@
|
|||||||
"merge-descriptors": {
|
"merge-descriptors": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||||
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
|
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
|
||||||
},
|
},
|
||||||
"merge-stream": {
|
"merge-stream": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@@ -9676,7 +9517,7 @@
|
|||||||
"methods": {
|
"methods": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
||||||
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
|
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="
|
||||||
},
|
},
|
||||||
"micromatch": {
|
"micromatch": {
|
||||||
"version": "3.1.10",
|
"version": "3.1.10",
|
||||||
@@ -10280,15 +10121,6 @@
|
|||||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
|
||||||
"dev": true
|
"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": {
|
"node-domexception": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
||||||
@@ -13061,9 +12893,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"core-js-pure": {
|
"core-js-pure": {
|
||||||
"version": "3.22.7",
|
"version": "3.22.8",
|
||||||
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.7.tgz",
|
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.8.tgz",
|
||||||
"integrity": "sha512-wTriFxiZI+C8msGeh7fJcbC/a0V8fdInN1oS2eK79DMBGs8iIJiXhtFJCiT3rBa8w6zroHWW3p8ArlujZ/Mz+w=="
|
"integrity": "sha512-bOxbZIy9S5n4OVH63XaLVXZ49QKicjowDx/UELyJ68vxfCRpYsbyh/WNZNfEfAk+ekA8vSjt+gCDpvh672bc3w=="
|
||||||
},
|
},
|
||||||
"idb-keyval": {
|
"idb-keyval": {
|
||||||
"version": "6.0.3",
|
"version": "6.0.3",
|
||||||
@@ -13108,15 +12940,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
|
"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": {
|
"pascalcase": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
|
||||||
@@ -13158,7 +12981,7 @@
|
|||||||
"path-to-regexp": {
|
"path-to-regexp": {
|
||||||
"version": "0.1.7",
|
"version": "0.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
"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": {
|
"path-type": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
@@ -13477,7 +13300,7 @@
|
|||||||
"precond": {
|
"precond": {
|
||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz",
|
||||||
"integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw="
|
"integrity": "sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ=="
|
||||||
},
|
},
|
||||||
"prelude-ls": {
|
"prelude-ls": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
@@ -14631,7 +14454,7 @@
|
|||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -15750,9 +15573,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "2.0.3",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
|
||||||
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
|
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
||||||
},
|
},
|
||||||
"tsutils": {
|
"tsutils": {
|
||||||
"version": "3.21.0",
|
"version": "3.21.0",
|
||||||
@@ -16096,9 +15919,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"value-or-promise": {
|
"value-or-promise": {
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.10.tgz",
|
"resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz",
|
||||||
"integrity": "sha512-1OwTzvcfXkAfabk60UVr5NdjtjJ0Fg0T5+B1bhxtrOEwSH2fe8y4DnLgoksfCyd8yZCOQQHB0qLMQnwgCjbXLQ=="
|
"integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg=="
|
||||||
},
|
},
|
||||||
"vary": {
|
"vary": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
|
|||||||
10
package.json
10
package.json
@@ -19,9 +19,10 @@
|
|||||||
],
|
],
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@graphql-tools/stitch": "6.2.4",
|
|
||||||
"@graphql-tools/utils": "6.2.4",
|
|
||||||
"@graphql-yoga/node": "2.6.0",
|
"@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/fs-files-adapter": "1.2.2",
|
||||||
"@parse/push-adapter": "4.1.2",
|
"@parse/push-adapter": "4.1.2",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
@@ -31,10 +32,10 @@
|
|||||||
"deepcopy": "2.1.0",
|
"deepcopy": "2.1.0",
|
||||||
"express": "4.18.1",
|
"express": "4.18.1",
|
||||||
"follow-redirects": "1.15.0",
|
"follow-redirects": "1.15.0",
|
||||||
"graphql": "15.8.0",
|
"graphql": "16.5.0",
|
||||||
"graphql-list-fields": "2.0.2",
|
"graphql-list-fields": "2.0.2",
|
||||||
"graphql-relay": "0.7.0",
|
|
||||||
"graphql-tag": "2.12.6",
|
"graphql-tag": "2.12.6",
|
||||||
|
"graphql-relay": "0.10.0",
|
||||||
"intersect": "1.0.1",
|
"intersect": "1.0.1",
|
||||||
"jsonwebtoken": "8.5.1",
|
"jsonwebtoken": "8.5.1",
|
||||||
"jwks-rsa": "2.1.2",
|
"jwks-rsa": "2.1.2",
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
"ws": "8.6.0"
|
"ws": "8.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"graphql-tag": "2.12.6",
|
||||||
"@actions/core": "1.2.6",
|
"@actions/core": "1.2.6",
|
||||||
"@apollo/client": "3.6.1",
|
"@apollo/client": "3.6.1",
|
||||||
"@babel/cli": "7.10.0",
|
"@babel/cli": "7.10.0",
|
||||||
|
|||||||
@@ -500,9 +500,11 @@ describe('AuthenticationProviders', function () {
|
|||||||
const provider = getMockMyOauthProvider();
|
const provider = getMockMyOauthProvider();
|
||||||
Parse.User._registerAuthenticationProvider(provider);
|
Parse.User._registerAuthenticationProvider(provider);
|
||||||
await Parse.User._logInWith('myoauth');
|
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', () => {
|
describe('instagram auth adapter', () => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const { getMainDefinition } = require('apollo-utilities');
|
|||||||
const { createUploadLink } = require('apollo-upload-client');
|
const { createUploadLink } = require('apollo-upload-client');
|
||||||
const { SubscriptionClient } = require('subscriptions-transport-ws');
|
const { SubscriptionClient } = require('subscriptions-transport-ws');
|
||||||
const { WebSocketLink } = require('@apollo/client/link/ws');
|
const { WebSocketLink } = require('@apollo/client/link/ws');
|
||||||
|
const { mergeSchemas } = require('@graphql-tools/schema');
|
||||||
const {
|
const {
|
||||||
ApolloClient,
|
ApolloClient,
|
||||||
InMemoryCache,
|
InMemoryCache,
|
||||||
@@ -10459,7 +10460,7 @@ describe('ParseGraphQLServer', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('Custom API', () => {
|
describe('Custom API', () => {
|
||||||
describe('GraphQL Schema Based', () => {
|
describe('SDL based', () => {
|
||||||
let httpServer;
|
let httpServer;
|
||||||
const headers = {
|
const headers = {
|
||||||
'X-Parse-Application-Id': 'test',
|
'X-Parse-Application-Id': 'test',
|
||||||
@@ -10582,7 +10583,7 @@ describe('ParseGraphQLServer', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('SDL Based', () => {
|
describe('GraphQL Schema Based', () => {
|
||||||
let httpServer;
|
let httpServer;
|
||||||
const headers = {
|
const headers = {
|
||||||
'X-Parse-Application-Id': 'test',
|
'X-Parse-Application-Id': 'test',
|
||||||
@@ -10879,8 +10880,7 @@ describe('ParseGraphQLServer', () => {
|
|||||||
httpServer = http.createServer(expressApp);
|
httpServer = http.createServer(expressApp);
|
||||||
parseGraphQLServer = new ParseGraphQLServer(parseServer, {
|
parseGraphQLServer = new ParseGraphQLServer(parseServer, {
|
||||||
graphQLPath: '/graphql',
|
graphQLPath: '/graphql',
|
||||||
graphQLCustomTypeDefs: ({ autoSchema, stitchSchemas }) =>
|
graphQLCustomTypeDefs: ({ autoSchema }) => mergeSchemas({ schemas: [autoSchema] }),
|
||||||
stitchSchemas({ subschemas: [autoSchema] }),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
parseGraphQLServer.applyGraphQL(expressApp);
|
parseGraphQLServer.applyGraphQL(expressApp);
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ const requiredColumns = Object.freeze({
|
|||||||
write: {
|
write: {
|
||||||
_Product: ['productIdentifier', 'icon', 'order', 'title', 'subtitle'],
|
_Product: ['productIdentifier', 'icon', 'order', 'title', 'subtitle'],
|
||||||
_Role: ['name', 'ACL'],
|
_Role: ['name', 'ACL'],
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const invalidColumns = ['length'];
|
const invalidColumns = ['length'];
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import Parse from 'parse/node';
|
import Parse from 'parse/node';
|
||||||
import { GraphQLSchema, GraphQLObjectType, DocumentNode, GraphQLNamedType } from 'graphql';
|
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 { isDeepStrictEqual } from 'util';
|
||||||
import { SchemaDirectiveVisitor } from '@graphql-tools/utils';
|
|
||||||
import requiredParameter from '../requiredParameter';
|
import requiredParameter from '../requiredParameter';
|
||||||
import * as defaultGraphQLTypes from './loaders/defaultGraphQLTypes';
|
import * as defaultGraphQLTypes from './loaders/defaultGraphQLTypes';
|
||||||
import * as parseClassTypes from './loaders/parseClassTypes';
|
import * as parseClassTypes from './loaders/parseClassTypes';
|
||||||
@@ -203,9 +203,8 @@ class ParseGraphQLSchema {
|
|||||||
|
|
||||||
if (this.graphQLCustomTypeDefs) {
|
if (this.graphQLCustomTypeDefs) {
|
||||||
schemaDirectives.load(this);
|
schemaDirectives.load(this);
|
||||||
|
|
||||||
if (typeof this.graphQLCustomTypeDefs.getTypeMap === 'function') {
|
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 customGraphQLSchemaTypeMap = this.graphQLCustomTypeDefs._typeMap;
|
||||||
const findAndReplaceLastType = (parent, key) => {
|
const findAndReplaceLastType = (parent, key) => {
|
||||||
if (parent[key].name) {
|
if (parent[key].name) {
|
||||||
@@ -280,51 +279,18 @@ class ParseGraphQLSchema {
|
|||||||
this.graphQLSchema = await this.graphQLCustomTypeDefs({
|
this.graphQLSchema = await this.graphQLCustomTypeDefs({
|
||||||
directivesDefinitionsSchema: this.graphQLSchemaDirectivesDefinitions,
|
directivesDefinitionsSchema: this.graphQLSchemaDirectivesDefinitions,
|
||||||
autoSchema: this.graphQLAutoSchema,
|
autoSchema: this.graphQLAutoSchema,
|
||||||
stitchSchemas,
|
graphQLSchemaDirectives: this.graphQLSchemaDirectives,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.graphQLSchema = stitchSchemas({
|
this.graphQLSchema = mergeSchemas({
|
||||||
schemas: [
|
schemas: [this.graphQLAutoSchema],
|
||||||
this.graphQLSchemaDirectivesDefinitions,
|
typeDefs: mergeTypeDefs([
|
||||||
this.graphQLAutoSchema,
|
|
||||||
this.graphQLCustomTypeDefs,
|
this.graphQLCustomTypeDefs,
|
||||||
],
|
this.graphQLSchemaDirectivesDefinitions,
|
||||||
mergeDirectives: true,
|
]),
|
||||||
});
|
});
|
||||||
|
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 {
|
} else {
|
||||||
this.graphQLSchema = this.graphQLAutoSchema;
|
this.graphQLSchema = this.graphQLAutoSchema;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1210,12 +1210,12 @@ const loadArrayResult = (parseGraphQLSchema, parseClassesArray) => {
|
|||||||
resolveType: value => {
|
resolveType: value => {
|
||||||
if (value.__type === 'Object' && value.className && value.objectId) {
|
if (value.__type === 'Object' && value.className && value.objectId) {
|
||||||
if (parseGraphQLSchema.parseClassTypes[value.className]) {
|
if (parseGraphQLSchema.parseClassTypes[value.className]) {
|
||||||
return parseGraphQLSchema.parseClassTypes[value.className].classGraphQLOutputType;
|
return parseGraphQLSchema.parseClassTypes[value.className].classGraphQLOutputType.name;
|
||||||
} else {
|
} else {
|
||||||
return ELEMENT;
|
return ELEMENT.name;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ELEMENT;
|
return ELEMENT.name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const load = parseGraphQLSchema => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
obj => {
|
obj => {
|
||||||
return parseGraphQLSchema.parseClassTypes[obj.className].classGraphQLOutputType;
|
return parseGraphQLSchema.parseClassTypes[obj.className].classGraphQLOutputType.name;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import gql from 'graphql-tag';
|
import { mapSchema, getDirective, MapperKind } from '@graphql-tools/utils';
|
||||||
import { SchemaDirectiveVisitor } from '@graphql-tools/utils';
|
|
||||||
import { FunctionsRouter } from '../../Routers/FunctionsRouter';
|
import { FunctionsRouter } from '../../Routers/FunctionsRouter';
|
||||||
|
|
||||||
export const definitions = gql`
|
export const definitions = `
|
||||||
directive @resolve(to: String) on FIELD_DEFINITION
|
directive @resolve(to: String) on FIELD_DEFINITION
|
||||||
directive @mock(with: Any!) on FIELD_DEFINITION
|
directive @mock(with: Any!) on FIELD_DEFINITION
|
||||||
`;
|
`;
|
||||||
@@ -10,46 +9,48 @@ export const definitions = gql`
|
|||||||
const load = parseGraphQLSchema => {
|
const load = parseGraphQLSchema => {
|
||||||
parseGraphQLSchema.graphQLSchemaDirectivesDefinitions = definitions;
|
parseGraphQLSchema.graphQLSchemaDirectivesDefinitions = definitions;
|
||||||
|
|
||||||
class ResolveDirectiveVisitor extends SchemaDirectiveVisitor {
|
const resolveDirective = schema =>
|
||||||
visitFieldDefinition(field) {
|
mapSchema(schema, {
|
||||||
field.resolve = async (_source, args, context) => {
|
[MapperKind.OBJECT_FIELD]: fieldConfig => {
|
||||||
try {
|
const directive = getDirective(schema, fieldConfig, 'resolve')?.[0];
|
||||||
const { config, auth, info } = context;
|
if (directive) {
|
||||||
|
const { to: targetCloudFunction } = directive;
|
||||||
let functionName = field.name;
|
fieldConfig.resolve = async (_source, args, context, gqlInfo) => {
|
||||||
if (this.args.to) {
|
try {
|
||||||
functionName = this.args.to;
|
const { config, auth, info } = context;
|
||||||
}
|
const functionName = targetCloudFunction || gqlInfo.fieldName;
|
||||||
|
return (
|
||||||
return (
|
await FunctionsRouter.handleCloudFunction({
|
||||||
await FunctionsRouter.handleCloudFunction({
|
params: {
|
||||||
params: {
|
functionName,
|
||||||
functionName,
|
},
|
||||||
},
|
config,
|
||||||
config,
|
auth,
|
||||||
auth,
|
info,
|
||||||
info,
|
body: args,
|
||||||
body: args,
|
})
|
||||||
})
|
).response.result;
|
||||||
).response.result;
|
} catch (e) {
|
||||||
} catch (e) {
|
parseGraphQLSchema.handleError(e);
|
||||||
parseGraphQLSchema.handleError(e);
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
};
|
return fieldConfig;
|
||||||
}
|
},
|
||||||
}
|
});
|
||||||
|
|
||||||
parseGraphQLSchema.graphQLSchemaDirectives.resolve = ResolveDirectiveVisitor;
|
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;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
class MockDirectiveVisitor extends SchemaDirectiveVisitor {
|
parseGraphQLSchema.graphQLSchemaDirectives = schema => mockDirective(resolveDirective(schema));
|
||||||
visitFieldDefinition(field) {
|
|
||||||
field.resolve = () => {
|
|
||||||
return this.args.with;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parseGraphQLSchema.graphQLSchemaDirectives.mock = MockDirectiveVisitor;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export { load };
|
export { load };
|
||||||
|
|||||||
@@ -29,19 +29,19 @@ const SCHEMA_FIELD = new GraphQLInterfaceType({
|
|||||||
},
|
},
|
||||||
resolveType: value =>
|
resolveType: value =>
|
||||||
({
|
({
|
||||||
String: SCHEMA_STRING_FIELD,
|
String: SCHEMA_STRING_FIELD.name,
|
||||||
Number: SCHEMA_NUMBER_FIELD,
|
Number: SCHEMA_NUMBER_FIELD.name,
|
||||||
Boolean: SCHEMA_BOOLEAN_FIELD,
|
Boolean: SCHEMA_BOOLEAN_FIELD.name,
|
||||||
Array: SCHEMA_ARRAY_FIELD,
|
Array: SCHEMA_ARRAY_FIELD.name,
|
||||||
Object: SCHEMA_OBJECT_FIELD,
|
Object: SCHEMA_OBJECT_FIELD.name,
|
||||||
Date: SCHEMA_DATE_FIELD,
|
Date: SCHEMA_DATE_FIELD.name,
|
||||||
File: SCHEMA_FILE_FIELD,
|
File: SCHEMA_FILE_FIELD.name,
|
||||||
GeoPoint: SCHEMA_GEO_POINT_FIELD,
|
GeoPoint: SCHEMA_GEO_POINT_FIELD.name,
|
||||||
Polygon: SCHEMA_POLYGON_FIELD,
|
Polygon: SCHEMA_POLYGON_FIELD.name,
|
||||||
Bytes: SCHEMA_BYTES_FIELD,
|
Bytes: SCHEMA_BYTES_FIELD.name,
|
||||||
Pointer: SCHEMA_POINTER_FIELD,
|
Pointer: SCHEMA_POINTER_FIELD.name,
|
||||||
Relation: SCHEMA_RELATION_FIELD,
|
Relation: SCHEMA_RELATION_FIELD.name,
|
||||||
ACL: SCHEMA_ACL_FIELD,
|
ACL: SCHEMA_ACL_FIELD.name,
|
||||||
}[value.type]),
|
}[value.type]),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user