demo project

This commit is contained in:
Ruidy 2020-11-14 16:43:58 +01:00
commit 1bce11671d
9031 changed files with 616322 additions and 0 deletions

15
.graphqlconfig Normal file
View file

@ -0,0 +1,15 @@
{
"name": "Untitled GraphQL Schema",
"schemaPath": "schema.graphql",
"extensions": {
"endpoints": {
"Gateway": {
"url": "http://localhost:4000/",
"headers": {
"user-agent": "JS GraphQL"
},
"introspect": false
}
}
}
}

8
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

6
.idea/dictionaries Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectDictionaryState">
<dictionary name="ruidy" />
</component>
</project>

11
.idea/federation.iml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="pytest" />
</component>
</module>

View file

@ -0,0 +1,16 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ourVersions">
<value>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="3.8" />
<item index="1" class="java.lang.String" itemvalue="3.9" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

View file

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Pipenv (federation)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/federation.iml" filepath="$PROJECT_DIR$/.idea/federation.iml" />
</modules>
</component>
</project>

7
.idea/prettier.xml Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PrettierConfiguration">
<option name="myRunOnSave" value="true" />
<option name="myRunOnReformat" value="true" />
</component>
</project>

8
.idea/watcherTasks.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions">
<enabled-global>
<option value="black" />
</enabled-global>
</component>
</project>

15
Pipfile Normal file
View file

@ -0,0 +1,15 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
black = "*"
[packages]
ariadne = "*"
uvicorn = "*"
pydantic = "*"
[requires]
python_version = "3.8"

238
Pipfile.lock generated Normal file
View file

@ -0,0 +1,238 @@
{
"_meta": {
"hash": {
"sha256": "e301e93e09911fcc054bfa46258def2b5db64c776e8c7c459fd09bd1efb44163"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.8"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"ariadne": {
"hashes": [
"sha256:00a21584eb5ca8751380f9870d560db0a486ff69747884674caaee811a2ae64b",
"sha256:e88b574d13c155f934d5e57431e5f9ab3a266a7064a6e397e7c662241276e2e3"
],
"index": "pypi",
"version": "==0.12.0"
},
"click": {
"hashes": [
"sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a",
"sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==7.1.2"
},
"graphql-core": {
"hashes": [
"sha256:51f7dab06b5035515b23984f6fcb677ed909b56c672152699cca32e03624992e",
"sha256:dfc374d3426677727772d8da9dd010e92d10305ddd9c2f7f0fc388f07cee94c4"
],
"markers": "python_version >= '3.6' and python_version < '4'",
"version": "==3.0.5"
},
"h11": {
"hashes": [
"sha256:3c6c61d69c6f13d41f1b80ab0322f1872702a3ba26e12aa864c928f6a43fbaab",
"sha256:ab6c335e1b6ef34b205d5ca3e228c9299cc7218b049819ec84a388c2525e5d87"
],
"version": "==0.11.0"
},
"pydantic": {
"hashes": [
"sha256:01f0291f4951580f320f7ae3f2ecaf0044cdebcc9b45c5f882a7e84453362420",
"sha256:0fe8b45d31ae53d74a6aa0bf801587bd49970070eac6a6326f9fa2a302703b8a",
"sha256:2182ba2a9290964b278bcc07a8d24207de709125d520efec9ad6fa6f92ee058d",
"sha256:2c1673633ad1eea78b1c5c420a47cd48717d2ef214c8230d96ca2591e9e00958",
"sha256:388c0c26c574ff49bad7d0fd6ed82fbccd86a0473fa3900397d3354c533d6ebb",
"sha256:4ba6b903e1b7bd3eb5df0e78d7364b7e831ed8b4cd781ebc3c4f1077fbcb72a4",
"sha256:6665f7ab7fbbf4d3c1040925ff4d42d7549a8c15fe041164adfe4fc2134d4cce",
"sha256:95d4410c4e429480c736bba0db6cce5aaa311304aea685ebcf9ee47571bfd7c8",
"sha256:a2fc7bf77ed4a7a961d7684afe177ff59971828141e608f142e4af858e07dddc",
"sha256:a3c274c49930dc047a75ecc865e435f3df89715c775db75ddb0186804d9b04d0",
"sha256:ab1d5e4d8de00575957e1c982b951bffaedd3204ddd24694e3baca3332e53a23",
"sha256:b11fc9530bf0698c8014b2bdb3bbc50243e82a7fa2577c8cfba660bcc819e768",
"sha256:b9572c0db13c8658b4a4cb705dcaae6983aeb9842248b36761b3fbc9010b740f",
"sha256:c68b5edf4da53c98bb1ccb556ae8f655575cb2e676aef066c12b08c724a3f1a1",
"sha256:c8200aecbd1fb914e1bd061d71a4d1d79ecb553165296af0c14989b89e90d09b",
"sha256:c9760d1556ec59ff745f88269a8f357e2b7afc75c556b3a87b8dda5bc62da8ba",
"sha256:ce2d452961352ba229fe1e0b925b41c0c37128f08dddb788d0fd73fd87ea0f66",
"sha256:dfaa6ed1d509b5aef4142084206584280bb6e9014f01df931ec6febdad5b200a",
"sha256:e5fece30e80087d9b7986104e2ac150647ec1658c4789c89893b03b100ca3164",
"sha256:f045cf7afb3352a03bc6cb993578a34560ac24c5d004fa33c76efec6ada1361a",
"sha256:f83f679e727742b0c465e7ef992d6da4a7e5268b8edd8fdaf5303276374bef52",
"sha256:fc21a37ff3f545de80b166e1735c4172b41b017948a3fb2d5e2f03c219eac50a"
],
"index": "pypi",
"version": "==1.7.2"
},
"starlette": {
"hashes": [
"sha256:40afea6ffa830849800cc4efdf006a86ad579d6ba6b64cb1925a1897b020ba6e",
"sha256:82df29b2149437ad828a883674bf031788600c876dae50835e98398bd1706183"
],
"markers": "python_version >= '3.6'",
"version": "==0.13.8"
},
"typing-extensions": {
"hashes": [
"sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918",
"sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c",
"sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"
],
"version": "==3.7.4.3"
},
"uvicorn": {
"hashes": [
"sha256:8ff7495c74b8286a341526ff9efa3988ebab9a4b2f561c7438c3cb420992d7dd",
"sha256:e5dbed4a8a44c7b04376021021d63798d6a7bcfae9c654a0b153577b93854fba"
],
"index": "pypi",
"version": "==0.12.2"
}
},
"develop": {
"appdirs": {
"hashes": [
"sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41",
"sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"
],
"version": "==1.4.4"
},
"black": {
"hashes": [
"sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea"
],
"index": "pypi",
"version": "==20.8b1"
},
"click": {
"hashes": [
"sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a",
"sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==7.1.2"
},
"mypy-extensions": {
"hashes": [
"sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d",
"sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"
],
"version": "==0.4.3"
},
"pathspec": {
"hashes": [
"sha256:86379d6b86d75816baba717e64b1a3a3469deb93bb76d613c9ce79edc5cb68fd",
"sha256:aa0cb481c4041bf52ffa7b0d8fa6cd3e88a2ca4879c533c9153882ee2556790d"
],
"version": "==0.8.1"
},
"regex": {
"hashes": [
"sha256:02951b7dacb123d8ea6da44fe45ddd084aa6777d4b2454fa0da61d569c6fa538",
"sha256:0d08e71e70c0237883d0bef12cad5145b84c3705e9c6a588b2a9c7080e5af2a4",
"sha256:1862a9d9194fae76a7aaf0150d5f2a8ec1da89e8b55890b1786b8f88a0f619dc",
"sha256:1ab79fcb02b930de09c76d024d279686ec5d532eb814fd0ed1e0051eb8bd2daa",
"sha256:1fa7ee9c2a0e30405e21031d07d7ba8617bc590d391adfc2b7f1e8b99f46f444",
"sha256:262c6825b309e6485ec2493ffc7e62a13cf13fb2a8b6d212f72bd53ad34118f1",
"sha256:2a11a3e90bd9901d70a5b31d7dd85114755a581a5da3fc996abfefa48aee78af",
"sha256:2c99e97d388cd0a8d30f7c514d67887d8021541b875baf09791a3baad48bb4f8",
"sha256:3128e30d83f2e70b0bed9b2a34e92707d0877e460b402faca908c6667092ada9",
"sha256:38c8fd190db64f513fe4e1baa59fed086ae71fa45083b6936b52d34df8f86a88",
"sha256:3bddc701bdd1efa0d5264d2649588cbfda549b2899dc8d50417e47a82e1387ba",
"sha256:4902e6aa086cbb224241adbc2f06235927d5cdacffb2425c73e6570e8d862364",
"sha256:49cae022fa13f09be91b2c880e58e14b6da5d10639ed45ca69b85faf039f7a4e",
"sha256:56e01daca75eae420bce184edd8bb341c8eebb19dd3bce7266332258f9fb9dd7",
"sha256:5862975b45d451b6db51c2e654990c1820523a5b07100fc6903e9c86575202a0",
"sha256:6a8ce43923c518c24a2579fda49f093f1397dad5d18346211e46f134fc624e31",
"sha256:6c54ce4b5d61a7129bad5c5dc279e222afd00e721bf92f9ef09e4fae28755683",
"sha256:6e4b08c6f8daca7d8f07c8d24e4331ae7953333dbd09c648ed6ebd24db5a10ee",
"sha256:717881211f46de3ab130b58ec0908267961fadc06e44f974466d1887f865bd5b",
"sha256:749078d1eb89484db5f34b4012092ad14b327944ee7f1c4f74d6279a6e4d1884",
"sha256:7913bd25f4ab274ba37bc97ad0e21c31004224ccb02765ad984eef43e04acc6c",
"sha256:7a25fcbeae08f96a754b45bdc050e1fb94b95cab046bf56b016c25e9ab127b3e",
"sha256:83d6b356e116ca119db8e7c6fc2983289d87b27b3fac238cfe5dca529d884562",
"sha256:8b882a78c320478b12ff024e81dc7d43c1462aa4a3341c754ee65d857a521f85",
"sha256:8f6a2229e8ad946e36815f2a03386bb8353d4bde368fdf8ca5f0cb97264d3b5c",
"sha256:9801c4c1d9ae6a70aeb2128e5b4b68c45d4f0af0d1535500884d644fa9b768c6",
"sha256:a15f64ae3a027b64496a71ab1f722355e570c3fac5ba2801cafce846bf5af01d",
"sha256:a3d748383762e56337c39ab35c6ed4deb88df5326f97a38946ddd19028ecce6b",
"sha256:a63f1a07932c9686d2d416fb295ec2c01ab246e89b4d58e5fa468089cab44b70",
"sha256:b2b1a5ddae3677d89b686e5c625fc5547c6e492bd755b520de5332773a8af06b",
"sha256:b2f4007bff007c96a173e24dcda236e5e83bde4358a557f9ccf5e014439eae4b",
"sha256:baf378ba6151f6e272824b86a774326f692bc2ef4cc5ce8d5bc76e38c813a55f",
"sha256:bafb01b4688833e099d79e7efd23f99172f501a15c44f21ea2118681473fdba0",
"sha256:bba349276b126947b014e50ab3316c027cac1495992f10e5682dc677b3dfa0c5",
"sha256:c084582d4215593f2f1d28b65d2a2f3aceff8342aa85afd7be23a9cad74a0de5",
"sha256:d1ebb090a426db66dd80df8ca85adc4abfcbad8a7c2e9a5ec7513ede522e0a8f",
"sha256:d2d8ce12b7c12c87e41123997ebaf1a5767a5be3ec545f64675388970f415e2e",
"sha256:e32f5f3d1b1c663af7f9c4c1e72e6ffe9a78c03a31e149259f531e0fed826512",
"sha256:e3faaf10a0d1e8e23a9b51d1900b72e1635c2d5b0e1bea1c18022486a8e2e52d",
"sha256:f7d29a6fc4760300f86ae329e3b6ca28ea9c20823df123a2ea8693e967b29917",
"sha256:f8f295db00ef5f8bae530fc39af0b40486ca6068733fb860b42115052206466f"
],
"version": "==2020.11.13"
},
"toml": {
"hashes": [
"sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b",
"sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"
],
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==0.10.2"
},
"typed-ast": {
"hashes": [
"sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355",
"sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919",
"sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d",
"sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa",
"sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652",
"sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75",
"sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c",
"sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01",
"sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d",
"sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1",
"sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907",
"sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c",
"sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3",
"sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d",
"sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b",
"sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614",
"sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c",
"sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb",
"sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395",
"sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b",
"sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41",
"sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6",
"sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34",
"sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe",
"sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072",
"sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298",
"sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91",
"sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4",
"sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f",
"sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"
],
"version": "==1.4.1"
},
"typing-extensions": {
"hashes": [
"sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918",
"sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c",
"sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f"
],
"version": "==3.7.4.3"
}
}
}

19
gateway/index.js Normal file
View file

@ -0,0 +1,19 @@
import {ApolloServer} from "apollo-server";
import {ApolloGateway} from "@apollo/gateway";
const gateway = new ApolloGateway({
serviceList: [
{name: 'users', url: 'http://localhost:5001'},
{name: 'reviews', url: 'http://localhost:5002'},
{name: 'products', url: 'http://localhost:5003'},
]
})
const server = new ApolloServer({
gateway,
subscriptions: false
})
server.listen().then(({url}) => {
console.log(`Server ready at ${url}`)
})

1
gateway/node_modules/.bin/apollo-pbjs generated vendored Symbolic link
View file

@ -0,0 +1 @@
../@apollo/protobufjs/bin/pbjs

1
gateway/node_modules/.bin/apollo-pbts generated vendored Symbolic link
View file

@ -0,0 +1 @@
../@apollo/protobufjs/bin/pbts

1
gateway/node_modules/.bin/is-ci generated vendored Symbolic link
View file

@ -0,0 +1 @@
../is-ci/bin.js

1
gateway/node_modules/.bin/mime generated vendored Symbolic link
View file

@ -0,0 +1 @@
../mime/cli.js

1
gateway/node_modules/.bin/mkdirp generated vendored Symbolic link
View file

@ -0,0 +1 @@
../mkdirp/bin/cmd.js

1
gateway/node_modules/.bin/nodemon generated vendored Symbolic link
View file

@ -0,0 +1 @@
../nodemon/bin/nodemon.js

1
gateway/node_modules/.bin/nodetouch generated vendored Symbolic link
View file

@ -0,0 +1 @@
../touch/bin/nodetouch.js

1
gateway/node_modules/.bin/nopt generated vendored Symbolic link
View file

@ -0,0 +1 @@
../nopt/bin/nopt.js

1
gateway/node_modules/.bin/rc generated vendored Symbolic link
View file

@ -0,0 +1 @@
../rc/cli.js

1
gateway/node_modules/.bin/rimraf generated vendored Symbolic link
View file

@ -0,0 +1 @@
../rimraf/bin.js

1
gateway/node_modules/.bin/semver generated vendored Symbolic link
View file

@ -0,0 +1 @@
../nodemon/node_modules/semver/bin/semver

1
gateway/node_modules/.bin/sha.js generated vendored Symbolic link
View file

@ -0,0 +1 @@
../sha.js/bin.js

1
gateway/node_modules/.bin/uuid generated vendored Symbolic link
View file

@ -0,0 +1 @@
../apollo-server-core/node_modules/uuid/dist/bin/uuid

1
gateway/node_modules/.bin/xss generated vendored Symbolic link
View file

@ -0,0 +1 @@
../xss/bin/xss

430
gateway/node_modules/.yarn-integrity generated vendored Normal file
View file

@ -0,0 +1,430 @@
{
"systemParams": "darwin-x64-83",
"modulesFolders": [
"node_modules"
],
"flags": [],
"linkedModules": [],
"topLevelPatterns": [
"@apollo/gateway@^0.21.1",
"apollo-server@^2.19.0",
"graphql@^15.4.0",
"nodemon@^2.0.6"
],
"lockfileEntries": {
"@apollo/federation@^0.20.4": "https://registry.yarnpkg.com/@apollo/federation/-/federation-0.20.4.tgz#49baf1e94e7b9dea3e3736c9801c7c230157f94f",
"@apollo/gateway@^0.21.1": "https://registry.yarnpkg.com/@apollo/gateway/-/gateway-0.21.1.tgz#e7dd3065303d2047e411803973447c459a7c338a",
"@apollo/protobufjs@^1.0.3": "https://registry.yarnpkg.com/@apollo/protobufjs/-/protobufjs-1.0.5.tgz#a78b726147efc0795e74c8cb8a11aafc6e02f773",
"@apollo/query-planner-wasm@^0.0.7": "https://registry.yarnpkg.com/@apollo/query-planner-wasm/-/query-planner-wasm-0.0.7.tgz#6fa5ea9d49b546475b66afe9aa79fbaada28b7fb",
"@apollographql/apollo-tools@^0.4.3": "https://registry.yarnpkg.com/@apollographql/apollo-tools/-/apollo-tools-0.4.8.tgz#d81da89ee880c2345eb86bddb92b35291f6135ed",
"@apollographql/graphql-playground-html@1.6.26": "https://registry.yarnpkg.com/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.26.tgz#2f7b610392e2a872722912fc342b43cf8d641cb3",
"@jest/types@^26.6.2": "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e",
"@npmcli/move-file@^1.0.1": "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.0.1.tgz#de103070dac0f48ce49cf6693c23af59c0f70464",
"@protobufjs/aspromise@^1.1.1": "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf",
"@protobufjs/aspromise@^1.1.2": "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf",
"@protobufjs/base64@^1.1.2": "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735",
"@protobufjs/codegen@^2.0.4": "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb",
"@protobufjs/eventemitter@^1.1.0": "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70",
"@protobufjs/fetch@^1.1.0": "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45",
"@protobufjs/float@^1.0.2": "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1",
"@protobufjs/inquire@^1.1.0": "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089",
"@protobufjs/path@^1.1.2": "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d",
"@protobufjs/pool@^1.1.0": "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54",
"@protobufjs/utf8@^1.1.0": "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570",
"@sindresorhus/is@^0.14.0": "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea",
"@szmarczak/http-timer@^1.1.2": "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421",
"@tootallnate/once@1": "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82",
"@types/accepts@*": "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575",
"@types/accepts@^1.3.5": "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575",
"@types/body-parser@*": "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f",
"@types/body-parser@1.19.0": "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.0.tgz#0685b3c47eb3006ffed117cdd55164b61f80538f",
"@types/connect@*": "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.33.tgz#31610c901eca573b8713c3330abc6e6b9f588546",
"@types/content-disposition@*": "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.3.tgz#0aa116701955c2faa0717fc69cd1596095e49d96",
"@types/cookies@*": "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.7.5.tgz#aa42c9a9834724bffee597028da5319b38e85e84",
"@types/cors@2.8.8": "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.8.tgz#317a8d8561995c60e35b9e0fcaa8d36660c98092",
"@types/express-serve-static-core@*": "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz#d9af025e925fc8b089be37423b8d1eac781be084",
"@types/express-serve-static-core@4.17.13": "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz#d9af025e925fc8b089be37423b8d1eac781be084",
"@types/express@*": "https://registry.yarnpkg.com/@types/express/-/express-4.17.9.tgz#f5f2df6add703ff28428add52bdec8a1091b0a78",
"@types/express@4.17.7": "https://registry.yarnpkg.com/@types/express/-/express-4.17.7.tgz#42045be6475636d9801369cd4418ef65cdb0dd59",
"@types/fs-capacitor@*": "https://registry.yarnpkg.com/@types/fs-capacitor/-/fs-capacitor-2.0.0.tgz#17113e25817f584f58100fb7a08eed288b81956e",
"@types/graphql-upload@^8.0.0": "https://registry.yarnpkg.com/@types/graphql-upload/-/graphql-upload-8.0.4.tgz#23a8ffb3d2fe6e0ee07e6f16ee9d9d5e995a2f4f",
"@types/http-assert@*": "https://registry.yarnpkg.com/@types/http-assert/-/http-assert-1.5.1.tgz#d775e93630c2469c2f980fc27e3143240335db3b",
"@types/http-errors@*": "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-1.8.0.tgz#682477dbbbd07cd032731cb3b0e7eaee3d026b69",
"@types/istanbul-lib-coverage@*": "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762",
"@types/istanbul-lib-coverage@^2.0.0": "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762",
"@types/istanbul-lib-report@*": "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686",
"@types/istanbul-reports@^3.0.0": "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821",
"@types/keygrip@*": "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.2.tgz#513abfd256d7ad0bf1ee1873606317b33b1b2a72",
"@types/koa-compose@*": "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.5.tgz#85eb2e80ac50be95f37ccf8c407c09bbe3468e9d",
"@types/koa@*": "https://registry.yarnpkg.com/@types/koa/-/koa-2.11.6.tgz#b7030caa6b44af801c2aea13ba77d74aff7484d5",
"@types/long@^4.0.0": "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9",
"@types/mime@*": "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.3.tgz#c893b73721db73699943bfc3653b1deb7faa4a3a",
"@types/node-fetch@2.5.4": "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.4.tgz#5245b6d8841fc3a6208b82291119bc11c4e0ce44",
"@types/node-fetch@2.5.7": "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c",
"@types/node@*": "https://registry.yarnpkg.com/@types/node/-/node-14.14.7.tgz#8ea1e8f8eae2430cf440564b98c6dfce1ec5945d",
"@types/node@^10.1.0": "https://registry.yarnpkg.com/@types/node/-/node-10.17.44.tgz#3945e6b702cb6403f22b779c8ea9e5c3f44ead40",
"@types/qs@*": "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz#434711bdd49eb5ee69d90c1d67c354a9a8ecb18b",
"@types/range-parser@*": "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c",
"@types/serve-static@*": "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.7.tgz#e51b51a0becda910f9fd04c718044da69d6c492e",
"@types/ws@^7.0.0": "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.0.tgz#499690ea08736e05a8186113dac37769ab251a0e",
"@types/yargs-parser@*": "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d",
"@types/yargs@^15.0.0": "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.9.tgz#524cd7998fe810cdb02f26101b699cccd156ff19",
"@wry/equality@^0.1.2": "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790",
"abbrev@1": "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8",
"accepts@^1.3.5": "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd",
"accepts@~1.3.7": "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd",
"agent-base@6": "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77",
"agentkeepalive@^4.1.0": "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.1.3.tgz#360a09d743a1f4fde749f9ba07caa6575d08259a",
"aggregate-error@^3.0.0": "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a",
"ansi-align@^3.0.0": "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb",
"ansi-regex@^4.1.0": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997",
"ansi-regex@^5.0.0": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75",
"ansi-styles@^4.0.0": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937",
"ansi-styles@^4.1.0": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937",
"anymatch@~3.1.1": "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142",
"apollo-cache-control@^0.11.4": "https://registry.yarnpkg.com/apollo-cache-control/-/apollo-cache-control-0.11.4.tgz#06d57d728e6f928e03b9cc3b993f6102f305c32e",
"apollo-datasource@^0.7.2": "https://registry.yarnpkg.com/apollo-datasource/-/apollo-datasource-0.7.2.tgz#1662ee93453a9b89af6f73ce561bde46b41ebf31",
"apollo-env@^0.6.5": "https://registry.yarnpkg.com/apollo-env/-/apollo-env-0.6.5.tgz#5a36e699d39e2356381f7203493187260fded9f3",
"apollo-graphql@^0.6.0": "https://registry.yarnpkg.com/apollo-graphql/-/apollo-graphql-0.6.0.tgz#37bee7dc853213269137f4c60bfdf2ee28658669",
"apollo-link@^1.2.14": "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.14.tgz#3feda4b47f9ebba7f4160bef8b977ba725b684d9",
"apollo-reporting-protobuf@^0.6.0": "https://registry.yarnpkg.com/apollo-reporting-protobuf/-/apollo-reporting-protobuf-0.6.1.tgz#09294e5f5f6b2285eb94b40621ed42113eaabea3",
"apollo-reporting-protobuf@^0.6.1": "https://registry.yarnpkg.com/apollo-reporting-protobuf/-/apollo-reporting-protobuf-0.6.1.tgz#09294e5f5f6b2285eb94b40621ed42113eaabea3",
"apollo-server-caching@^0.5.2": "https://registry.yarnpkg.com/apollo-server-caching/-/apollo-server-caching-0.5.2.tgz#bef5d5e0d48473a454927a66b7bb947a0b6eb13e",
"apollo-server-core@^2.19.0": "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-2.19.0.tgz#ff14e788f228c2d6739478a68cf93f46a16e5bfa",
"apollo-server-env@^2.4.5": "https://registry.yarnpkg.com/apollo-server-env/-/apollo-server-env-2.4.5.tgz#73730b4f0439094a2272a9d0caa4079d4b661d5f",
"apollo-server-errors@^2.4.2": "https://registry.yarnpkg.com/apollo-server-errors/-/apollo-server-errors-2.4.2.tgz#1128738a1d14da989f58420896d70524784eabe5",
"apollo-server-express@^2.19.0": "https://registry.yarnpkg.com/apollo-server-express/-/apollo-server-express-2.19.0.tgz#a8735e854e2da20e624583bef3c2e54b0cdd6a9b",
"apollo-server-plugin-base@^0.10.2": "https://registry.yarnpkg.com/apollo-server-plugin-base/-/apollo-server-plugin-base-0.10.2.tgz#185aea98ba22afe275fb01659070edeb480a89a7",
"apollo-server-types@^0.6.1": "https://registry.yarnpkg.com/apollo-server-types/-/apollo-server-types-0.6.1.tgz#61486980b44cacee2cb4939f0b369a0eb661a098",
"apollo-server@^2.19.0": "https://registry.yarnpkg.com/apollo-server/-/apollo-server-2.19.0.tgz#8a596573aa5a9535494fdafd635eab7c84342699",
"apollo-tracing@^0.12.0": "https://registry.yarnpkg.com/apollo-tracing/-/apollo-tracing-0.12.0.tgz#26250d7789c28aa89d63226eb674706dd69a568a",
"apollo-utilities@^1.0.1": "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf",
"apollo-utilities@^1.3.0": "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf",
"array-flatten@1.1.1": "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2",
"async-limiter@~1.0.0": "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd",
"async-retry@^1.2.1": "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.1.tgz#139f31f8ddce50c0870b0ba558a6079684aaed55",
"asynckit@^0.4.0": "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79",
"backo2@^1.0.2": "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947",
"balanced-match@^1.0.0": "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767",
"binary-extensions@^2.0.0": "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9",
"body-parser@1.19.0": "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a",
"body-parser@^1.18.3": "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a",
"boxen@^4.2.0": "https://registry.yarnpkg.com/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64",
"brace-expansion@^1.1.7": "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
"braces@~3.0.2": "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107",
"busboy@^0.3.1": "https://registry.yarnpkg.com/busboy/-/busboy-0.3.1.tgz#170899274c5bf38aae27d5c62b71268cd585fd1b",
"bytes@3.1.0": "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6",
"cacache@^15.0.0": "https://registry.yarnpkg.com/cacache/-/cacache-15.0.5.tgz#69162833da29170d6732334643c60e005f5f17d0",
"cacheable-request@^6.0.0": "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912",
"call-bind@^1.0.0": "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.0.tgz#24127054bb3f9bdcb4b1fb82418186072f77b8ce",
"camelcase@^5.3.1": "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320",
"chalk@^3.0.0": "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4",
"chalk@^4.0.0": "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a",
"chokidar@^3.2.2": "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b",
"chownr@^2.0.0": "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece",
"ci-info@^2.0.0": "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46",
"clean-stack@^2.0.0": "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b",
"cli-boxes@^2.2.0": "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f",
"clone-response@^1.0.2": "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b",
"color-convert@^2.0.1": "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3",
"color-name@~1.1.4": "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2",
"combined-stream@^1.0.8": "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f",
"commander@^2.20.3": "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33",
"concat-map@0.0.1": "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b",
"configstore@^5.0.1": "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96",
"content-disposition@0.5.3": "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd",
"content-type@~1.0.4": "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b",
"cookie-signature@1.0.6": "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c",
"cookie@0.4.0": "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba",
"core-js@^3.0.1": "https://registry.yarnpkg.com/core-js/-/core-js-3.7.0.tgz#b0a761a02488577afbf97179e4681bf49568520f",
"core-js@^3.4.0": "https://registry.yarnpkg.com/core-js/-/core-js-3.7.0.tgz#b0a761a02488577afbf97179e4681bf49568520f",
"cors@^2.8.4": "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29",
"crypto-random-string@^2.0.0": "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5",
"cssfilter@0.0.10": "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae",
"debug@2.6.9": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f",
"debug@4": "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1",
"debug@^2.2.0": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f",
"debug@^3.2.6": "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b",
"debug@^4.1.0": "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1",
"decompress-response@^3.3.0": "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3",
"deep-extend@^0.6.0": "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac",
"defer-to-connect@^1.0.1": "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591",
"define-properties@^1.1.3": "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1",
"delayed-stream@~1.0.0": "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619",
"depd@^1.1.2": "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9",
"depd@~1.1.2": "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9",
"deprecated-decorator@^0.1.6": "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37",
"destroy@~1.0.4": "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80",
"dicer@0.3.0": "https://registry.yarnpkg.com/dicer/-/dicer-0.3.0.tgz#eacd98b3bfbf92e8ab5c2fdb71aaac44bb06b872",
"dot-prop@^5.2.0": "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88",
"duplexer3@^0.1.4": "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2",
"ee-first@1.1.1": "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d",
"emoji-regex@^7.0.1": "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156",
"emoji-regex@^8.0.0": "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37",
"encodeurl@~1.0.2": "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59",
"encoding@^0.1.12": "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9",
"end-of-stream@^1.1.0": "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0",
"err-code@^1.0.0": "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960",
"es-abstract@^1.17.0-next.1": "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c",
"es-abstract@^1.17.2": "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c",
"es-abstract@^1.18.0-next.1": "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68",
"es-to-primitive@^1.2.1": "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a",
"escape-goat@^2.0.0": "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675",
"escape-html@~1.0.3": "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988",
"etag@~1.8.1": "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887",
"eventemitter3@^3.1.0": "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7",
"express@^4.0.0": "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134",
"express@^4.17.1": "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134",
"fast-json-stable-stringify@^2.0.0": "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633",
"fill-range@^7.0.1": "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40",
"finalhandler@~1.1.2": "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d",
"form-data@^3.0.0": "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682",
"forwarded@~0.1.2": "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84",
"fresh@0.5.2": "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7",
"fs-capacitor@^2.0.4": "https://registry.yarnpkg.com/fs-capacitor/-/fs-capacitor-2.0.4.tgz#5a22e72d40ae5078b4fe64fe4d08c0d3fc88ad3c",
"fs-minipass@^2.0.0": "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb",
"fs.realpath@^1.0.0": "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f",
"fsevents@~2.1.2": "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e",
"function-bind@^1.1.1": "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d",
"get-intrinsic@^1.0.0": "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.1.tgz#94a9768fcbdd0595a1c9273aacf4c89d075631be",
"get-stream@^4.1.0": "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5",
"get-stream@^5.1.0": "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3",
"glob-parent@~5.1.0": "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229",
"glob@^7.1.3": "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6",
"glob@^7.1.4": "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6",
"global-dirs@^2.0.1": "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201",
"got@^9.6.0": "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85",
"graceful-fs@^4.1.2": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb",
"graphql-extensions@^0.12.6": "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.12.6.tgz#c66be43035662a8cfb0b8efe9df96595338bd13c",
"graphql-subscriptions@^1.0.0": "https://registry.yarnpkg.com/graphql-subscriptions/-/graphql-subscriptions-1.1.0.tgz#5f2fa4233eda44cf7570526adfcf3c16937aef11",
"graphql-tag@^2.9.2": "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz#1deb53a01c46a7eb401d6cb59dec86fa1cccbffd",
"graphql-tools@^4.0.0": "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.8.tgz#e7fb9f0d43408fb0878ba66b522ce871bafe9d30",
"graphql-upload@^8.0.2": "https://registry.yarnpkg.com/graphql-upload/-/graphql-upload-8.1.0.tgz#6d0ab662db5677a68bfb1f2c870ab2544c14939a",
"graphql@^15.3.0": "https://registry.yarnpkg.com/graphql/-/graphql-15.4.0.tgz#e459dea1150da5a106486ba7276518b5295a4347",
"graphql@^15.4.0": "https://registry.yarnpkg.com/graphql/-/graphql-15.4.0.tgz#e459dea1150da5a106486ba7276518b5295a4347",
"has-flag@^3.0.0": "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd",
"has-flag@^4.0.0": "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b",
"has-symbols@^1.0.1": "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8",
"has-yarn@^2.1.0": "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77",
"has@^1.0.3": "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796",
"http-cache-semantics@^4.0.0": "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390",
"http-cache-semantics@^4.0.4": "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390",
"http-errors@1.7.2": "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f",
"http-errors@^1.7.3": "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.0.tgz#75d1bbe497e1044f51e4ee9e704a62f28d336507",
"http-errors@~1.7.2": "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06",
"http-proxy-agent@^4.0.1": "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a",
"https-proxy-agent@^5.0.0": "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2",
"humanize-ms@^1.2.1": "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed",
"iconv-lite@0.4.24": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b",
"iconv-lite@^0.6.2": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01",
"ignore-by-default@^1.0.1": "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09",
"import-lazy@^2.1.0": "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43",
"imurmurhash@^0.1.4": "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea",
"indent-string@^4.0.0": "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251",
"infer-owner@^1.0.4": "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467",
"inflight@^1.0.4": "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9",
"inherits@2": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c",
"inherits@2.0.3": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de",
"inherits@2.0.4": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c",
"inherits@^2.0.1": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c",
"ini@^1.3.5": "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927",
"ini@~1.3.0": "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927",
"ip@^1.1.5": "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a",
"ipaddr.js@1.9.1": "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3",
"is-binary-path@~2.1.0": "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09",
"is-callable@^1.1.4": "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9",
"is-callable@^1.2.2": "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9",
"is-ci@^2.0.0": "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c",
"is-date-object@^1.0.1": "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e",
"is-extglob@^2.1.1": "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2",
"is-fullwidth-code-point@^2.0.0": "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f",
"is-fullwidth-code-point@^3.0.0": "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d",
"is-glob@^4.0.1": "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc",
"is-glob@~4.0.1": "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc",
"is-installed-globally@^0.3.1": "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.3.2.tgz#fd3efa79ee670d1187233182d5b0a1dd00313141",
"is-lambda@^1.0.1": "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5",
"is-negative-zero@^2.0.0": "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461",
"is-npm@^4.0.0": "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d",
"is-number@^7.0.0": "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b",
"is-obj@^2.0.0": "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982",
"is-path-inside@^3.0.1": "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017",
"is-regex@^1.1.1": "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9",
"is-symbol@^1.0.2": "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937",
"is-typedarray@^1.0.0": "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a",
"is-yarn-global@^0.3.0": "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232",
"iterall@^1.1.3": "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea",
"iterall@^1.2.1": "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea",
"json-buffer@3.0.0": "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898",
"keyv@^3.0.0": "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9",
"latest-version@^5.0.0": "https://registry.yarnpkg.com/latest-version/-/latest-version-5.1.0.tgz#119dfe908fe38d15dfa43ecd13fa12ec8832face",
"lodash.sortby@^4.7.0": "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438",
"lodash.xorby@^4.7.0": "https://registry.yarnpkg.com/lodash.xorby/-/lodash.xorby-4.7.0.tgz#9c19a6f9f063a6eb53dd03c1b6871799801463d7",
"loglevel@^1.6.1": "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.0.tgz#728166855a740d59d38db01cf46f042caa041bb0",
"loglevel@^1.6.7": "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.0.tgz#728166855a740d59d38db01cf46f042caa041bb0",
"long@^4.0.0": "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28",
"lowercase-keys@^1.0.0": "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f",
"lowercase-keys@^1.0.1": "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f",
"lowercase-keys@^2.0.0": "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479",
"lru-cache@^5.0.0": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920",
"lru-cache@^6.0.0": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94",
"make-dir@^3.0.0": "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f",
"make-fetch-happen@^8.0.0": "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.10.tgz#f37c5d93d14290488ca6a2ae917a380bd7d24f16",
"media-typer@0.3.0": "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748",
"merge-descriptors@1.0.1": "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61",
"methods@~1.1.2": "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee",
"mime-db@1.44.0": "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92",
"mime-types@^2.1.12": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f",
"mime-types@~2.1.24": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f",
"mime@1.6.0": "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1",
"mimic-response@^1.0.0": "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b",
"mimic-response@^1.0.1": "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b",
"minimatch@^3.0.4": "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083",
"minimist@^1.2.0": "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602",
"minipass-collect@^1.0.2": "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617",
"minipass-fetch@^1.3.0": "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.3.2.tgz#573766fb1ae86e30df916a6b060bc2e801bf8f37",
"minipass-flush@^1.0.5": "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373",
"minipass-pipeline@^1.2.2": "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c",
"minipass-sized@^1.0.3": "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70",
"minipass@^3.0.0": "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd",
"minipass@^3.1.0": "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd",
"minipass@^3.1.1": "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd",
"minipass@^3.1.3": "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd",
"minizlib@^2.0.0": "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931",
"minizlib@^2.1.1": "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931",
"mkdirp@^1.0.3": "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
"mkdirp@^1.0.4": "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e",
"ms@2.0.0": "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8",
"ms@2.1.1": "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a",
"ms@2.1.2": "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009",
"ms@^2.0.0": "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009",
"ms@^2.1.1": "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009",
"negotiator@0.6.2": "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb",
"node-fetch@^2.1.2": "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052",
"node-fetch@^2.2.0": "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052",
"nodemon@^2.0.6": "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.6.tgz#1abe1937b463aaf62f0d52e2b7eaadf28cc2240d",
"nopt@~1.0.10": "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee",
"normalize-path@^3.0.0": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65",
"normalize-path@~3.0.0": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65",
"normalize-url@^4.1.0": "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129",
"object-assign@^4": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863",
"object-inspect@^1.8.0": "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0",
"object-keys@^1.0.12": "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e",
"object-keys@^1.1.1": "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e",
"object-path@^0.11.4": "https://registry.yarnpkg.com/object-path/-/object-path-0.11.5.tgz#d4e3cf19601a5140a55a16ad712019a9c50b577a",
"object.assign@^4.1.1": "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940",
"object.getownpropertydescriptors@^2.1.0": "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649",
"on-finished@~2.3.0": "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947",
"once@^1.3.0": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1",
"once@^1.3.1": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1",
"once@^1.4.0": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1",
"p-cancelable@^1.0.0": "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc",
"p-map@^4.0.0": "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b",
"package-json@^6.3.0": "https://registry.yarnpkg.com/package-json/-/package-json-6.5.0.tgz#6feedaca35e75725876d0b0e64974697fed145b0",
"parseurl@^1.3.2": "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4",
"parseurl@~1.3.3": "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4",
"path-is-absolute@^1.0.0": "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
"path-to-regexp@0.1.7": "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c",
"picomatch@^2.0.4": "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad",
"picomatch@^2.2.1": "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad",
"prepend-http@^2.0.0": "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897",
"pretty-format@^26.0.0": "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93",
"promise-inflight@^1.0.1": "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3",
"promise-retry@^1.1.1": "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d",
"proxy-addr@~2.0.5": "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf",
"pstree.remy@^1.1.7": "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a",
"pump@^3.0.0": "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64",
"pupa@^2.0.1": "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62",
"qs@6.7.0": "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc",
"range-parser@~1.2.1": "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031",
"raw-body@2.4.0": "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332",
"rc@^1.2.8": "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed",
"react-is@^17.0.1": "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339",
"readdirp@~3.5.0": "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e",
"registry-auth-token@^4.0.0": "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250",
"registry-url@^5.0.0": "https://registry.yarnpkg.com/registry-url/-/registry-url-5.1.0.tgz#e98334b50d5434b81136b44ec638d9c2009c5009",
"responselike@^1.0.2": "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7",
"retry@0.12.0": "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b",
"retry@^0.10.0": "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4",
"rimraf@^3.0.2": "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a",
"safe-buffer@5.1.2": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d",
"safe-buffer@^5.0.1": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6",
"safer-buffer@>= 2.1.2 < 3": "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a",
"safer-buffer@>= 2.1.2 < 3.0.0": "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a",
"semver-diff@^3.1.1": "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b",
"semver@^5.7.1": "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7",
"semver@^6.0.0": "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d",
"semver@^6.2.0": "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d",
"semver@^6.3.0": "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d",
"send@0.17.1": "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8",
"serve-static@1.14.1": "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9",
"setprototypeof@1.1.1": "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683",
"setprototypeof@1.2.0": "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424",
"sha.js@^2.4.11": "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7",
"signal-exit@^3.0.2": "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c",
"smart-buffer@^4.1.0": "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba",
"socks-proxy-agent@^5.0.0": "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.0.tgz#7c0f364e7b1cf4a7a437e71253bed72e9004be60",
"socks@^2.3.3": "https://registry.yarnpkg.com/socks/-/socks-2.5.0.tgz#3a7c286db114f67864a4bd8b4207a91d1db3d6db",
"ssri@^8.0.0": "https://registry.yarnpkg.com/ssri/-/ssri-8.0.0.tgz#79ca74e21f8ceaeddfcb4b90143c458b8d988808",
"statuses@>= 1.5.0 < 2": "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c",
"statuses@~1.5.0": "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c",
"streamsearch@0.1.2": "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a",
"string-width@^3.0.0": "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961",
"string-width@^4.0.0": "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5",
"string-width@^4.1.0": "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5",
"string.prototype.trimend@^1.0.1": "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz#6ddd9a8796bc714b489a3ae22246a208f37bfa46",
"string.prototype.trimstart@^1.0.1": "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz#22d45da81015309cd0cdd79787e8919fc5c613e7",
"strip-ansi@^5.1.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae",
"strip-ansi@^6.0.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532",
"strip-json-comments@~2.0.1": "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a",
"subscriptions-transport-ws@^0.9.11": "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz#bcf02320c911fbadb054f7f928e51c6041a37b97",
"subscriptions-transport-ws@^0.9.16": "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz#bcf02320c911fbadb054f7f928e51c6041a37b97",
"supports-color@^5.5.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f",
"supports-color@^7.1.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da",
"symbol-observable@^1.0.4": "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804",
"tar@^6.0.2": "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f",
"term-size@^2.1.0": "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54",
"to-readable-stream@^1.0.0": "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771",
"to-regex-range@^5.0.1": "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4",
"toidentifier@1.0.0": "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553",
"touch@^3.1.0": "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b",
"ts-invariant@^0.4.0": "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86",
"tslib@^1.10.0": "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00",
"tslib@^1.9.3": "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00",
"type-fest@^0.8.1": "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d",
"type-is@^1.6.16": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131",
"type-is@~1.6.17": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131",
"type-is@~1.6.18": "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131",
"typedarray-to-buffer@^3.1.5": "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080",
"undefsafe@^2.0.3": "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.3.tgz#6b166e7094ad46313b2202da7ecc2cd7cc6e7aae",
"unique-filename@^1.1.1": "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230",
"unique-slug@^2.0.0": "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c",
"unique-string@^2.0.0": "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d",
"unpipe@1.0.0": "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec",
"unpipe@~1.0.0": "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec",
"update-notifier@^4.1.0": "https://registry.yarnpkg.com/update-notifier/-/update-notifier-4.1.3.tgz#be86ee13e8ce48fb50043ff72057b5bd598e1ea3",
"url-parse-lax@^3.0.0": "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c",
"util.promisify@^1.0.0": "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee",
"utils-merge@1.0.1": "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713",
"uuid@^3.1.0": "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee",
"uuid@^8.0.0": "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31",
"vary@^1": "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc",
"vary@~1.1.2": "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc",
"widest-line@^3.1.0": "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca",
"wrappy@1": "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
"write-file-atomic@^3.0.0": "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8",
"ws@^5.2.0": "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f",
"ws@^6.0.0": "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb",
"xdg-basedir@^4.0.0": "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13",
"xss@^1.0.6": "https://registry.yarnpkg.com/xss/-/xss-1.0.8.tgz#32feb87feb74b3dcd3d404b7a68ababf10700535",
"yallist@^3.0.2": "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd",
"yallist@^4.0.0": "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72",
"zen-observable-ts@^0.8.21": "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d",
"zen-observable@^0.8.0": "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
},
"files": [],
"artifacts": {
"@apollo/protobufjs@1.0.5": [
"cli"
]
}
}

191
gateway/node_modules/@apollo/federation/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,191 @@
# CHANGELOG for `@apollo/federation`
## vNEXT
> The changes noted within this `vNEXT` section have not been released yet. New PRs and commits which introduce changes should include an entry in this `vNEXT` section as part of their development. When a release is being prepared, a new header will be (manually) created below and the appropriate changes within that release will be moved into the new section.
## v0.20.4
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.20.3
- Fix warning for non-matching `@external` types when the declaration's type is non-null or a list [PR #4392](https://github.com/apollographql/apollo-server/pull/4392)
## v0.20.2
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.20.1
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.20.0
- __FIX__: CSDL complex `@key`s shouldn't result in an unparseable document [PR #4490](https://github.com/apollographql/apollo-server/pull/4490)
- __FIX__: Value type validations - restrict unions, scalars, enums [PR #4496](https://github.com/apollographql/apollo-server/pull/4496)
- __FIX__: Composition - aggregate interfaces for types and interfaces in composed schema [PR #4497](https://github.com/apollographql/apollo-server/pull/4497)
- __FIX__: Create new `@key` validations to prevent invalid compositions [PR #4498](https://github.com/apollographql/apollo-server/pull/4498)
- CSDL: make `fields` directive args parseable [PR #4489](https://github.com/apollographql/apollo-server/pull/4489)
## v0.19.1
- Include new directive definitions in CSDL [PR #4452](https://github.com/apollographql/apollo-server/pull/4452)
## v0.19.0
- New federation composition format. Capture federation metadata in SDL [PR #4405](https://github.com/apollographql/apollo-server/pull/4405)
## v0.18.1
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.18.0
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.17.0
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.16.11
- Reinstate typings for `make-fetch-happen` at the `apollo-gateway` project level (and now, additionally, `apollo-server-plugin-operation-registry`) [PR #4333](https://github.com/apollographql/apollo-server/pull/4333)
## 0.16.10
- The default branch of the repository has been changed to `main`. As this changed a number of references in the repository's `package.json` and `README.md` files (e.g., for badges, links, etc.), this necessitates a release to publish those changes to npm. [PR #4302](https://github.com/apollographql/apollo-server/pull/4302)
- __BREAKING__: Move federation metadata from custom objects on schema nodes over to the `extensions` field on schema nodes which are intended for metadata. This is a breaking change because it narrows the `graphql` peer dependency from `^14.0.2` to `^14.5.0` which is when [`extensions` were introduced](https://github.com/graphql/graphql-js/pull/2097) for all Type System objects. [PR #4302](https://github.com/apollographql/apollo-server/pull/4313)
## 0.16.9
- Handle `@external` validation edge case for interface implementors [#4284](https://github.com/apollographql/apollo-server/pull/4284)
## 0.16.7
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.16.6
- In-house `Maybe` type which was previously imported from `graphql` and has been moved in `v15.1.0`. [#4230](https://github.com/apollographql/apollo-server/pull/4230)
- Remove remaining common primitives from SDL during composition. This is a follow up to [#4209](https://github.com/apollographql/apollo-server/pull/4209), and additionally removes directives which are included in a schema by default (`@skip`, `@include`, `@deprecated`, and `@specifiedBy`) [#4228](https://github.com/apollographql/apollo-server/pull/4209)
## v0.16.5
- Remove federation primitives from SDL during composition. This allows for services to report their *full* SDL from the `{ _service { sdl } }` query as opposed to the previously limited SDL without federation definitions. [#4209](https://github.com/apollographql/apollo-server/pull/4209)
## v0.16.4
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.16.3
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.16.2
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.16.1
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.16.0
- No changes. This package was major versioned to maintain lockstep versioning with @apollo/gateway.
## v0.15.1
- Export `defaultRootOperationNameLookup` and `normalizeTypeDefs`; needed by `@apollo/gateway` to normalize root operation types when reporting to Apollo Graph Manager. [#4071](https://github.com/apollographql/apollo-server/pull/4071)
## v0.15.0
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/e37384a49b2bf474eed0de3e9f4a1bebaeee64c7)
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.14.1
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/b898396e9fcd3b9092b168f9aac8466ca186fa6b)
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.14.0
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/71a3863f59f4ab2c9052c316479d94c6708c4309)
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.13.2
- Only changes in the similarly versioned `@apollo/gateway` package.
## v0.12.1
- Fix `v0.12.0` regression: Preserve the `@deprecated` type-system directive as a special case when removing type system directives during composition, resolving an unintentional breaking change introduced by [#3736](https://github.com/apollographql/apollo-server/pull/3736). [#3792](https://github.com/apollographql/apollo-server/pull/3792)
## v0.12.0
- Strip all Type System Directives during composition [#3736](https://github.com/apollographql/apollo-server/pull/3736)
- Prepare for changes in upcoming `graphql@15` release. [#3712](https://github.com/apollographql/apollo-server/pull/3712)
## v0.11.1
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/2a4c654986a158aaccf947ee56a4bfc48a3173c7)
- Ignore TypeSystemDirectiveLocations during composition [#3536](https://github.com/apollographql/apollo-server/pull/3536)
## v0.11.0
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/93002737d53dd9a50b473ab9cef14849b3e539aa)
- Begin supporting executable directives in federation [#3464](https://github.com/apollographql/apollo-server/pull/3464)
## v0.10.3
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/3cdde1b7a71ace6411fbacf82a1a61bf737444a6)
- Remove `apollo-env` dependency to eliminate circular dependency between the two packages. This circular dependency makes the tooling repo unpublishable when `apollo-env` requires a version bump. [#3463](https://github.com/apollographql/apollo-server/pull/3463)
## v0.10.1
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/aa200ce24b834320fc79d2605dac340b37d3e434)
- Use reference-equality when omitting validation rules during composition. [#3338](https://github.com/apollographql/apollo-server/pull/3338)
## v0.10.0
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/6100fb5e0797cd1f578ded7cb77b60fac47e58e3)
- Remove federation directives from composed schema [#3272](https://github.com/apollographql/apollo-server/pull/3272)
- Do not remove Query/Mutation/Subscription types when schema is included if schema references those types [#3260](https://github.com/apollographql/apollo-server/pull/3260)
## v0.9.1
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/029c8dca3af812ee70589cdb6de749df3d2843d8)
- Fix value type behavior within composition and execution [#3182](https://github.com/apollographql/apollo-server/pull/2922)
## v0.6.8
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/5974b2ce405a06bc331230400b9073f6381738d3)
- Support __typenames if defined by an incoming operation [#2922](https://github.com/apollographql/apollo-server/pull/2922)
## v0.6.7
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/2ea5887acc43461a5539071f4981a5f70e0d0652)
- Fix bug in externalUnused validation [#2919](https://github.com/apollographql/apollo-server/pull/2919)
## v0.6.6
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/183de5f112324def375a45c239955e1bf1608fae)
- Allow specified directives during validation (@deprecated) [#2823](https://github.com/apollographql/apollo-server/pull/2823)
## v0.6.1
> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/1209839c01b4cac1eb23f42c747296dd9507a8ac)
- Normalize SDL in a normalization step before validation [#2771](https://github.com/apollographql/apollo-server/pull/2771)

21
gateway/node_modules/@apollo/federation/LICENSE.md generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2020- Apollo Graph, Inc.
Copyright (c) 2019-2020 Meteor Development Group, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

40
gateway/node_modules/@apollo/federation/README.md generated vendored Normal file
View file

@ -0,0 +1,40 @@
# `Apollo Federation Utilities`
This package provides utilities for creating GraphQL microservices, which can be combined into a single endpoint through tools like [Apollo Gateway](https://github.com/apollographql/apollo-server/tree/main/packages/apollo-gateway).
For complete documentation, see the [Apollo Federation API reference](https://www.apollographql.com/docs/apollo-server/api/apollo-federation/).
## Usage
```js
const { ApolloServer, gql } = require("apollo-server");
const { buildFederatedSchema } = require("@apollo/federation");
const typeDefs = gql`
type Query {
me: User
}
type User @key(fields: "id") {
id: ID!
username: String
}
`;
const resolvers = {
Query: {
me() {
return { id: "1", username: "@ava" }
}
},
User: {
__resolveReference(user, { fetchUserById }){
return fetchUserById(user.id)
}
}
};
const server = new ApolloServer({
schema: buildFederatedSchema([{ typeDefs, resolvers }])
});
```

View file

@ -0,0 +1,62 @@
import 'apollo-server-env';
import { GraphQLSchema, GraphQLError, TypeDefinitionNode, DirectiveDefinitionNode, TypeExtensionNode } from 'graphql';
import { ServiceDefinition, ExternalFieldDefinition, ServiceNameToKeyDirectivesMap } from './types';
interface TypeDefinitionsMap {
[name: string]: TypeDefinitionNode[];
}
interface TypeExtensionsMap {
[name: string]: TypeExtensionNode[];
}
interface DirectiveDefinitionsMap {
[name: string]: {
[serviceName: string]: DirectiveDefinitionNode;
};
}
interface TypeToServiceMap {
[typeName: string]: {
owningService?: string;
extensionFieldsToOwningServiceMap: {
[fieldName: string]: string;
};
};
}
export interface KeyDirectivesMap {
[typeName: string]: ServiceNameToKeyDirectivesMap;
}
declare type ValueTypes = Set<string>;
export declare type ComposedGraphQLSchema = GraphQLSchema & {
extensions: {
serviceList: ServiceDefinition[];
};
};
export declare function buildMapsFromServiceList(serviceList: ServiceDefinition[]): {
typeToServiceMap: TypeToServiceMap;
typeDefinitionsMap: TypeDefinitionsMap;
typeExtensionsMap: TypeExtensionsMap;
directiveDefinitionsMap: DirectiveDefinitionsMap;
externalFields: ExternalFieldDefinition[];
keyDirectivesMap: KeyDirectivesMap;
valueTypes: ValueTypes;
};
export declare function buildSchemaFromDefinitionsAndExtensions({ typeDefinitionsMap, typeExtensionsMap, directiveDefinitionsMap, }: {
typeDefinitionsMap: TypeDefinitionsMap;
typeExtensionsMap: TypeExtensionsMap;
directiveDefinitionsMap: DirectiveDefinitionsMap;
}): {
schema: GraphQLSchema;
errors: GraphQLError[];
};
export declare function addFederationMetadataToSchemaNodes({ schema, typeToServiceMap, externalFields, keyDirectivesMap, valueTypes, directiveDefinitionsMap, }: {
schema: GraphQLSchema;
typeToServiceMap: TypeToServiceMap;
externalFields: ExternalFieldDefinition[];
keyDirectivesMap: KeyDirectivesMap;
valueTypes: ValueTypes;
directiveDefinitionsMap: DirectiveDefinitionsMap;
}): void;
export declare function composeServices(services: ServiceDefinition[]): {
schema: ComposedGraphQLSchema;
errors: GraphQLError[];
};
export {};
//# sourceMappingURL=compose.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/composition/compose.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EACL,aAAa,EAKb,YAAY,EAQZ,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EAGlB,MAAM,SAAS,CAAC;AAiBjB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,6BAA6B,EAI9B,MAAM,SAAS,CAAC;AAkBjB,UAAU,kBAAkB;IAC1B,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAAC;CACtC;AAED,UAAU,iBAAiB;IACzB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAAC;CACrC;AAGD,UAAU,uBAAuB;IAC/B,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,CAAC,WAAW,EAAE,MAAM,GAAG,uBAAuB,CAAA;KAAE,CAAC;CACpE;AAoBD,UAAU,gBAAgB;IACxB,CAAC,QAAQ,EAAE,MAAM,GAAG;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iCAAiC,EAAE;YAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC;KACpE,CAAC;CACH;AAcD,MAAM,WAAW,gBAAgB;IAC/B,CAAC,QAAQ,EAAE,MAAM,GAAG,6BAA6B,CAAC;CACnD;AAMD,aAAK,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AAE9B,oBAAY,qBAAqB,GAAG,aAAa,GAAG;IAClD,UAAU,EAAE;QAAE,WAAW,EAAE,iBAAiB,EAAE,CAAA;KAAE,CAAA;CACjD,CAAC;AAMF,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,iBAAiB,EAAE;;;;;;;;EAgNxE;AAED,wBAAgB,uCAAuC,CAAC,EACtD,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,GACxB,EAAE;IACD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,uBAAuB,EAAE,uBAAuB,CAAC;CAClD;;;EAqFA;AAMD,wBAAgB,kCAAkC,CAAC,EACjD,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,uBAAuB,GACxB,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,cAAc,EAAE,uBAAuB,EAAE,CAAC;IAC1C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,UAAU,CAAC;IACvB,uBAAuB,EAAE,uBAAuB,CAAC;CAClD,QA8IA;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,iBAAiB,EAAE;;;EA6D5D"}

View file

@ -0,0 +1,273 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.composeServices = exports.addFederationMetadataToSchemaNodes = exports.buildSchemaFromDefinitionsAndExtensions = exports.buildMapsFromServiceList = void 0;
require("apollo-server-env");
const graphql_1 = require("graphql");
const apollo_graphql_1 = require("apollo-graphql");
const directives_1 = __importDefault(require("../directives"));
const utils_1 = require("./utils");
const validate_1 = require("graphql/validation/validate");
const rules_1 = require("./rules");
const EmptyQueryDefinition = {
kind: graphql_1.Kind.OBJECT_TYPE_DEFINITION,
name: { kind: graphql_1.Kind.NAME, value: utils_1.defaultRootOperationNameLookup.query },
fields: [],
serviceName: null,
};
const EmptyMutationDefinition = {
kind: graphql_1.Kind.OBJECT_TYPE_DEFINITION,
name: { kind: graphql_1.Kind.NAME, value: utils_1.defaultRootOperationNameLookup.mutation },
fields: [],
serviceName: null,
};
function buildMapsFromServiceList(serviceList) {
const typeDefinitionsMap = Object.create(null);
const typeExtensionsMap = Object.create(null);
const directiveDefinitionsMap = Object.create(null);
const typeToServiceMap = Object.create(null);
const externalFields = [];
const keyDirectivesMap = Object.create(null);
const valueTypes = new Set();
for (const { typeDefs, name: serviceName } of serviceList) {
const { typeDefsWithoutExternalFields, strippedFields, } = utils_1.stripExternalFieldsFromTypeDefs(typeDefs, serviceName);
externalFields.push(...strippedFields);
const typeDefsWithoutTypeSystemDirectives = utils_1.stripTypeSystemDirectivesFromTypeDefs(typeDefsWithoutExternalFields);
for (const definition of typeDefsWithoutTypeSystemDirectives.definitions) {
if (definition.kind === graphql_1.Kind.OBJECT_TYPE_DEFINITION ||
definition.kind === graphql_1.Kind.OBJECT_TYPE_EXTENSION) {
const typeName = definition.name.value;
for (const keyDirective of utils_1.findDirectivesOnTypeOrField(definition, 'key')) {
if (keyDirective.arguments &&
utils_1.isStringValueNode(keyDirective.arguments[0].value)) {
keyDirectivesMap[typeName] = keyDirectivesMap[typeName] || {};
keyDirectivesMap[typeName][serviceName] =
keyDirectivesMap[typeName][serviceName] || [];
keyDirectivesMap[typeName][serviceName].push(utils_1.parseSelections(keyDirective.arguments[0].value.value));
}
}
}
if (graphql_1.isTypeDefinitionNode(definition)) {
const typeName = definition.name.value;
if (!typeToServiceMap[typeName]) {
typeToServiceMap[typeName] = {
extensionFieldsToOwningServiceMap: Object.create(null),
};
}
typeToServiceMap[typeName].owningService = serviceName;
if (typeDefinitionsMap[typeName]) {
const isValueType = utils_1.typeNodesAreEquivalent(typeDefinitionsMap[typeName][typeDefinitionsMap[typeName].length - 1], definition);
if (isValueType) {
valueTypes.add(typeName);
}
typeDefinitionsMap[typeName].push(Object.assign(Object.assign({}, definition), { serviceName }));
}
else {
typeDefinitionsMap[typeName] = [Object.assign(Object.assign({}, definition), { serviceName })];
}
}
else if (graphql_1.isTypeExtensionNode(definition)) {
const typeName = definition.name.value;
if (definition.kind === graphql_1.Kind.OBJECT_TYPE_EXTENSION ||
definition.kind === graphql_1.Kind.INPUT_OBJECT_TYPE_EXTENSION) {
if (!definition.fields)
break;
const fields = utils_1.mapFieldNamesToServiceName(definition.fields, serviceName);
if (typeToServiceMap[typeName]) {
typeToServiceMap[typeName].extensionFieldsToOwningServiceMap = Object.assign(Object.assign({}, typeToServiceMap[typeName].extensionFieldsToOwningServiceMap), fields);
}
else {
typeToServiceMap[typeName] = {
extensionFieldsToOwningServiceMap: fields,
};
}
}
if (definition.kind === graphql_1.Kind.ENUM_TYPE_EXTENSION) {
if (!definition.values)
break;
const values = utils_1.mapFieldNamesToServiceName(definition.values, serviceName);
if (typeToServiceMap[typeName]) {
typeToServiceMap[typeName].extensionFieldsToOwningServiceMap = Object.assign(Object.assign({}, typeToServiceMap[typeName].extensionFieldsToOwningServiceMap), values);
}
else {
typeToServiceMap[typeName] = {
extensionFieldsToOwningServiceMap: values,
};
}
}
if (typeExtensionsMap[typeName]) {
typeExtensionsMap[typeName].push(Object.assign(Object.assign({}, definition), { serviceName }));
}
else {
typeExtensionsMap[typeName] = [Object.assign(Object.assign({}, definition), { serviceName })];
}
}
else if (definition.kind === graphql_1.Kind.DIRECTIVE_DEFINITION) {
const directiveName = definition.name.value;
const executableLocations = definition.locations.filter(location => utils_1.executableDirectiveLocations.includes(location.value));
if (executableLocations.length === 0)
continue;
const definitionWithExecutableLocations = Object.assign(Object.assign({}, definition), { locations: executableLocations });
if (directiveDefinitionsMap[directiveName]) {
directiveDefinitionsMap[directiveName][serviceName] = definitionWithExecutableLocations;
}
else {
directiveDefinitionsMap[directiveName] = {
[serviceName]: definitionWithExecutableLocations,
};
}
}
}
}
if (!typeDefinitionsMap.Query)
typeDefinitionsMap.Query = [EmptyQueryDefinition];
if (typeExtensionsMap.Mutation && !typeDefinitionsMap.Mutation)
typeDefinitionsMap.Mutation = [EmptyMutationDefinition];
return {
typeToServiceMap,
typeDefinitionsMap,
typeExtensionsMap,
directiveDefinitionsMap,
externalFields,
keyDirectivesMap,
valueTypes,
};
}
exports.buildMapsFromServiceList = buildMapsFromServiceList;
function buildSchemaFromDefinitionsAndExtensions({ typeDefinitionsMap, typeExtensionsMap, directiveDefinitionsMap, }) {
let errors = undefined;
let schema = new graphql_1.GraphQLSchema({
query: undefined,
directives: [...graphql_1.specifiedDirectives, ...directives_1.default],
});
function nodeHasInterfaces(node) {
return 'interfaces' in node;
}
const definitionsDocument = {
kind: graphql_1.Kind.DOCUMENT,
definitions: [
...Object.values(typeDefinitionsMap).flatMap(typeDefinitions => {
if (!typeDefinitions.some(nodeHasInterfaces))
return typeDefinitions;
const uniqueInterfaces = typeDefinitions.reduce((map, objectTypeDef) => {
var _a;
(_a = objectTypeDef.interfaces) === null || _a === void 0 ? void 0 : _a.forEach((iface) => map.set(iface.name.value, iface));
return map;
}, new Map());
if (uniqueInterfaces.size === 0)
return typeDefinitions;
const [first, ...rest] = typeDefinitions;
return [
...rest,
Object.assign(Object.assign({}, first), { interfaces: Array.from(uniqueInterfaces.values()) }),
];
}),
...Object.values(directiveDefinitionsMap).map(definitions => Object.values(definitions)[0]),
],
};
errors = validate_1.validateSDL(definitionsDocument, schema, rules_1.compositionRules);
schema = graphql_1.extendSchema(schema, definitionsDocument, { assumeValidSDL: true });
const extensionsDocument = {
kind: graphql_1.Kind.DOCUMENT,
definitions: Object.values(typeExtensionsMap).flat(),
};
errors.push(...validate_1.validateSDL(extensionsDocument, schema, rules_1.compositionRules));
schema = graphql_1.extendSchema(schema, extensionsDocument, { assumeValidSDL: true });
schema = new graphql_1.GraphQLSchema(Object.assign(Object.assign({}, schema.toConfig()), { directives: [
...schema.getDirectives().filter(x => !utils_1.isFederationDirective(x)),
] }));
return { schema, errors };
}
exports.buildSchemaFromDefinitionsAndExtensions = buildSchemaFromDefinitionsAndExtensions;
function addFederationMetadataToSchemaNodes({ schema, typeToServiceMap, externalFields, keyDirectivesMap, valueTypes, directiveDefinitionsMap, }) {
var _a;
for (const [typeName, { owningService, extensionFieldsToOwningServiceMap },] of Object.entries(typeToServiceMap)) {
const namedType = schema.getType(typeName);
if (!namedType)
continue;
const isValueType = valueTypes.has(typeName);
const serviceName = isValueType ? null : owningService;
const federationMetadata = Object.assign(Object.assign(Object.assign({}, utils_1.getFederationMetadata(namedType)), { serviceName,
isValueType }), (keyDirectivesMap[typeName] && {
keys: keyDirectivesMap[typeName],
}));
namedType.extensions = Object.assign(Object.assign({}, namedType.extensions), { federation: federationMetadata });
if (graphql_1.isObjectType(namedType)) {
for (const field of Object.values(namedType.getFields())) {
const [providesDirective] = utils_1.findDirectivesOnTypeOrField(field.astNode, 'provides');
if (providesDirective &&
providesDirective.arguments &&
utils_1.isStringValueNode(providesDirective.arguments[0].value)) {
const fieldFederationMetadata = Object.assign(Object.assign({}, utils_1.getFederationMetadata(field)), { serviceName, provides: utils_1.parseSelections(providesDirective.arguments[0].value.value), belongsToValueType: isValueType });
field.extensions = Object.assign(Object.assign({}, field.extensions), { federation: fieldFederationMetadata });
}
}
}
for (const [fieldName, extendingServiceName] of Object.entries(extensionFieldsToOwningServiceMap)) {
if (graphql_1.isObjectType(namedType)) {
const field = namedType.getFields()[fieldName];
const fieldFederationMetadata = Object.assign(Object.assign({}, utils_1.getFederationMetadata(field)), { serviceName: extendingServiceName });
field.extensions = Object.assign(Object.assign({}, field.extensions), { federation: fieldFederationMetadata });
const [requiresDirective] = utils_1.findDirectivesOnTypeOrField(field.astNode, 'requires');
if (requiresDirective &&
requiresDirective.arguments &&
utils_1.isStringValueNode(requiresDirective.arguments[0].value)) {
const fieldFederationMetadata = Object.assign(Object.assign({}, utils_1.getFederationMetadata(field)), { requires: utils_1.parseSelections(requiresDirective.arguments[0].value.value) });
field.extensions = Object.assign(Object.assign({}, field.extensions), { federation: fieldFederationMetadata });
}
}
}
}
for (const field of externalFields) {
const namedType = schema.getType(field.parentTypeName);
if (!namedType)
continue;
const existingMetadata = utils_1.getFederationMetadata(namedType);
const typeFederationMetadata = Object.assign(Object.assign({}, existingMetadata), { externals: Object.assign(Object.assign({}, existingMetadata === null || existingMetadata === void 0 ? void 0 : existingMetadata.externals), { [field.serviceName]: [
...(((_a = existingMetadata === null || existingMetadata === void 0 ? void 0 : existingMetadata.externals) === null || _a === void 0 ? void 0 : _a[field.serviceName]) || []),
field,
] }) });
namedType.extensions = Object.assign(Object.assign({}, namedType.extensions), { federation: typeFederationMetadata });
}
for (const directiveName of Object.keys(directiveDefinitionsMap)) {
const directive = schema.getDirective(directiveName);
if (!directive)
continue;
const directiveFederationMetadata = Object.assign(Object.assign({}, utils_1.getFederationMetadata(directive)), { directiveDefinitions: directiveDefinitionsMap[directiveName] });
directive.extensions = Object.assign(Object.assign({}, directive.extensions), { federation: directiveFederationMetadata });
}
}
exports.addFederationMetadataToSchemaNodes = addFederationMetadataToSchemaNodes;
function composeServices(services) {
const { typeToServiceMap, typeDefinitionsMap, typeExtensionsMap, directiveDefinitionsMap, externalFields, keyDirectivesMap, valueTypes, } = buildMapsFromServiceList(services);
let { schema, errors } = buildSchemaFromDefinitionsAndExtensions({
typeDefinitionsMap,
typeExtensionsMap,
directiveDefinitionsMap,
});
schema = new graphql_1.GraphQLSchema(Object.assign(Object.assign(Object.assign({}, schema.toConfig()), utils_1.mapValues(utils_1.defaultRootOperationNameLookup, typeName => typeName
? schema.getType(typeName)
: undefined)), { extensions: {
serviceList: services
} }));
schema = apollo_graphql_1.transformSchema(schema, type => {
if (graphql_1.isObjectType(type)) {
const config = type.toConfig();
return new graphql_1.GraphQLObjectType(Object.assign(Object.assign({}, config), { interfaces: Array.from(new Set(config.interfaces)) }));
}
return undefined;
});
addFederationMetadataToSchemaNodes({
schema,
typeToServiceMap,
externalFields,
keyDirectivesMap,
valueTypes,
directiveDefinitionsMap,
});
return { schema: schema, errors };
}
exports.composeServices = composeServices;
//# sourceMappingURL=compose.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,8 @@
import { ServiceDefinition } from './types';
export declare function composeAndValidate(serviceList: ServiceDefinition[]): {
schema: import("./compose").ComposedGraphQLSchema;
warnings: never[];
errors: import("graphql").GraphQLError[];
composedSdl: string | undefined;
};
//# sourceMappingURL=composeAndValidate.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"composeAndValidate.d.ts","sourceRoot":"","sources":["../../src/composition/composeAndValidate.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAI5C,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,iBAAiB,EAAE;;;;;EAoClE"}

View file

@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.composeAndValidate = void 0;
const compose_1 = require("./compose");
const validate_1 = require("./validate");
const normalize_1 = require("./normalize");
const printComposedSdl_1 = require("../service/printComposedSdl");
function composeAndValidate(serviceList) {
const errors = validate_1.validateServicesBeforeNormalization(serviceList);
const normalizedServiceList = serviceList.map(({ name, typeDefs }) => ({
name,
typeDefs: normalize_1.normalizeTypeDefs(typeDefs),
}));
errors.push(...validate_1.validateServicesBeforeComposition(normalizedServiceList));
const compositionResult = compose_1.composeServices(normalizedServiceList);
errors.push(...compositionResult.errors);
errors.push(...validate_1.validateComposedSchema({
schema: compositionResult.schema,
serviceList,
}));
const composedSdl = errors.length === 0
? printComposedSdl_1.printComposedSdl(compositionResult.schema, serviceList)
: undefined;
return {
schema: compositionResult.schema,
warnings: [],
errors,
composedSdl,
};
}
exports.composeAndValidate = composeAndValidate;
//# sourceMappingURL=composeAndValidate.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"composeAndValidate.js","sourceRoot":"","sources":["../../src/composition/composeAndValidate.ts"],"names":[],"mappings":";;;AAAA,uCAA4C;AAC5C,yCAIoB;AAEpB,2CAAgD;AAChD,kEAA+D;AAE/D,SAAgB,kBAAkB,CAAC,WAAgC;IACjE,MAAM,MAAM,GAAG,8CAAmC,CAAC,WAAW,CAAC,CAAC;IAEhE,MAAM,qBAAqB,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACrE,IAAI;QACJ,QAAQ,EAAE,6BAAiB,CAAC,QAAQ,CAAC;KACtC,CAAC,CAAC,CAAC;IAGJ,MAAM,CAAC,IAAI,CAAC,GAAG,4CAAiC,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAGzE,MAAM,iBAAiB,GAAG,yBAAe,CAAC,qBAAqB,CAAC,CAAC;IACjE,MAAM,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAGzC,MAAM,CAAC,IAAI,CACT,GAAG,iCAAsB,CAAC;QACxB,MAAM,EAAE,iBAAiB,CAAC,MAAM;QAChC,WAAW;KACZ,CAAC,CACH,CAAC;IAGF,MAAM,WAAW,GACf,MAAM,CAAC,MAAM,KAAK,CAAC;QACjB,CAAC,CAAC,mCAAgB,CAAC,iBAAiB,CAAC,MAAM,EAAE,WAAW,CAAC;QACzD,CAAC,CAAC,SAAS,CAAC;IAGhB,OAAO;QACL,MAAM,EAAE,iBAAiB,CAAC,MAAM;QAChC,QAAQ,EAAE,EAAE;QACZ,MAAM;QACN,WAAW;KACZ,CAAC;AACJ,CAAC;AApCD,gDAoCC"}

View file

@ -0,0 +1,7 @@
export * from './compose';
export * from './composeAndValidate';
export * from './types';
export { compositionRules } from './rules';
export { normalizeTypeDefs } from './normalize';
export { defaultRootOperationNameLookup } from './utils';
//# sourceMappingURL=index.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composition/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC"}

View file

@ -0,0 +1,22 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./compose"), exports);
__exportStar(require("./composeAndValidate"), exports);
__exportStar(require("./types"), exports);
var rules_1 = require("./rules");
Object.defineProperty(exports, "compositionRules", { enumerable: true, get: function () { return rules_1.compositionRules; } });
var normalize_1 = require("./normalize");
Object.defineProperty(exports, "normalizeTypeDefs", { enumerable: true, get: function () { return normalize_1.normalizeTypeDefs; } });
var utils_1 = require("./utils");
Object.defineProperty(exports, "defaultRootOperationNameLookup", { enumerable: true, get: function () { return utils_1.defaultRootOperationNameLookup; } });
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/composition/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA0B;AAC1B,uDAAqC;AACrC,0CAAwB;AACxB,iCAA2C;AAAlC,yGAAA,gBAAgB,OAAA;AACzB,yCAAgD;AAAvC,8GAAA,iBAAiB,OAAA;AAC1B,iCAAyD;AAAhD,uHAAA,8BAA8B,OAAA"}

View file

@ -0,0 +1,6 @@
import { DocumentNode } from 'graphql';
export declare function normalizeTypeDefs(typeDefs: DocumentNode): any;
export declare function defaultRootOperationTypes(typeDefs: DocumentNode): DocumentNode;
export declare function replaceExtendedDefinitionsWithExtensions(typeDefs: DocumentNode): any;
export declare function stripCommonPrimitives(document: DocumentNode): any;
//# sourceMappingURL=normalize.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/composition/normalize.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EAQb,MAAM,SAAS,CAAC;AASjB,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,OASvD;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,GACrB,YAAY,CA8Ld;AAID,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,YAAY,OA6BvB;AAaD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,YAAY,OAmD3D"}

View file

@ -0,0 +1,145 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.stripCommonPrimitives = exports.replaceExtendedDefinitionsWithExtensions = exports.defaultRootOperationTypes = exports.normalizeTypeDefs = void 0;
const graphql_1 = require("graphql");
const utils_1 = require("./utils");
const directives_1 = __importDefault(require("../directives"));
function normalizeTypeDefs(typeDefs) {
return stripCommonPrimitives(defaultRootOperationTypes(replaceExtendedDefinitionsWithExtensions(typeDefs)));
}
exports.normalizeTypeDefs = normalizeTypeDefs;
function defaultRootOperationTypes(typeDefs) {
const defaultRootOperationNames = Object.values(utils_1.defaultRootOperationNameLookup);
let rootOperationTypeMap = Object.create(null);
let hasSchemaDefinitionOrExtension = false;
graphql_1.visit(typeDefs, {
OperationTypeDefinition(node) {
hasSchemaDefinitionOrExtension = true;
rootOperationTypeMap[node.type.name.value] =
utils_1.defaultRootOperationNameLookup[node.operation];
},
});
if (!hasSchemaDefinitionOrExtension) {
rootOperationTypeMap = {
Query: 'Query',
Mutation: 'Mutation',
Subscription: 'Subscription',
};
}
let schemaWithoutConflictingDefaultDefinitions;
if (!hasSchemaDefinitionOrExtension) {
schemaWithoutConflictingDefaultDefinitions = typeDefs;
}
else {
schemaWithoutConflictingDefaultDefinitions = graphql_1.visit(typeDefs, {
ObjectTypeDefinition(node) {
if (defaultRootOperationNames.includes(node.name.value) &&
!rootOperationTypeMap[node.name.value]) {
return null;
}
return;
},
ObjectTypeExtension(node) {
if (defaultRootOperationNames.includes(node.name.value) &&
!rootOperationTypeMap[node.name.value]) {
return null;
}
return;
},
FieldDefinition(node) {
if (node.type.kind === graphql_1.Kind.NAMED_TYPE &&
defaultRootOperationNames.includes(node.type.name.value)) {
return null;
}
if (node.type.kind === graphql_1.Kind.NON_NULL_TYPE &&
node.type.type.kind === graphql_1.Kind.NAMED_TYPE &&
defaultRootOperationNames.includes(node.type.type.name.value)) {
return null;
}
return;
},
});
}
const schemaWithDefaultRootTypes = graphql_1.visit(schemaWithoutConflictingDefaultDefinitions, {
SchemaDefinition() {
return null;
},
SchemaExtension() {
return null;
},
ObjectTypeDefinition(node) {
if (node.name.value in rootOperationTypeMap ||
defaultRootOperationNames.includes(node.name.value)) {
return Object.assign(Object.assign({}, node), { name: Object.assign(Object.assign({}, node.name), { value: rootOperationTypeMap[node.name.value] || node.name.value }), kind: graphql_1.Kind.OBJECT_TYPE_EXTENSION });
}
return;
},
ObjectTypeExtension(node) {
if (node.name.value in rootOperationTypeMap ||
defaultRootOperationNames.includes(node.name.value)) {
return Object.assign(Object.assign({}, node), { name: Object.assign(Object.assign({}, node.name), { value: rootOperationTypeMap[node.name.value] || node.name.value }) });
}
return;
},
NamedType(node) {
if (node.name.value in rootOperationTypeMap) {
return Object.assign(Object.assign({}, node), { name: Object.assign(Object.assign({}, node.name), { value: rootOperationTypeMap[node.name.value] }) });
}
return;
},
});
return schemaWithDefaultRootTypes;
}
exports.defaultRootOperationTypes = defaultRootOperationTypes;
function replaceExtendedDefinitionsWithExtensions(typeDefs) {
const typeDefsWithExtendedTypesReplaced = graphql_1.visit(typeDefs, {
ObjectTypeDefinition: visitor,
InterfaceTypeDefinition: visitor,
});
function visitor(node) {
const isExtensionDefinition = utils_1.findDirectivesOnTypeOrField(node, 'extends').length > 0;
if (!isExtensionDefinition) {
return node;
}
const filteredDirectives = node.directives &&
node.directives.filter(directive => directive.name.value !== 'extends');
return Object.assign(Object.assign(Object.assign({}, node), (filteredDirectives && { directives: filteredDirectives })), { kind: utils_1.defKindToExtKind[node.kind] });
}
return typeDefsWithExtendedTypesReplaced;
}
exports.replaceExtendedDefinitionsWithExtensions = replaceExtendedDefinitionsWithExtensions;
function stripCommonPrimitives(document) {
const typeDefinitionVisitor = (node) => {
var _a;
if (node.name.value === utils_1.defaultRootOperationNameLookup.query) {
const filteredFieldDefinitions = (_a = node.fields) === null || _a === void 0 ? void 0 : _a.filter((fieldDefinition) => !utils_1.reservedRootFields.includes(fieldDefinition.name.value));
if (!filteredFieldDefinitions || filteredFieldDefinitions.length === 0) {
return null;
}
return Object.assign(Object.assign({}, node), { fields: filteredFieldDefinitions });
}
const isFederationType = node.name.value === '_Service';
return isFederationType ? null : node;
};
return graphql_1.visit(document, {
DirectiveDefinition(node) {
const isCommonDirective = [...directives_1.default, ...graphql_1.specifiedDirectives].some((directive) => directive.name === node.name.value);
return isCommonDirective ? null : node;
},
ScalarTypeDefinition(node) {
const isFederationScalar = ['_Any', '_FieldSet'].includes(node.name.value);
return isFederationScalar ? null : node;
},
UnionTypeDefinition(node) {
const isFederationUnion = node.name.value === "_Entity";
return isFederationUnion ? null : node;
},
ObjectTypeDefinition: typeDefinitionVisitor,
ObjectTypeExtension: typeDefinitionVisitor,
});
}
exports.stripCommonPrimitives = stripCommonPrimitives;
//# sourceMappingURL=normalize.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../src/composition/normalize.ts"],"names":[],"mappings":";;;;;;AACA,qCASiB;AACjB,mCAKiB;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IAAI,CAAC,KAAK,CAChB,CAAC;YACF,OAAO,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1C,CAAC;QAED,mBAAmB,CAAC,IAAI;YACtB,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC;YACxD,OAAO,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACzC,CAAC;QACD,oBAAoB,EAAE,qBAAqB;QAC3C,mBAAmB,EAAE,qBAAqB;KAC3C,CAAC,CAAC;AACL,CAAC;AAnDD,sDAmDC"}

View file

@ -0,0 +1,2 @@
export declare const compositionRules: import("graphql/validation/ValidationContext").SDLValidationRule[];
//# sourceMappingURL=rules.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/composition/rules.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,gBAAgB,oEAQzB,CAAC"}

View file

@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.compositionRules = void 0;
const specifiedRules_1 = require("graphql/validation/specifiedRules");
const graphql_1 = require("graphql");
const UniqueTypeNames_1 = require("graphql/validation/rules/UniqueTypeNames");
const UniqueEnumValueNames_1 = require("graphql/validation/rules/UniqueEnumValueNames");
const PossibleTypeExtensions_1 = require("graphql/validation/rules/PossibleTypeExtensions");
const UniqueFieldDefinitionNames_1 = require("graphql/validation/rules/UniqueFieldDefinitionNames");
const sdl_1 = require("./validate/sdl");
const omit = [
graphql_1.UniqueDirectivesPerLocationRule,
UniqueTypeNames_1.UniqueTypeNames,
UniqueEnumValueNames_1.UniqueEnumValueNames,
PossibleTypeExtensions_1.PossibleTypeExtensions,
UniqueFieldDefinitionNames_1.UniqueFieldDefinitionNames,
];
exports.compositionRules = specifiedRules_1.specifiedSDLRules
.filter(rule => !omit.includes(rule))
.concat([
sdl_1.UniqueFieldDefinitionNames,
sdl_1.UniqueTypeNamesWithFields,
sdl_1.MatchingEnums,
sdl_1.UniqueUnionTypes,
sdl_1.PossibleTypeExtensions,
]);
//# sourceMappingURL=rules.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/composition/rules.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AAatE,qCAEiB;AACjB,8EAEkD;AAClD,wFAEuD;AACvD,4FAEyD;AACzD,oGAE6D;AAO7D,wCAMyB;AAEzB,MAAM,IAAI,GAAG;IACX,yCAA4C;IAC5C,iCAA4B;IAC5B,2CAAiC;IACjC,+CAAmC;IACnC,uDAAuC;CACxC,CAAC;AAEW,QAAA,gBAAgB,GAAG,kCAAiB;KAC9C,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KACpC,MAAM,CAAC;IACN,gCAA0C;IAC1C,+BAAwC;IACxC,mBAA4B;IAC5B,sBAA+B;IAC/B,4BAAqC;CACtC,CAAC,CAAC"}

View file

@ -0,0 +1,75 @@
import { SelectionNode, DocumentNode, FieldDefinitionNode, DirectiveDefinitionNode } from 'graphql';
export declare type Maybe<T> = null | undefined | T;
export declare type ServiceName = string | null;
export declare type DefaultRootOperationTypeName = 'Query' | 'Mutation' | 'Subscription';
export interface ExternalFieldDefinition {
field: FieldDefinitionNode;
parentTypeName: string;
serviceName: string;
}
export interface ServiceNameToKeyDirectivesMap {
[serviceName: string]: ReadonlyArray<SelectionNode>[];
}
export interface FederationType {
serviceName?: ServiceName;
keys?: ServiceNameToKeyDirectivesMap;
externals?: {
[serviceName: string]: ExternalFieldDefinition[];
};
isValueType?: boolean;
}
export interface FederationField {
serviceName?: ServiceName;
requires?: ReadonlyArray<SelectionNode>;
provides?: ReadonlyArray<SelectionNode>;
belongsToValueType?: boolean;
}
export interface FederationDirective {
directiveDefinitions: {
[serviceName: string]: DirectiveDefinitionNode;
};
}
export interface ServiceDefinition {
typeDefs: DocumentNode;
name: string;
url?: string;
}
declare module 'graphql/language/ast' {
interface UnionTypeDefinitionNode {
serviceName?: string | null;
}
interface UnionTypeExtensionNode {
serviceName?: string | null;
}
interface EnumTypeDefinitionNode {
serviceName?: string | null;
}
interface EnumTypeExtensionNode {
serviceName?: string | null;
}
interface ScalarTypeDefinitionNode {
serviceName?: string | null;
}
interface ScalarTypeExtensionNode {
serviceName?: string | null;
}
interface ObjectTypeDefinitionNode {
serviceName?: string | null;
}
interface ObjectTypeExtensionNode {
serviceName?: string | null;
}
interface InterfaceTypeDefinitionNode {
serviceName?: string | null;
}
interface InterfaceTypeExtensionNode {
serviceName?: string | null;
}
interface InputObjectTypeDefinitionNode {
serviceName?: string | null;
}
interface InputObjectTypeExtensionNode {
serviceName?: string | null;
}
}
//# sourceMappingURL=types.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/composition/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,oBAAY,KAAK,CAAC,CAAC,IAAI,IAAI,GAAG,SAAS,GAAG,CAAC,CAAC;AAE5C,oBAAY,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;AAExC,oBAAY,4BAA4B,GACpC,OAAO,GACP,UAAU,GACV,cAAc,CAAC;AAEnB,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,6BAA6B;IAC5C,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC;CACvD;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,6BAA6B,CAAC;IACrC,SAAS,CAAC,EAA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AAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,0BAA0B;QAClC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,6BAA6B;QACrC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,4BAA4B;QACpC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;CACF"}

View file

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/composition/types.ts"],"names":[],"mappings":""}

View file

@ -0,0 +1,64 @@
import 'apollo-server-env';
import { FieldDefinitionNode, StringValueNode, NameNode, DocumentNode, DirectiveNode, GraphQLNamedType, GraphQLError, GraphQLSchema, GraphQLObjectType, GraphQLField, SelectionNode, TypeDefinitionNode, TypeExtensionNode, ASTNode, DirectiveDefinitionNode, GraphQLDirective, OperationTypeNode } from 'graphql';
import { ExternalFieldDefinition, DefaultRootOperationTypeName, Maybe, FederationType, FederationDirective, FederationField } from './types';
export declare function isStringValueNode(node: any): node is StringValueNode;
export declare function mapFieldNamesToServiceName<Node extends {
name: NameNode;
}>(fields: ReadonlyArray<Node>, serviceName: string): any;
export declare function findDirectivesOnTypeOrField(node: Maybe<TypeDefinitionNode | TypeExtensionNode | FieldDefinitionNode>, directiveName: string): DirectiveNode[];
export declare function stripExternalFieldsFromTypeDefs(typeDefs: DocumentNode, serviceName: string): {
typeDefsWithoutExternalFields: DocumentNode;
strippedFields: ExternalFieldDefinition[];
};
export declare function stripTypeSystemDirectivesFromTypeDefs(typeDefs: DocumentNode): DocumentNode;
export declare function parseSelections(source: string): readonly SelectionNode[];
export declare function hasMatchingFieldInDirectives({ directives, fieldNameToMatch, namedType, }: {
directives: DirectiveNode[];
fieldNameToMatch: String;
namedType: GraphQLNamedType;
}): boolean;
export declare const logServiceAndType: (serviceName: string, typeName: string, fieldName?: string | undefined) => string;
export declare function logDirective(directiveName: string): string;
export declare function errorWithCode(code: string, message: string, nodes?: ReadonlyArray<ASTNode> | ASTNode | undefined): GraphQLError;
export declare function findTypesContainingFieldWithReturnType(schema: GraphQLSchema, node: GraphQLField<any, any>): GraphQLObjectType[];
export declare function findFieldsThatReturnType({ schema, typeToFind, }: {
schema: GraphQLSchema;
typeToFind: GraphQLNamedType;
}): GraphQLField<any, any>[];
export declare function selectionIncludesField({ selections, selectionSetType, typeToFind, fieldToFind, }: {
selections: readonly SelectionNode[];
selectionSetType: GraphQLObjectType;
typeToFind: GraphQLObjectType;
fieldToFind: string;
}): boolean;
export declare function isTypeNodeAnEntity(node: TypeDefinitionNode | TypeExtensionNode): boolean;
export declare function diffTypeNodes(firstNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode, secondNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode): {
name: string[];
kind: ("ScalarTypeDefinition" | "ObjectTypeDefinition" | "InterfaceTypeDefinition" | "UnionTypeDefinition" | "EnumTypeDefinition" | "InputObjectTypeDefinition" | "DirectiveDefinition" | "ScalarTypeExtension" | "ObjectTypeExtension" | "InterfaceTypeExtension" | "UnionTypeExtension" | "EnumTypeExtension" | "InputObjectTypeExtension")[];
fields: {
[fieldName: string]: string[];
};
unionTypes: {
[typeName: string]: boolean;
};
locations: string[];
args: {
[argumentName: string]: string[];
};
};
export declare function typeNodesAreEquivalent(firstNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode, secondNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode): boolean;
export declare const defKindToExtKind: {
[kind: string]: string;
};
export declare function mapValues<T, U = T>(object: Record<string, T>, callback: (value: T) => U): Record<string, U>;
export declare function isNotNullOrUndefined<T>(value: T | null | undefined): value is T;
export declare const executableDirectiveLocations: string[];
export declare function isFederationDirective(directive: GraphQLDirective): boolean;
export declare const reservedRootFields: string[];
export declare const defaultRootOperationNameLookup: {
[node in OperationTypeNode]: DefaultRootOperationTypeName;
};
export declare function getFederationMetadata(obj: GraphQLNamedType): FederationType | undefined;
export declare function getFederationMetadata(obj: GraphQLField<any, any>): FederationField | undefined;
export declare function getFederationMetadata(obj: GraphQLDirective): FederationDirective | undefined;
//# sourceMappingURL=utils.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/composition/utils.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAEL,mBAAmB,EAEnB,eAAe,EAGf,QAAQ,EACR,YAAY,EAGZ,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,aAAa,EAEb,iBAAiB,EAEjB,YAAY,EACZ,aAAa,EAGb,kBAAkB,EAElB,iBAAiB,EAGjB,OAAO,EACP,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EAChB,MAAM,SAAS,CAAC;AAGjB,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,eAAe,CAEpE;AAGD,wBAAgB,0BAA0B,CAAC,IAAI,SAAS;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,EACxE,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,EAC3B,WAAW,EAAE,MAAM,OAMpB;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,KAAK,CAAC,kBAAkB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,EACzE,aAAa,EAAE,MAAM,mBAOtB;AAED,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,MAAM,GAClB;IACD,6BAA6B,EAAE,YAAY,CAAC;IAC5C,cAAc,EAAE,uBAAuB,EAAE,CAAC;CAC3C,CAeA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var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFederationMetadata = exports.defaultRootOperationNameLookup = exports.reservedRootFields = exports.isFederationDirective = exports.executableDirectiveLocations = exports.isNotNullOrUndefined = exports.mapValues = exports.defKindToExtKind = exports.typeNodesAreEquivalent = exports.diffTypeNodes = exports.isTypeNodeAnEntity = exports.selectionIncludesField = exports.findFieldsThatReturnType = exports.findTypesContainingFieldWithReturnType = exports.errorWithCode = exports.logDirective = exports.logServiceAndType = exports.hasMatchingFieldInDirectives = exports.parseSelections = exports.stripTypeSystemDirectivesFromTypeDefs = exports.stripExternalFieldsFromTypeDefs = exports.findDirectivesOnTypeOrField = exports.mapFieldNamesToServiceName = exports.isStringValueNode = void 0;
require("apollo-server-env");
const graphql_1 = require("graphql");
const directives_1 = __importDefault(require("../directives"));
function isStringValueNode(node) {
return node.kind === graphql_1.Kind.STRING;
}
exports.isStringValueNode = isStringValueNode;
function mapFieldNamesToServiceName(fields, serviceName) {
return fields.reduce((prev, next) => {
prev[next.name.value] = serviceName;
return prev;
}, Object.create(null));
}
exports.mapFieldNamesToServiceName = mapFieldNamesToServiceName;
function findDirectivesOnTypeOrField(node, directiveName) {
return node && node.directives
? node.directives.filter(directive => directive.name.value === directiveName)
: [];
}
exports.findDirectivesOnTypeOrField = findDirectivesOnTypeOrField;
function stripExternalFieldsFromTypeDefs(typeDefs, serviceName) {
const strippedFields = [];
const typeDefsWithoutExternalFields = graphql_1.visit(typeDefs, {
ObjectTypeExtension: removeExternalFieldsFromExtensionVisitor(strippedFields, serviceName),
InterfaceTypeExtension: removeExternalFieldsFromExtensionVisitor(strippedFields, serviceName),
});
return { typeDefsWithoutExternalFields, strippedFields };
}
exports.stripExternalFieldsFromTypeDefs = stripExternalFieldsFromTypeDefs;
function stripTypeSystemDirectivesFromTypeDefs(typeDefs) {
const typeDefsWithoutTypeSystemDirectives = graphql_1.visit(typeDefs, {
Directive(node) {
if (node.name.value === 'deprecated' || node.name.value === 'specifiedBy')
return;
const isFederationDirective = directives_1.default.some(({ name }) => name === node.name.value);
return isFederationDirective ? undefined : null;
},
});
return typeDefsWithoutTypeSystemDirectives;
}
exports.stripTypeSystemDirectivesFromTypeDefs = stripTypeSystemDirectivesFromTypeDefs;
function removeExternalFieldsFromExtensionVisitor(collector, serviceName) {
return (node) => {
let fields = node.fields;
if (fields) {
fields = fields.filter(field => {
const externalDirectives = findDirectivesOnTypeOrField(field, 'external');
if (externalDirectives.length > 0) {
collector.push({
field,
parentTypeName: node.name.value,
serviceName,
});
return false;
}
return true;
});
}
return Object.assign(Object.assign({}, node), { fields });
};
}
function parseSelections(source) {
return graphql_1.parse(`query { ${source} }`)
.definitions[0].selectionSet.selections;
}
exports.parseSelections = parseSelections;
function hasMatchingFieldInDirectives({ directives, fieldNameToMatch, namedType, }) {
return Boolean(namedType.astNode &&
directives
.map(keyDirective => keyDirective.arguments &&
isStringValueNode(keyDirective.arguments[0].value)
? {
typeName: namedType.astNode.name.value,
keyArgument: keyDirective.arguments[0].value.value,
}
: null)
.filter(isNotNullOrUndefined)
.flatMap(selection => parseSelections(selection.keyArgument))
.some(field => field.kind === graphql_1.Kind.FIELD && field.name.value === fieldNameToMatch));
}
exports.hasMatchingFieldInDirectives = hasMatchingFieldInDirectives;
exports.logServiceAndType = (serviceName, typeName, fieldName) => `[${serviceName}] ${typeName}${fieldName ? `.${fieldName} -> ` : ' -> '}`;
function logDirective(directiveName) {
return `[@${directiveName}] -> `;
}
exports.logDirective = logDirective;
function errorWithCode(code, message, nodes) {
return new graphql_1.GraphQLError(message, nodes, undefined, undefined, undefined, undefined, {
code,
});
}
exports.errorWithCode = errorWithCode;
function findTypesContainingFieldWithReturnType(schema, node) {
const returnType = graphql_1.getNamedType(node.type);
if (!graphql_1.isObjectType(returnType))
return [];
const containingTypes = [];
const types = schema.getTypeMap();
for (const selectionSetType of Object.values(types)) {
if (!graphql_1.isObjectType(selectionSetType))
continue;
const allFields = selectionSetType.getFields();
Object.values(allFields).forEach(field => {
const fieldReturnType = graphql_1.getNamedType(field.type);
if (fieldReturnType === returnType) {
containingTypes.push(fieldReturnType);
}
});
}
return containingTypes;
}
exports.findTypesContainingFieldWithReturnType = findTypesContainingFieldWithReturnType;
function findFieldsThatReturnType({ schema, typeToFind, }) {
if (!graphql_1.isObjectType(typeToFind))
return [];
const fieldsThatReturnType = [];
const types = schema.getTypeMap();
for (const selectionSetType of Object.values(types)) {
if (!graphql_1.isObjectType(selectionSetType))
continue;
const fieldsOnNamedType = selectionSetType.getFields();
Object.values(fieldsOnNamedType).forEach(field => {
const fieldReturnType = graphql_1.getNamedType(field.type);
if (fieldReturnType === typeToFind) {
fieldsThatReturnType.push(field);
}
});
}
return fieldsThatReturnType;
}
exports.findFieldsThatReturnType = findFieldsThatReturnType;
function selectionIncludesField({ selections, selectionSetType, typeToFind, fieldToFind, }) {
for (const selection of selections) {
const selectionName = selection.name.value;
if (selectionName === fieldToFind &&
graphql_1.isEqualType(selectionSetType, typeToFind))
return true;
const typeIncludesField = selectionName &&
Object.keys(selectionSetType.getFields()).includes(selectionName);
if (!selectionName || !typeIncludesField)
continue;
const returnType = graphql_1.getNamedType(selectionSetType.getFields()[selectionName].type);
if (!returnType || !graphql_1.isObjectType(returnType))
continue;
const subselections = selection.selectionSet && selection.selectionSet.selections;
if (subselections) {
const selectionDoesIncludeField = selectionIncludesField({
selectionSetType: returnType,
selections: subselections,
typeToFind,
fieldToFind,
});
if (selectionDoesIncludeField)
return true;
}
}
return false;
}
exports.selectionIncludesField = selectionIncludesField;
function isTypeNodeAnEntity(node) {
let isEntity = false;
graphql_1.visit(node, {
Directive(directive) {
if (directive.name.value === 'key') {
isEntity = true;
return graphql_1.BREAK;
}
},
});
return isEntity;
}
exports.isTypeNodeAnEntity = isTypeNodeAnEntity;
function diffTypeNodes(firstNode, secondNode) {
const fieldsDiff = Object.create(null);
const unionTypesDiff = Object.create(null);
const locationsDiff = new Set();
const argumentsDiff = Object.create(null);
const document = {
kind: graphql_1.Kind.DOCUMENT,
definitions: [firstNode, secondNode],
};
function fieldVisitor(node) {
const fieldName = node.name.value;
const type = graphql_1.print(node.type);
if (!fieldsDiff[fieldName]) {
fieldsDiff[fieldName] = [type];
return;
}
const fieldTypes = fieldsDiff[fieldName];
if (fieldTypes[0] === type) {
delete fieldsDiff[fieldName];
}
else {
fieldTypes.push(type);
}
}
graphql_1.visit(document, {
FieldDefinition: fieldVisitor,
InputValueDefinition: fieldVisitor,
UnionTypeDefinition(node) {
if (!node.types)
return graphql_1.BREAK;
for (const namedTypeNode of node.types) {
const name = namedTypeNode.name.value;
if (unionTypesDiff[name]) {
delete unionTypesDiff[name];
}
else {
unionTypesDiff[name] = true;
}
}
},
DirectiveDefinition(node) {
node.locations.forEach(location => {
const locationName = location.value;
if (locationsDiff.has(locationName)) {
locationsDiff.delete(locationName);
}
else {
locationsDiff.add(locationName);
}
});
if (!node.arguments)
return;
node.arguments.forEach(argument => {
const argumentName = argument.name.value;
const printedType = graphql_1.print(argument.type);
if (argumentsDiff[argumentName]) {
if (printedType === argumentsDiff[argumentName][0]) {
delete argumentsDiff[argumentName];
}
else {
argumentsDiff[argumentName].push(printedType);
}
}
else {
argumentsDiff[argumentName] = [printedType];
}
});
},
});
const typeNameDiff = firstNode.name.value === secondNode.name.value
? []
: [firstNode.name.value, secondNode.name.value];
const kindDiff = firstNode.kind === secondNode.kind ? [] : [firstNode.kind, secondNode.kind];
return {
name: typeNameDiff,
kind: kindDiff,
fields: fieldsDiff,
unionTypes: unionTypesDiff,
locations: Array.from(locationsDiff),
args: argumentsDiff,
};
}
exports.diffTypeNodes = diffTypeNodes;
function typeNodesAreEquivalent(firstNode, secondNode) {
const { name, kind, fields, unionTypes, locations, args } = diffTypeNodes(firstNode, secondNode);
return (name.length === 0 &&
kind.length === 0 &&
Object.keys(fields).length === 0 &&
Object.keys(unionTypes).length === 0 &&
locations.length === 0 &&
Object.keys(args).length === 0);
}
exports.typeNodesAreEquivalent = typeNodesAreEquivalent;
exports.defKindToExtKind = {
[graphql_1.Kind.SCALAR_TYPE_DEFINITION]: graphql_1.Kind.SCALAR_TYPE_EXTENSION,
[graphql_1.Kind.OBJECT_TYPE_DEFINITION]: graphql_1.Kind.OBJECT_TYPE_EXTENSION,
[graphql_1.Kind.INTERFACE_TYPE_DEFINITION]: graphql_1.Kind.INTERFACE_TYPE_EXTENSION,
[graphql_1.Kind.UNION_TYPE_DEFINITION]: graphql_1.Kind.UNION_TYPE_EXTENSION,
[graphql_1.Kind.ENUM_TYPE_DEFINITION]: graphql_1.Kind.ENUM_TYPE_EXTENSION,
[graphql_1.Kind.INPUT_OBJECT_TYPE_DEFINITION]: graphql_1.Kind.INPUT_OBJECT_TYPE_EXTENSION,
};
function mapValues(object, callback) {
const result = Object.create(null);
for (const [key, value] of Object.entries(object)) {
result[key] = callback(value);
}
return result;
}
exports.mapValues = mapValues;
function isNotNullOrUndefined(value) {
return value !== null && typeof value !== 'undefined';
}
exports.isNotNullOrUndefined = isNotNullOrUndefined;
exports.executableDirectiveLocations = [
'QUERY',
'MUTATION',
'SUBSCRIPTION',
'FIELD',
'FRAGMENT_DEFINITION',
'FRAGMENT_SPREAD',
'INLINE_FRAGMENT',
'VARIABLE_DEFINITION',
];
function isFederationDirective(directive) {
return directives_1.default.some(({ name }) => name === directive.name);
}
exports.isFederationDirective = isFederationDirective;
exports.reservedRootFields = ['_service', '_entities'];
exports.defaultRootOperationNameLookup = {
query: 'Query',
mutation: 'Mutation',
subscription: 'Subscription',
};
function getFederationMetadata(obj) {
var _a, _b, _c;
if (typeof obj === "undefined")
return undefined;
else if (graphql_1.isNamedType(obj))
return (_a = obj.extensions) === null || _a === void 0 ? void 0 : _a.federation;
else if (graphql_1.isDirective(obj))
return (_b = obj.extensions) === null || _b === void 0 ? void 0 : _b.federation;
else
return (_c = obj.extensions) === null || _c === void 0 ? void 0 : _c.federation;
}
exports.getFederationMetadata = getFederationMetadata;
//# sourceMappingURL=utils.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,9 @@
import { GraphQLSchema, GraphQLError } from 'graphql';
import { ServiceDefinition } from '../types';
export declare function validateServicesBeforeNormalization(services: ServiceDefinition[]): GraphQLError[];
export declare const validateServicesBeforeComposition: (services: ServiceDefinition[]) => GraphQLError[];
export declare const validateComposedSchema: ({ schema, serviceList, }: {
schema: GraphQLSchema;
serviceList: ServiceDefinition[];
}) => GraphQLError[];
//# sourceMappingURL=index.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composition/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAkB,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAS7C,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,iBAAiB,EAAE,kBAW9B;AAID,eAAO,MAAM,iCAAiC,aAClC,iBAAiB,EAAE,mBAW9B,CAAC;AAIF,eAAO,MAAM,sBAAsB;YAIzB,aAAa;iBACR,iBAAiB,EAAE;MAC9B,YAAY,EAUf,CAAC"}

View file

@ -0,0 +1,57 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateComposedSchema = exports.validateServicesBeforeComposition = exports.validateServicesBeforeNormalization = void 0;
const graphql_1 = require("graphql");
const preNormalizationRules = __importStar(require("./preNormalization"));
const preCompositionRules = __importStar(require("./preComposition"));
const postCompositionRules = __importStar(require("./postComposition"));
const preNormalizationValidators = Object.values(preNormalizationRules);
function validateServicesBeforeNormalization(services) {
const errors = [];
for (const serviceDefinition of services) {
for (const validator of preNormalizationValidators) {
errors.push(...validator(serviceDefinition));
}
}
return errors;
}
exports.validateServicesBeforeNormalization = validateServicesBeforeNormalization;
const preCompositionValidators = Object.values(preCompositionRules);
exports.validateServicesBeforeComposition = (services) => {
const warningsOrErrors = [];
for (const serviceDefinition of services) {
for (const validator of preCompositionValidators) {
warningsOrErrors.push(...validator(serviceDefinition));
}
}
return warningsOrErrors;
};
const postCompositionValidators = Object.values(postCompositionRules);
exports.validateComposedSchema = ({ schema, serviceList, }) => {
const warningsOrErrors = [];
warningsOrErrors.push(...graphql_1.validateSchema(schema));
for (const validator of postCompositionValidators) {
warningsOrErrors.push(...validator({ schema, serviceList }));
}
return warningsOrErrors;
};
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/composition/validate/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAsE;AAItE,0EAA4D;AAC5D,sEAAwD;AACxD,wEAA0D;AAE1D,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAExE,SAAgB,mCAAmC,CACjD,QAA6B;IAE7B,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,KAAK,MAAM,iBAAiB,IAAI,QAAQ,EAAE;QACxC,KAAK,MAAM,SAAS,IAAI,0BAA0B,EAAE;YAClD,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC;SAC9C;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAZD,kFAYC;AAED,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAEvD,QAAA,iCAAiC,GAAG,CAC/C,QAA6B,EAC7B,EAAE;IACF,MAAM,gBAAgB,GAAmB,EAAE,CAAC;IAE5C,KAAK,MAAM,iBAAiB,IAAI,QAAQ,EAAE;QACxC,KAAK,MAAM,SAAS,IAAI,wBAAwB,EAAE;YAChD,gBAAgB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC;SACxD;KACF;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAEzD,QAAA,sBAAsB,GAAG,CAAC,EACrC,MAAM,EACN,WAAW,GAIZ,EAAkB,EAAE;IACnB,MAAM,gBAAgB,GAAmB,EAAE,CAAC;IAG5C,gBAAgB,CAAC,IAAI,CAAC,GAAG,wBAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,KAAK,MAAM,SAAS,IAAI,yBAAyB,EAAE;QACjD,gBAAgB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;KAC9D;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}

View file

@ -0,0 +1,4 @@
import 'apollo-server-env';
import { PostCompositionValidator } from '.';
export declare const executableDirectivesIdentical: PostCompositionValidator;
//# sourceMappingURL=executableDirectivesIdentical.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"executableDirectivesIdentical.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/executableDirectivesIdentical.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAS3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAQ7C,eAAO,MAAM,6BAA6B,EAAE,wBA0C3C,CAAC"}

View file

@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.executableDirectivesIdentical = void 0;
require("apollo-server-env");
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
exports.executableDirectivesIdentical = ({ schema, }) => {
const errors = [];
const customDirectives = schema
.getDirectives()
.filter(x => !utils_1.isFederationDirective(x) && !graphql_1.isSpecifiedDirective(x));
customDirectives.forEach(directive => {
const directiveFederationMetadata = utils_1.getFederationMetadata(directive);
if (!directiveFederationMetadata)
return;
const definitions = Object.entries(directiveFederationMetadata.directiveDefinitions);
const shouldError = definitions.some(([, definition], index) => {
if (index === 0)
return;
const [, previousDefinition] = definitions[index - 1];
return !utils_1.typeNodesAreEquivalent(definition, previousDefinition);
});
if (shouldError) {
errors.push(utils_1.errorWithCode('EXECUTABLE_DIRECTIVES_IDENTICAL', utils_1.logDirective(directive.name) +
`custom directives must be defined identically across all services. See below for a list of current implementations:\n${definitions
.map(([serviceName, definition]) => {
return `\t${serviceName}: ${graphql_1.print(definition)}`;
})
.join('\n')}`));
}
});
return errors;
};
//# sourceMappingURL=executableDirectivesIdentical.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"executableDirectivesIdentical.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/executableDirectivesIdentical.ts"],"names":[],"mappings":";;;AAAA,6BAA2B;AAC3B,qCAAoE;AACpE,uCAMqB;AASR,QAAA,6BAA6B,GAA6B,CAAC,EACtE,MAAM,GACP,EAAE,EAAE;IACH,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,gBAAgB,GAAG,MAAM;SAC5B,aAAa,EAAE;SACf,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,6BAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,8BAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtE,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QACnC,MAAM,2BAA2B,GAAG,6BAAqB,CAAC,SAAS,CAAC,CAAC;QAErE,IAAI,CAAC,2BAA2B;YAAE,OAAO;QAEzC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAChC,2BAA2B,CAAC,oBAAoB,CACjD,CAAC;QAIF,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE;YAE7D,IAAI,KAAK,KAAK,CAAC;gBAAE,OAAO;YACxB,MAAM,CAAC,EAAE,kBAAkB,CAAC,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACtD,OAAO,CAAC,8BAAsB,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;QAEH,IAAI,WAAW,EAAE;YACf,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,iCAAiC,EACjC,oBAAY,CAAC,SAAS,CAAC,IAAI,CAAC;gBAC1B,wHAAwH,WAAW;qBAChI,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,EAAE;oBACjC,OAAO,KAAK,WAAW,KAAK,eAAK,CAAC,UAAU,CAAC,EAAE,CAAC;gBAClD,CAAC,CAAC;qBACD,IAAI,CAAC,IAAI,CAAC,EAAE,CAClB,CACF,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}

View file

@ -0,0 +1,4 @@
import 'apollo-server-env';
import { PostCompositionValidator } from '.';
export declare const executableDirectivesInAllServices: PostCompositionValidator;
//# sourceMappingURL=executableDirectivesInAllServices.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"executableDirectivesInAllServices.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/executableDirectivesInAllServices.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAO7C,eAAO,MAAM,iCAAiC,EAAE,wBA4C/C,CAAC"}

View file

@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.executableDirectivesInAllServices = void 0;
require("apollo-server-env");
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
exports.executableDirectivesInAllServices = ({ schema, serviceList, }) => {
const errors = [];
const customExecutableDirectives = schema
.getDirectives()
.filter(x => !utils_1.isFederationDirective(x) && !graphql_1.isSpecifiedDirective(x));
customExecutableDirectives.forEach(directive => {
const directiveFederationMetadata = utils_1.getFederationMetadata(directive);
if (!directiveFederationMetadata)
return;
const allServiceNames = serviceList.map(({ name }) => name);
const serviceNamesWithDirective = Object.keys(directiveFederationMetadata.directiveDefinitions);
const serviceNamesWithoutDirective = allServiceNames.reduce((without, serviceName) => {
if (!serviceNamesWithDirective.includes(serviceName)) {
without.push(serviceName);
}
return without;
}, []);
if (serviceNamesWithoutDirective.length > 0) {
errors.push(utils_1.errorWithCode('EXECUTABLE_DIRECTIVES_IN_ALL_SERVICES', utils_1.logDirective(directive.name) +
`Custom directives must be implemented in every service. The following services do not implement the @${directive.name} directive: ${serviceNamesWithoutDirective.join(', ')}.`));
}
});
return errors;
};
//# sourceMappingURL=executableDirectivesInAllServices.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"executableDirectivesInAllServices.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/executableDirectivesInAllServices.ts"],"names":[],"mappings":";;;AAAA,6BAA2B;AAC3B,qCAA6D;AAC7D,uCAKqB;AAQR,QAAA,iCAAiC,GAA6B,CAAC,EAC1E,MAAM,EACN,WAAW,GACZ,EAAE,EAAE;IACH,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,0BAA0B,GAAG,MAAM;SACtC,aAAa,EAAE;SACf,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,6BAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,8BAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtE,0BAA0B,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QAC7C,MAAM,2BAA2B,GAAG,6BAAqB,CAAC,SAAS,CAAC,CAAC;QAErE,IAAI,CAAC,2BAA2B;YAAE,OAAO;QAEzC,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QAC5D,MAAM,yBAAyB,GAAG,MAAM,CAAC,IAAI,CAC3C,2BAA2B,CAAC,oBAAoB,CACjD,CAAC;QAEF,MAAM,4BAA4B,GAAG,eAAe,CAAC,MAAM,CACzD,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE;YACvB,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;gBACpD,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aAC3B;YACD,OAAO,OAAO,CAAC;QACjB,CAAC,EACD,EAAc,CACf,CAAC;QAEF,IAAI,4BAA4B,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3C,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,uCAAuC,EACvC,oBAAY,CAAC,SAAS,CAAC,IAAI,CAAC;gBAC1B,wGACE,SAAS,CAAC,IACZ,eAAe,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC5D,CACF,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}

View file

@ -0,0 +1,4 @@
import 'apollo-server-env';
import { PostCompositionValidator } from '.';
export declare const externalMissingOnBase: PostCompositionValidator;
//# sourceMappingURL=externalMissingOnBase.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"externalMissingOnBase.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/externalMissingOnBase.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAG3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAK7C,eAAO,MAAM,qBAAqB,EAAE,wBAqDnC,CAAC"}

View file

@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.externalMissingOnBase = void 0;
require("apollo-server-env");
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
exports.externalMissingOnBase = ({ schema }) => {
const errors = [];
const types = schema.getTypeMap();
for (const [typeName, namedType] of Object.entries(types)) {
if (!graphql_1.isObjectType(namedType))
continue;
const typeFederationMetadata = utils_1.getFederationMetadata(namedType);
if (typeFederationMetadata === null || typeFederationMetadata === void 0 ? void 0 : typeFederationMetadata.externals) {
for (const [serviceName, externalFieldsForService] of Object.entries(typeFederationMetadata.externals)) {
for (const { field: externalField } of externalFieldsForService) {
const externalFieldName = externalField.name.value;
const allFields = namedType.getFields();
const matchingBaseField = allFields[externalFieldName];
if (!matchingBaseField) {
errors.push(utils_1.errorWithCode('EXTERNAL_MISSING_ON_BASE', utils_1.logServiceAndType(serviceName, typeName, externalFieldName) +
`marked @external but ${externalFieldName} is not defined on the base service of ${typeName} (${typeFederationMetadata.serviceName})`));
continue;
}
const fieldFederationMetadata = utils_1.getFederationMetadata(matchingBaseField);
if (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.serviceName) {
errors.push(utils_1.errorWithCode('EXTERNAL_MISSING_ON_BASE', utils_1.logServiceAndType(serviceName, typeName, externalFieldName) +
`marked @external but ${externalFieldName} was defined in ${fieldFederationMetadata.serviceName}, not in the service that owns ${typeName} (${typeFederationMetadata.serviceName})`));
}
}
}
}
}
return errors;
};
//# sourceMappingURL=externalMissingOnBase.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"externalMissingOnBase.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/externalMissingOnBase.ts"],"names":[],"mappings":";;;AAAA,6BAA2B;AAC3B,qCAAqD;AACrD,uCAAsF;AAMzE,QAAA,qBAAqB,GAA6B,CAAC,EAAE,MAAM,EAAE,EAAE,EA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BAAiB,CAAC;4BACzD,wBAAwB,iBAAiB,mBAAmB,uBAAuB,CAAC,WAAW,kCAAkC,QAAQ,KAAK,sBAAsB,CAAC,WAAW,GAAG,CACtL,CACF,CAAC;qBACH;iBACF;aACF;SACF;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}

View file

@ -0,0 +1,3 @@
import { PostCompositionValidator } from '.';
export declare const externalTypeMismatch: PostCompositionValidator;
//# sourceMappingURL=externalTypeMismatch.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"externalTypeMismatch.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/externalTypeMismatch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAM7C,eAAO,MAAM,oBAAoB,EAAE,wBAwDlC,CAAC"}

View file

@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.externalTypeMismatch = void 0;
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
exports.externalTypeMismatch = ({ schema }) => {
const errors = [];
const types = schema.getTypeMap();
for (const [typeName, namedType] of Object.entries(types)) {
if (!graphql_1.isObjectType(namedType))
continue;
const typeFederationMetadata = utils_1.getFederationMetadata(namedType);
if (typeFederationMetadata === null || typeFederationMetadata === void 0 ? void 0 : typeFederationMetadata.externals) {
for (const [serviceName, externalFieldsForService] of Object.entries(typeFederationMetadata.externals)) {
for (const { field: externalField } of externalFieldsForService) {
const externalFieldName = externalField.name.value;
const allFields = namedType.getFields();
const matchingBaseField = allFields[externalFieldName];
const externalFieldType = graphql_1.typeFromAST(schema, externalField.type);
if (!externalFieldType) {
errors.push(utils_1.errorWithCode('EXTERNAL_TYPE_MISMATCH', utils_1.logServiceAndType(serviceName, typeName, externalFieldName) +
`the type of the @external field does not exist in the resulting composed schema`));
}
else if (matchingBaseField &&
!graphql_1.isEqualType(matchingBaseField.type, externalFieldType)) {
errors.push(utils_1.errorWithCode('EXTERNAL_TYPE_MISMATCH', utils_1.logServiceAndType(serviceName, typeName, externalFieldName) +
`Type \`${externalFieldType}\` does not match the type of the original field in ${typeFederationMetadata.serviceName} (\`${matchingBaseField.type}\`)`));
}
}
}
}
}
return errors;
};
//# sourceMappingURL=externalTypeMismatch.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"externalTypeMismatch.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/externalTypeMismatch.ts"],"names":[],"mappings":";;;AAAA,qCAA4F;AAC5F,uCAAsF;AAOzE,QAAA,oBAAoB,GAA6B,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IAC3E,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAEzD,IAAI,CAAC,sBAAY,CAAC,SAAS,CAAC;YAAE,SAAS;QAIvC,MAAM,sBAAsB,GAAG,6BAAqB,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,SAAS,EAAE;YAErC,KAAK,MAAM,CAAC,WAAW,EAAE,wBAAwB,CAAC,IAAI,MAAM,CAAC,OAAO,CAClE,sBAAsB,CAAC,SAAS,CACjC,EAAE;gBAED,KAAK,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,wBAAwB,EAAE;oBAC/D,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;oBACnD,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;oBACxC,MAAM,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;oBAKvD,MAAM,iBAAiB,GAAG,qBAAW,CACnC,MAAM,EACN,aAAa,CAAC,IAAW,CACX,CAAC;oBAEjB,IAAI,CAAC,iBAAiB,EAAE;wBACtB,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,wBAAwB,EACxB,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,iBAAiB,CAAC;4BACzD,iFAAiF,CACpF,CACF,CAAC;qBACH;yBAAM,IACL,iBAAiB;wBACjB,CAAC,qBAAW,CAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,EACvD;wBACA,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,wBAAwB,EACxB,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,iBAAiB,CAAC;4BACzD,UAAU,iBAAiB,uDAAuD,sBAAsB,CAAC,WAAW,OAAO,iBAAiB,CAAC,IAAI,KAAK,CACzJ,CACF,CAAC;qBACH;iBACF;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}

View file

@ -0,0 +1,3 @@
import { PostCompositionValidator } from '.';
export declare const externalUnused: PostCompositionValidator;
//# sourceMappingURL=externalUnused.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"externalUnused.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/externalUnused.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAM7C,eAAO,MAAM,cAAc,EAAE,wBA0N5B,CAAC"}

View file

@ -0,0 +1,94 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.externalUnused = void 0;
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
exports.externalUnused = ({ schema }) => {
const errors = [];
const types = schema.getTypeMap();
for (const [parentTypeName, parentType] of Object.entries(types)) {
if (!graphql_1.isObjectType(parentType))
continue;
const typeFederationMetadata = utils_1.getFederationMetadata(parentType);
if (typeFederationMetadata) {
const { serviceName, keys } = typeFederationMetadata;
if (serviceName && keys && !keys[serviceName])
continue;
}
if (typeFederationMetadata === null || typeFederationMetadata === void 0 ? void 0 : typeFederationMetadata.externals) {
for (const [serviceName, externalFieldsForService] of Object.entries(typeFederationMetadata.externals)) {
for (const { field: externalField } of externalFieldsForService) {
const externalFieldName = externalField.name.value;
const hasMatchingKeyOnType = Boolean(utils_1.hasMatchingFieldInDirectives({
directives: utils_1.findDirectivesOnTypeOrField(parentType.astNode, 'key'),
fieldNameToMatch: externalFieldName,
namedType: parentType,
}));
if (hasMatchingKeyOnType)
continue;
const hasMatchingProvidesOnAnotherType = utils_1.findFieldsThatReturnType({
schema,
typeToFind: parentType,
}).some(field => utils_1.findDirectivesOnTypeOrField(field.astNode, 'provides').some(directive => {
if (!directive.arguments)
return false;
const selections = utils_1.isStringValueNode(directive.arguments[0].value) &&
utils_1.parseSelections(directive.arguments[0].value.value);
return (selections &&
selections.some(selection => selection.kind === graphql_1.Kind.FIELD &&
selection.name.value === externalFieldName));
}));
if (hasMatchingProvidesOnAnotherType)
continue;
const hasMatchingRequiresOnAnotherType = Object.values(schema.getTypeMap()).some(namedType => {
if (!graphql_1.isObjectType(namedType))
return false;
return Object.values(namedType.getFields()).some(field => utils_1.findDirectivesOnTypeOrField(field.astNode, 'requires').some(directive => {
if (!directive.arguments)
return false;
const selections = utils_1.isStringValueNode(directive.arguments[0].value) &&
utils_1.parseSelections(directive.arguments[0].value.value);
if (!selections)
return false;
return utils_1.selectionIncludesField({
selections,
selectionSetType: namedType,
typeToFind: parentType,
fieldToFind: externalFieldName,
});
}));
});
if (hasMatchingRequiresOnAnotherType)
continue;
const hasMatchingRequiresOnType = Object.values(parentType.getFields()).some(maybeRequiresField => {
var _a;
const fieldOwner = (_a = utils_1.getFederationMetadata(maybeRequiresField)) === null || _a === void 0 ? void 0 : _a.serviceName;
if (fieldOwner !== serviceName)
return false;
const requiresDirectives = utils_1.findDirectivesOnTypeOrField(maybeRequiresField.astNode, 'requires');
return utils_1.hasMatchingFieldInDirectives({
directives: requiresDirectives,
fieldNameToMatch: externalFieldName,
namedType: parentType,
});
});
if (hasMatchingRequiresOnType)
continue;
const fieldsOnInterfacesImplementedByParentType = new Set();
for (const _interface of parentType.getInterfaces()) {
for (const fieldName in _interface.getFields()) {
fieldsOnInterfacesImplementedByParentType.add(fieldName);
}
}
if (fieldsOnInterfacesImplementedByParentType.has(externalFieldName)) {
continue;
}
errors.push(utils_1.errorWithCode('EXTERNAL_UNUSED', utils_1.logServiceAndType(serviceName, parentTypeName, externalFieldName) +
`is marked as @external but is not used by a @requires, @key, or @provides directive.`));
}
}
}
}
return errors;
};
//# sourceMappingURL=externalUnused.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"externalUnused.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/externalUnused.ts"],"names":[],"mappings":";;;AAAA,qCAA2D;AAC3D,uCAUqB;AAOR,QAAA,cAAc,GAA6B,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IACrE,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,cAAc,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAEhE,IAAI,CAAC,sBAAY,CAAC,UAAU,CAAC;YAAE,SAAS;QAGxC,MAAM,sBAAsB,GAAG,6BAAqB,CAAC,UAAU,CAAC,CAAC;QAIjE,IAAI,sBAAsB,EAAE;YAC1B,MAAM,EAAC,WAAW,EAAE,IAAI,EAAC,GAAG,sBAAsB,CAAC;YACnD,IAAI,WAAW,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;gBAAE,SAAS;SACzD;QAED,IAAI,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,SAAS,EAAE;YAErC,KAAK,MAAM,CAAC,WAAW,EAAE,wBAAwB,CAAC,IAAI,MAAM,CAAC,OAAO,CAClE,sBAAsB,CAAC,SAAS,CACjC,EAAE;gBAED,KAAK,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,wBAAwB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,yBAAyB;wBAAE,SAAS;oBAoCxC,MAAM,yCAAyC,GAAgB,IAAI,GAAG,EAAE,CAAC;oBAGzE,KAAK,MAAM,UAAU,IAAI,UAAU,CAAC,aAAa,EAAE,EAAE;wBAEnD,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,SAAS,EAAE,EAAE;4BAC9C,yCAAyC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;yBAC1D;qBACF;oBAGD,IAAI,yCAAyC,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;wBACpE,SAAS;qBACV;oBAED,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,iBAAiB,EACjB,yBAAiB,CACf,WAAW,EACX,cAAc,EACd,iBAAiB,CAClB;wBACC,sFAAsF,CACzF,CACF,CAAC;iBACH;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}

View file

@ -0,0 +1,20 @@
import { GraphQLSchema, GraphQLError } from 'graphql';
import { ServiceDefinition } from '../../types';
export { externalUnused } from './externalUnused';
export { externalMissingOnBase } from './externalMissingOnBase';
export { externalTypeMismatch } from './externalTypeMismatch';
export { requiresFieldsMissingExternal } from './requiresFieldsMissingExternal';
export { requiresFieldsMissingOnBase } from './requiresFieldsMissingOnBase';
export { keyFieldsMissingOnBase } from './keyFieldsMissingOnBase';
export { keyFieldsSelectInvalidType } from './keyFieldsSelectInvalidType';
export { providesFieldsMissingExternal } from './providesFieldsMissingExternal';
export { providesFieldsSelectInvalidType, } from './providesFieldsSelectInvalidType';
export { providesNotOnEntity } from './providesNotOnEntity';
export { executableDirectivesInAllServices, } from './executableDirectivesInAllServices';
export { executableDirectivesIdentical } from './executableDirectivesIdentical';
export { keysMatchBaseService } from './keysMatchBaseService';
export declare type PostCompositionValidator = ({ schema, serviceList, }: {
schema: GraphQLSchema;
serviceList: ServiceDefinition[];
}) => GraphQLError[];
//# sourceMappingURL=index.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EACL,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,iCAAiC,GAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,oBAAY,wBAAwB,GAAG,CAAC,EACtC,MAAM,EACN,WAAW,GACZ,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,iBAAiB,EAAE,CAAC;CAClC,KAAK,YAAY,EAAE,CAAC"}

View file

@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var externalUnused_1 = require("./externalUnused");
Object.defineProperty(exports, "externalUnused", { enumerable: true, get: function () { return externalUnused_1.externalUnused; } });
var externalMissingOnBase_1 = require("./externalMissingOnBase");
Object.defineProperty(exports, "externalMissingOnBase", { enumerable: true, get: function () { return externalMissingOnBase_1.externalMissingOnBase; } });
var externalTypeMismatch_1 = require("./externalTypeMismatch");
Object.defineProperty(exports, "externalTypeMismatch", { enumerable: true, get: function () { return externalTypeMismatch_1.externalTypeMismatch; } });
var requiresFieldsMissingExternal_1 = require("./requiresFieldsMissingExternal");
Object.defineProperty(exports, "requiresFieldsMissingExternal", { enumerable: true, get: function () { return requiresFieldsMissingExternal_1.requiresFieldsMissingExternal; } });
var requiresFieldsMissingOnBase_1 = require("./requiresFieldsMissingOnBase");
Object.defineProperty(exports, "requiresFieldsMissingOnBase", { enumerable: true, get: function () { return requiresFieldsMissingOnBase_1.requiresFieldsMissingOnBase; } });
var keyFieldsMissingOnBase_1 = require("./keyFieldsMissingOnBase");
Object.defineProperty(exports, "keyFieldsMissingOnBase", { enumerable: true, get: function () { return keyFieldsMissingOnBase_1.keyFieldsMissingOnBase; } });
var keyFieldsSelectInvalidType_1 = require("./keyFieldsSelectInvalidType");
Object.defineProperty(exports, "keyFieldsSelectInvalidType", { enumerable: true, get: function () { return keyFieldsSelectInvalidType_1.keyFieldsSelectInvalidType; } });
var providesFieldsMissingExternal_1 = require("./providesFieldsMissingExternal");
Object.defineProperty(exports, "providesFieldsMissingExternal", { enumerable: true, get: function () { return providesFieldsMissingExternal_1.providesFieldsMissingExternal; } });
var providesFieldsSelectInvalidType_1 = require("./providesFieldsSelectInvalidType");
Object.defineProperty(exports, "providesFieldsSelectInvalidType", { enumerable: true, get: function () { return providesFieldsSelectInvalidType_1.providesFieldsSelectInvalidType; } });
var providesNotOnEntity_1 = require("./providesNotOnEntity");
Object.defineProperty(exports, "providesNotOnEntity", { enumerable: true, get: function () { return providesNotOnEntity_1.providesNotOnEntity; } });
var executableDirectivesInAllServices_1 = require("./executableDirectivesInAllServices");
Object.defineProperty(exports, "executableDirectivesInAllServices", { enumerable: true, get: function () { return executableDirectivesInAllServices_1.executableDirectivesInAllServices; } });
var executableDirectivesIdentical_1 = require("./executableDirectivesIdentical");
Object.defineProperty(exports, "executableDirectivesIdentical", { enumerable: true, get: function () { return executableDirectivesIdentical_1.executableDirectivesIdentical; } });
var keysMatchBaseService_1 = require("./keysMatchBaseService");
Object.defineProperty(exports, "keysMatchBaseService", { enumerable: true, get: function () { return keysMatchBaseService_1.keysMatchBaseService; } });
//# sourceMappingURL=index.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/index.ts"],"names":[],"mappings":";;AAGA,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA;AACtC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA;AACtC,qFAE2C;AADzC,kJAAA,+BAA+B,OAAA;AAEjC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,yFAE6C;AAD3C,sJAAA,iCAAiC,OAAA;AAEnC,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA;AACtC,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA"}

View file

@ -0,0 +1,3 @@
import { PostCompositionValidator } from '.';
export declare const keyFieldsMissingOnBase: PostCompositionValidator;
//# sourceMappingURL=keyFieldsMissingOnBase.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"keyFieldsMissingOnBase.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/keyFieldsMissingOnBase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAK7C,eAAO,MAAM,sBAAsB,EAAE,wBA4CpC,CAAC"}

View file

@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.keyFieldsMissingOnBase = void 0;
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
exports.keyFieldsMissingOnBase = ({ schema, }) => {
const errors = [];
const types = schema.getTypeMap();
for (const [typeName, namedType] of Object.entries(types)) {
if (!graphql_1.isObjectType(namedType))
continue;
const typeFederationMetadata = utils_1.getFederationMetadata(namedType);
if (typeFederationMetadata === null || typeFederationMetadata === void 0 ? void 0 : typeFederationMetadata.keys) {
const allFieldsInType = namedType.getFields();
for (const [serviceName, selectionSets] of Object.entries(typeFederationMetadata.keys)) {
for (const selectionSet of selectionSets) {
for (const field of selectionSet) {
const name = field.name.value;
const matchingField = allFieldsInType[name];
if (matchingField) {
const fieldFederationMetadata = utils_1.getFederationMetadata(matchingField);
if (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.serviceName) {
errors.push(utils_1.errorWithCode('KEY_FIELDS_MISSING_ON_BASE', utils_1.logServiceAndType(serviceName, typeName) +
`A @key selects ${name}, but ${typeName}.${name} was either created or overwritten by ${fieldFederationMetadata.serviceName}, not ${serviceName}`));
}
}
}
}
}
}
}
return errors;
};
//# sourceMappingURL=keyFieldsMissingOnBase.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"keyFieldsMissingOnBase.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/keyFieldsMissingOnBase.ts"],"names":[],"mappings":";;;AAAA,qCAAgE;AAChE,uCAAsF;AAMzE,QAAA,sBAAsB,GAA6B,CAAC,EAC/D,MAAM,GACP,EAAE,EAAE;IACH,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzD,IAAI,CAAC,sBAAY,CAAC,SAAS,CAAC;YAAE,SAAS;QAEvC,MAAM,sBAAsB,GAAG,6BAAqB,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,IAAI,EAAE;YAChC,MAAM,eAAe,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;YAC9C,KAAK,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,IAAI,MAAM,CAAC,OAAO,CACvD,sBAAsB,CAAC,IAAI,CAC5B,EAAE;gBACD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;oBACxC,KAAK,MAAM,KAAK,IAAI,YAA2B,EAAE;wBAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;wBAG9B,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;wBAI5C,IAAI,aAAa,EAAE;4BACjB,MAAM,uBAAuB,GAAG,6BAAqB,CAAC,aAAa,CAAC,CAAC;4BAErE,IAAI,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,EAAE;gCACxC,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,4BAA4B,EAC5B,yBAAiB,CAAC,WAAW,EAAE,QAAQ,CAAC;oCACtC,kBAAkB,IAAI,SAAS,QAAQ,IAAI,IAAI,yCAAyC,uBAAuB,CAAC,WAAW,SAAS,WAAW,EAAE,CACpJ,CACF,CAAC;6BACH;yBACF;qBACF;iBACF;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}

View file

@ -0,0 +1,3 @@
import { PostCompositionValidator } from '.';
export declare const keyFieldsSelectInvalidType: PostCompositionValidator;
//# sourceMappingURL=keyFieldsSelectInvalidType.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"keyFieldsSelectInvalidType.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/keyFieldsSelectInvalidType.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAO7C,eAAO,MAAM,0BAA0B,EAAE,wBAmExC,CAAC"}

View file

@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.keyFieldsSelectInvalidType = void 0;
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
exports.keyFieldsSelectInvalidType = ({ schema, }) => {
const errors = [];
const types = schema.getTypeMap();
for (const [typeName, namedType] of Object.entries(types)) {
if (!graphql_1.isObjectType(namedType))
continue;
const typeFederationMetadata = utils_1.getFederationMetadata(namedType);
if (typeFederationMetadata === null || typeFederationMetadata === void 0 ? void 0 : typeFederationMetadata.keys) {
const allFieldsInType = namedType.getFields();
for (const [serviceName, selectionSets] of Object.entries(typeFederationMetadata.keys)) {
for (const selectionSet of selectionSets) {
for (const field of selectionSet) {
const name = field.name.value;
const matchingField = allFieldsInType[name];
if (!matchingField) {
errors.push(utils_1.errorWithCode('KEY_FIELDS_SELECT_INVALID_TYPE', utils_1.logServiceAndType(serviceName, typeName) +
`A @key selects ${name}, but ${typeName}.${name} could not be found`));
}
if (matchingField) {
if (graphql_1.isInterfaceType(matchingField.type) ||
(graphql_1.isNonNullType(matchingField.type) &&
graphql_1.isInterfaceType(graphql_1.getNullableType(matchingField.type)))) {
errors.push(utils_1.errorWithCode('KEY_FIELDS_SELECT_INVALID_TYPE', utils_1.logServiceAndType(serviceName, typeName) +
`A @key selects ${typeName}.${name}, which is an interface type. Keys cannot select interfaces.`));
}
if (graphql_1.isUnionType(matchingField.type) ||
(graphql_1.isNonNullType(matchingField.type) &&
graphql_1.isUnionType(graphql_1.getNullableType(matchingField.type)))) {
errors.push(utils_1.errorWithCode('KEY_FIELDS_SELECT_INVALID_TYPE', utils_1.logServiceAndType(serviceName, typeName) +
`A @key selects ${typeName}.${name}, which is a union type. Keys cannot select union types.`));
}
}
}
}
}
}
}
return errors;
};
//# sourceMappingURL=keyFieldsSelectInvalidType.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"keyFieldsSelectInvalidType.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/keyFieldsSelectInvalidType.ts"],"names":[],"mappings":";;;AAAA,qCAQiB;AACjB,uCAAsF;AAQzE,QAAA,0BAA0B,GAA6B,CAAC,EACnE,MAAM,GACP,EAAE,EAAE;IACH,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzD,IAAI,CAAC,sBAAY,CAAC,SAAS,CAAC;YAAE,SAAS;QAEvC,MAAM,sBAAsB,GAAG,6BAAqB,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,IAAI,EAAE;YAChC,MAAM,eAAe,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;YAC9C,KAAK,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,IAAI,MAAM,CAAC,OAAO,CACvD,sBAAsB,CAAC,IAAI,CAC5B,EAAE;gBACD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;oBACxC,KAAK,MAAM,KAAK,IAAI,YAA2B,EAAE;wBAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;wBAG9B,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;wBAC5C,IAAI,CAAC,aAAa,EAAE;4BAClB,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,gCAAgC,EAChC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,CAAC;gCACtC,kBAAkB,IAAI,SAAS,QAAQ,IAAI,IAAI,qBAAqB,CACvE,CACF,CAAC;yBACH;wBAED,IAAI,aAAa,EAAE;4BACjB,IACE,yBAAe,CAAC,aAAa,CAAC,IAAI,CAAC;gCACnC,CAAC,uBAAa,CAAC,aAAa,CAAC,IAAI,CAAC;oCAChC,yBAAe,CAAC,yBAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EACvD;gCACA,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,gCAAgC,EAChC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,CAAC;oCACtC,kBAAkB,QAAQ,IAAI,IAAI,8DAA8D,CACnG,CACF,CAAC;6BACH;4BAED,IACE,qBAAW,CAAC,aAAa,CAAC,IAAI,CAAC;gCAC/B,CAAC,uBAAa,CAAC,aAAa,CAAC,IAAI,CAAC;oCAChC,qBAAW,CAAC,yBAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EACnD;gCACA,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,gCAAgC,EAChC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,CAAC;oCACtC,kBAAkB,QAAQ,IAAI,IAAI,0DAA0D,CAC/F,CACF,CAAC;6BACH;yBACF;qBACF;iBACF;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}

View file

@ -0,0 +1,3 @@
import { PostCompositionValidator } from '.';
export declare const keysMatchBaseService: PostCompositionValidator;
//# sourceMappingURL=keysMatchBaseService.d.ts.map

View file

@ -0,0 +1 @@
{"version":3,"file":"keysMatchBaseService.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/keysMatchBaseService.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAQ7C,eAAO,MAAM,oBAAoB,EAAE,wBAmElC,CAAC"}

View file

@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.keysMatchBaseService = void 0;
const graphql_1 = require("graphql");
const utils_1 = require("../../utils");
const service_1 = require("../../../service");
exports.keysMatchBaseService = function ({ schema, }) {
const errors = [];
const types = schema.getTypeMap();
for (const [parentTypeName, parentType] of Object.entries(types)) {
if (!graphql_1.isObjectType(parentType))
continue;
const typeFederationMetadata = utils_1.getFederationMetadata(parentType);
if (typeFederationMetadata) {
const { serviceName, keys } = typeFederationMetadata;
if (serviceName && keys) {
if (!keys[serviceName]) {
errors.push(utils_1.errorWithCode('KEY_MISSING_ON_BASE', utils_1.logServiceAndType(serviceName, parentTypeName) +
`appears to be an entity but no @key directives are specified on the originating type.`));
continue;
}
const availableKeys = keys[serviceName].map(printFieldSet);
Object.entries(keys)
.filter(([service]) => service !== serviceName)
.forEach(([extendingService, keyFields]) => {
if (keyFields.length > 1) {
errors.push(utils_1.errorWithCode('MULTIPLE_KEYS_ON_EXTENSION', utils_1.logServiceAndType(extendingService, parentTypeName) +
`is extended from service ${serviceName} but specifies multiple @key directives. Extensions may only specify one @key.`));
return;
}
const extensionKey = printFieldSet(keyFields[0]);
if (!availableKeys.includes(extensionKey)) {
errors.push(utils_1.errorWithCode('KEY_NOT_SPECIFIED', utils_1.logServiceAndType(extendingService, parentTypeName) +
`extends from ${serviceName} but specifies an invalid @key directive. Valid @key directives are specified by the originating type. Available @key directives for this type are:\n` +
`\t${availableKeys
.map((fieldSet) => `@key(fields: "${fieldSet}")`)
.join('\n\t')}`));
return;
}
});
}
}
}
return errors;
};
function printFieldSet(selections) {
return selections.map(service_1.printWithReducedWhitespace).join(' ');
}
//# sourceMappingURL=keysMatchBaseService.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"keysMatchBaseService.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/keysMatchBaseService.ts"],"names":[],"mappings":";;;AAAA,qCAAoE;AACpE,uCAIqB;AAErB,8CAA8D;AAOjD,QAAA,oBAAoB,GAA6B,UAAU,EACtE,MAAM,GACP;IACC,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,cAAc,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,C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AAa;iCACf,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,iBAAiB,QAAQ,IAAI,CAAC;iCAChD,IAAI,CAAC,MAAM,CAAC,EAAE,CACpB,CACF,CAAC;wBACF,OAAO;qBACR;gBACH,CAAC,CAAC,CAAC;aACN;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,SAAS,aAAa,CAAC,UAAoC;IACzD,OAAO,UAAU,CAAC,GAAG,CAAC,oCAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9D,CAAC"}

View file

@ -0,0 +1,3 @@
import { PostCompositionValidator } from '.';
export declare const providesFieldsMissingExternal: PostCompositionValidator;
//# sourceMappingURL=providesFieldsMissingExternal.d.ts.map

Some files were not shown because too many files have changed in this diff Show more