diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0dae17f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,360 @@
+# Created by .ignore support plugin (hsz.mobi)
+### Python template
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+cover/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+.pybuilder/
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+# For a library or package, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# .python-version
+
+# pipenv
+# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+# However, in case of collaboration, if having platform-specific dependencies or dependencies
+# having no cross-platform support, pipenv may install dependencies that don't work, or not
+# install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
+# pytype static type analyzer
+.pytype/
+
+# Cython debug symbols
+cython_debug/
+
+### macOS template
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/artifacts
+# .idea/compiler.xml
+# .idea/jarRepositories.xml
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### Node template
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+lerna-debug.log*
+
+# Diagnostic reports (https://nodejs.org/api/report.html)
+report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+*.lcov
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+
+# Snowpack dependency directory (https://snowpack.dev/)
+web_modules/
+
+# TypeScript cache
+*.tsbuildinfo
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Microbundle cache
+.rpt2_cache/
+.rts2_cache_cjs/
+.rts2_cache_es/
+.rts2_cache_umd/
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+.env.test
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+.parcel-cache
+
+# Next.js build output
+.next
+out
+
+# Nuxt.js build / generate output
+.nuxt
+dist
+
+# Gatsby files
+.cache/
+# Comment in the public line in if your project uses Gatsby and not Next.js
+# https://nextjs.org/blog/next-9-1#public-directory-support
+# public
+
+# vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
+
+# TernJS port file
+.tern-port
+
+# Stores VSCode versions used for testing VSCode extensions
+.vscode-test
+
+# yarn v2
+.yarn/cache
+.yarn/unplugged
+.yarn/build-state.yml
+.yarn/install-state.gz
+.pnp.*
+
diff --git a/.idea/dictionaries b/.idea/dictionaries
deleted file mode 100644
index 5261c27..0000000
--- a/.idea/dictionaries
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/apollo-pbjs b/gateway/node_modules/.bin/apollo-pbjs
deleted file mode 120000
index 8edaa96..0000000
--- a/gateway/node_modules/.bin/apollo-pbjs
+++ /dev/null
@@ -1 +0,0 @@
-../@apollo/protobufjs/bin/pbjs
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/apollo-pbts b/gateway/node_modules/.bin/apollo-pbts
deleted file mode 120000
index 4b508ee..0000000
--- a/gateway/node_modules/.bin/apollo-pbts
+++ /dev/null
@@ -1 +0,0 @@
-../@apollo/protobufjs/bin/pbts
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/is-ci b/gateway/node_modules/.bin/is-ci
deleted file mode 120000
index fe6aca6..0000000
--- a/gateway/node_modules/.bin/is-ci
+++ /dev/null
@@ -1 +0,0 @@
-../is-ci/bin.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/mime b/gateway/node_modules/.bin/mime
deleted file mode 120000
index fbb7ee0..0000000
--- a/gateway/node_modules/.bin/mime
+++ /dev/null
@@ -1 +0,0 @@
-../mime/cli.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/mkdirp b/gateway/node_modules/.bin/mkdirp
deleted file mode 120000
index 017896c..0000000
--- a/gateway/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1 +0,0 @@
-../mkdirp/bin/cmd.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/nodemon b/gateway/node_modules/.bin/nodemon
deleted file mode 120000
index 1056ddc..0000000
--- a/gateway/node_modules/.bin/nodemon
+++ /dev/null
@@ -1 +0,0 @@
-../nodemon/bin/nodemon.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/nodetouch b/gateway/node_modules/.bin/nodetouch
deleted file mode 120000
index 3409fdb..0000000
--- a/gateway/node_modules/.bin/nodetouch
+++ /dev/null
@@ -1 +0,0 @@
-../touch/bin/nodetouch.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/nopt b/gateway/node_modules/.bin/nopt
deleted file mode 120000
index 6b6566e..0000000
--- a/gateway/node_modules/.bin/nopt
+++ /dev/null
@@ -1 +0,0 @@
-../nopt/bin/nopt.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/rc b/gateway/node_modules/.bin/rc
deleted file mode 120000
index 48b3cda..0000000
--- a/gateway/node_modules/.bin/rc
+++ /dev/null
@@ -1 +0,0 @@
-../rc/cli.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/rimraf b/gateway/node_modules/.bin/rimraf
deleted file mode 120000
index 4cd49a4..0000000
--- a/gateway/node_modules/.bin/rimraf
+++ /dev/null
@@ -1 +0,0 @@
-../rimraf/bin.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/semver b/gateway/node_modules/.bin/semver
deleted file mode 120000
index 933e12d..0000000
--- a/gateway/node_modules/.bin/semver
+++ /dev/null
@@ -1 +0,0 @@
-../nodemon/node_modules/semver/bin/semver
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/sha.js b/gateway/node_modules/.bin/sha.js
deleted file mode 120000
index 3c76105..0000000
--- a/gateway/node_modules/.bin/sha.js
+++ /dev/null
@@ -1 +0,0 @@
-../sha.js/bin.js
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/uuid b/gateway/node_modules/.bin/uuid
deleted file mode 120000
index 208502a..0000000
--- a/gateway/node_modules/.bin/uuid
+++ /dev/null
@@ -1 +0,0 @@
-../apollo-server-core/node_modules/uuid/dist/bin/uuid
\ No newline at end of file
diff --git a/gateway/node_modules/.bin/xss b/gateway/node_modules/.bin/xss
deleted file mode 120000
index e9e309f..0000000
--- a/gateway/node_modules/.bin/xss
+++ /dev/null
@@ -1 +0,0 @@
-../xss/bin/xss
\ No newline at end of file
diff --git a/gateway/node_modules/.yarn-integrity b/gateway/node_modules/.yarn-integrity
deleted file mode 100644
index 34d225c..0000000
--- a/gateway/node_modules/.yarn-integrity
+++ /dev/null
@@ -1,430 +0,0 @@
-{
- "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"
- ]
- }
-}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/CHANGELOG.md b/gateway/node_modules/@apollo/federation/CHANGELOG.md
deleted file mode 100644
index 2afd669..0000000
--- a/gateway/node_modules/@apollo/federation/CHANGELOG.md
+++ /dev/null
@@ -1,191 +0,0 @@
-# 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)
diff --git a/gateway/node_modules/@apollo/federation/LICENSE.md b/gateway/node_modules/@apollo/federation/LICENSE.md
deleted file mode 100644
index c177b43..0000000
--- a/gateway/node_modules/@apollo/federation/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-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.
diff --git a/gateway/node_modules/@apollo/federation/README.md b/gateway/node_modules/@apollo/federation/README.md
deleted file mode 100644
index 7980e3b..0000000
--- a/gateway/node_modules/@apollo/federation/README.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# `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 }])
-});
-```
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/compose.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/compose.d.ts
deleted file mode 100644
index 990b551..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/compose.d.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-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;
-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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/compose.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/compose.d.ts.map
deleted file mode 100644
index dc1e585..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/compose.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/compose.js b/gateway/node_modules/@apollo/federation/dist/composition/compose.js
deleted file mode 100644
index f01f697..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/compose.js
+++ /dev/null
@@ -1,273 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/compose.js.map b/gateway/node_modules/@apollo/federation/dist/composition/compose.js.map
deleted file mode 100644
index 6bbbf0e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/compose.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/composition/compose.ts"],"names":[],"mappings":";;;;;;AAAA,6BAA2B;AAC3B,qCAmBiB;AACjB,mDAAiD;AACjD,+DAAiD;AACjD,mCAaiB;AASjB,0DAA0D;AAC1D,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B,iBAAiB;QACjB,uBAAuB;KACxB,CAAC,CAAC;IAIH,MAAM,GAAG,IAAI,uBAAa,+CACrB,MAAM,CAAC,QAAQ,EAAE,GACjB,iBAAS,CAAC,sCAA8B,EAAE,QAAQ,CAAC,EAAE,CACtD,QAAQ;QACN,CAAC,CAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAiC;QAC3D,CAAC,CAAC,SAAS,CACd,KACD,UAAU,EAAE;YACV,WAAW,EAAE,QAAQ;SACtB,IACD,CAAC;IAMH,MAAM,GAAG,gCAAe,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;QACtC,IAAI,sBAAY,CAAC,IAAI,CAAC,EAAE;YACtB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC/B,OAAO,IAAI,2BAAiB,iCACvB,MAAM,KACT,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAClD,CAAC;SACJ;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,kCAAkC,CAAC;QACjC,MAAM;QACN,gBAAgB;QAChB,cAAc;QACd,gBAAgB;QAChB,UAAU;QACV,uBAAuB;KACxB,CAAC,CAAC;IAOH,OAAO,EAAE,MAAM,EAAE,MAA+B,EAAE,MAAM,EAAE,CAAC;AAC7D,CAAC;AA7DD,0CA6DC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.d.ts
deleted file mode 100644
index f88a647..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.d.ts.map
deleted file mode 100644
index 5ed7f5e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.js b/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.js
deleted file mode 100644
index 0898c5a..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.js
+++ /dev/null
@@ -1,32 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.js.map b/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.js.map
deleted file mode 100644
index e2b02ba..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/composeAndValidate.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/index.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/index.d.ts
deleted file mode 100644
index 7cd7d16..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/index.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/index.d.ts.map
deleted file mode 100644
index 5ea9ade..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/index.js b/gateway/node_modules/@apollo/federation/dist/composition/index.js
deleted file mode 100644
index 740be8f..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/index.js.map b/gateway/node_modules/@apollo/federation/dist/composition/index.js.map
deleted file mode 100644
index 867ef0c..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/normalize.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/normalize.d.ts
deleted file mode 100644
index 65f88cd..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/normalize.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/normalize.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/normalize.d.ts.map
deleted file mode 100644
index f82791c..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/normalize.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/normalize.js b/gateway/node_modules/@apollo/federation/dist/composition/normalize.js
deleted file mode 100644
index 8afd9c7d..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/normalize.js
+++ /dev/null
@@ -1,145 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/normalize.js.map b/gateway/node_modules/@apollo/federation/dist/composition/normalize.js.map
deleted file mode 100644
index 262eb94..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/normalize.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../src/composition/normalize.ts"],"names":[],"mappings":";;;;;;AACA,qCASiB;AACjB,mCAKiB;AACjB,+DAAiD;AAEjD,SAAgB,iBAAiB,CAAC,QAAsB;IAItD,OAAO,qBAAqB,CAC1B,yBAAyB,CACvB,wCAAwC,CAAC,QAAQ,CAAC,CACnD,CACF,CAAC;AACJ,CAAC;AATD,8CASC;AAED,SAAgB,yBAAyB,CACvC,QAAsB;IAGtB,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAC7C,sCAA8B,CAC/B,CAAC;IAIF,IAAI,oBAAoB,GAEpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAExB,IAAI,8BAA8B,GAAG,KAAK,CAAC;IAC3C,eAAK,CAAC,QAAQ,EAAE;QACd,uBAAuB,CAAC,IAAI;YAG1B,8BAA8B,GAAG,IAAI,CAAC;YAEtC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;gBACxC,sCAA8B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC;KACF,CAA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ACH;QAGD,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC;QACxD,OAAO,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC,CAAC;IAEF,OAAO,eAAK,CAAC,QAAQ,EAAE;QAErB,mBAAmB,CAAC,IAAI;YACtB,MAAM,iBAAiB,GAAG,CAAC,GAAG,oBAAoB,EAAE,GAAG,6BAAmB,CAAC,CAAC,IAAI,CAC9E,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAClD,CAAC;YACF,OAAO,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACzC,CAAC;QAED,oBAAoB,CAAC,IAAI;YACvB,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,QAAQ,CACvD,IAAI,CAAC,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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/rules.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/rules.d.ts
deleted file mode 100644
index d5729bf..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/rules.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export declare const compositionRules: import("graphql/validation/ValidationContext").SDLValidationRule[];
-//# sourceMappingURL=rules.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/rules.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/rules.d.ts.map
deleted file mode 100644
index 6820054..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/rules.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/composition/rules.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,gBAAgB,oEAQzB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/rules.js b/gateway/node_modules/@apollo/federation/dist/composition/rules.js
deleted file mode 100644
index 02ee0f8..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/rules.js
+++ /dev/null
@@ -1,27 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/rules.js.map b/gateway/node_modules/@apollo/federation/dist/composition/rules.js.map
deleted file mode 100644
index 16d4b3b..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/rules.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/types.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/types.d.ts
deleted file mode 100644
index 1288f11..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/types.d.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { SelectionNode, DocumentNode, FieldDefinitionNode, DirectiveDefinitionNode } from 'graphql';
-export declare type Maybe = 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[];
-}
-export interface FederationType {
- serviceName?: ServiceName;
- keys?: ServiceNameToKeyDirectivesMap;
- externals?: {
- [serviceName: string]: ExternalFieldDefinition[];
- };
- isValueType?: boolean;
-}
-export interface FederationField {
- serviceName?: ServiceName;
- requires?: ReadonlyArray;
- provides?: ReadonlyArray;
- 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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/types.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/types.d.ts.map
deleted file mode 100644
index 6f7f253..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/types.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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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AAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,sBAAsB;QAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,qBAAqB;QAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,wBAAwB;QAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,uBAAuB;QAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,wBAAwB;QAChC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,uBAAuB;QAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B;IAED,UAAU,2BAA2B;QACnC,WAAW,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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/types.js b/gateway/node_modules/@apollo/federation/dist/composition/types.js
deleted file mode 100644
index 11e638d..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/types.js
+++ /dev/null
@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/types.js.map b/gateway/node_modules/@apollo/federation/dist/composition/types.js.map
deleted file mode 100644
index 71498ab..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/types.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/composition/types.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/utils.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/utils.d.ts
deleted file mode 100644
index 4edc0ec..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/utils.d.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-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(fields: ReadonlyArray, serviceName: string): any;
-export declare function findDirectivesOnTypeOrField(node: Maybe, 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 | undefined): GraphQLError;
-export declare function findTypesContainingFieldWithReturnType(schema: GraphQLSchema, node: GraphQLField): GraphQLObjectType[];
-export declare function findFieldsThatReturnType({ schema, typeToFind, }: {
- schema: GraphQLSchema;
- typeToFind: GraphQLNamedType;
-}): GraphQLField[];
-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(object: Record, callback: (value: T) => U): Record;
-export declare function isNotNullOrUndefined(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): FederationField | undefined;
-export declare function getFederationMetadata(obj: GraphQLDirective): FederationDirective | undefined;
-//# sourceMappingURL=utils.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/utils.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/utils.d.ts.map
deleted file mode 100644
index c7bfc07..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/utils.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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;AAED,wBAAgB,qCAAqC,CAAC,QAAQ,EAAE,YAAY,gBAe3E;AAsCD,wBAAgB,eAAe,CAAC,M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G,iBAAiB,GAAG,uBAAuB;;;;;;;;;;;;;EA2G7E;AAQD,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,uBAAuB,EAC3E,UAAU,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,uBAAuB,WAe7E;AAKD,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAOtD,CAAC;AAGF,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GACxB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAQnB;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAC1B,KAAK,IAAI,CAAC,CAEZ;AAED,eAAO,MAAM,4BAA4B,UASxC,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAE1E;AAED,eAAO,MAAM,kBAAkB,UAA4B,CAAC;AAG5D,eAAO,MAAM,8BAA8B,EAAE;KAC1C,IAAI,IAAI,iBAAiB,GAAG,4BAA4B;CAK1D,CAAC;AAIF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,cAAc,GAAG,SAAS,CAAC;AACzF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,eAAe,GAAG,SAAS,CAAC;AAChG,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,SAAS,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/utils.js b/gateway/node_modules/@apollo/federation/dist/composition/utils.js
deleted file mode 100644
index ad257ef..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/utils.js
+++ /dev/null
@@ -1,324 +0,0 @@
-"use strict";
-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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/utils.js.map b/gateway/node_modules/@apollo/federation/dist/composition/utils.js.map
deleted file mode 100644
index 75c675f..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/utils.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/composition/utils.ts"],"names":[],"mappings":";;;;;;AAAA,6BAA2B;AAC3B,qCAiCiB;AASjB,+DAAiD;AAEjD,SAAgB,iBAAiB,CAAC,IAAS;IACzC,OAAO,IAAI,CAAC,IAAI,KAAK,cAAI,CAAC,MAAM,CAAC;AACnC,CAAC;AAFD,8CAEC;AAGD,SAAgB,0BAA0B,CACxC,MAA2B,EAC3B,WAAmB;IAEnB,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1B,CAAC;AARD,gEAQC;A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;QAAE,OAAO,MAAA,GAAG,CAAC,UAAU,0CAAE,UAAwC,CAAC;SACtF,IAAI,qBAAW,CAAC,GAAG,CAAC;QAAE,OAAO,MAAA,GAAG,CAAC,UAAU,0CAAE,UAA6C,CAAC;;QAC3F,OAAO,MAAA,GAAG,CAAC,UAAU,0CAAE,UAAyC,CAAC;AACxE,CAAC;AALD,sDAKC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/index.d.ts
deleted file mode 100644
index ee645d7..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/index.d.ts.map
deleted file mode 100644
index c498772..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/index.js
deleted file mode 100644
index 2e759cc..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.js
+++ /dev/null
@@ -1,57 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/index.js.map
deleted file mode 100644
index 84c9554..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.d.ts
deleted file mode 100644
index 91740f1..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import 'apollo-server-env';
-import { PostCompositionValidator } from '.';
-export declare const executableDirectivesIdentical: PostCompositionValidator;
-//# sourceMappingURL=executableDirectivesIdentical.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.d.ts.map
deleted file mode 100644
index 12d0383..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.js
deleted file mode 100644
index 254e591..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.js
+++ /dev/null
@@ -1,34 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.js.map
deleted file mode 100644
index 32deac0..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesIdentical.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.d.ts
deleted file mode 100644
index 52adcc7..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import 'apollo-server-env';
-import { PostCompositionValidator } from '.';
-export declare const executableDirectivesInAllServices: PostCompositionValidator;
-//# sourceMappingURL=executableDirectivesInAllServices.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.d.ts.map
deleted file mode 100644
index 5702503..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.js
deleted file mode 100644
index 39e0be7..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.js
+++ /dev/null
@@ -1,31 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.js.map
deleted file mode 100644
index 7474a26..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/executableDirectivesInAllServices.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.d.ts
deleted file mode 100644
index 595bfde..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import 'apollo-server-env';
-import { PostCompositionValidator } from '.';
-export declare const externalMissingOnBase: PostCompositionValidator;
-//# sourceMappingURL=externalMissingOnBase.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.d.ts.map
deleted file mode 100644
index 431c105..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.js
deleted file mode 100644
index 32996ed..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.js
+++ /dev/null
@@ -1,36 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.js.map
deleted file mode 100644
index 558a370..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalMissingOnBase.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"externalMissingOnBase.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AAC;oBAEzE,IAAI,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,EAAE;wBACxC,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,0BAA0B,EAC1B,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,iBAAiB,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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.d.ts
deleted file mode 100644
index 6be5d2a..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const externalTypeMismatch: PostCompositionValidator;
-//# sourceMappingURL=externalTypeMismatch.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.d.ts.map
deleted file mode 100644
index 85dcb45..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.js
deleted file mode 100644
index df1c08e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.js
+++ /dev/null
@@ -1,35 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.js.map
deleted file mode 100644
index 0795c15..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalTypeMismatch.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.d.ts
deleted file mode 100644
index 580119f..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const externalUnused: PostCompositionValidator;
-//# sourceMappingURL=externalUnused.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.d.ts.map
deleted file mode 100644
index a6f5b3b..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.js
deleted file mode 100644
index 1638641..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.js
+++ /dev/null
@@ -1,94 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.js.map
deleted file mode 100644
index d36be10..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/externalUnused.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"externalUnused.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/external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,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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.d.ts
deleted file mode 100644
index 6107e99..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.d.ts.map
deleted file mode 100644
index ae453e7..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.js
deleted file mode 100644
index ca3d37e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.js
+++ /dev/null
@@ -1,29 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.js.map
deleted file mode 100644
index 6cb7cb5..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.d.ts
deleted file mode 100644
index 521add1..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const keyFieldsMissingOnBase: PostCompositionValidator;
-//# sourceMappingURL=keyFieldsMissingOnBase.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.d.ts.map
deleted file mode 100644
index 93eb7d0..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.js
deleted file mode 100644
index 3bf9b84..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.js
+++ /dev/null
@@ -1,34 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.js.map
deleted file mode 100644
index bd16997..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsMissingOnBase.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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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postComposition/keyFieldsSelectInvalidType.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.d.ts
deleted file mode 100644
index f780def..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const keyFieldsSelectInvalidType: PostCompositionValidator;
-//# sourceMappingURL=keyFieldsSelectInvalidType.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.d.ts.map
deleted file mode 100644
index 777fa17..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.js
deleted file mode 100644
index 7b5e2b2..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.js.map
deleted file mode 100644
index 42c1b7d..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keyFieldsSelectInvalidType.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.d.ts
deleted file mode 100644
index 58a8f05..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const keysMatchBaseService: PostCompositionValidator;
-//# sourceMappingURL=keysMatchBaseService.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.d.ts.map
deleted file mode 100644
index 01e6fd2..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.js
deleted file mode 100644
index 2bc5e49..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.js
+++ /dev/null
@@ -1,49 +0,0 @@
-"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
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.js.map
deleted file mode 100644
index f3f1329..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/keysMatchBaseService.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"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,CAAC,EAAE;QAEhE,IAAI,CAAC,sBAAY,CAAC,UAAU,CAAC;YAAE,SAAS;QAExC,MAAM,sBAAsB,GAAG,6BAAqB,CAAC,UAAU,CAAC,CAAC;QAEjE,IAAI,sBAAsB,EAAE;YAC1B,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,sBAAsB,CAAC;YAErD,IAAI,WAAW,IAAI,IAAI,EA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,CAAC,UAAoC;IACzD,OAAO,UAAU,CAAC,GAAG,CAAC,oCAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9D,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.d.ts
deleted file mode 100644
index cddde1b..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const providesFieldsMissingExternal: PostCompositionValidator;
-//# sourceMappingURL=providesFieldsMissingExternal.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.d.ts.map
deleted file mode 100644
index 2ab2a3e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"providesFieldsMissingExternal.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/providesFieldsMissingExternal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAK7C,eAAO,MAAM,6BAA6B,EAAE,wBAoD3C,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.js
deleted file mode 100644
index c544b5d..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.js
+++ /dev/null
@@ -1,39 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.providesFieldsMissingExternal = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.providesFieldsMissingExternal = ({ schema, }) => {
- var _a;
- const errors = [];
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!graphql_1.isObjectType(namedType))
- continue;
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = utils_1.getFederationMetadata(field);
- const serviceName = fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.serviceName;
- if (!serviceName)
- continue;
- const fieldType = field.type;
- if (!graphql_1.isObjectType(fieldType))
- continue;
- const fieldTypeFederationMetadata = utils_1.getFederationMetadata(fieldType);
- const externalFieldsOnTypeForService = (_a = fieldTypeFederationMetadata === null || fieldTypeFederationMetadata === void 0 ? void 0 : fieldTypeFederationMetadata.externals) === null || _a === void 0 ? void 0 : _a[serviceName];
- if (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.provides) {
- const selections = fieldFederationMetadata.provides;
- for (const selection of selections) {
- const foundMatchingExternal = externalFieldsOnTypeForService
- ? externalFieldsOnTypeForService.some(ext => ext.field.name.value === selection.name.value)
- : undefined;
- if (!foundMatchingExternal) {
- errors.push(utils_1.errorWithCode('PROVIDES_FIELDS_MISSING_EXTERNAL', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `provides the field \`${selection.name.value}\` and requires ${fieldType}.${selection.name.value} to be marked as @external.`));
- }
- }
- }
- }
- }
- return errors;
-};
-//# sourceMappingURL=providesFieldsMissingExternal.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.js.map
deleted file mode 100644
index 12dad45..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsMissingExternal.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"providesFieldsMissingExternal.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/providesFieldsMissingExternal.ts"],"names":[],"mappings":";;;AAAA,qCAAgE;AAChE,uCAAsF;AAMzE,QAAA,6BAA6B,GAA6B,CAAC,EACtE,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;QAEzD,IAAI,CAAC,sBAAY,CAAC,SAAS,CAAC;YAAE,SAAS;QAIvC,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,EAAE;YACtE,MAAM,uBAAuB,GAAG,6BAAqB,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,WAAW,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,CAAC;YAMzD,IAAI,CAAC,WAAW;gBAAE,SAAS;YAE3B,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;YAC7B,IAAI,CAAC,sBAAY,CAAC,SAAS,CAAC;gBAAE,SAAS;YAEvC,MAAM,2BAA2B,GAAG,6BAAqB,CAAC,SAAS,CAAC,CAAC;YAErE,MAAM,8BAA8B,SAAG,2BAA2B,aAA3B,2BAA2B,uBAA3B,2BAA2B,CAAE,SAAS,0CAAG,WAAW,CAAC,CAAC;YAE7F,IAAI,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,QAAQ,EAAE;gBACrC,MAAM,UAAU,GAAG,uBAAuB,CAAC,QAAuB,CAAC;gBACnE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;oBAClC,MAAM,qBAAqB,GAAG,8BAA8B;wBAC1D,CAAC,CAAC,8BAA8B,CAAC,IAAI,CACjC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,KAAK,CACrD;wBACH,CAAC,CAAC,SAAS,CAAC;oBACd,IAAI,CAAC,qBAAqB,EAAE;wBAC1B,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,kCAAkC,EAClC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;4BACjD,wBAAwB,SAAS,CAAC,IAAI,CAAC,KAAK,mBAAmB,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,6BAA6B,CAChI,CACF,CAAC;qBACH;iBACF;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.d.ts
deleted file mode 100644
index 672b675..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const providesFieldsSelectInvalidType: PostCompositionValidator;
-//# sourceMappingURL=providesFieldsSelectInvalidType.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.d.ts.map
deleted file mode 100644
index a6c8e01..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"providesFieldsSelectInvalidType.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/providesFieldsSelectInvalidType.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAO7C,eAAO,MAAM,+BAA+B,EAAE,wBAuF7C,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.js
deleted file mode 100644
index 430976c..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.js
+++ /dev/null
@@ -1,55 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.providesFieldsSelectInvalidType = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.providesFieldsSelectInvalidType = ({ schema, }) => {
- const errors = [];
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!graphql_1.isObjectType(namedType))
- continue;
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = utils_1.getFederationMetadata(field);
- const serviceName = fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.serviceName;
- if (!serviceName)
- continue;
- const fieldType = field.type;
- if (!graphql_1.isObjectType(fieldType))
- continue;
- const allFields = fieldType.getFields();
- if (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.provides) {
- const selections = fieldFederationMetadata.provides;
- for (const selection of selections) {
- const name = selection.name.value;
- const matchingField = allFields[name];
- if (!matchingField) {
- errors.push(utils_1.errorWithCode('PROVIDES_FIELDS_SELECT_INVALID_TYPE', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${name}, but ${fieldType.name}.${name} could not be found`));
- continue;
- }
- if (graphql_1.isListType(matchingField.type) ||
- (graphql_1.isNonNullType(matchingField.type) &&
- graphql_1.isListType(graphql_1.getNullableType(matchingField.type)))) {
- errors.push(utils_1.errorWithCode('PROVIDES_FIELDS_SELECT_INVALID_TYPE', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${fieldType.name}.${name}, which is a list type. A field cannot @provide lists.`));
- }
- if (graphql_1.isInterfaceType(matchingField.type) ||
- (graphql_1.isNonNullType(matchingField.type) &&
- graphql_1.isInterfaceType(graphql_1.getNullableType(matchingField.type)))) {
- errors.push(utils_1.errorWithCode('PROVIDES_FIELDS_SELECT_INVALID_TYPE', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${fieldType.name}.${name}, which is an interface type. A field cannot @provide 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('PROVIDES_FIELDS_SELECT_INVALID_TYPE', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${fieldType.name}.${name}, which is a union type. A field cannot @provide union types.`));
- }
- }
- }
- }
- }
- return errors;
-};
-//# sourceMappingURL=providesFieldsSelectInvalidType.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.js.map
deleted file mode 100644
index 4c4c6f6..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesFieldsSelectInvalidType.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"providesFieldsSelectInvalidType.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/providesFieldsSelectInvalidType.ts"],"names":[],"mappings":";;;AAAA,qCASiB;AACjB,uCAAsF;AAQzE,QAAA,+BAA+B,GAA6B,CAAC,EACxE,MAAM,GACP,EAAE,EAAE;IACH,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,KAAK,GAAG,MAAM,CAAC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aAAa,CAAC,IAAI,CAAC;4BAChC,oBAAU,CAAC,yBAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAClD;wBACA,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,qCAAqC,EACrC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;4BACjD,uBAAuB,SAAS,CAAC,IAAI,IAAI,IAAI,wDAAwD,CACxG,CACF,CAAC;qBACH;oBACD,IACE,yBAAe,CAAC,aAAa,CAAC,IAAI,CAAC;wBACnC,CAAC,uBAAa,CAAC,aAAa,CAAC,IAAI,CAAC;4BAChC,yBAAe,CAAC,yBAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EACvD;wBACA,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,qCAAqC,EACrC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;4BACjD,uBAAuB,SAAS,CAAC,IAAI,IAAI,IAAI,mEAAmE,CACnH,CACF,CAAC;qBACH;oBAED,IACE,qBAAW,CAAC,aAAa,CAAC,IAAI,CAAC;wBAC/B,CAAC,uBAAa,CAAC,aAAa,CAAC,IAAI,CAAC;4BAChC,qBAAW,CAAC,yBAAe,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EACnD;wBACA,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,qCAAqC,EACrC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;4BACjD,uBAAuB,SAAS,CAAC,IAAI,IAAI,IAAI,+DAA+D,CAC/G,CACF,CAAC;qBACH;iBACF;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.d.ts
deleted file mode 100644
index c99dc41..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const providesNotOnEntity: PostCompositionValidator;
-//# sourceMappingURL=providesNotOnEntity.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.d.ts.map
deleted file mode 100644
index c61a1b3..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"providesNotOnEntity.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/providesNotOnEntity.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAK7C,eAAO,MAAM,mBAAmB,EAAE,wBAgEjC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.js
deleted file mode 100644
index 55648fa..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.js
+++ /dev/null
@@ -1,42 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.providesNotOnEntity = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.providesNotOnEntity = ({ schema }) => {
- var _a;
- const errors = [];
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!graphql_1.isObjectType(namedType))
- continue;
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = utils_1.getFederationMetadata(field);
- const serviceName = fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.serviceName;
- if (!serviceName && (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.provides) &&
- !(fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.belongsToValueType))
- throw Error('Internal Consistency Error: field with provides information does not have service name.');
- if (!serviceName)
- continue;
- const getBaseType = (type) => graphql_1.isListType(type) || graphql_1.isNonNullType(type)
- ? getBaseType(type.ofType)
- : type;
- const baseType = getBaseType(field.type);
- if (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.provides) {
- if (!graphql_1.isObjectType(baseType)) {
- errors.push(utils_1.errorWithCode('PROVIDES_NOT_ON_ENTITY', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `uses the @provides directive but \`${typeName}.${fieldName}\` returns \`${field.type}\`, which is not an Object or List type. @provides can only be used on Object types with at least one @key, or Lists of such Objects.`));
- continue;
- }
- const fieldType = types[baseType.name];
- const selectedFieldIsEntity = (_a = utils_1.getFederationMetadata(fieldType)) === null || _a === void 0 ? void 0 : _a.keys;
- if (!selectedFieldIsEntity) {
- errors.push(utils_1.errorWithCode('PROVIDES_NOT_ON_ENTITY', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `uses the @provides directive but \`${typeName}.${fieldName}\` does not return a type that has a @key. Try adding a @key to the \`${baseType}\` type.`));
- }
- }
- }
- }
- return errors;
-};
-//# sourceMappingURL=providesNotOnEntity.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.js.map
deleted file mode 100644
index 96db199..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/providesNotOnEntity.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"providesNotOnEntity.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/providesNotOnEntity.ts"],"names":[],"mappings":";;;AAAA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AE;oBAC3B,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,wBAAwB,EACxB,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;wBACjD,sCAAsC,QAAQ,IAAI,SAAS,gBAAgB,KAAK,CAAC,IAAI,uIAAuI,CAC/N,CACF,CAAC;oBACF,SAAS;iBACV;gBAED,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACvC,MAAM,qBAAqB,SAAG,6BAAqB,CAAC,SAAS,CAAC,0CAAE,IAAI,CAAC;gBAErE,IAAI,CAAC,qBAAqB,EAAE;oBAC1B,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,wBAAwB,EACxB,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;wBACjD,sCAAsC,QAAQ,IAAI,SAAS,yEAAyE,QAAQ,UAAU,CACzJ,CACF,CAAC;iBACH;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.d.ts
deleted file mode 100644
index 604ba81..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const requiresFieldsMissingExternal: PostCompositionValidator;
-//# sourceMappingURL=requiresFieldsMissingExternal.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.d.ts.map
deleted file mode 100644
index 236cc89..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"requiresFieldsMissingExternal.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/requiresFieldsMissingExternal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAK7C,eAAO,MAAM,6BAA6B,EAAE,wBAiD3C,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.js
deleted file mode 100644
index 2198246..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.js
+++ /dev/null
@@ -1,36 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.requiresFieldsMissingExternal = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.requiresFieldsMissingExternal = ({ schema, }) => {
- var _a;
- const errors = [];
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!graphql_1.isObjectType(namedType))
- continue;
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = utils_1.getFederationMetadata(field);
- const serviceName = fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.serviceName;
- if (!serviceName)
- continue;
- if (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.requires) {
- const typeFederationMetadata = utils_1.getFederationMetadata(namedType);
- const externalFieldsOnTypeForService = (_a = typeFederationMetadata === null || typeFederationMetadata === void 0 ? void 0 : typeFederationMetadata.externals) === null || _a === void 0 ? void 0 : _a[serviceName];
- const selections = fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.requires;
- for (const selection of selections) {
- const foundMatchingExternal = externalFieldsOnTypeForService
- ? externalFieldsOnTypeForService.some(ext => ext.field.name.value === selection.name.value)
- : undefined;
- if (!foundMatchingExternal) {
- errors.push(utils_1.errorWithCode('REQUIRES_FIELDS_MISSING_EXTERNAL', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `requires the field \`${selection.name.value}\` to be marked as @external.`));
- }
- }
- }
- }
- }
- return errors;
-};
-//# sourceMappingURL=requiresFieldsMissingExternal.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.js.map
deleted file mode 100644
index 8b5830d..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingExternal.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"requiresFieldsMissingExternal.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/requiresFieldsMissingExternal.ts"],"names":[],"mappings":";;;AAAA,qCAAgE;AAChE,uCAAsF;AAMzE,QAAA,6BAA6B,GAA6B,CAAC,EACtE,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;QAEzD,IAAI,CAAC,sBAAY,CAAC,SAAS,CAAC;YAAE,SAAS;QAIvC,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,EAAE;YACtE,MAAM,uBAAuB,GAAG,6BAAqB,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,WAAW,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,CAAC;YAMzD,IAAI,CAAC,WAAW;gBAAE,SAAS;YAE3B,IAAI,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,QAAQ,EAAE;gBACrC,MAAM,sBAAsB,GAAG,6BAAqB,CAAC,SAAS,CAAC,CAAC;gBAChE,MAAM,8BAA8B,SAClC,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,SAAS,0CAAG,WAAW,CAAC,CAAC;gBAEnD,MAAM,UAAU,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,QAAuB,CAAC;gBACpE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;oBAClC,MAAM,qBAAqB,GAAG,8BAA8B;wBAC1D,CAAC,CAAC,8BAA8B,CAAC,IAAI,CACjC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,KAAK,CACrD;wBACH,CAAC,CAAC,SAAS,CAAC;oBACd,IAAI,CAAC,qBAAqB,EAAE;wBAC1B,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,kCAAkC,EAClC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;4BACjD,wBAAwB,SAAS,CAAC,IAAI,CAAC,KAAK,+BAA+B,CAC9E,CACF,CAAC;qBACH;iBACF;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.d.ts
deleted file mode 100644
index d3332d7..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { PostCompositionValidator } from '.';
-export declare const requiresFieldsMissingOnBase: PostCompositionValidator;
-//# sourceMappingURL=requiresFieldsMissingOnBase.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.d.ts.map
deleted file mode 100644
index c92db64..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"requiresFieldsMissingOnBase.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/requiresFieldsMissingOnBase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,GAAG,CAAC;AAK7C,eAAO,MAAM,2BAA2B,EAAE,wBA8CzC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.js
deleted file mode 100644
index df96a03..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.js
+++ /dev/null
@@ -1,32 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.requiresFieldsMissingOnBase = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.requiresFieldsMissingOnBase = ({ schema, }) => {
- const errors = [];
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!graphql_1.isObjectType(namedType))
- continue;
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = utils_1.getFederationMetadata(field);
- const serviceName = fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.serviceName;
- if (!serviceName)
- continue;
- if (fieldFederationMetadata === null || fieldFederationMetadata === void 0 ? void 0 : fieldFederationMetadata.requires) {
- const selections = fieldFederationMetadata.requires;
- for (const selection of selections) {
- const matchingFieldOnType = namedType.getFields()[selection.name.value];
- const typeFederationMetadata = utils_1.getFederationMetadata(matchingFieldOnType);
- if (typeFederationMetadata === null || typeFederationMetadata === void 0 ? void 0 : typeFederationMetadata.serviceName) {
- errors.push(utils_1.errorWithCode('REQUIRES_FIELDS_MISSING_ON_BASE', utils_1.logServiceAndType(serviceName, typeName, fieldName) +
- `requires the field \`${selection.name.value}\` to be @external. @external fields must exist on the base type, not an extension.`));
- }
- }
- }
- }
- }
- return errors;
-};
-//# sourceMappingURL=requiresFieldsMissingOnBase.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.js.map
deleted file mode 100644
index a89a673..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/postComposition/requiresFieldsMissingOnBase.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"requiresFieldsMissingOnBase.js","sourceRoot":"","sources":["../../../../src/composition/validate/postComposition/requiresFieldsMissingOnBase.ts"],"names":[],"mappings":";;;AAAA,qCAAgE;AAChE,uCAAsF;AAMzE,QAAA,2BAA2B,GAA6B,CAAC,EACpE,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;QAEzD,IAAI,CAAC,sBAAY,CAAC,SAAS,CAAC;YAAE,SAAS;QAIvC,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,EAAE;YACtE,MAAM,uBAAuB,GAAG,6BAAqB,CAAC,KAAK,CAAC,CAAC;YAC7D,MAAM,WAAW,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,CAAC;YAMzD,IAAI,CAAC,WAAW;gBAAE,SAAS;YAE3B,IAAI,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,QAAQ,EAAE;gBACrC,MAAM,UAAU,GAAG,uBAAuB,CAAC,QAAuB,CAAC;gBACnE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;oBAElC,MAAM,mBAAmB,GAAG,SAAS,CAAC,SAAS,EAAE,CAC/C,SAAS,CAAC,IAAI,CAAC,KAAK,CACrB,CAAC;oBACF,MAAM,sBAAsB,GAAG,6BAAqB,CAAC,mBAAmB,CAAC,CAAC;oBAE1E,IAAI,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,WAAW,EAAE;wBACvC,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,iCAAiC,EACjC,yBAAiB,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC;4BACjD,wBAAwB,SAAS,CAAC,IAAI,CAAC,KAAK,qFAAqF,CACpI,CACF,CAAC;qBACH;iBACF;aACF;SACF;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.d.ts
deleted file mode 100644
index 3da68c5..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-export declare const duplicateEnumOrScalar: ({ name: serviceName, typeDefs, }: ServiceDefinition) => GraphQLError[];
-//# sourceMappingURL=duplicateEnumOrScalar.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.d.ts.map
deleted file mode 100644
index f4675c3..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"duplicateEnumOrScalar.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/duplicateEnumOrScalar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD,eAAO,MAAM,qBAAqB,qCAG/B,iBAAiB,mBAyCnB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.js
deleted file mode 100644
index adbafeb..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.js
+++ /dev/null
@@ -1,34 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.duplicateEnumOrScalar = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.duplicateEnumOrScalar = ({ name: serviceName, typeDefs, }) => {
- const errors = [];
- const enums = [];
- const scalars = [];
- graphql_1.visit(typeDefs, {
- EnumTypeDefinition(definition) {
- const name = definition.name.value;
- if (enums.includes(name)) {
- errors.push(utils_1.errorWithCode('DUPLICATE_ENUM_DEFINITION', utils_1.logServiceAndType(serviceName, name) +
- `The enum, \`${name}\` was defined multiple times in this service. Remove one of the definitions for \`${name}\``));
- return definition;
- }
- enums.push(name);
- return definition;
- },
- ScalarTypeDefinition(definition) {
- const name = definition.name.value;
- if (scalars.includes(name)) {
- errors.push(utils_1.errorWithCode('DUPLICATE_SCALAR_DEFINITION', utils_1.logServiceAndType(serviceName, name) +
- `The scalar, \`${name}\` was defined multiple times in this service. Remove one of the definitions for \`${name}\``));
- return definition;
- }
- scalars.push(name);
- return definition;
- },
- });
- return errors;
-};
-//# sourceMappingURL=duplicateEnumOrScalar.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.js.map
deleted file mode 100644
index 2476bc2..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumOrScalar.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"duplicateEnumOrScalar.js","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/duplicateEnumOrScalar.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAG9C,uCAA+D;AAElD,QAAA,qBAAqB,GAAG,CAAC,EACpC,IAAI,EAAE,WAAW,EACjB,QAAQ,GACU,EAAE,EAAE;IACtB,MAAM,MAAM,GAAmB,EAAE,CAAC;IAGlC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,eAAK,CAAC,QAAQ,EAAE;QACd,kBAAkB,CAAC,UAAU;YAC3B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;YACnC,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACxB,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,2BAA2B,EAC3B,yBAAiB,CAAC,WAAW,EAAE,IAAI,CAAC;oBAClC,eAAe,IAAI,sFAAsF,IAAI,IAAI,CACpH,CACF,CAAC;gBACF,OAAO,UAAU,CAAC;aACnB;YACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,oBAAoB,CAAC,UAAU;YAC7B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;YACnC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC1B,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,6BAA6B,EAC7B,yBAAiB,CAAC,WAAW,EAAE,IAAI,CAAC;oBAClC,iBAAiB,IAAI,sFAAsF,IAAI,IAAI,CACtH,CACF,CAAC;gBACF,OAAO,UAAU,CAAC;aACnB;YACD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.d.ts
deleted file mode 100644
index 4badf07..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-export declare const duplicateEnumValue: ({ name: serviceName, typeDefs, }: ServiceDefinition) => GraphQLError[];
-//# sourceMappingURL=duplicateEnumValue.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.d.ts.map
deleted file mode 100644
index 559a34a..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"duplicateEnumValue.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/duplicateEnumValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD,eAAO,MAAM,kBAAkB,qCAG5B,iBAAiB,mBA+DnB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.js
deleted file mode 100644
index 51c9059..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.js
+++ /dev/null
@@ -1,53 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.duplicateEnumValue = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.duplicateEnumValue = ({ name: serviceName, typeDefs, }) => {
- const errors = [];
- const enums = {};
- graphql_1.visit(typeDefs, {
- EnumTypeDefinition(definition) {
- const name = definition.name.value;
- const enumValues = definition.values && definition.values.map(value => value.name.value);
- if (!enumValues)
- return definition;
- if (enums[name] && enums[name].length) {
- enumValues.map(valueName => {
- if (enums[name].includes(valueName)) {
- errors.push(utils_1.errorWithCode('DUPLICATE_ENUM_VALUE', utils_1.logServiceAndType(serviceName, name, valueName) +
- `The enum, \`${name}\` has multiple definitions of the \`${valueName}\` value.`));
- return;
- }
- enums[name].push(valueName);
- });
- }
- else {
- enums[name] = enumValues;
- }
- return definition;
- },
- EnumTypeExtension(definition) {
- const name = definition.name.value;
- const enumValues = definition.values && definition.values.map(value => value.name.value);
- if (!enumValues)
- return definition;
- if (enums[name] && enums[name].length) {
- enumValues.map(valueName => {
- if (enums[name].includes(valueName)) {
- errors.push(utils_1.errorWithCode('DUPLICATE_ENUM_VALUE', utils_1.logServiceAndType(serviceName, name, valueName) +
- `The enum, \`${name}\` has multiple definitions of the \`${valueName}\` value.`));
- return;
- }
- enums[name].push(valueName);
- });
- }
- else {
- enums[name] = enumValues;
- }
- return definition;
- },
- });
- return errors;
-};
-//# sourceMappingURL=duplicateEnumValue.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.js.map
deleted file mode 100644
index a927f52..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/duplicateEnumValue.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"duplicateEnumValue.js","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/duplicateEnumValue.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAG9C,uCAA+D;AAElD,QAAA,kBAAkB,GAAG,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,QAAQ,GACU,EAAE,EAAE;IACtB,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,MAAM,KAAK,GAAiC,EAAE,CAAC;IAE/C,eAAK,CAAC,QAAQ,EAAE;QACd,kBAAkB,CAAC,UAAU;YAC3B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;YACnC,MAAM,UAAU,GACd,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAExE,IAAI,CAAC,UAAU;gBAAE,OAAO,UAAU,CAAC;YAEnC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE;gBACrC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;oBACzB,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;wBACnC,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,sBAAsB,EACtB,yBAAiB,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC;4BAC7C,eAAe,IAAI,wCAAwC,SAAS,WAAW,CAClF,CACF,CAAC;wBACF,OAAO;qBACR;oBACD,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;aACJ;iBAAM;gBACL,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;aAC1B;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,iBAAiB,CAAC,UAAU;YAC1B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;YACnC,MAAM,UAAU,GACd,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAExE,IAAI,CAAC,UAAU;gBAAE,OAAO,UAAU,CAAC;YAEnC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE;gBACrC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;oBACzB,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;wBACnC,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,sBAAsB,EACtB,yBAAiB,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC;4BAC7C,eAAe,IAAI,wCAAwC,SAAS,WAAW,CAClF,CACF,CAAC;wBACF,OAAO;qBACR;oBACD,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;aACJ;iBAAM;gBACL,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;aAC1B;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.d.ts
deleted file mode 100644
index ea75041..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-export declare const externalUsedOnBase: ({ name: serviceName, typeDefs, }: ServiceDefinition) => GraphQLError[];
-//# sourceMappingURL=externalUsedOnBase.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.d.ts.map
deleted file mode 100644
index 4f57b37..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"externalUsedOnBase.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/externalUsedOnBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOhD,eAAO,MAAM,kBAAkB,qCAG5B,iBAAiB,mBA+BnB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.js
deleted file mode 100644
index ca733b6..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.js
+++ /dev/null
@@ -1,27 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.externalUsedOnBase = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.externalUsedOnBase = ({ name: serviceName, typeDefs, }) => {
- const errors = [];
- graphql_1.visit(typeDefs, {
- ObjectTypeDefinition(typeDefinition) {
- if (typeDefinition.fields) {
- for (const field of typeDefinition.fields) {
- if (field.directives) {
- for (const directive of field.directives) {
- const name = directive.name.value;
- if (name === 'external') {
- errors.push(utils_1.errorWithCode('EXTERNAL_USED_ON_BASE', utils_1.logServiceAndType(serviceName, typeDefinition.name.value, field.name.value) +
- `Found extraneous @external directive. @external cannot be used on base types.`));
- }
- }
- }
- }
- }
- },
- });
- return errors;
-};
-//# sourceMappingURL=externalUsedOnBase.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.js.map
deleted file mode 100644
index 668894a..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/externalUsedOnBase.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"externalUsedOnBase.js","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/externalUsedOnBase.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAG9C,uCAA+D;AAKlD,QAAA,kBAAkB,GAAG,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,QAAQ,GACU,EAAE,EAAE;IACtB,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,eAAK,CAAC,QAAQ,EAAE;QACd,oBAAoB,CAAC,cAAc;YACjC,IAAI,cAAc,CAAC,MAAM,EAAE;gBACzB,KAAK,MAAM,KAAK,IAAI,cAAc,CAAC,MAAM,EAAE;oBACzC,IAAI,KAAK,CAAC,UAAU,EAAE;wBACpB,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,UAAU,EAAE;4BACxC,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;4BAClC,IAAI,IAAI,KAAK,UAAU,EAAE;gCACvB,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,uBAAuB,EACvB,yBAAiB,CACf,WAAW,EACX,cAAc,CAAC,IAAI,CAAC,KAAK,EACzB,KAAK,CAAC,IAAI,CAAC,KAAK,CACjB;oCACC,+EAA+E,CAClF,CACF,CAAC;6BACH;yBACF;qBACF;iBACF;aACF;QACH,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.d.ts
deleted file mode 100644
index 489796b..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export { externalUsedOnBase } from './externalUsedOnBase';
-export { requiresUsedOnBase } from './requiresUsedOnBase';
-export { keyFieldsMissingExternal } from './keyFieldsMissingExternal';
-export { reservedFieldUsed } from './reservedFieldUsed';
-export { duplicateEnumOrScalar } from './duplicateEnumOrScalar';
-export { duplicateEnumValue } from './duplicateEnumValue';
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.d.ts.map
deleted file mode 100644
index 7706590..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.js
deleted file mode 100644
index 36d76da..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var externalUsedOnBase_1 = require("./externalUsedOnBase");
-Object.defineProperty(exports, "externalUsedOnBase", { enumerable: true, get: function () { return externalUsedOnBase_1.externalUsedOnBase; } });
-var requiresUsedOnBase_1 = require("./requiresUsedOnBase");
-Object.defineProperty(exports, "requiresUsedOnBase", { enumerable: true, get: function () { return requiresUsedOnBase_1.requiresUsedOnBase; } });
-var keyFieldsMissingExternal_1 = require("./keyFieldsMissingExternal");
-Object.defineProperty(exports, "keyFieldsMissingExternal", { enumerable: true, get: function () { return keyFieldsMissingExternal_1.keyFieldsMissingExternal; } });
-var reservedFieldUsed_1 = require("./reservedFieldUsed");
-Object.defineProperty(exports, "reservedFieldUsed", { enumerable: true, get: function () { return reservedFieldUsed_1.reservedFieldUsed; } });
-var duplicateEnumOrScalar_1 = require("./duplicateEnumOrScalar");
-Object.defineProperty(exports, "duplicateEnumOrScalar", { enumerable: true, get: function () { return duplicateEnumOrScalar_1.duplicateEnumOrScalar; } });
-var duplicateEnumValue_1 = require("./duplicateEnumValue");
-Object.defineProperty(exports, "duplicateEnumValue", { enumerable: true, get: function () { return duplicateEnumValue_1.duplicateEnumValue; } });
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.js.map
deleted file mode 100644
index 03be5b4..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/index.ts"],"names":[],"mappings":";;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.d.ts
deleted file mode 100644
index a68592e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-export declare const keyFieldsMissingExternal: ({ name: serviceName, typeDefs, }: ServiceDefinition) => GraphQLError[];
-//# sourceMappingURL=keyFieldsMissingExternal.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.d.ts.map
deleted file mode 100644
index 61bde18..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"keyFieldsMissingExternal.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/keyFieldsMissingExternal.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,YAAY,EAEb,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAYhD,eAAO,MAAM,wBAAwB,qCAGlC,iBAAiB,mBAwFnB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.js
deleted file mode 100644
index b14887a..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.js
+++ /dev/null
@@ -1,61 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.keyFieldsMissingExternal = void 0;
-const graphql_1 = require("graphql");
-const apollo_graphql_1 = require("apollo-graphql");
-const directives_1 = require("../../../directives");
-const utils_1 = require("../../utils");
-exports.keyFieldsMissingExternal = ({ name: serviceName, typeDefs, }) => {
- const errors = [];
- let keyDirectiveInfoOnTypeExtensions = [];
- graphql_1.visit(typeDefs, {
- ObjectTypeExtension(node) {
- const keyDirectivesOnTypeExtension = utils_1.findDirectivesOnTypeOrField(node, 'key');
- const keyDirectivesInfo = keyDirectivesOnTypeExtension
- .map(keyDirective => keyDirective.arguments &&
- utils_1.isStringValueNode(keyDirective.arguments[0].value)
- ? {
- typeName: node.name.value,
- keyArgument: keyDirective.arguments[0].value.value,
- }
- : null)
- .filter(utils_1.isNotNullOrUndefined);
- keyDirectiveInfoOnTypeExtensions.push(...keyDirectivesInfo);
- },
- });
- let schema = new graphql_1.GraphQLSchema({
- query: undefined,
- directives: [...graphql_1.specifiedDirectives, ...directives_1.federationDirectives],
- });
- try {
- schema = apollo_graphql_1.buildSchemaFromSDL(typeDefs, schema);
- }
- catch (e) {
- errors.push(e);
- return errors;
- }
- const typeInfo = new graphql_1.TypeInfo(schema);
- for (const { typeName, keyArgument } of keyDirectiveInfoOnTypeExtensions) {
- const keyDirectiveSelectionSet = graphql_1.parse(`fragment __generated on ${typeName} { ${keyArgument} }`);
- graphql_1.visit(keyDirectiveSelectionSet, graphql_1.visitWithTypeInfo(typeInfo, {
- Field() {
- const fieldDef = typeInfo.getFieldDef();
- const parentType = typeInfo.getParentType();
- if (parentType) {
- if (!fieldDef) {
- errors.push(utils_1.errorWithCode('KEY_FIELDS_MISSING_EXTERNAL', utils_1.logServiceAndType(serviceName, parentType.name) +
- `A @key directive specifies a field which is not found in this service. Add a field to this type with @external.`));
- return;
- }
- const externalDirectivesOnField = utils_1.findDirectivesOnTypeOrField(fieldDef.astNode, 'external');
- if (externalDirectivesOnField.length === 0) {
- errors.push(utils_1.errorWithCode('KEY_FIELDS_MISSING_EXTERNAL', utils_1.logServiceAndType(serviceName, parentType.name) +
- `A @key directive specifies the \`${fieldDef.name}\` field which has no matching @external field.`));
- }
- }
- },
- }));
- }
- return errors;
-};
-//# sourceMappingURL=keyFieldsMissingExternal.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.js.map
deleted file mode 100644
index b975baa..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/keyFieldsMissingExternal.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"keyFieldsMissingExternal.js","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/keyFieldsMissingExternal.ts"],"names":[],"mappings":";;;AAAA,qCAQiB;AACjB,mDAAoD;AACpD,oDAA2D;AAE3D,uCAMqB;AAKR,QAAA,wBAAwB,GAAG,CAAC,EACvC,IAAI,EAAE,WAAW,EACjB,QAAQ,GACU,EAAE,EAAE;IACtB,MAAM,MAAM,GAAmB,EAAE,CAAC;IAGlC,IAAI,gCAAgC,GAG9B,EAAE,CAAC;IACT,eAAK,CAAC,QAAQ,EAAE;QACd,mBAAmB,CAAC,IAAI;YACtB,MAAM,4BAA4B,GAAG,mCAA2B,CAC9D,IAAI,EACJ,KAAK,CACN,CAAC;YAEF,MAAM,iBAAiB,GAAG,4BAA4B;iBACnD,GAAG,CAAC,YAAY,CAAC,EAAE,CAClB,YAAY,C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,6BAA6B,EAC7B,yBAAiB,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC;4BAC7C,iHAAiH,CACpH,CACF,CAAC;wBACF,OAAO;qBACR;oBACD,MAAM,yBAAyB,GAAG,mCAA2B,CAC3D,QAAQ,CAAC,OAAO,EAChB,UAAU,CACX,CAAC;oBAEF,IAAI,yBAAyB,CAAC,MAAM,KAAK,CAAC,EAAE;wBAC1C,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,6BAA6B,EAC7B,yBAAiB,CAAC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC;4BAC7C,oCAAoC,QAAQ,CAAC,IAAI,iDAAiD,CACrG,CACF,CAAC;qBACH;iBACF;YACH,CAAC;SACF,CAAC,CACH,CAAC;KACH;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.d.ts
deleted file mode 100644
index d542976..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-export declare const requiresUsedOnBase: ({ name: serviceName, typeDefs, }: ServiceDefinition) => GraphQLError[];
-//# sourceMappingURL=requiresUsedOnBase.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.d.ts.map
deleted file mode 100644
index ceb5f11..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"requiresUsedOnBase.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/requiresUsedOnBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOhD,eAAO,MAAM,kBAAkB,qCAG5B,iBAAiB,mBA+BnB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.js
deleted file mode 100644
index 70750a5..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.js
+++ /dev/null
@@ -1,27 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.requiresUsedOnBase = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.requiresUsedOnBase = ({ name: serviceName, typeDefs, }) => {
- const errors = [];
- graphql_1.visit(typeDefs, {
- ObjectTypeDefinition(typeDefinition) {
- if (typeDefinition.fields) {
- for (const field of typeDefinition.fields) {
- if (field.directives) {
- for (const directive of field.directives) {
- const name = directive.name.value;
- if (name === 'requires') {
- errors.push(utils_1.errorWithCode('REQUIRES_USED_ON_BASE', utils_1.logServiceAndType(serviceName, typeDefinition.name.value, field.name.value) +
- `Found extraneous @requires directive. @requires cannot be used on base types.`));
- }
- }
- }
- }
- }
- },
- });
- return errors;
-};
-//# sourceMappingURL=requiresUsedOnBase.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.js.map
deleted file mode 100644
index 25c86af..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/requiresUsedOnBase.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"requiresUsedOnBase.js","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/requiresUsedOnBase.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAG9C,uCAA+D;AAKlD,QAAA,kBAAkB,GAAG,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,QAAQ,GACU,EAAE,EAAE;IACtB,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,eAAK,CAAC,QAAQ,EAAE;QACd,oBAAoB,CAAC,cAAc;YACjC,IAAI,cAAc,CAAC,MAAM,EAAE;gBACzB,KAAK,MAAM,KAAK,IAAI,cAAc,CAAC,MAAM,EAAE;oBACzC,IAAI,KAAK,CAAC,UAAU,EAAE;wBACpB,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,UAAU,EAAE;4BACxC,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;4BAClC,IAAI,IAAI,KAAK,UAAU,EAAE;gCACvB,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,uBAAuB,EACvB,yBAAiB,CACf,WAAW,EACX,cAAc,CAAC,IAAI,CAAC,KAAK,EACzB,KAAK,CAAC,IAAI,CAAC,KAAK,CACjB;oCACC,+EAA+E,CAClF,CACF,CAAC;6BACH;yBACF;qBACF;iBACF;aACF;QACH,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.d.ts
deleted file mode 100644
index 6d8c8e7..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-export declare const reservedFieldUsed: ({ name: serviceName, typeDefs, }: ServiceDefinition) => GraphQLError[];
-//# sourceMappingURL=reservedFieldUsed.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.d.ts.map
deleted file mode 100644
index 07b6df9..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"reservedFieldUsed.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/reservedFieldUsed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAUhD,eAAO,MAAM,iBAAiB,qCAG3B,iBAAiB,mBAiCnB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.js
deleted file mode 100644
index fe69fee..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.js
+++ /dev/null
@@ -1,31 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.reservedFieldUsed = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.reservedFieldUsed = ({ name: serviceName, typeDefs, }) => {
- const errors = [];
- let rootQueryName = 'Query';
- graphql_1.visit(typeDefs, {
- OperationTypeDefinition(node) {
- if (node.operation === 'query') {
- rootQueryName = node.type.name.value;
- }
- },
- });
- graphql_1.visit(typeDefs, {
- ObjectTypeDefinition(node) {
- if (node.name.value === rootQueryName && node.fields) {
- for (const field of node.fields) {
- const { value: fieldName } = field.name;
- if (utils_1.reservedRootFields.includes(fieldName)) {
- errors.push(utils_1.errorWithCode('RESERVED_FIELD_USED', utils_1.logServiceAndType(serviceName, rootQueryName, fieldName) +
- `${fieldName} is a field reserved for federation and can\'t be used at the Query root.`));
- }
- }
- }
- },
- });
- return errors;
-};
-//# sourceMappingURL=reservedFieldUsed.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.js.map
deleted file mode 100644
index 69c02e0..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preComposition/reservedFieldUsed.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"reservedFieldUsed.js","sourceRoot":"","sources":["../../../../src/composition/validate/preComposition/reservedFieldUsed.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAE9C,uCAIqB;AAKR,QAAA,iBAAiB,GAAG,CAAC,EAChC,IAAI,EAAE,WAAW,EACjB,QAAQ,GACU,EAAE,EAAE;IACtB,MAAM,MAAM,GAAmB,EAAE,CAAC;IAElC,IAAI,aAAa,GAAG,OAAO,CAAC;IAC5B,eAAK,CAAC,QAAQ,EAAE;QAEd,uBAAuB,CAAC,IAAI;YAC1B,IAAI,IAAI,CAAC,SAAS,KAAK,OAAO,EAAE;gBAC9B,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;aACtC;QACH,CAAC;KACF,CAAC,CAAC;IAEH,eAAK,CAAC,QAAQ,EAAE;QACd,oBAAoB,CAAC,IAAI;YACvB,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,aAAa,IAAI,IAAI,CAAC,MAAM,EAAE;gBACpD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;oBAC/B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;oBACxC,IAAI,0BAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;wBAC1C,MAAM,CAAC,IAAI,CACT,qBAAa,CACX,qBAAqB,EACrB,yBAAiB,CAAC,WAAW,EAAE,aAAa,EAAE,SAAS,CAAC;4BACtD,GAAG,SAAS,2EAA2E,CAC1F,CACF,CAAC;qBACH;iBACF;aACF;QACH,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.d.ts
deleted file mode 100644
index 9d62709..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export { rootFieldUsed } from './rootFieldUsed';
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.d.ts.map
deleted file mode 100644
index 07d67ae..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preNormalization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.js
deleted file mode 100644
index 285d9e2..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var rootFieldUsed_1 = require("./rootFieldUsed");
-Object.defineProperty(exports, "rootFieldUsed", { enumerable: true, get: function () { return rootFieldUsed_1.rootFieldUsed; } });
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.js.map
deleted file mode 100644
index 06b8062..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/composition/validate/preNormalization/index.ts"],"names":[],"mappings":";;AAAA,iDAAgD;AAAvC,8GAAA,aAAa,OAAA"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.d.ts
deleted file mode 100644
index a765ff4..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-export declare const rootFieldUsed: ({ name: serviceName, typeDefs, }: ServiceDefinition) => GraphQLError[];
-//# sourceMappingURL=rootFieldUsed.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.d.ts.map
deleted file mode 100644
index 2071f77..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"rootFieldUsed.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/preNormalization/rootFieldUsed.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAIb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAgC,MAAM,aAAa,CAAC;AAY9E,eAAO,MAAM,aAAa,qCAGvB,iBAAiB,mBA2DnB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.js
deleted file mode 100644
index e71e653..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.js
+++ /dev/null
@@ -1,35 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.rootFieldUsed = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-exports.rootFieldUsed = ({ name: serviceName, typeDefs, }) => {
- const errors = [];
- const defaultRootOperationNames = Object.values(utils_1.defaultRootOperationNameLookup);
- const disallowedTypeNames = {};
- let hasSchemaDefinitionOrExtension = false;
- graphql_1.visit(typeDefs, {
- OperationTypeDefinition(node) {
- hasSchemaDefinitionOrExtension = true;
- if (!defaultRootOperationNames.includes(node.type.name
- .value)) {
- disallowedTypeNames[utils_1.defaultRootOperationNameLookup[node.operation]] = true;
- }
- },
- });
- if (hasSchemaDefinitionOrExtension) {
- graphql_1.visit(typeDefs, {
- ObjectTypeDefinition: visitType,
- ObjectTypeExtension: visitType,
- });
- function visitType(node) {
- if (disallowedTypeNames[node.name.value]) {
- const rootOperationName = node.name.value;
- errors.push(utils_1.errorWithCode(`ROOT_${rootOperationName.toUpperCase()}_USED`, utils_1.logServiceAndType(serviceName, rootOperationName) +
- `Found invalid use of default root operation name \`${rootOperationName}\`. \`${rootOperationName}\` is disallowed when \`Schema.${rootOperationName.toLowerCase()}\` is set to a type other than \`${rootOperationName}\`.`));
- }
- }
- }
- return errors;
-};
-//# sourceMappingURL=rootFieldUsed.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.js.map
deleted file mode 100644
index 4643383..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/preNormalization/rootFieldUsed.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"rootFieldUsed.js","sourceRoot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KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.d.ts
deleted file mode 100644
index d2c3128..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export { UniqueTypeNamesWithFields } from './uniqueTypeNamesWithFields';
-export { MatchingEnums } from './matchingEnums';
-export { PossibleTypeExtensions } from './possibleTypeExtensions';
-export { UniqueFieldDefinitionNames } from './uniqueFieldDefinitionNames';
-export { UniqueUnionTypes } from './matchingUnions';
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.d.ts.map
deleted file mode 100644
index 0c18ccd..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.js
deleted file mode 100644
index ab783ec..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var uniqueTypeNamesWithFields_1 = require("./uniqueTypeNamesWithFields");
-Object.defineProperty(exports, "UniqueTypeNamesWithFields", { enumerable: true, get: function () { return uniqueTypeNamesWithFields_1.UniqueTypeNamesWithFields; } });
-var matchingEnums_1 = require("./matchingEnums");
-Object.defineProperty(exports, "MatchingEnums", { enumerable: true, get: function () { return matchingEnums_1.MatchingEnums; } });
-var possibleTypeExtensions_1 = require("./possibleTypeExtensions");
-Object.defineProperty(exports, "PossibleTypeExtensions", { enumerable: true, get: function () { return possibleTypeExtensions_1.PossibleTypeExtensions; } });
-var uniqueFieldDefinitionNames_1 = require("./uniqueFieldDefinitionNames");
-Object.defineProperty(exports, "UniqueFieldDefinitionNames", { enumerable: true, get: function () { return uniqueFieldDefinitionNames_1.UniqueFieldDefinitionNames; } });
-var matchingUnions_1 = require("./matchingUnions");
-Object.defineProperty(exports, "UniqueUnionTypes", { enumerable: true, get: function () { return matchingUnions_1.UniqueUnionTypes; } });
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.js.map
deleted file mode 100644
index d3baa49..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/index.ts"],"names":[],"mappings":";;AAAA,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA;AAClC,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,mDAAoD;AAA3C,kHAAA,gBAAgB,OAAA"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.d.ts
deleted file mode 100644
index a489d3b..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-import { ASTVisitor } from 'graphql';
-export declare function MatchingEnums(context: SDLValidationContext): ASTVisitor;
-//# sourceMappingURL=matchingEnums.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.d.ts.map
deleted file mode 100644
index 836f25a..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"matchingEnums.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/matchingEnums.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EACL,UAAU,EAKX,MAAM,SAAS,CAAC;AAYjB,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,UAAU,CAuGvE"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.js
deleted file mode 100644
index 75b6b2d..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.js
+++ /dev/null
@@ -1,67 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.MatchingEnums = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-const util_1 = require("util");
-function isEnumDefinition(node) {
- return node.kind === graphql_1.Kind.ENUM_TYPE_DEFINITION;
-}
-function MatchingEnums(context) {
- const { definitions } = context.getDocument();
- let definitionsByName = definitions.reduce((typeToDefinitionsMap, node) => {
- const name = node.name.value;
- if (typeToDefinitionsMap[name]) {
- typeToDefinitionsMap[name].push(node);
- }
- else {
- typeToDefinitionsMap[name] = [node];
- }
- return typeToDefinitionsMap;
- }, {});
- for (const [name, definitions] of Object.entries(definitionsByName)) {
- if (definitions.every(isEnumDefinition)) {
- let simpleEnumDefs = [];
- for (const { values, serviceName, } of definitions) {
- if (serviceName && values)
- simpleEnumDefs.push({
- serviceName,
- values: values.map((enumValue) => enumValue.name.value),
- });
- }
- for (const definition of simpleEnumDefs) {
- definition.values = definition.values.sort();
- }
- let matchingEnumGroups = {};
- for (const definition of simpleEnumDefs) {
- const key = definition.values.join();
- if (matchingEnumGroups[key]) {
- matchingEnumGroups[key].push(definition.serviceName);
- }
- else {
- matchingEnumGroups[key] = [definition.serviceName];
- }
- }
- if (Object.keys(matchingEnumGroups).length > 1) {
- context.reportError(utils_1.errorWithCode('ENUM_MISMATCH', `The \`${name}\` enum does not have identical values in all services. Groups of services with identical values are: ${Object.values(matchingEnumGroups)
- .map(serviceNames => `[${serviceNames.join(', ')}]`)
- .join(', ')}`));
- }
- }
- else if (definitions.some(isEnumDefinition)) {
- const servicesWithEnum = definitions
- .filter(isEnumDefinition)
- .map(definition => definition.serviceName)
- .filter(util_1.isString);
- const servicesWithoutEnum = definitions
- .filter(d => !isEnumDefinition(d))
- .map(d => d.serviceName)
- .filter(util_1.isString);
- context.reportError(utils_1.errorWithCode('ENUM_MISMATCH_TYPE', utils_1.logServiceAndType(servicesWithEnum[0], name) +
- `${name} is an enum in [${servicesWithEnum.join(', ')}], but not in [${servicesWithoutEnum.join(', ')}]`));
- }
- }
- return {};
-}
-exports.MatchingEnums = MatchingEnums;
-//# sourceMappingURL=matchingEnums.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.js.map
deleted file mode 100644
index 11f884b..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingEnums.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"matchingEnums.js","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/matchingEnums.ts"],"names":[],"mappings":";;;AACA,qCAMiB;AACjB,uCAA+D;AAC/D,+BAAgC;AAEhC,SAAS,gBAAgB,CAAC,IAAwB;IAChD,OAAO,IAAI,CAAC,IAAI,KAAK,cAAI,CAAC,oBAAoB,CAAC;AACjD,CAAC;AAMD,SAAgB,aAAa,CAAC,OAA6B;IACzD,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAI9C,IAAI,iBAAiB,GAEhB,WAAoC,CAAC,MAAM,CAC9C,CAAC,oBAA0C,EAAE,IAAI,EAAE,EAAE;QACnD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QAC7B,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE;YAC9B,oBAAoB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACvC;aAAM;YACL,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SACrC;QACD,OAAO,oBAAoB,CAAC;IAC9B,CAAC,EACD,EAAE,CACH,CAAC;IAGF,KAAK,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE;QAGnE,IAAI,WAAW,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE;YAGvC,IAAI,cAAc,GAAqD,EAAE,CAAC;YAG1E,KAAK,MAAM,EACT,MAAM,EACN,WAAW,GACZ,IAAI,WAAuC,EAAE;gBAC5C,IAAI,WAAW,IAAI,MAAM;oBACvB,cAAc,CAAC,IAAI,CAAC;wBAClB,WAAW;wBACX,MAAM,EAAE,MAAM,CAAC,GAAG,CAChB,CAAC,SAAkC,EAA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AAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;iBACjC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;iBACvB,MAAM,CAAC,eAAQ,CAAC,CAAC;YAEpB,OAAO,CAAC,WAAW,CACjB,qBAAa,CACX,oBAAoB,EACpB,yBAAiB,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;gBAC1C,GAAG,IAAI,mBAAmB,gBAAgB,CAAC,IAAI,CAC7C,IAAI,CACL,kBAAkB,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACvD,CACF,CAAC;SACH;KACF;IAGD,OAAO,EAAE,CAAC;AACZ,CAAC;AAvGD,sCAuGC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.d.ts
deleted file mode 100644
index 28d0547..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { ASTVisitor } from 'graphql';
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-export declare function UniqueUnionTypes(context: SDLValidationContext): ASTVisitor;
-//# sourceMappingURL=matchingUnions.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.d.ts.map
deleted file mode 100644
index 1e81dd9..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"matchingUnions.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/matchingUnions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAA2B,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAc5E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,GAAG,UAAU,CAyE1E"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.js
deleted file mode 100644
index b799498..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.js
+++ /dev/null
@@ -1,49 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.UniqueUnionTypes = void 0;
-const graphql_1 = require("graphql");
-const lodash_xorby_1 = __importDefault(require("lodash.xorby"));
-const utils_1 = require("../../utils");
-const uniqueTypeNamesWithFields_1 = require("./uniqueTypeNamesWithFields");
-function UniqueUnionTypes(context) {
- const knownTypes = Object.create(null);
- const schema = context.getSchema();
- return {
- UnionTypeDefinition: validateUnionTypes,
- };
- function validateUnionTypes(node) {
- const typeName = node.name.value;
- const typeFromSchema = schema && schema.getType(typeName);
- const typeNodeFromSchema = typeFromSchema &&
- typeFromSchema.astNode;
- const typeNodeFromDefs = knownTypes[typeName];
- const duplicateTypeNode = typeNodeFromSchema || typeNodeFromDefs;
- if (duplicateTypeNode) {
- const unionDiff = lodash_xorby_1.default(node.types, duplicateTypeNode.types, 'name.value');
- const diffLength = unionDiff.length;
- if (diffLength > 0) {
- context.reportError(utils_1.errorWithCode('VALUE_TYPE_UNION_TYPES_MISMATCH', `${utils_1.logServiceAndType(duplicateTypeNode.serviceName, typeName)}The union \`${typeName}\` is defined in services \`${duplicateTypeNode.serviceName}\` and \`${node.serviceName}\`, however their types do not match. Union types with the same name must also consist of identical types. The type${diffLength > 1 ? 's' : ''} ${unionDiff.map(diffEntry => diffEntry.name.value).join(', ')} ${diffLength > 1 ? 'are' : 'is'} mismatched.`, [node, duplicateTypeNode]));
- }
- return false;
- }
- if (typeFromSchema) {
- context.reportError(new graphql_1.GraphQLError(uniqueTypeNamesWithFields_1.existedTypeNameMessage(typeName), node.name));
- return;
- }
- if (knownTypes[typeName]) {
- context.reportError(new graphql_1.GraphQLError(uniqueTypeNamesWithFields_1.duplicateTypeNameMessage(typeName), [
- knownTypes[typeName],
- node.name,
- ]));
- }
- else {
- knownTypes[typeName] = node;
- }
- return false;
- }
-}
-exports.UniqueUnionTypes = UniqueUnionTypes;
-//# sourceMappingURL=matchingUnions.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.js.map
deleted file mode 100644
index 4c312a2..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/matchingUnions.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"matchingUnions.js","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/matchingUnions.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA4E;AAE5E,gEAAiC;AAEjC,uCAA+D;AAC/D,2EAGqC;AAOrC,SAAgB,gBAAgB,CAAC,OAA6B;IAC5D,MAAM,UAAU,GAEZ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAEnC,OAAO;QACL,mBAAmB,EAAE,kBAAkB;KACxC,CAAC;IAEF,SAAS,kBAAkB,CAAC,IAA6B;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QACjC,MAAM,cAAc,GAAG,MAAM,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1D,MAAM,kBAAkB,GACtB,cAAc;YACb,cAAc,CAAC,OAA0C,CAAC;QAE7D,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC,CA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,CAAC;SAC7B;QAED,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAzED,4CAyEC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.d.ts
deleted file mode 100644
index 8feab50..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-import { ASTVisitor } from 'graphql';
-export declare function PossibleTypeExtensions(context: SDLValidationContext): ASTVisitor;
-//# sourceMappingURL=possibleTypeExtensions.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.d.ts.map
deleted file mode 100644
index 32cfc4f..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"possibleTypeExtensions.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/possibleTypeExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EACL,UAAU,EAYX,MAAM,SAAS,CAAC;AAiBjB,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,oBAAoB,GAC5B,UAAU,CAyDZ"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.js
deleted file mode 100644
index b82d9e1..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.js
+++ /dev/null
@@ -1,90 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.PossibleTypeExtensions = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-function PossibleTypeExtensions(context) {
- const schema = context.getSchema();
- const definedTypes = Object.create(null);
- for (const def of context.getDocument().definitions) {
- if (graphql_1.isTypeDefinitionNode(def)) {
- definedTypes[def.name.value] = def;
- }
- }
- const checkExtension = (node) => {
- const typeName = node.name.value;
- const defNode = definedTypes[typeName];
- const existingType = schema && schema.getType(typeName);
- const serviceName = node.serviceName;
- if (!serviceName)
- return;
- if (defNode) {
- const expectedKind = utils_1.defKindToExtKind[defNode.kind];
- const baseKind = defNode.kind;
- if (expectedKind !== node.kind) {
- context.reportError(utils_1.errorWithCode('EXTENSION_OF_WRONG_KIND', utils_1.logServiceAndType(serviceName, typeName) +
- `\`${typeName}\` was originally defined as a ${baseKind} and can only be extended by a ${expectedKind}. ${serviceName} defines ${typeName} as a ${node.kind}`));
- }
- }
- else if (existingType) {
- const expectedKind = typeToExtKind(existingType);
- const baseKind = typeToKind(existingType);
- if (expectedKind !== node.kind) {
- context.reportError(utils_1.errorWithCode('EXTENSION_OF_WRONG_KIND', utils_1.logServiceAndType(serviceName, typeName) +
- `\`${typeName}\` was originally defined as a ${baseKind} and can only be extended by a ${expectedKind}. ${serviceName} defines ${typeName} as a ${node.kind}`));
- }
- }
- else {
- context.reportError(utils_1.errorWithCode('EXTENSION_WITH_NO_BASE', utils_1.logServiceAndType(serviceName, typeName) +
- `\`${typeName}\` is an extension type, but \`${typeName}\` is not defined in any service`));
- }
- };
- return {
- ObjectTypeExtension: checkExtension,
- InterfaceTypeExtension: checkExtension,
- };
-}
-exports.PossibleTypeExtensions = PossibleTypeExtensions;
-function typeToExtKind(type) {
- if (graphql_1.isScalarType(type)) {
- return graphql_1.Kind.SCALAR_TYPE_EXTENSION;
- }
- else if (graphql_1.isObjectType(type)) {
- return graphql_1.Kind.OBJECT_TYPE_EXTENSION;
- }
- else if (graphql_1.isInterfaceType(type)) {
- return graphql_1.Kind.INTERFACE_TYPE_EXTENSION;
- }
- else if (graphql_1.isUnionType(type)) {
- return graphql_1.Kind.UNION_TYPE_EXTENSION;
- }
- else if (graphql_1.isEnumType(type)) {
- return graphql_1.Kind.ENUM_TYPE_EXTENSION;
- }
- else if (graphql_1.isInputObjectType(type)) {
- return graphql_1.Kind.INPUT_OBJECT_TYPE_EXTENSION;
- }
- return null;
-}
-function typeToKind(type) {
- if (graphql_1.isScalarType(type)) {
- return graphql_1.Kind.SCALAR_TYPE_DEFINITION;
- }
- else if (graphql_1.isObjectType(type)) {
- return graphql_1.Kind.OBJECT_TYPE_DEFINITION;
- }
- else if (graphql_1.isInterfaceType(type)) {
- return graphql_1.Kind.INTERFACE_TYPE_DEFINITION;
- }
- else if (graphql_1.isUnionType(type)) {
- return graphql_1.Kind.UNION_TYPE_DEFINITION;
- }
- else if (graphql_1.isEnumType(type)) {
- return graphql_1.Kind.ENUM_TYPE_DEFINITION;
- }
- else if (graphql_1.isInputObjectType(type)) {
- return graphql_1.Kind.INPUT_OBJECT_TYPE_DEFINITION;
- }
- return null;
-}
-//# sourceMappingURL=possibleTypeExtensions.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.js.map
deleted file mode 100644
index 26d8c65..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/possibleTypeExtensions.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"possibleTypeExtensions.js","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/possibleTypeExtensions.ts"],"names":[],"mappings":";;;AACA,qCAaiB;AACjB,uCAIqB;AAYrB,SAAgB,sBAAsB,CACpC,OAA6B;IAE7B,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC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AsB,CAAC;KACpC;SAAM,IAAI,yBAAe,CAAC,IAAI,CAAC,EAAE;QAChC,OAAO,cAAI,CAAC,yBAAyB,CAAC;KACvC;SAAM,IAAI,qBAAW,CAAC,IAAI,CAAC,EAAE;QAC5B,OAAO,cAAI,CAAC,qBAAqB,CAAC;KACnC;SAAM,IAAI,oBAAU,CAAC,IAAI,CAAC,EAAE;QAC3B,OAAO,cAAI,CAAC,oBAAoB,CAAC;KAClC;SAAM,IAAI,2BAAiB,CAAC,IAAI,CAAC,EAAE;QAClC,OAAO,cAAI,CAAC,4BAA4B,CAAC;KAC1C;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.d.ts
deleted file mode 100644
index bc659f3..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { ASTVisitor } from 'graphql';
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-export declare function duplicateFieldDefinitionNameMessage(typeName: string, fieldName: string): string;
-export declare function existedFieldDefinitionNameMessage(typeName: string, fieldName: string, serviceName: string): string;
-export declare function UniqueFieldDefinitionNames(context: SDLValidationContext): ASTVisitor;
-//# sourceMappingURL=uniqueFieldDefinitionNames.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.d.ts.map
deleted file mode 100644
index 6f2a2e5..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"uniqueFieldDefinitionNames.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/uniqueFieldDefinitionNames.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAaX,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAiB5E,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,MAAM,CAMR;AAQD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,oBAAoB,GAC5B,UAAU,CA6IZ"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.js
deleted file mode 100644
index 81e61dd..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.js
+++ /dev/null
@@ -1,95 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.UniqueFieldDefinitionNames = exports.existedFieldDefinitionNameMessage = exports.duplicateFieldDefinitionNameMessage = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-function duplicateFieldDefinitionNameMessage(typeName, fieldName) {
- return `Field "${typeName}.${fieldName}" can only be defined once.`;
-}
-exports.duplicateFieldDefinitionNameMessage = duplicateFieldDefinitionNameMessage;
-function existedFieldDefinitionNameMessage(typeName, fieldName, serviceName) {
- return `${utils_1.logServiceAndType(serviceName, typeName, fieldName)}Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension. If this is meant to be an external field, add the \`@external\` directive.`;
-}
-exports.existedFieldDefinitionNameMessage = existedFieldDefinitionNameMessage;
-function UniqueFieldDefinitionNames(context) {
- const schema = context.getSchema();
- const existingTypeMap = schema
- ? schema.getTypeMap()
- : Object.create(null);
- const knownFieldNames = Object.create(null);
- const possibleValueTypes = Object.create(null);
- return {
- InputObjectTypeExtension: checkFieldUniqueness,
- InterfaceTypeExtension: checkFieldUniqueness,
- ObjectTypeExtension: checkFieldUniqueness,
- InputObjectTypeDefinition: checkFieldUniquenessExcludingValueTypes,
- InterfaceTypeDefinition: checkFieldUniquenessExcludingValueTypes,
- ObjectTypeDefinition: checkFieldUniquenessExcludingValueTypes,
- };
- function checkFieldUniqueness(node) {
- const typeName = node.name.value;
- if (!knownFieldNames[typeName]) {
- knownFieldNames[typeName] = Object.create(null);
- }
- if (!node.fields) {
- return false;
- }
- const fieldNames = knownFieldNames[typeName];
- for (const fieldDef of node.fields) {
- const fieldName = fieldDef.name.value;
- if (hasField(existingTypeMap[typeName], fieldName)) {
- context.reportError(new graphql_1.GraphQLError(existedFieldDefinitionNameMessage(typeName, fieldName, existingTypeMap[typeName].astNode.serviceName), fieldDef.name));
- }
- else if (fieldNames[fieldName]) {
- context.reportError(new graphql_1.GraphQLError(duplicateFieldDefinitionNameMessage(typeName, fieldName), [fieldNames[fieldName], fieldDef.name]));
- }
- else {
- fieldNames[fieldName] = fieldDef.name;
- }
- }
- return false;
- }
- function checkFieldUniquenessExcludingValueTypes(node) {
- const typeName = node.name.value;
- const valueTypeFromSchema = existingTypeMap[typeName] &&
- existingTypeMap[typeName].astNode;
- const duplicateTypeNode = valueTypeFromSchema || possibleValueTypes[node.name.value];
- if (duplicateTypeNode) {
- const { fields } = utils_1.diffTypeNodes(node, duplicateTypeNode);
- if (Object.values(fields).every(diffEntry => diffEntry.length === 2)) {
- return false;
- }
- }
- else {
- possibleValueTypes[node.name.value] = node;
- }
- if (!knownFieldNames[typeName]) {
- knownFieldNames[typeName] = Object.create(null);
- }
- if (!node.fields) {
- return false;
- }
- const fieldNames = knownFieldNames[typeName];
- for (const fieldDef of node.fields) {
- const fieldName = fieldDef.name.value;
- if (hasField(existingTypeMap[typeName], fieldName)) {
- context.reportError(new graphql_1.GraphQLError(existedFieldDefinitionNameMessage(typeName, fieldName, existingTypeMap[typeName].astNode.serviceName), fieldDef.name));
- }
- else if (fieldNames[fieldName]) {
- context.reportError(new graphql_1.GraphQLError(duplicateFieldDefinitionNameMessage(typeName, fieldName), [fieldNames[fieldName], fieldDef.name]));
- }
- else {
- fieldNames[fieldName] = fieldDef.name;
- }
- }
- return false;
- }
-}
-exports.UniqueFieldDefinitionNames = UniqueFieldDefinitionNames;
-function hasField(type, fieldName) {
- if (graphql_1.isObjectType(type) || graphql_1.isInterfaceType(type) || graphql_1.isInputObjectType(type)) {
- return Boolean(type.getFields()[fieldName]);
- }
- return false;
-}
-//# sourceMappingURL=uniqueFieldDefinitionNames.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.js.map
deleted file mode 100644
index f1e0455..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueFieldDefinitionNames.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"uniqueFieldDefinitionNames.js","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/uniqueFieldDefinitionNames.ts"],"names":[],"mappings":";;;AAAA,qCAciB;AAIjB,uCAA+D;AAc/D,SAAgB,mCAAmC,CACjD,QAAgB,EAChB,SAAiB;IAEjB,OAAO,UAAU,QAAQ,IAAI,SAAS,6BAA6B,CAAC;AACtE,CAAC;AALD,kFAKC;AAED,SAAgB,iCAAiC,CAC/C,QAAgB,EAChB,SAAiB,EACjB,WAAmB;IAEnB,OAAO,GAAG,yBAAiB,CACzB,WAAW,EACX,QAAQ,EACR,SAAS,CACV,UAAU,QAAQ,IAAI,SAAS,8JAA8J,CAAC;AACjM,CAAC;AAVD,8EAUC;AAQD,SAAgB,0BAA0B,CACxC,OAA6B;IAE7B,MAAM,MAAM,GAAG,OAAO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e,CAAC,QAAQ,CAAC,CAAC;QAE7C,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,MAAM,EAAE;YAClC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YACtC,IAAI,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,EAAE;gBAClD,OAAO,CAAC,WAAW,CACjB,IAAI,sBAAY,CACd,iCAAiC,CAC/B,QAAQ,EACR,SAAS,EACT,eAAe,CAAC,QAAQ,CAAC,CAAC,OAAQ,CAAC,WAAY,CAChD,EACD,QAAQ,CAAC,IAAI,CACd,CACF,CAAC;aACH;iBAAM,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE;gBAChC,OAAO,CAAC,WAAW,CACjB,IAAI,sBAAY,CACd,mCAAmC,CAAC,QAAQ,EAAE,SAAS,CAAC,EACxD,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CACvC,CACF,CAAC;aACH;iBAAM;gBACL,UAAU,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;aACvC;SACF;QAED,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AA/ID,gEA+IC;AAED,SAAS,QAAQ,CAAC,IAAsB,EAAE,SAAiB;IACzD,IAAI,sBAAY,CAAC,IAAI,CAAC,IAAI,yBAAe,CAAC,IAAI,CAAC,IAAI,2BAAiB,CAAC,IAAI,CAAC,EAAE;QAC1E,OAAO,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;KAC7C;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.d.ts b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.d.ts
deleted file mode 100644
index 1f24eee..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { ASTVisitor } from 'graphql';
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-export declare function duplicateTypeNameMessage(typeName: string): string;
-export declare function existedTypeNameMessage(typeName: string): string;
-export declare function UniqueTypeNamesWithFields(context: SDLValidationContext): ASTVisitor;
-//# sourceMappingURL=uniqueTypeNamesWithFields.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.d.ts.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.d.ts.map
deleted file mode 100644
index e1caff5..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"uniqueTypeNamesWithFields.d.ts","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/uniqueTypeNamesWithFields.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAS5E,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE/D;AAOD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,oBAAoB,GAC5B,UAAU,CA6IZ"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.js b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.js
deleted file mode 100644
index 7021ee8..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.js
+++ /dev/null
@@ -1,76 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.UniqueTypeNamesWithFields = exports.existedTypeNameMessage = exports.duplicateTypeNameMessage = void 0;
-const graphql_1 = require("graphql");
-const utils_1 = require("../../utils");
-function duplicateTypeNameMessage(typeName) {
- return `There can be only one type named "${typeName}".`;
-}
-exports.duplicateTypeNameMessage = duplicateTypeNameMessage;
-function existedTypeNameMessage(typeName) {
- return `Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`;
-}
-exports.existedTypeNameMessage = existedTypeNameMessage;
-function UniqueTypeNamesWithFields(context) {
- const knownTypes = Object.create(null);
- const schema = context.getSchema();
- return {
- ScalarTypeDefinition: checkTypeName,
- ObjectTypeDefinition: checkTypeName,
- InterfaceTypeDefinition: checkTypeName,
- UnionTypeDefinition: checkTypeName,
- EnumTypeDefinition: checkTypeName,
- InputObjectTypeDefinition: checkTypeName,
- };
- function checkTypeName(node) {
- const typeName = node.name.value;
- const typeFromSchema = schema && schema.getType(typeName);
- const typeNodeFromSchema = typeFromSchema &&
- typeFromSchema.astNode;
- const typeNodeFromDefs = knownTypes[typeName];
- const duplicateTypeNode = typeNodeFromSchema || typeNodeFromDefs;
- if (duplicateTypeNode) {
- const possibleErrors = [];
- const { kind, fields } = utils_1.diffTypeNodes(node, duplicateTypeNode);
- const fieldsDiff = Object.entries(fields);
- if (kind.length > 0) {
- context.reportError(utils_1.errorWithCode('VALUE_TYPE_KIND_MISMATCH', `${utils_1.logServiceAndType(duplicateTypeNode.serviceName, typeName)}Found kind mismatch on expected value type belonging to services \`${duplicateTypeNode.serviceName}\` and \`${node.serviceName}\`. \`${typeName}\` is defined as both a \`${kind[0]}\` and a \`${kind[1]}\`. In order to define \`${typeName}\` in multiple places, the kinds must be identical.`, [node, duplicateTypeNode]));
- return;
- }
- const typesHaveSameShape = fieldsDiff.length === 0 ||
- fieldsDiff.every(([fieldName, types]) => {
- if (types.length === 2) {
- possibleErrors.push(utils_1.errorWithCode('VALUE_TYPE_FIELD_TYPE_MISMATCH', `${utils_1.logServiceAndType(duplicateTypeNode.serviceName, typeName, fieldName)}A field was defined differently in different services. \`${duplicateTypeNode.serviceName}\` and \`${node.serviceName}\` define \`${typeName}.${fieldName}\` as a ${types[1]} and ${types[0]} respectively. In order to define \`${typeName}\` in multiple places, the fields and their types must be identical.`, [node, duplicateTypeNode]));
- return true;
- }
- return false;
- });
- if (typesHaveSameShape) {
- possibleErrors.forEach(error => context.reportError(error));
- if (utils_1.isTypeNodeAnEntity(node) || utils_1.isTypeNodeAnEntity(duplicateTypeNode)) {
- const entityNode = utils_1.isTypeNodeAnEntity(duplicateTypeNode)
- ? duplicateTypeNode
- : node;
- context.reportError(utils_1.errorWithCode('VALUE_TYPE_NO_ENTITY', `${utils_1.logServiceAndType(entityNode.serviceName, typeName)}Value types cannot be entities (using the \`@key\` directive). Please ensure that the \`${typeName}\` type is extended properly or remove the \`@key\` directive if this is not an entity.`, [node, duplicateTypeNode]));
- }
- return false;
- }
- }
- if (typeFromSchema) {
- context.reportError(new graphql_1.GraphQLError(existedTypeNameMessage(typeName), node.name));
- return;
- }
- if (knownTypes[typeName]) {
- context.reportError(new graphql_1.GraphQLError(duplicateTypeNameMessage(typeName), [
- knownTypes[typeName],
- node.name,
- ]));
- }
- else {
- knownTypes[typeName] = node;
- }
- return false;
- }
-}
-exports.UniqueTypeNamesWithFields = UniqueTypeNamesWithFields;
-//# sourceMappingURL=uniqueTypeNamesWithFields.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.js.map b/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.js.map
deleted file mode 100644
index fbacee0..0000000
--- a/gateway/node_modules/@apollo/federation/dist/composition/validate/sdl/uniqueTypeNamesWithFields.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"uniqueTypeNamesWithFields.js","sourceRoot":"","sources":["../../../../src/composition/validate/sdl/uniqueTypeNamesWithFields.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CAAC,IAAI,CAAC;oBAET,OAAO,CAAC,WAAW,CACjB,qBAAa,CACX,sBAAsB,EACtB,GAAG,yBAAiB,CAClB,UAAU,CAAC,WAAY,EACvB,QAAQ,CACT,2FAA2F,QAAQ,yFAAyF,EAC7L,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAC1B,CACF,CAAC;iBACH;gBAED,OAAO,KAAK,CAAC;aACd;SACF;QAED,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,WAAW,CACjB,IAAI,sBAAY,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAC9D,CAAC;YACF,OAAO;SACR;QAED,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;YACxB,OAAO,CAAC,WAAW,CACjB,IAAI,sBAAY,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE;gBACnD,UAAU,CAAC,QAAQ,CAAC;gBACpB,IAAI,CAAC,IAAI;aACV,CAAC,CACH,CAAC;SACH;aAAM;YACL,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;SAC7B;QAED,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AA/ID,8DA+IC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.d.ts b/gateway/node_modules/@apollo/federation/dist/csdlDirectives.d.ts
deleted file mode 100644
index 5c9d5a9..0000000
--- a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { GraphQLDirective } from 'graphql';
-export declare const ComposedGraphDirective: GraphQLDirective;
-export declare const GraphDirective: GraphQLDirective;
-export declare const OwnerDirective: GraphQLDirective;
-export declare const KeyDirective: GraphQLDirective;
-export declare const ResolveDirective: GraphQLDirective;
-export declare const ProvidesDirective: GraphQLDirective;
-export declare const RequiresDirective: GraphQLDirective;
-export declare const csdlDirectives: GraphQLDirective[];
-export default csdlDirectives;
-//# sourceMappingURL=csdlDirectives.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.d.ts.map b/gateway/node_modules/@apollo/federation/dist/csdlDirectives.d.ts.map
deleted file mode 100644
index fced7a1..0000000
--- a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"csdlDirectives.d.ts","sourceRoot":"","sources":["../src/csdlDirectives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAKjB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,sBAAsB,kBAQjC,CAAC;AAEH,eAAO,MAAM,cAAc,kBAWzB,CAAC;AAEH,eAAO,MAAM,cAAc,kBAQzB,CAAC;AAEH,eAAO,MAAM,YAAY,kBAWvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,kBAQ3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,kBAQ5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,kBAQ5B,CAAC;AAEH,eAAO,MAAM,cAAc,oBAQ1B,CAAC;AAEF,eAAe,cAAc,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.js b/gateway/node_modules/@apollo/federation/dist/csdlDirectives.js
deleted file mode 100644
index f076c89..0000000
--- a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.js
+++ /dev/null
@@ -1,84 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.csdlDirectives = exports.RequiresDirective = exports.ProvidesDirective = exports.ResolveDirective = exports.KeyDirective = exports.OwnerDirective = exports.GraphDirective = exports.ComposedGraphDirective = void 0;
-const graphql_1 = require("graphql");
-exports.ComposedGraphDirective = new graphql_1.GraphQLDirective({
- name: 'composedGraph',
- locations: [graphql_1.DirectiveLocation.SCHEMA],
- args: {
- version: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLInt),
- },
- },
-});
-exports.GraphDirective = new graphql_1.GraphQLDirective({
- name: 'graph',
- locations: [graphql_1.DirectiveLocation.SCHEMA],
- args: {
- name: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- url: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.OwnerDirective = new graphql_1.GraphQLDirective({
- name: 'owner',
- locations: [graphql_1.DirectiveLocation.OBJECT],
- args: {
- graph: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.KeyDirective = new graphql_1.GraphQLDirective({
- name: 'key',
- locations: [graphql_1.DirectiveLocation.OBJECT],
- args: {
- fields: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- graph: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.ResolveDirective = new graphql_1.GraphQLDirective({
- name: 'resolve',
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
- args: {
- graph: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.ProvidesDirective = new graphql_1.GraphQLDirective({
- name: 'provides',
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.RequiresDirective = new graphql_1.GraphQLDirective({
- name: 'requires',
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.csdlDirectives = [
- exports.ComposedGraphDirective,
- exports.GraphDirective,
- exports.OwnerDirective,
- exports.KeyDirective,
- exports.ResolveDirective,
- exports.ProvidesDirective,
- exports.RequiresDirective,
-];
-exports.default = exports.csdlDirectives;
-//# sourceMappingURL=csdlDirectives.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.js.map b/gateway/node_modules/@apollo/federation/dist/csdlDirectives.js.map
deleted file mode 100644
index 39fa201..0000000
--- a/gateway/node_modules/@apollo/federation/dist/csdlDirectives.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"csdlDirectives.js","sourceRoot":"","sources":["../src/csdlDirectives.ts"],"names":[],"mappings":";;;AAAA,qCAMiB;AAEJ,QAAA,sBAAsB,GAAG,IAAI,0BAAgB,CAAC;IACzD,IAAI,EAAE,eAAe;IACrB,SAAS,EAAE,CAAC,2BAAiB,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,IAAI,EAAE,wBAAc,CAAC,oBAAU,CAAC;SACjC;KACF;CACF,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,IAAI,0BAAgB,CAAC;IACjD,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,CAAC,2BAAiB,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;QACD,GAAG,EAAE;YACH,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;KACF;CACF,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,IAAI,0BAAgB,CAAC;IACjD,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,CAAC,2BAAiB,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;KACF;CACF,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG,IAAI,0BAAgB,CAAC;IAC/C,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,CAAC,2BAAiB,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;QACD,KAAK,EAAE;YACL,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;KACF;CACF,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,IAAI,0BAAgB,CAAC;IACnD,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,CAAC,2BAAiB,CAAC,gBAAgB,CAAC;IAC/C,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;KACF;CACF,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,IAAI,0BAAgB,CAAC;IACpD,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,CAAC,2BAAiB,CAAC,gBAAgB,CAAC;IAC/C,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;KACF;CACF,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,IAAI,0BAAgB,CAAC;IACpD,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,CAAC,2BAAiB,CAAC,gBAAgB,CAAC;IAC/C,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,IAAI,EAAE,wBAAc,CAAC,uBAAa,CAAC;SACpC;KACF;CACF,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG;IAC5B,8BAAsB;IACtB,sBAAc;IACd,sBAAc;IACd,oBAAY;IACZ,wBAAgB;IAChB,yBAAiB;IACjB,yBAAiB;CAClB,CAAC;AAEF,kBAAe,sBAAc,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/directives.d.ts b/gateway/node_modules/@apollo/federation/dist/directives.d.ts
deleted file mode 100644
index 5416efd..0000000
--- a/gateway/node_modules/@apollo/federation/dist/directives.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { GraphQLDirective, GraphQLNamedType, GraphQLInputObjectType, DirectiveNode, ScalarTypeDefinitionNode, ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode, EnumTypeDefinitionNode, ScalarTypeExtensionNode, ObjectTypeExtensionNode, InterfaceTypeExtensionNode, UnionTypeExtensionNode, EnumTypeExtensionNode, GraphQLField, FieldDefinitionNode } from 'graphql';
-export declare const KeyDirective: GraphQLDirective;
-export declare const ExtendsDirective: GraphQLDirective;
-export declare const ExternalDirective: GraphQLDirective;
-export declare const RequiresDirective: GraphQLDirective;
-export declare const ProvidesDirective: GraphQLDirective;
-export declare const federationDirectives: GraphQLDirective[];
-export default federationDirectives;
-export declare type ASTNodeWithDirectives = ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | FieldDefinitionNode;
-export declare type GraphQLNamedTypeWithDirectives = Exclude;
-export declare function gatherDirectives(type: GraphQLNamedTypeWithDirectives | GraphQLField): DirectiveNode[];
-export declare function typeIncludesDirective(type: GraphQLNamedType, directiveName: string): boolean;
-//# sourceMappingURL=directives.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/directives.d.ts.map b/gateway/node_modules/@apollo/federation/dist/directives.d.ts.map
deleted file mode 100644
index 18f8313..0000000
--- a/gateway/node_modules/@apollo/federation/dist/directives.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../src/directives.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAIhB,gBAAgB,EAEhB,sBAAsB,EACtB,aAAa,EACb,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,YAAY,EACZ,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,YAAY,kBAQvB,CAAC;AAEH,eAAO,MAAM,gBAAgB,kBAG3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,kBAG5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,kBAQ5B,CAAC;AAEH,eAAO,MAAM,iBAAiB,kBAQ5B,CAAC;AAEH,eAAO,MAAM,oBAAoB,oBAMhC,CAAC;AAEF,eAAe,oBAAoB,CAAC;AAEpC,oBAAY,qBAAqB,GAC7B,wBAAwB,GACxB,wBAAwB,GACxB,2BAA2B,GAC3B,uBAAuB,GACvB,sBAAsB,GACtB,uBAAuB,GACvB,uBAAuB,GACvB,0BAA0B,GAC1B,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,CAAC;AAGxB,oBAAY,8BAA8B,GAAG,OAAO,CAClD,gBAAgB,EAChB,sBAAsB,CACvB,CAAC;AAUF,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,8BAA8B,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,GAC5D,aAAa,EAAE,CAcjB;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,gBAAgB,EACtB,aAAa,EAAE,MAAM,GACpB,OAAO,CAIT"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/directives.js b/gateway/node_modules/@apollo/federation/dist/directives.js
deleted file mode 100644
index 90a963a..0000000
--- a/gateway/node_modules/@apollo/federation/dist/directives.js
+++ /dev/null
@@ -1,72 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.typeIncludesDirective = exports.gatherDirectives = exports.federationDirectives = exports.ProvidesDirective = exports.RequiresDirective = exports.ExternalDirective = exports.ExtendsDirective = exports.KeyDirective = void 0;
-const graphql_1 = require("graphql");
-exports.KeyDirective = new graphql_1.GraphQLDirective({
- name: 'key',
- locations: [graphql_1.DirectiveLocation.OBJECT, graphql_1.DirectiveLocation.INTERFACE],
- args: {
- fields: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.ExtendsDirective = new graphql_1.GraphQLDirective({
- name: 'extends',
- locations: [graphql_1.DirectiveLocation.OBJECT, graphql_1.DirectiveLocation.INTERFACE],
-});
-exports.ExternalDirective = new graphql_1.GraphQLDirective({
- name: 'external',
- locations: [graphql_1.DirectiveLocation.OBJECT, graphql_1.DirectiveLocation.FIELD_DEFINITION],
-});
-exports.RequiresDirective = new graphql_1.GraphQLDirective({
- name: 'requires',
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.ProvidesDirective = new graphql_1.GraphQLDirective({
- name: 'provides',
- locations: [graphql_1.DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: graphql_1.GraphQLNonNull(graphql_1.GraphQLString),
- },
- },
-});
-exports.federationDirectives = [
- exports.KeyDirective,
- exports.ExtendsDirective,
- exports.ExternalDirective,
- exports.RequiresDirective,
- exports.ProvidesDirective,
-];
-exports.default = exports.federationDirectives;
-function hasDirectives(node) {
- return Boolean('directives' in node && node.directives);
-}
-function gatherDirectives(type) {
- let directives = [];
- if ('extensionASTNodes' in type && type.extensionASTNodes) {
- for (const node of type.extensionASTNodes) {
- if (hasDirectives(node)) {
- directives = directives.concat(node.directives);
- }
- }
- }
- if (type.astNode && hasDirectives(type.astNode))
- directives = directives.concat(type.astNode.directives);
- return directives;
-}
-exports.gatherDirectives = gatherDirectives;
-function typeIncludesDirective(type, directiveName) {
- if (graphql_1.isInputObjectType(type))
- return false;
- const directives = gatherDirectives(type);
- return directives.some(directive => directive.name.value === directiveName);
-}
-exports.typeIncludesDirective = typeIncludesDirective;
-//# sourceMappingURL=directives.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/directives.js.map b/gateway/node_modules/@apollo/federation/dist/directives.js.map
deleted file mode 100644
index f349d90..0000000
--- a/gateway/node_modules/@apollo/federation/dist/directives.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"directives.js","sourceRoot":"","sources":["../src/directives.ts"],"names":[],"mappings":";;;AAAA,qCAqBiB;A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AO,OAAO,CAAC,YAAY,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1D,CAAC;AAED,SAAgB,gBAAgB,CAC9B,IAA6D;IAE7D,IAAI,UAAU,GAAoB,EAAE,CAAC;IACrC,IAAI,mBAAmB,IAAI,IAAI,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACzD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACzC,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE;gBACvB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aACjD;SACF;KACF;IAED,IAAI,IAAI,CAAC,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7C,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAE1D,OAAO,UAAU,CAAC;AACpB,CAAC;AAhBD,4CAgBC;AAED,SAAgB,qBAAqB,CACnC,IAAsB,EACtB,aAAqB;IAErB,IAAI,2BAAiB,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1C,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAsC,CAAC,CAAC;IAC5E,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,KAAK,aAAa,CAAC,CAAC;AAC9E,CAAC;AAPD,sDAOC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/index.d.ts b/gateway/node_modules/@apollo/federation/dist/index.d.ts
deleted file mode 100644
index 4cd5706..0000000
--- a/gateway/node_modules/@apollo/federation/dist/index.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import "core-js/features/array/flat";
-import "core-js/features/array/flat-map";
-export * from './composition';
-export * from './service';
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/index.d.ts.map
deleted file mode 100644
index 043ce34..0000000
--- a/gateway/node_modules/@apollo/federation/dist/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AACrC,OAAO,iCAAiC,CAAC;AAEzC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/index.js b/gateway/node_modules/@apollo/federation/dist/index.js
deleted file mode 100644
index fd6a156..0000000
--- a/gateway/node_modules/@apollo/federation/dist/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"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 });
-require("core-js/features/array/flat");
-require("core-js/features/array/flat-map");
-__exportStar(require("./composition"), exports);
-__exportStar(require("./service"), exports);
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/index.js.map b/gateway/node_modules/@apollo/federation/dist/index.js.map
deleted file mode 100644
index 20b0ae6..0000000
--- a/gateway/node_modules/@apollo/federation/dist/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAqC;AACrC,2CAAyC;AAEzC,gDAA8B;AAC9B,4CAA0B"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.d.ts b/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.d.ts
deleted file mode 100644
index 87158c1..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { DocumentNode, GraphQLSchema } from 'graphql';
-import { GraphQLSchemaModule, GraphQLResolverMap } from 'apollo-graphql';
-import 'apollo-server-env';
-declare type LegacySchemaModule = {
- typeDefs: DocumentNode | DocumentNode[];
- resolvers?: GraphQLResolverMap;
-};
-export declare function buildFederatedSchema(modulesOrSDL: (GraphQLSchemaModule | DocumentNode)[] | DocumentNode | LegacySchemaModule): GraphQLSchema;
-export {};
-//# sourceMappingURL=buildFederatedSchema.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.d.ts.map b/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.d.ts.map
deleted file mode 100644
index 6fc9aa8..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"buildFederatedSchema.d.ts","sourceRoot":"","sources":["../../src/service/buildFederatedSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EAMd,MAAM,SAAS,CAAC;AACjB,OAAO,EAGL,mBAAmB,EAGnB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAOxB,OAAO,mBAAmB,CAAC;AAE3B,aAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,SAAS,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CACrC,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,YAAY,EACR,CAAC,mBAAmB,GAAG,YAAY,CAAC,EAAE,GACtC,YAAY,GACZ,kBAAkB,GACrB,aAAa,CAkGf"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.js b/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.js
deleted file mode 100644
index 278553e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.js
+++ /dev/null
@@ -1,79 +0,0 @@
-"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.buildFederatedSchema = void 0;
-const graphql_1 = require("graphql");
-const apollo_graphql_1 = require("apollo-graphql");
-const directives_1 = __importStar(require("../directives"));
-const types_1 = require("../types");
-const printFederatedSchema_1 = require("./printFederatedSchema");
-require("apollo-server-env");
-function buildFederatedSchema(modulesOrSDL) {
- let shapedModulesOrSDL;
- if ('typeDefs' in modulesOrSDL) {
- const { typeDefs, resolvers } = modulesOrSDL;
- const augmentedTypeDefs = Array.isArray(typeDefs) ? typeDefs : [typeDefs];
- shapedModulesOrSDL = augmentedTypeDefs.map((typeDefs, i) => {
- const module = { typeDefs };
- if (i === 0 && resolvers)
- module.resolvers = resolvers;
- return module;
- });
- }
- else {
- shapedModulesOrSDL = modulesOrSDL;
- }
- const modules = apollo_graphql_1.modulesFromSDL(shapedModulesOrSDL);
- let schema = apollo_graphql_1.buildSchemaFromSDL(modules, new graphql_1.GraphQLSchema({
- query: undefined,
- directives: [...graphql_1.specifiedDirectives, ...directives_1.default],
- }));
- const sdl = printFederatedSchema_1.printSchema(schema);
- if (!schema.getQueryType()) {
- schema = new graphql_1.GraphQLSchema(Object.assign(Object.assign({}, schema.toConfig()), { query: new graphql_1.GraphQLObjectType({
- name: 'Query',
- fields: {},
- }) }));
- }
- const entityTypes = Object.values(schema.getTypeMap()).filter(type => graphql_1.isObjectType(type) && directives_1.typeIncludesDirective(type, 'key'));
- const hasEntities = entityTypes.length > 0;
- schema = apollo_graphql_1.transformSchema(schema, type => {
- if (graphql_1.isObjectType(type) && type === schema.getQueryType()) {
- const config = type.toConfig();
- return new graphql_1.GraphQLObjectType(Object.assign(Object.assign({}, config), { fields: Object.assign(Object.assign(Object.assign({}, (hasEntities && { _entities: types_1.entitiesField })), { _service: Object.assign(Object.assign({}, types_1.serviceField), { resolve: () => ({ sdl }) }) }), config.fields) }));
- }
- return undefined;
- });
- schema = apollo_graphql_1.transformSchema(schema, type => {
- if (hasEntities && graphql_1.isUnionType(type) && type.name === types_1.EntityType.name) {
- return new graphql_1.GraphQLUnionType(Object.assign(Object.assign({}, types_1.EntityType.toConfig()), { types: entityTypes.filter(graphql_1.isObjectType) }));
- }
- return undefined;
- });
- for (const module of modules) {
- if (!module.resolvers)
- continue;
- apollo_graphql_1.addResolversToSchema(schema, module.resolvers);
- }
- return schema;
-}
-exports.buildFederatedSchema = buildFederatedSchema;
-//# sourceMappingURL=buildFederatedSchema.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.js.map b/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.js.map
deleted file mode 100644
index 1fc2d7d..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/buildFederatedSchema.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"buildFederatedSchema.js","sourceRoot":"","sources":["../../src/service/buildFederatedSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;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AAM,CAAC,SAAS,CAAC,CAAC;KAChD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAvGD,oDAuGC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/index.d.ts b/gateway/node_modules/@apollo/federation/dist/service/index.d.ts
deleted file mode 100644
index 3d847ca..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './buildFederatedSchema';
-export * from './printFederatedSchema';
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/service/index.d.ts.map
deleted file mode 100644
index 6786a23..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/index.js b/gateway/node_modules/@apollo/federation/dist/service/index.js
deleted file mode 100644
index 451c606..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-"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("./buildFederatedSchema"), exports);
-__exportStar(require("./printFederatedSchema"), exports);
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/index.js.map b/gateway/node_modules/@apollo/federation/dist/service/index.js.map
deleted file mode 100644
index b6a41df..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAuC;AACvC,yDAAuC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.d.ts b/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.d.ts
deleted file mode 100644
index f16fe82..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { GraphQLSchema, GraphQLNamedType, ASTNode } from 'graphql';
-import { ServiceDefinition } from '../composition';
-declare type Options = {
- commentDescriptions?: boolean;
-};
-export declare function printComposedSdl(schema: GraphQLSchema, serviceList: ServiceDefinition[], options?: Options): string;
-export declare function printIntrospectionSchema(schema: GraphQLSchema, options?: Options): string;
-export declare function printType(type: GraphQLNamedType, options?: Options): string;
-export declare function printWithReducedWhitespace(ast: ASTNode): string;
-export declare function printBlockString(value: string, indentation?: string, preferMultipleLines?: boolean): string;
-export {};
-//# sourceMappingURL=printComposedSdl.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.d.ts.map b/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.d.ts.map
deleted file mode 100644
index 70a99a2..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"printComposedSdl.d.ts","sourceRoot":"","sources":["../../src/service/printComposedSdl.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAIb,gBAAgB,EAsBhB,OAAO,EAER,MAAM,SAAS,CAAC;AACjB,OAAO,EAAS,iBAAiB,EAAmC,MAAM,gBAAgB,CAAC;AAK3F,aAAK,OAAO,GAAG;IASb,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AASF,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,EACrB,WAAW,EAAE,iBAAiB,EAAE,EAChC,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,CAYR;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,CAQR;AA6ED,wBAAgB,SAAS,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAgB3E;AAyID,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAI/D;AA0KD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,WAAW,GAAE,MAAW,EACxB,mBAAmB,GAAE,OAAe,GACnC,MAAM,CAsBR"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.js b/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.js
deleted file mode 100644
index 09b56bb..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.js
+++ /dev/null
@@ -1,284 +0,0 @@
-"use strict";
-var __rest = (this && this.__rest) || function (s, e) {
- var t = {};
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
- }
- return t;
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.printBlockString = exports.printWithReducedWhitespace = exports.printType = exports.printIntrospectionSchema = exports.printComposedSdl = void 0;
-const graphql_1 = require("graphql");
-const types_1 = require("../types");
-const utils_1 = require("../composition/utils");
-const csdlDirectives_1 = __importDefault(require("../csdlDirectives"));
-function printComposedSdl(schema, serviceList, options) {
- return printFilteredSchema(schema, serviceList, (n) => !graphql_1.isSpecifiedDirective(n) && !utils_1.isFederationDirective(n), isDefinedType, options);
-}
-exports.printComposedSdl = printComposedSdl;
-function printIntrospectionSchema(schema, options) {
- return printFilteredSchema(schema, [], graphql_1.isSpecifiedDirective, graphql_1.isIntrospectionType, options);
-}
-exports.printIntrospectionSchema = printIntrospectionSchema;
-function isDefinedType(type) {
- return (!graphql_1.isSpecifiedScalarType(type) &&
- !graphql_1.isIntrospectionType(type) &&
- !types_1.isFederationType(type));
-}
-function printFilteredSchema(schema, serviceList, directiveFilter, typeFilter, options) {
- const directives = [
- ...csdlDirectives_1.default,
- ...schema.getDirectives().filter(directiveFilter),
- ];
- const types = Object.values(schema.getTypeMap())
- .sort((type1, type2) => type1.name.localeCompare(type2.name))
- .filter(typeFilter);
- return ([printSchemaDefinition(schema, serviceList)]
- .concat(directives.map(directive => printDirective(directive, options)), types.map(type => printType(type, options)))
- .filter(Boolean)
- .join('\n\n') + '\n');
-}
-function printSchemaDefinition(schema, serviceList) {
- const operationTypes = [];
- const queryType = schema.getQueryType();
- if (queryType) {
- operationTypes.push(` query: ${queryType.name}`);
- }
- const mutationType = schema.getMutationType();
- if (mutationType) {
- operationTypes.push(` mutation: ${mutationType.name}`);
- }
- const subscriptionType = schema.getSubscriptionType();
- if (subscriptionType) {
- operationTypes.push(` subscription: ${subscriptionType.name}`);
- }
- return ('schema' +
- printFederationSchemaDirectives(serviceList) +
- `\n{\n${operationTypes.join('\n')}\n}`);
-}
-function printFederationSchemaDirectives(serviceList) {
- return (serviceList.map(service => `\n @graph(name: "${service.name}", url: "${service.url}")`).join('') +
- `\n @composedGraph(version: 1)`);
-}
-function printType(type, options) {
- if (graphql_1.isScalarType(type)) {
- return printScalar(type, options);
- }
- else if (graphql_1.isObjectType(type)) {
- return printObject(type, options);
- }
- else if (graphql_1.isInterfaceType(type)) {
- return printInterface(type, options);
- }
- else if (graphql_1.isUnionType(type)) {
- return printUnion(type, options);
- }
- else if (graphql_1.isEnumType(type)) {
- return printEnum(type, options);
- }
- else if (graphql_1.isInputObjectType(type)) {
- return printInputObject(type, options);
- }
- throw Error('Unexpected type: ' + type.toString());
-}
-exports.printType = printType;
-function printScalar(type, options) {
- return printDescription(options, type) + `scalar ${type.name}`;
-}
-function printObject(type, options) {
- const interfaces = type.getInterfaces();
- const implementedInterfaces = interfaces.length
- ? ' implements ' + interfaces.map(i => i.name).join(' & ')
- : '';
- const isExtension = type.extensionASTNodes && type.astNode && !type.astNode.fields;
- return (printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `type ${type.name}` +
- implementedInterfaces +
- printFederationTypeDirectives(type) +
- printFields(options, type));
-}
-function printFederationTypeDirectives(type) {
- var _a;
- const metadata = (_a = type.extensions) === null || _a === void 0 ? void 0 : _a.federation;
- if (!metadata)
- return '';
- const { serviceName: ownerService, keys } = metadata;
- if (!ownerService || !keys)
- return '';
- const _b = keys, _c = ownerService, ownerKeys = _b[_c], restKeys = __rest(_b, [typeof _c === "symbol" ? _c : _c + ""]);
- const ownerEntry = [ownerService, ownerKeys];
- const restEntries = Object.entries(restKeys);
- return (`\n @owner(graph: "${ownerService}")` +
- [ownerEntry, ...restEntries].map(([service, keys]) => keys
- .map((selections) => `\n @key(fields: "${printFieldSet(selections)}", graph: "${service}")`)
- .join(''))
- .join(''));
-}
-function printInterface(type, options) {
- const isExtension = type.extensionASTNodes && type.astNode && !type.astNode.fields;
- return (printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `interface ${type.name}` +
- printFields(options, type));
-}
-function printUnion(type, options) {
- const types = type.getTypes();
- const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
- return printDescription(options, type) + 'union ' + type.name + possibleTypes;
-}
-function printEnum(type, options) {
- const values = type
- .getValues()
- .map((value, i) => printDescription(options, value, ' ', !i) +
- ' ' +
- value.name +
- printDeprecated(value));
- return (printDescription(options, type) + `enum ${type.name}` + printBlock(values));
-}
-function printInputObject(type, options) {
- const fields = Object.values(type.getFields()).map((f, i) => printDescription(options, f, ' ', !i) + ' ' + printInputValue(f));
- return (printDescription(options, type) + `input ${type.name}` + printBlock(fields));
-}
-function printFields(options, type) {
- var _a, _b;
- const fields = Object.values(type.getFields()).map((f, i) => printDescription(options, f, ' ', !i) +
- ' ' +
- f.name +
- printArgs(options, f.args, ' ') +
- ': ' +
- String(f.type) +
- printDeprecated(f) +
- printFederationFieldDirectives(f, type));
- const isEntity = Boolean((_b = (_a = type.extensions) === null || _a === void 0 ? void 0 : _a.federation) === null || _b === void 0 ? void 0 : _b.keys);
- return printBlock(fields, isEntity);
-}
-function printWithReducedWhitespace(ast) {
- return graphql_1.print(ast)
- .replace(/\s+/g, ' ')
- .trim();
-}
-exports.printWithReducedWhitespace = printWithReducedWhitespace;
-function printFieldSet(selections) {
- return `{ ${selections.map(printWithReducedWhitespace).join(' ')} }`;
-}
-function printFederationFieldDirectives(field, parentType) {
- var _a, _b, _c;
- if (!((_a = field.extensions) === null || _a === void 0 ? void 0 : _a.federation))
- return '';
- const { serviceName, requires = [], provides = [], } = field.extensions.federation;
- let printed = '';
- if (serviceName &&
- serviceName !== ((_c = (_b = parentType.extensions) === null || _b === void 0 ? void 0 : _b.federation) === null || _c === void 0 ? void 0 : _c.serviceName)) {
- printed += ` @resolve(graph: "${serviceName}")`;
- }
- if (requires.length > 0) {
- printed += ` @requires(fields: "${printFieldSet(requires)}")`;
- }
- if (provides.length > 0) {
- printed += ` @provides(fields: "${printFieldSet(provides)}")`;
- }
- return printed;
-}
-function printBlock(items, onNewLine) {
- return items.length !== 0
- ? onNewLine
- ? '\n{\n' + items.join('\n') + '\n}'
- : ' {\n' + items.join('\n') + '\n}'
- : '';
-}
-function printArgs(options, args, indentation = '') {
- if (args.length === 0) {
- return '';
- }
- if (args.every((arg) => !arg.description)) {
- return '(' + args.map(printInputValue).join(', ') + ')';
- }
- return ('(\n' +
- args
- .map((arg, i) => printDescription(options, arg, ' ' + indentation, !i) +
- ' ' +
- indentation +
- printInputValue(arg))
- .join('\n') +
- '\n' +
- indentation +
- ')');
-}
-function printInputValue(arg) {
- const defaultAST = graphql_1.astFromValue(arg.defaultValue, arg.type);
- let argDecl = arg.name + ': ' + String(arg.type);
- if (defaultAST) {
- argDecl += ` = ${graphql_1.print(defaultAST)}`;
- }
- return argDecl;
-}
-function printDirective(directive, options) {
- return (printDescription(options, directive) +
- 'directive @' +
- directive.name +
- printArgs(options, directive.args) +
- (directive.isRepeatable ? ' repeatable' : '') +
- ' on ' +
- directive.locations.join(' | '));
-}
-function printDeprecated(fieldOrEnumVal) {
- if (!fieldOrEnumVal.isDeprecated) {
- return '';
- }
- const reason = fieldOrEnumVal.deprecationReason;
- const reasonAST = graphql_1.astFromValue(reason, graphql_1.GraphQLString);
- if (reasonAST && reason !== graphql_1.DEFAULT_DEPRECATION_REASON) {
- return ' @deprecated(reason: ' + graphql_1.print(reasonAST) + ')';
- }
- return ' @deprecated';
-}
-function printDescription(options, def, indentation = '', firstInBlock = true) {
- const { description } = def;
- if (description == null) {
- return '';
- }
- if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) {
- return printDescriptionWithComments(description, indentation, firstInBlock);
- }
- const preferMultipleLines = description.length > 70;
- const blockString = printBlockString(description, '', preferMultipleLines);
- const prefix = indentation && !firstInBlock ? '\n' + indentation : indentation;
- return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
-}
-function printDescriptionWithComments(description, indentation, firstInBlock) {
- const prefix = indentation && !firstInBlock ? '\n' : '';
- const comment = description
- .split('\n')
- .map((line) => indentation + (line !== '' ? '# ' + line : '#'))
- .join('\n');
- return prefix + comment + '\n';
-}
-function printBlockString(value, indentation = '', preferMultipleLines = false) {
- const isSingleLine = value.indexOf('\n') === -1;
- const hasLeadingSpace = value[0] === ' ' || value[0] === '\t';
- const hasTrailingQuote = value[value.length - 1] === '"';
- const hasTrailingSlash = value[value.length - 1] === '\\';
- const printAsMultipleLines = !isSingleLine ||
- hasTrailingQuote ||
- hasTrailingSlash ||
- preferMultipleLines;
- let result = '';
- if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {
- result += '\n' + indentation;
- }
- result += indentation ? value.replace(/\n/g, '\n' + indentation) : value;
- if (printAsMultipleLines) {
- result += '\n';
- }
- return '"""' + result.replace(/"""/g, '\\"""') + '"""';
-}
-exports.printBlockString = printBlockString;
-//# sourceMappingURL=printComposedSdl.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.js.map b/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.js.map
deleted file mode 100644
index 5830c57..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printComposedSdl.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"printComposedSdl.js","sourceRoot":"","sources":["../../src/service/printComposedSdl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCA6BiB;AAEjB,oCAA4C;AAC5C,gDAA6D;AAC7D,uEAA+C;AAqB/C,SAAgB,gBAAgB,CAC9B,MAAqB,EACrB,WAAgC,EAChC,OAAiB;IAEjB,OAAO,mBAAmB,CACxB,MAAM,EAEN,WAAW,EAIX,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,8BAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,6BAAqB,CAAC,CAAC,CAAC,EAC5D,aAAa,EACb,OAAO,CACR,CAAC;AACJ,CAAC;AAhBD,4CAgBC;AAED,SAAgB,wBAAwB,CACtC,MAAqB,EACrB,OAAiB;IAEjB,OAAO,mBAAmB,CACxB,MAAM,EACN,EAAE,EACF,8BAAoB,EACpB,6BAAmB,EACnB,OAAO,CACR,CAAC;AACJ,CAAC;AAXD,4DAWC;AAKD,SAAS,aAAa,CAAC,IAAsB;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,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC9D,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;IACzD,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1D,MAAM,oBAAoB,GACxB,CAAC,YAAY;QACb,gBAAgB;QAChB,gBAAgB;QAChB,mBAAmB,CAAC;IAEtB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,oBAAoB,IAAI,CAAC,CAAC,YAAY,IAAI,eAAe,CAAC,EAAE;QAC9D,MAAM,IAAI,IAAI,GAAG,WAAW,CAAC;KAC9B;IACD,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACzE,IAAI,oBAAoB,EAAE;QACxB,MAAM,IAAI,IAAI,CAAC;KAChB;IAED,OAAO,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;AACzD,CAAC;AA1BD,4CA0BC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.d.ts b/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.d.ts
deleted file mode 100644
index 753f8dc..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { GraphQLSchema, GraphQLNamedType, ASTNode } from 'graphql';
-declare type Options = {
- commentDescriptions?: boolean;
-};
-export declare function printSchema(schema: GraphQLSchema, options?: Options): string;
-export declare function printIntrospectionSchema(schema: GraphQLSchema, options?: Options): string;
-export declare function printType(type: GraphQLNamedType, options?: Options): string;
-export declare function printWithReducedWhitespace(ast: ASTNode): string;
-export declare function printBlockString(value: string, indentation?: string, preferMultipleLines?: boolean): string;
-export {};
-//# sourceMappingURL=printFederatedSchema.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.d.ts.map b/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.d.ts.map
deleted file mode 100644
index 0b3d171..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"printFederatedSchema.d.ts","sourceRoot":"","sources":["../../src/service/printFederatedSchema.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EAIb,gBAAgB,EAsBhB,OAAO,EACR,MAAM,SAAS,CAAC;AAMjB,aAAK,OAAO,GAAG;IASb,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AASF,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAU5E;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,CAOR;AA2FD,wBAAgB,SAAS,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAgB3E;AAuHD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAI/D;AAoHD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,WAAW,GAAE,MAAW,EACxB,mBAAmB,GAAE,OAAe,GACnC,MAAM,CAsBR"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.js b/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.js
deleted file mode 100644
index af2268f..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.js
+++ /dev/null
@@ -1,265 +0,0 @@
-"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.printBlockString = exports.printWithReducedWhitespace = exports.printType = exports.printIntrospectionSchema = exports.printSchema = void 0;
-const graphql_1 = require("graphql");
-const types_1 = require("../types");
-const utils_1 = require("../composition/utils");
-const directives_1 = __importStar(require("../directives"));
-function printSchema(schema, options) {
- return printFilteredSchema(schema, (n) => !graphql_1.isSpecifiedDirective(n) && !utils_1.isFederationDirective(n), isDefinedType, options);
-}
-exports.printSchema = printSchema;
-function printIntrospectionSchema(schema, options) {
- return printFilteredSchema(schema, graphql_1.isSpecifiedDirective, graphql_1.isIntrospectionType, options);
-}
-exports.printIntrospectionSchema = printIntrospectionSchema;
-function isDefinedType(type) {
- return (!graphql_1.isSpecifiedScalarType(type) &&
- !graphql_1.isIntrospectionType(type) &&
- !types_1.isFederationType(type));
-}
-function printFilteredSchema(schema, directiveFilter, typeFilter, options) {
- const directives = schema.getDirectives().filter(directiveFilter);
- const types = Object.values(schema.getTypeMap())
- .sort((type1, type2) => type1.name.localeCompare(type2.name))
- .filter(typeFilter);
- return ([printSchemaDefinition(schema)]
- .concat(directives.map(directive => printDirective(directive, options)), types.map(type => printType(type, options)))
- .filter(Boolean)
- .join('\n\n') + '\n');
-}
-function printSchemaDefinition(schema) {
- if (isSchemaOfCommonNames(schema)) {
- return;
- }
- const operationTypes = [];
- const queryType = schema.getQueryType();
- if (queryType) {
- operationTypes.push(` query: ${queryType.name}`);
- }
- const mutationType = schema.getMutationType();
- if (mutationType) {
- operationTypes.push(` mutation: ${mutationType.name}`);
- }
- const subscriptionType = schema.getSubscriptionType();
- if (subscriptionType) {
- operationTypes.push(` subscription: ${subscriptionType.name}`);
- }
- return `schema {\n${operationTypes.join('\n')}\n}`;
-}
-function isSchemaOfCommonNames(schema) {
- const queryType = schema.getQueryType();
- if (queryType && queryType.name !== 'Query') {
- return false;
- }
- const mutationType = schema.getMutationType();
- if (mutationType && mutationType.name !== 'Mutation') {
- return false;
- }
- const subscriptionType = schema.getSubscriptionType();
- if (subscriptionType && subscriptionType.name !== 'Subscription') {
- return false;
- }
- return true;
-}
-function printType(type, options) {
- if (graphql_1.isScalarType(type)) {
- return printScalar(type, options);
- }
- else if (graphql_1.isObjectType(type)) {
- return printObject(type, options);
- }
- else if (graphql_1.isInterfaceType(type)) {
- return printInterface(type, options);
- }
- else if (graphql_1.isUnionType(type)) {
- return printUnion(type, options);
- }
- else if (graphql_1.isEnumType(type)) {
- return printEnum(type, options);
- }
- else if (graphql_1.isInputObjectType(type)) {
- return printInputObject(type, options);
- }
- throw Error('Unexpected type: ' + type.toString());
-}
-exports.printType = printType;
-function printScalar(type, options) {
- return printDescription(options, type) + `scalar ${type.name}`;
-}
-function printObject(type, options) {
- const interfaces = type.getInterfaces();
- const implementedInterfaces = interfaces.length
- ? ' implements ' + interfaces.map(i => i.name).join(' & ')
- : '';
- const isExtension = type.extensionASTNodes && type.astNode && !type.astNode.fields;
- return (printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `type ${type.name}${implementedInterfaces}` +
- printFederationDirectives(type) +
- printFields(options, type));
-}
-function printInterface(type, options) {
- const isExtension = type.extensionASTNodes && type.astNode && !type.astNode.fields;
- return (printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `interface ${type.name}` +
- printFederationDirectives(type) +
- printFields(options, type));
-}
-function printUnion(type, options) {
- const types = type.getTypes();
- const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
- return printDescription(options, type) + 'union ' + type.name + possibleTypes;
-}
-function printEnum(type, options) {
- const values = type
- .getValues()
- .map((value, i) => printDescription(options, value, ' ', !i) +
- ' ' +
- value.name +
- printDeprecated(value));
- return (printDescription(options, type) + `enum ${type.name}` + printBlock(values));
-}
-function printInputObject(type, options) {
- const fields = Object.values(type.getFields()).map((f, i) => printDescription(options, f, ' ', !i) + ' ' + printInputValue(f));
- return (printDescription(options, type) + `input ${type.name}` + printBlock(fields));
-}
-function printFields(options, type) {
- const fields = Object.values(type.getFields()).map((f, i) => printDescription(options, f, ' ', !i) +
- ' ' +
- f.name +
- printArgs(options, f.args, ' ') +
- ': ' +
- String(f.type) +
- printDeprecated(f) +
- printFederationDirectives(f));
- return printBlock(fields);
-}
-function printFederationDirectives(type) {
- if (!type.astNode)
- return '';
- if (graphql_1.isInputObjectType(type))
- return '';
- const allDirectives = directives_1.gatherDirectives(type)
- .filter((n) => directives_1.default.some((fedDir) => fedDir.name === n.name.value))
- .map(graphql_1.print);
- const dedupedDirectives = [...new Set(allDirectives)];
- return dedupedDirectives.length > 0 ? ' ' + dedupedDirectives.join(' ') : '';
-}
-function printWithReducedWhitespace(ast) {
- return graphql_1.print(ast)
- .replace(/\s+/g, ' ')
- .trim();
-}
-exports.printWithReducedWhitespace = printWithReducedWhitespace;
-function printBlock(items) {
- return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : '';
-}
-function printArgs(options, args, indentation = '') {
- if (args.length === 0) {
- return '';
- }
- if (args.every(arg => !arg.description)) {
- return '(' + args.map(printInputValue).join(', ') + ')';
- }
- return ('(\n' +
- args
- .map((arg, i) => printDescription(options, arg, ' ' + indentation, !i) +
- ' ' +
- indentation +
- printInputValue(arg))
- .join('\n') +
- '\n' +
- indentation +
- ')');
-}
-function printInputValue(arg) {
- const defaultAST = graphql_1.astFromValue(arg.defaultValue, arg.type);
- let argDecl = arg.name + ': ' + String(arg.type);
- if (defaultAST) {
- argDecl += ` = ${graphql_1.print(defaultAST)}`;
- }
- return argDecl;
-}
-function printDirective(directive, options) {
- return (printDescription(options, directive) +
- 'directive @' +
- directive.name +
- printArgs(options, directive.args) +
- (directive.isRepeatable ? ' repeatable' : '') +
- ' on ' +
- directive.locations.join(' | '));
-}
-function printDeprecated(fieldOrEnumVal) {
- if (!fieldOrEnumVal.isDeprecated) {
- return '';
- }
- const reason = fieldOrEnumVal.deprecationReason;
- const reasonAST = graphql_1.astFromValue(reason, graphql_1.GraphQLString);
- if (reasonAST && reason !== '' && reason !== graphql_1.DEFAULT_DEPRECATION_REASON) {
- return ' @deprecated(reason: ' + graphql_1.print(reasonAST) + ')';
- }
- return ' @deprecated';
-}
-function printDescription(options, def, indentation = '', firstInBlock = true) {
- const { description } = def;
- if (description == null) {
- return '';
- }
- if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) {
- return printDescriptionWithComments(description, indentation, firstInBlock);
- }
- const preferMultipleLines = description.length > 70;
- const blockString = printBlockString(description, '', preferMultipleLines);
- const prefix = indentation && !firstInBlock ? '\n' + indentation : indentation;
- return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
-}
-function printDescriptionWithComments(description, indentation, firstInBlock) {
- const prefix = indentation && !firstInBlock ? '\n' : '';
- const comment = description
- .split('\n')
- .map(line => indentation + (line !== '' ? '# ' + line : '#'))
- .join('\n');
- return prefix + comment + '\n';
-}
-function printBlockString(value, indentation = '', preferMultipleLines = false) {
- const isSingleLine = value.indexOf('\n') === -1;
- const hasLeadingSpace = value[0] === ' ' || value[0] === '\t';
- const hasTrailingQuote = value[value.length - 1] === '"';
- const hasTrailingSlash = value[value.length - 1] === '\\';
- const printAsMultipleLines = !isSingleLine ||
- hasTrailingQuote ||
- hasTrailingSlash ||
- preferMultipleLines;
- let result = '';
- if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {
- result += '\n' + indentation;
- }
- result += indentation ? value.replace(/\n/g, '\n' + indentation) : value;
- if (printAsMultipleLines) {
- result += '\n';
- }
- return '"""' + result.replace(/"""/g, '\\"""') + '"""';
-}
-exports.printBlockString = printBlockString;
-//# sourceMappingURL=printFederatedSchema.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.js.map b/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.js.map
deleted file mode 100644
index 6dcd901..0000000
--- a/gateway/node_modules/@apollo/federation/dist/service/printFederatedSchema.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"printFederatedSchema.js","sourceRoot":"","sources":["../../src/service/printFederatedSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,qCA4BiB;AAEjB,oCAA4C;AAC5C,gDAA6D;AAC7D,4DAAuE;AAqBvE,SAAgB,WAAW,CAAC,MAAqB,EAAE,OAAiB;IAClE,OAAO,mBAAmB,CACxB,MAAM,EAIN,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,8BAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,6BAAqB,CAAC,CAAC,CAAC,EAC5D,aAAa,EACb,OAAO,CACR,CAAC;AACJ,CAAC;AAVD,kCAUC;AAED,SAAgB,wBAAwB,CACtC,MAAqB,EACrB,OAAiB;IAEjB,OAAO,mBAAmB,CACxB,MAAM,EACN,8BAAoB,EACpB,6BAAmB,EACnB,OAAO,CACR,CAAC;AACJ,CAAC;AAVD,4DAUC;AAKD,SAAS,aAAa,CAAC,IAAsB;IAC3C,OAAO,CACL,CAAC,+BAAqB,CAAC,IAAI,CAAC;QAC5B,CAAC,6BAAmB,CAAC,IAAI,CAAC;QAC1B,CAAC,wBAAgB,CAAC,IAA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AgB,CAC9B,KAAa,EACb,cAAsB,EAAE,EACxB,sBAA+B,KAAK;IAEpC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,MAAM,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC9D,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;IACzD,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1D,MAAM,oBAAoB,GACxB,CAAC,YAAY;QACb,gBAAgB;QAChB,gBAAgB;QAChB,mBAAmB,CAAC;IAEtB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,oBAAoB,IAAI,CAAC,CAAC,YAAY,IAAI,eAAe,CAAC,EAAE;QAC9D,MAAM,IAAI,IAAI,GAAG,WAAW,CAAC;KAC9B;IACD,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACzE,IAAI,oBAAoB,EAAE;QACxB,MAAM,IAAI,IAAI,CAAC;KAChB;IAED,OAAO,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;AACzD,CAAC;AA1BD,4CA0BC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.d.ts b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.d.ts
deleted file mode 100644
index 7b0f424..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare const _default: import("pretty-format/build/types").Plugin;
-export default _default;
-//# sourceMappingURL=astSerializer.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.d.ts.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.d.ts.map
deleted file mode 100644
index 5ad4940..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"astSerializer.d.ts","sourceRoot":"","sources":["../../src/snapshotSerializers/astSerializer.ts"],"names":[],"mappings":";AAGA,wBAiBY"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.js b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.js
deleted file mode 100644
index 4664185..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.js
+++ /dev/null
@@ -1,14 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const graphql_1 = require("graphql");
-exports.default = {
- test(value) {
- return value && typeof value.kind === 'string';
- },
- serialize(value, _config, indentation, _depth, _refs, _printer) {
- return graphql_1.print(value)
- .trim()
- .replace(/\n/g, '\n' + indentation);
- },
-};
-//# sourceMappingURL=astSerializer.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.js.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.js.map
deleted file mode 100644
index ac4aca1..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/astSerializer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"astSerializer.js","sourceRoot":"","sources":["../../src/snapshotSerializers/astSerializer.ts"],"names":[],"mappings":";;AAAA,qCAAyC;AAGzC,kBAAe;IACb,IAAI,CAAC,KAAU;QACb,OAAO,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;IACjD,CAAC;IAED,SAAS,CACP,KAAc,EACd,OAAe,EACf,WAAmB,EACnB,MAAc,EACd,KAAW,EACX,QAAa;QAEb,OAAO,eAAK,CAAC,KAAK,CAAC;aAChB,IAAI,EAAE;aACN,OAAO,CAAC,KAAK,EAAE,IAAI,GAAG,WAAW,CAAC,CAAC;IACxC,CAAC;CACQ,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.d.ts b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.d.ts
deleted file mode 100644
index a1900ec..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare const _default: import("pretty-format/build/types").Plugin;
-export default _default;
-//# sourceMappingURL=graphqlErrorSerializer.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.d.ts.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.d.ts.map
deleted file mode 100644
index faa805c..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"graphqlErrorSerializer.d.ts","sourceRoot":"","sources":["../../src/snapshotSerializers/graphqlErrorSerializer.ts"],"names":[],"mappings":";AAGA,wBAWY"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.js b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.js
deleted file mode 100644
index 3a18bb5..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const graphql_1 = require("graphql");
-exports.default = {
- test(value) {
- return value && value instanceof graphql_1.GraphQLError;
- },
- print(value, print) {
- return print({
- message: value.message,
- code: value.extensions ? value.extensions.code : 'MISSING_ERROR',
- });
- },
-};
-//# sourceMappingURL=graphqlErrorSerializer.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.js.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.js.map
deleted file mode 100644
index f76d36f..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/graphqlErrorSerializer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"graphqlErrorSerializer.js","sourceRoot":"","sources":["../../src/snapshotSerializers/graphqlErrorSerializer.ts"],"names":[],"mappings":";;AAAA,qCAAuC;AAGvC,kBAAe;IACb,IAAI,CAAC,KAAU;QACb,OAAO,KAAK,IAAI,KAAK,YAAY,sBAAY,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,KAAmB,EAAE,KAAK;QAC9B,OAAO,KAAK,CAAC;YACX,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe;SACjE,CAAC,CAAC;IACL,CAAC;CACQ,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.d.ts b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.d.ts
deleted file mode 100644
index c7cb821..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export { default as astSerializer } from './astSerializer';
-export { default as selectionSetSerializer } from './selectionSetSerializer';
-export { default as typeSerializer } from './typeSerializer';
-export { default as graphqlErrorSerializer } from './graphqlErrorSerializer';
-declare global {
- namespace jest {
- interface Expect {
- addSnapshotSerializer(serializer: import('pretty-format').Plugin): void;
- }
- }
-}
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.d.ts.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.d.ts.map
deleted file mode 100644
index 436b437..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snapshotSerializers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,IAAI,CAAC;QACb,UAAU,MAAM;YAId,qBAAqB,CAAC,UAAU,EAAE,OAAO,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;SACzE;KACF;CACF"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.js b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.js
deleted file mode 100644
index fbbea07..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var astSerializer_1 = require("./astSerializer");
-Object.defineProperty(exports, "astSerializer", { enumerable: true, get: function () { return astSerializer_1.default; } });
-var selectionSetSerializer_1 = require("./selectionSetSerializer");
-Object.defineProperty(exports, "selectionSetSerializer", { enumerable: true, get: function () { return selectionSetSerializer_1.default; } });
-var typeSerializer_1 = require("./typeSerializer");
-Object.defineProperty(exports, "typeSerializer", { enumerable: true, get: function () { return typeSerializer_1.default; } });
-var graphqlErrorSerializer_1 = require("./graphqlErrorSerializer");
-Object.defineProperty(exports, "graphqlErrorSerializer", { enumerable: true, get: function () { return graphqlErrorSerializer_1.default; } });
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.js.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.js.map
deleted file mode 100644
index 5c38f01..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/snapshotSerializers/index.ts"],"names":[],"mappings":";;AAAA,iDAA2D;AAAlD,8GAAA,OAAO,OAAiB;AACjC,mEAA6E;AAApE,gIAAA,OAAO,OAA0B;AAC1C,mDAA6D;AAApD,gHAAA,OAAO,OAAkB;AAClC,mEAA6E;AAApE,gIAAA,OAAO,OAA0B"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.d.ts b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.d.ts
deleted file mode 100644
index 991c013..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare const _default: import("pretty-format/build/types").Plugin;
-export default _default;
-//# sourceMappingURL=selectionSetSerializer.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.d.ts.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.d.ts.map
deleted file mode 100644
index d8f117e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"selectionSetSerializer.d.ts","sourceRoot":"","sources":["../../src/snapshotSerializers/selectionSetSerializer.ts"],"names":[],"mappings":";AAGA,wBASY"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.js b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.js
deleted file mode 100644
index 10c4d70..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const graphql_1 = require("graphql");
-exports.default = {
- test(value) {
- return (Array.isArray(value) && value.length > 0 && value.every(graphql_1.isSelectionNode));
- },
- print(selectionNodes) {
- return selectionNodes.map(node => graphql_1.print(node)).join('\n');
- },
-};
-//# sourceMappingURL=selectionSetSerializer.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.js.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.js.map
deleted file mode 100644
index c96bfa9..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/selectionSetSerializer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"selectionSetSerializer.js","sourceRoot":"","sources":["../../src/snapshotSerializers/selectionSetSerializer.ts"],"names":[],"mappings":";;AAAA,qCAAgE;AAGhE,kBAAe;IACb,IAAI,CAAC,KAAU;QACb,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,yBAAe,CAAC,CACzE,CAAC;IACJ,CAAC;IACD,KAAK,CAAC,cAA+B;QACnC,OAAO,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,eAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;CACQ,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.d.ts b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.d.ts
deleted file mode 100644
index 8d322c2..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare const _default: import("pretty-format/build/types").Plugin;
-export default _default;
-//# sourceMappingURL=typeSerializer.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.d.ts.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.d.ts.map
deleted file mode 100644
index 7207e5b..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"typeSerializer.d.ts","sourceRoot":"","sources":["../../src/snapshotSerializers/typeSerializer.ts"],"names":[],"mappings":";AAGA,wBAOY"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.js b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.js
deleted file mode 100644
index 607079e..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-const graphql_1 = require("graphql");
-exports.default = {
- test(value) {
- return value && graphql_1.isNamedType(value);
- },
- print(value) {
- return graphql_1.printType(value);
- },
-};
-//# sourceMappingURL=typeSerializer.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.js.map b/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.js.map
deleted file mode 100644
index af32fc4..0000000
--- a/gateway/node_modules/@apollo/federation/dist/snapshotSerializers/typeSerializer.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"typeSerializer.js","sourceRoot":"","sources":["../../src/snapshotSerializers/typeSerializer.ts"],"names":[],"mappings":";;AAAA,qCAAmE;AAGnE,kBAAe;IACb,IAAI,CAAC,KAAU;QACb,OAAO,KAAK,IAAI,qBAAW,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IACD,KAAK,CAAC,KAAuB;QAC3B,OAAO,mBAAS,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;CACQ,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/types.d.ts b/gateway/node_modules/@apollo/federation/dist/types.d.ts
deleted file mode 100644
index e2d18a0..0000000
--- a/gateway/node_modules/@apollo/federation/dist/types.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { GraphQLFieldConfig, GraphQLUnionType, GraphQLObjectType, GraphQLScalarType, GraphQLType, GraphQLNamedType, GraphQLResolveInfo } from 'graphql';
-export declare const EntityType: GraphQLUnionType;
-export declare const ServiceType: GraphQLObjectType;
-export declare const AnyType: GraphQLScalarType;
-export declare type GraphQLReferenceResolver = (reference: object, context: TContext, info: GraphQLResolveInfo) => any;
-declare module 'graphql/type/definition' {
- interface GraphQLObjectType {
- resolveReference?: GraphQLReferenceResolver;
- }
- interface GraphQLObjectTypeConfig {
- resolveReference?: GraphQLReferenceResolver;
- }
-}
-export declare const entitiesField: GraphQLFieldConfig;
-export declare const serviceField: GraphQLFieldConfig;
-export declare const federationTypes: GraphQLNamedType[];
-export declare function isFederationType(type: GraphQLType): boolean;
-//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/types.d.ts.map b/gateway/node_modules/@apollo/federation/dist/types.d.ts.map
deleted file mode 100644
index ce32103..0000000
--- a/gateway/node_modules/@apollo/federation/dist/types.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAElB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EAGjB,WAAW,EACX,gBAAgB,EAEhB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAGjB,eAAO,MAAM,UAAU,kBAGrB,CAAC;AAEH,eAAO,MAAM,WAAW;;EAStB,CAAC;AAEH,eAAO,MAAM,OAAO,mBAKlB,CAAC;AAkBH,oBAAY,wBAAwB,CAAC,QAAQ,IAAI,CAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,kBAAkB,KACrB,GAAG,CAAC;AAET,OAAO,QAAQ,yBAAyB,CAAC;IACvC,UAAU,iBAAiB;QACzB,gBAAgB,CAAC,EAAE,wBAAwB,CAAC,GAAG,CAAC,CAAC;KAClD;IAED,UAAU,uBAAuB,CAAC,OAAO,EAAE,QAAQ;QACjD,gBAAgB,CAAC,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CAAC;KACvD;CACF;AAED,eAAO,MAAM,aAAa,EAAE,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAoCtD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAErD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,gBAAgB,EAI7C,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAI3D"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/types.js b/gateway/node_modules/@apollo/federation/dist/types.js
deleted file mode 100644
index 869abb1..0000000
--- a/gateway/node_modules/@apollo/federation/dist/types.js
+++ /dev/null
@@ -1,74 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.isFederationType = exports.federationTypes = exports.serviceField = exports.entitiesField = exports.AnyType = exports.ServiceType = exports.EntityType = void 0;
-const graphql_1 = require("graphql");
-exports.EntityType = new graphql_1.GraphQLUnionType({
- name: '_Entity',
- types: [],
-});
-exports.ServiceType = new graphql_1.GraphQLObjectType({
- name: '_Service',
- fields: {
- sdl: {
- type: graphql_1.GraphQLString,
- description: 'The sdl representing the federated service capabilities. Includes federation directives, removes federation types, and includes rest of full schema after schema directives have been applied',
- },
- },
-});
-exports.AnyType = new graphql_1.GraphQLScalarType({
- name: '_Any',
- serialize(value) {
- return value;
- },
-});
-function isPromise(value) {
- return Boolean(value && 'then' in value && typeof value.then === 'function');
-}
-function addTypeNameToPossibleReturn(maybeObject, typename) {
- if (maybeObject !== null && typeof maybeObject === 'object') {
- Object.defineProperty(maybeObject, '__typename', {
- value: typename,
- });
- }
- return maybeObject;
-}
-exports.entitiesField = {
- type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(exports.EntityType)),
- args: {
- representations: {
- type: new graphql_1.GraphQLNonNull(new graphql_1.GraphQLList(new graphql_1.GraphQLNonNull(exports.AnyType))),
- },
- },
- resolve(_source, { representations }, context, info) {
- return representations.map((reference) => {
- const { __typename } = reference;
- const type = info.schema.getType(__typename);
- if (!type || !graphql_1.isObjectType(type)) {
- throw new Error(`The _entities resolver tried to load an entity for type "${__typename}", but no object type of that name was found in the schema`);
- }
- const resolveReference = type.resolveReference
- ? type.resolveReference
- : function defaultResolveReference() {
- return reference;
- };
- const result = resolveReference(reference, context, info);
- if (isPromise(result)) {
- return result.then((x) => addTypeNameToPossibleReturn(x, __typename));
- }
- return addTypeNameToPossibleReturn(result, __typename);
- });
- },
-};
-exports.serviceField = {
- type: new graphql_1.GraphQLNonNull(exports.ServiceType),
-};
-exports.federationTypes = [
- exports.ServiceType,
- exports.AnyType,
- exports.EntityType,
-];
-function isFederationType(type) {
- return (graphql_1.isNamedType(type) && exports.federationTypes.some(({ name }) => name === type.name));
-}
-exports.isFederationType = isFederationType;
-//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/dist/types.js.map b/gateway/node_modules/@apollo/federation/dist/types.js.map
deleted file mode 100644
index 8106cb0..0000000
--- a/gateway/node_modules/@apollo/federation/dist/types.js.map
+++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CAAC;AACJ,CAAC;AAJD,4CAIC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/federation/package.json b/gateway/node_modules/@apollo/federation/package.json
deleted file mode 100644
index fe3d716..0000000
--- a/gateway/node_modules/@apollo/federation/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "@apollo/federation",
- "version": "0.20.4",
- "description": "Apollo Federation Utilities",
- "main": "dist/index.js",
- "types": "dist/index.d.ts",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/apollographql/federation.git",
- "directory": "federation-js/"
- },
- "keywords": [
- "graphql",
- "federation",
- "apollo"
- ],
- "author": "Apollo ",
- "license": "MIT",
- "engines": {
- "node": ">=8"
- },
- "publishConfig": {
- "access": "public"
- },
- "dependencies": {
- "apollo-graphql": "^0.6.0",
- "apollo-server-env": "^2.4.5",
- "core-js": "^3.4.0",
- "lodash.xorby": "^4.7.0"
- },
- "peerDependencies": {
- "graphql": "^14.5.0 || ^15.0.0"
- },
- "gitHead": "378eb6bc3a0a6400191fc133bc3b6db3cd6d2e0c"
-}
diff --git a/gateway/node_modules/@apollo/federation/src/__tests__/tsconfig.json b/gateway/node_modules/@apollo/federation/src/__tests__/tsconfig.json
deleted file mode 100644
index fcb8707..0000000
--- a/gateway/node_modules/@apollo/federation/src/__tests__/tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../../tsconfig.test.base",
- "include": ["**/*"],
- "references": [
- { "path": "../../" },
- ]
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/__tests__/compose.test.ts b/gateway/node_modules/@apollo/federation/src/composition/__tests__/compose.test.ts
deleted file mode 100644
index d458929..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/__tests__/compose.test.ts
+++ /dev/null
@@ -1,1391 +0,0 @@
-import {
- GraphQLObjectType,
- isSpecifiedDirective,
- GraphQLDirective,
-} from 'graphql';
-import gql from 'graphql-tag';
-import { composeServices } from '../compose';
-import {
- astSerializer,
- typeSerializer,
- selectionSetSerializer,
-} from '../../snapshotSerializers';
-import { normalizeTypeDefs } from '../normalize';
-import { getFederationMetadata } from '../utils';
-
-expect.addSnapshotSerializer(astSerializer);
-expect.addSnapshotSerializer(typeSerializer);
-expect.addSnapshotSerializer(selectionSetSerializer);
-
-describe('composeServices', () => {
- it('should include types from different services', () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type User {
- name: String
- email: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('User')).toMatchInlineSnapshot(`
- type User {
- name: String
- email: String!
- }
- `);
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- }
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- const user = schema.getType('User') as GraphQLObjectType;
-
- expect(getFederationMetadata(product).serviceName).toEqual('serviceA');
- expect(getFederationMetadata(user).serviceName).toEqual('serviceB');
- });
-
- it("doesn't leave federation directives in the final schema", () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const { schema } = composeServices([serviceA]);
-
- const directives = schema.getDirectives();
- expect(directives.every(isSpecifiedDirective));
- });
-
- describe('basic type extensions', () => {
- it('works when extension service is second', () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- price: Int!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- price: Int!
- }
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(getFederationMetadata(product).serviceName).toEqual('serviceA');
- expect(getFederationMetadata(product.getFields()['price']).serviceName).toEqual(
- 'serviceB',
- );
- });
-
- it('works when extension service is first', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Product {
- price: Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceB',
- };
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- price: Int!
- }
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(getFederationMetadata(product).serviceName).toEqual('serviceB');
- expect(getFederationMetadata(product.getFields()['price']).serviceName).toEqual(
- 'serviceA',
- );
- });
-
- it('works with multiple extensions on the same type', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Product {
- price: Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- extend type Product {
- color: String!
- }
- `,
- name: 'serviceC',
- };
-
- const { schema, errors } = composeServices([
- serviceA,
- serviceB,
- serviceC,
- ]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- price: Int!
- color: String!
- }
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(getFederationMetadata(product).serviceName).toEqual('serviceB');
- expect(getFederationMetadata(product.getFields()['price']).serviceName).toEqual(
- 'serviceA',
- );
- expect(getFederationMetadata(product.getFields()['color']).serviceName).toEqual(
- 'serviceC',
- );
- });
-
- it('allows extensions to overwrite other extension fields', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Product {
- price: Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- extend type Product {
- price: Float!
- color: String!
- }
- `,
- name: 'serviceC',
- };
-
- const { schema, errors } = composeServices([
- serviceA,
- serviceB,
- serviceC,
- ]);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: Field "Product.price" can only be defined once.],
- ]
- `);
- expect(schema).toBeDefined();
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(product).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- price: Float!
- color: String!
- }
- `);
-
- expect(getFederationMetadata(product).serviceName).toEqual('serviceB');
- expect(getFederationMetadata(product.getFields()['price']).serviceName).toEqual(
- 'serviceC',
- );
- });
-
- it('preserves arguments for fields', () => {
- const serviceA = {
- typeDefs: gql`
- enum Curr {
- USD
- GBP
- }
-
- extend type Product {
- price(currency: Curr!): Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product {
- sku: String!
- name(type: String): String!
- }
- `,
- name: 'serviceB',
- };
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name(type: String): String!
- price(currency: Curr!): Int!
- }
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(product.getFields()['price'].args[0].name).toEqual('currency');
- });
-
- // This is a limitation of extendSchema currently (this is currently a broken test to demonstrate)
- it.skip('overwrites field on extension by base type when base type comes second', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
- const serviceB = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(schema).toBeDefined();
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: Field "Product.sku" already exists in the schema. It cannot also be defined in this type extension.],
- [GraphQLError: Field "Product.name" already exists in the schema. It cannot also be defined in this type extension.],
- ]
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(product).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- }
- `);
- expect(getFederationMetadata(product.getFields()['sku']).serviceName).toEqual(
- 'serviceB',
- );
- expect(getFederationMetadata(product.getFields()['name']).serviceName).toEqual(
- 'serviceB',
- );
- });
-
- describe('collisions & error handling', () => {
- it('handles collisions on type extensions as expected', () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- name: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(schema).toBeDefined();
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: [serviceA] Product.name -> Field "Product.name" already exists in the schema. It cannot also be defined in this type extension. If this is meant to be an external field, add the \`@external\` directive.],
- ]
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(product).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- }
- `);
- expect(getFederationMetadata(product.getFields()['name']).serviceName).toEqual(
- 'serviceB',
- );
- });
-
- it('reports multiple errors correctly', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- }
-
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(schema).toBeDefined();
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: [serviceA] Product.sku -> Field "Product.sku" already exists in the schema. It cannot also be defined in this type extension. If this is meant to be an external field, add the \`@external\` directive.],
- [GraphQLError: [serviceA] Product.name -> Field "Product.name" already exists in the schema. It cannot also be defined in this type extension. If this is meant to be an external field, add the \`@external\` directive.],
- ]
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(product).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- }
- `);
- expect(getFederationMetadata(product.getFields()['name']).serviceName).toEqual(
- 'serviceB',
- );
- });
-
- it('handles collisions of base types as expected (newest takes precedence)', () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product {
- id: ID!
- name: String!
- price: Int!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(schema).toBeDefined();
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: Field "Product.name" can only be defined once.],
- [GraphQLError: There can be only one type named "Product".],
- ]
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(product).toMatchInlineSnapshot(`
- type Product {
- id: ID!
- name: String!
- price: Int!
- }
- `);
- });
- });
- });
-
- // Maybe just test conflicts in types
- // it("interfaces, unions", () => {});
-
- // TODO: _allow_ enum and input extensions, but don't add serviceName
- describe('input and enum type extensions', () => {
- it('extends input types', () => {
- const serviceA = {
- typeDefs: gql`
- input ProductInput {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend input ProductInput {
- color: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(schema).toBeDefined();
- expect(errors).toMatchInlineSnapshot(`Array []`);
- });
-
- it('extends enum types', () => {
- const serviceA = {
- typeDefs: gql`
- enum ProductCategory {
- BED
- BATH
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend enum ProductCategory {
- BEYOND
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(schema).toBeDefined();
- expect(errors).toMatchInlineSnapshot(`Array []`);
- });
- });
-
- describe('interfaces', () => {
- // TODO: should there be a validation warning of some sort for this?
- it('allows overwriting a type that implements an interface improperly', () => {
- const serviceA = {
- typeDefs: gql`
- interface Item {
- id: ID!
- }
-
- type Product implements Item {
- id: ID!
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- id: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: [serviceA] Product.id -> Field "Product.id" already exists in the schema. It cannot also be defined in this type extension. If this is meant to be an external field, add the \`@external\` directive.],
- ]
- `);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
- type Product implements Item {
- id: String!
- sku: String!
- name: String!
- }
- `);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(getFederationMetadata(product).serviceName).toEqual('serviceA');
- expect(getFederationMetadata(product.getFields()['id']).serviceName).toEqual(
- 'serviceB',
- );
- });
- });
-
- describe('root type extensions', () => {
- it('allows extension of the Query type with no base type definition', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Query {
- products: [ID!]
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Query {
- people: [ID!]
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getQueryType()).toMatchInlineSnapshot(`
- type Query {
- products: [ID!]
- people: [ID!]
- }
- `);
-
- const query = schema.getQueryType();
-
- expect(getFederationMetadata(query).serviceName).toBeUndefined();
- });
-
- it('treats root Query type definition as an extension, not base definitions', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- products: [ID!]
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Query {
- people: [ID!]
- }
- `,
- name: 'serviceB',
- };
-
- const normalizedServices = [serviceA, serviceB].map(
- ({ name, typeDefs }) => ({
- name,
- typeDefs: normalizeTypeDefs(typeDefs),
- }),
- );
- const { schema, errors } = composeServices(normalizedServices);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Query')).toMatchInlineSnapshot(`
- type Query {
- products: [ID!]
- people: [ID!]
- }
- `);
-
- const query = schema.getType('Query') as GraphQLObjectType;
-
- expect(getFederationMetadata(query).serviceName).toBeUndefined();
- });
-
- it('allows extension of the Mutation type with no base type definition', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Mutation {
- login(credentials: Credentials!): String
- }
-
- input Credentials {
- username: String!
- password: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Mutation {
- logout(username: String!): Boolean
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Mutation')).toMatchInlineSnapshot(`
- type Mutation {
- login(credentials: Credentials!): String
- logout(username: String!): Boolean
- }
- `);
- });
-
- it('treats root Mutations type definition as an extension, not base definitions', () => {
- const serviceA = {
- typeDefs: gql`
- type Mutation {
- login(credentials: Credentials!): String
- }
-
- input Credentials {
- username: String!
- password: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Mutation {
- logout(username: String!): Boolean
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
-
- expect(schema.getType('Mutation')).toMatchInlineSnapshot(`
- type Mutation {
- login(credentials: Credentials!): String
- logout(username: String!): Boolean
- }
- `);
- });
-
- // TODO: not sure what to do here. Haven't looked into it yet :)
- it.skip('works with custom root types', () => {});
- });
-
- describe('federation directives', () => {
- // Directives - allow schema (federation) directives
- describe('@external', () => {
- it('adds externals map from service to externals for @external fields', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA--FOUND',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB--MISSING',
- };
-
- const serviceC = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- upc: String! @external
- weight: Int! @requires(fields: "sku upc")
- }
- `,
- name: 'serviceC--found',
- };
-
- const { schema, errors } = composeServices([
- serviceA,
- serviceC,
- serviceB,
- ]);
-
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product');
-
- expect(getFederationMetadata(product).externals).toMatchInlineSnapshot(`
- Object {
- "serviceB--MISSING": Array [
- Object {
- "field": sku: String! @external,
- "parentTypeName": "Product",
- "serviceName": "serviceB--MISSING",
- },
- ],
- "serviceC--found": Array [
- Object {
- "field": sku: String! @external,
- "parentTypeName": "Product",
- "serviceName": "serviceC--found",
- },
- Object {
- "field": upc: String! @external,
- "parentTypeName": "Product",
- "serviceName": "serviceC--found",
- },
- ],
- }
- `);
- });
- it('does not redefine fields with @external when composing', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(schema).toBeDefined();
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
-
- expect(product).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- name: String!
- price: Int!
- }
- `);
- expect(getFederationMetadata(product.getFields()['price']).serviceName).toEqual(
- 'serviceB',
- );
- expect(getFederationMetadata(product).serviceName).toEqual('serviceA');
- });
- });
-
- describe('@requires directive', () => {
- it('adds @requires information to fields using a simple field set', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(
- getFederationMetadata(product.getFields()['price']).requires,
- ).toMatchInlineSnapshot(`sku`);
- });
-
- it('adds @requires information to fields using a nested field set', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku { id }") {
- sku: Sku!
- }
-
- type Sku {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: Sku! @external
- price: Float! @requires(fields: "sku { id }")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(getFederationMetadata(product.getFields()['price']).requires)
- .toMatchInlineSnapshot(`
- sku {
- id
- }
- `);
- });
- });
-
- // TODO: provides can happen on an extended type as well, add a test case for this
- describe('@provides directive', () => {
- it('adds @provides information to fields using a simple field set', () => {
- const serviceA = {
- typeDefs: gql`
- type Review {
- product: Product @provides(fields: "sku")
- }
-
- extend type Product {
- sku: String @external
- color: String
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const review = schema.getType('Review') as GraphQLObjectType;
- expect(getFederationMetadata(review.getFields()['product'])).toMatchInlineSnapshot(`
- Object {
- "belongsToValueType": false,
- "provides": sku,
- "serviceName": "serviceA",
- }
- `);
- });
-
- it('adds @provides information to fields using a nested field set', () => {
- const serviceA = {
- typeDefs: gql`
- type Review {
- product: Product @provides(fields: "sku { id }")
- }
-
- extend type Product {
- sku: Sku @external
- color: String
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product @key(fields: "sku { id }") {
- sku: Sku!
- price: Int! @requires(fields: "sku")
- }
-
- type Sku {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const review = schema.getType('Review') as GraphQLObjectType;
- expect(getFederationMetadata(review.getFields()['product']).provides)
- .toMatchInlineSnapshot(`
- sku {
- id
- }
- `);
- });
-
- it('adds @provides information for object types within list types', () => {
- const serviceA = {
- typeDefs: gql`
- type Review {
- products: [Product] @provides(fields: "sku")
- }
-
- extend type Product {
- sku: String @external
- color: String
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const review = schema.getType('Review') as GraphQLObjectType;
- expect(getFederationMetadata(review.getFields()['products']))
- .toMatchInlineSnapshot(`
- Object {
- "belongsToValueType": false,
- "provides": sku,
- "serviceName": "serviceA",
- }
- `);
- });
-
- it('adds correct @provides information to fields on value types', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Query {
- valueType: ValueType
- }
-
- type ValueType {
- id: ID!
- user: User! @provides(fields: "id name")
- }
-
- type User @key(fields: "id") {
- id: ID!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type ValueType {
- id: ID!
- user: User! @provides(fields: "id name")
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- name: String! @external
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const valueType = schema.getType('ValueType') as GraphQLObjectType;
- const userFieldFederationMetadata = getFederationMetadata(valueType.getFields()['user']);
- expect(userFieldFederationMetadata.belongsToValueType).toBe(true);
- expect(userFieldFederationMetadata.serviceName).toBe(null);
- });
- });
-
- describe('@key directive', () => {
- it('adds @key information to types using basic string notation', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") @key(fields: "upc") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(getFederationMetadata(product).keys).toMatchInlineSnapshot(`
- Object {
- "serviceA": Array [
- sku,
- upc,
- ],
- }
- `);
- });
-
- it('adds @key information to types using selection set notation', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(getFederationMetadata(product).keys).toMatchInlineSnapshot(`
- Object {
- "serviceA": Array [
- color {
- id
- value
- },
- ],
- }
- `);
- });
-
- it('preserves @key information with respect to types across different services', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(getFederationMetadata(product).keys).toMatchInlineSnapshot(`
- Object {
- "serviceA": Array [
- color {
- id
- value
- },
- ],
- "serviceB": Array [
- sku,
- ],
- }
- `);
- });
- });
-
- describe('@extends directive', () => {
- it('treats types with @extends as type extensions', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product @extends @key(fields: "sku") {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const normalizedServices = [serviceA, serviceB].map(
- ({ name, typeDefs }) => ({
- name,
- typeDefs: normalizeTypeDefs(typeDefs),
- }),
- );
- const { schema, errors } = composeServices(normalizedServices);
-
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(product).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- upc: String!
- price: Int!
- }
- `);
- });
-
- it('treats interfaces with @extends as interface extensions', () => {
- const serviceA = {
- typeDefs: gql`
- interface Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- interface Product @extends @key(fields: "sku") {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const normalizedServices = [serviceA, serviceB].map(
- ({ name, typeDefs }) => ({
- name,
- typeDefs: normalizeTypeDefs(typeDefs),
- }),
- );
- const { schema, errors } = composeServices(normalizedServices);
-
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(product).toMatchInlineSnapshot(`
- interface Product {
- sku: String!
- upc: String!
- price: Int!
- }
- `);
- });
- });
- });
- describe('executable directives', () => {
- it('keeps executable directives in the schema', () => {
- const serviceA = {
- typeDefs: gql`
- directive @defer on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
- `,
- name: 'serviceA',
- };
-
- const { schema, errors } = composeServices([serviceA]);
-
- expect(errors).toHaveLength(0);
-
- const defer = schema.getDirective('defer') as GraphQLDirective;
- expect(defer).toMatchInlineSnapshot(`"@defer"`);
- });
- it('keeps executable directives in the schema', () => {
- const serviceA = {
- typeDefs: gql`
- directive @defer on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
- `,
- name: 'serviceA',
- };
- const serviceB = {
- typeDefs: gql`
- directive @stream on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
-
- expect(errors).toHaveLength(0);
-
- const defer = schema.getDirective('defer') as GraphQLDirective;
- expect(defer).toMatchInlineSnapshot(`"@defer"`);
-
- const stream = schema.getDirective('stream') as GraphQLDirective;
- expect(stream).toMatchInlineSnapshot(`"@stream"`);
- });
- });
-
- it('extensions field on GraphQLSchema includes serviceList', () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- name: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type User {
- name: String
- email: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeServices([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
- expect(schema).toBeDefined();
- expect(schema.extensions.serviceList).toBeDefined();
- expect(schema.extensions.serviceList).toHaveLength(2);
- });
-});
-
-// XXX Ignored/unimplemented spec tests
-// it("allows extension of custom scalars", () => {});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/__tests__/composeAndValidate.test.ts b/gateway/node_modules/@apollo/federation/src/composition/__tests__/composeAndValidate.test.ts
deleted file mode 100644
index a585a56..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/__tests__/composeAndValidate.test.ts
+++ /dev/null
@@ -1,878 +0,0 @@
-import { composeAndValidate } from '../composeAndValidate';
-import gql from 'graphql-tag';
-import {
- GraphQLObjectType,
- DocumentNode,
- GraphQLScalarType,
- specifiedDirectives,
- printSchema,
-} from 'graphql';
-import {
- astSerializer,
- typeSerializer,
- graphqlErrorSerializer,
-} from '../../snapshotSerializers';
-
-expect.addSnapshotSerializer(astSerializer);
-expect.addSnapshotSerializer(typeSerializer);
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-const productsService = {
- name: 'Products',
- typeDefs: gql`
- extend type Query {
- topProducts(first: Int): [Product]
- }
- type Product @key(fields: "upc") {
- upc: String!
- sku: String!
- name: String
- price: String
- }
- `,
-};
-
-const reviewsService = {
- name: 'Reviews',
- typeDefs: gql`
- type Review @key(fields: "id") {
- id: ID!
- body: String
- author: User
- product: Product
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- reviews: [Review]
- }
- extend type Product @key(fields: "upc") {
- upc: String! @external
- reviews: [Review]
- }
- `,
-};
-
-const accountsService = {
- name: 'Accounts',
- typeDefs: gql`
- extend type Query {
- me: User
- }
- type User @key(fields: "id") {
- id: ID!
- name: String
- username: String
- birthDate: String
- }
- `,
-};
-
-const inventoryService = {
- name: 'Inventory',
- typeDefs: gql`
- extend type Product @key(fields: "upc") {
- upc: String! @external
- inStock: Boolean
- # quantity: Int
- }
- `,
-};
-
-function permutateList(inputArr: T[]) {
- let result: T[][] = [];
-
- function permute(arr: T[], m: T[] = []) {
- if (arr.length === 0) {
- result.push(m);
- } else {
- for (let i = 0; i < arr.length; i++) {
- let curr = arr.slice();
- let next = curr.splice(i, 1);
- permute(curr.slice(), m.concat(next));
- }
- }
- }
-
- permute(inputArr);
-
- return result;
-}
-
-it('composes and validates all (24) permutations without error', () => {
- permutateList([
- inventoryService,
- reviewsService,
- accountsService,
- productsService,
- ]).map((config) => {
- const { errors } = composeAndValidate(config);
-
- if (errors.length) {
- console.error(
- `Errors found with composition [${config.map((item) => item.name)}]`,
- );
- }
-
- expect(errors).toHaveLength(0);
- });
-});
-
-it('errors when a type extension has no base', () => {
- const serviceA = {
- typeDefs: gql`
- schema {
- query: MyRoot
- }
-
- type MyRoot {
- products: [Product]!
- }
-
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Location {
- id: ID
- }
- `,
- name: 'serviceB',
- };
-
- const { errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(1);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTENSION_WITH_NO_BASE",
- "message": "[serviceB] Location -> \`Location\` is an extension type, but \`Location\` is not defined in any service",
- },
- ]
- `);
-});
-
-it('treats types with @extends as type extensions', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- products: [Product]!
- }
-
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product @extends @key(fields: "sku") {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(product).toMatchInlineSnapshot(`
- type Product {
- sku: String!
- upc: String!
- price: Int!
- }
- `);
-});
-
-it('treats interfaces with @extends as interface extensions', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- products: [Product]!
- }
-
- interface Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- interface Product @extends @key(fields: "sku") {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const product = schema.getType('Product') as GraphQLObjectType;
- expect(product).toMatchInlineSnapshot(`
- interface Product {
- sku: String!
- upc: String!
- price: Int!
- }
- `);
-});
-
-it('errors on invalid usages of default operation names', () => {
- const serviceA = {
- typeDefs: gql`
- schema {
- query: RootQuery
- }
-
- type RootQuery {
- product: Product
- }
-
- type Product @key(fields: "id") {
- id: ID!
- query: Query
- }
-
- type Query {
- invalidUseOfQuery: Boolean
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Query {
- validUseOfQuery: Boolean
- }
-
- extend type Product @key(fields: "id") {
- id: ID! @external
- sku: String
- }
- `,
- name: 'serviceB',
- };
-
- const { errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "ROOT_QUERY_USED",
- "message": "[serviceA] Query -> Found invalid use of default root operation name \`Query\`. \`Query\` is disallowed when \`Schema.query\` is set to a type other than \`Query\`.",
- },
- ]
- `);
-});
-
-describe('composition of value types', () => {
- function getSchemaWithValueType(valueType: DocumentNode) {
- const serviceA = {
- typeDefs: gql`
- ${valueType}
-
- type Query {
- filler: String
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: valueType,
- name: 'serviceB',
- };
-
- return composeAndValidate([serviceA, serviceB]);
- }
-
- describe('success', () => {
- it('scalars', () => {
- const { errors, schema } = getSchemaWithValueType(
- gql`
- scalar Date
- `,
- );
- expect(errors).toHaveLength(0);
- expect(schema.getType('Date')).toMatchInlineSnapshot(`scalar Date`);
- });
-
- it('unions and object types', () => {
- const { errors, schema } = getSchemaWithValueType(
- gql`
- union CatalogItem = Couch | Mattress
-
- type Couch {
- sku: ID!
- material: String!
- }
-
- type Mattress {
- sku: ID!
- size: String!
- }
- `,
- );
- expect(errors).toHaveLength(0);
- expect(schema.getType('CatalogItem')).toMatchInlineSnapshot(
- `union CatalogItem = Couch | Mattress`,
- );
- expect(schema.getType('Couch')).toMatchInlineSnapshot(`
- type Couch {
- sku: ID!
- material: String!
- }
- `);
- });
-
- it('input types', () => {
- const { errors, schema } = getSchemaWithValueType(gql`
- input NewProductInput {
- sku: ID!
- type: String
- }
- `);
- expect(errors).toHaveLength(0);
- expect(schema.getType('NewProductInput')).toMatchInlineSnapshot(`
- input NewProductInput {
- sku: ID!
- type: String
- }
- `);
- });
-
- it('interfaces', () => {
- const { errors, schema } = getSchemaWithValueType(gql`
- interface Product {
- sku: ID!
- }
- `);
- expect(errors).toHaveLength(0);
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
- interface Product {
- sku: ID!
- }
- `);
- });
-
- it('enums', () => {
- const { errors, schema } = getSchemaWithValueType(gql`
- enum CatalogItemEnum {
- COUCH
- MATTRESS
- }
- `);
- expect(errors).toHaveLength(0);
- expect(schema.getType('CatalogItemEnum')).toMatchInlineSnapshot(`
- enum CatalogItemEnum {
- COUCH
- MATTRESS
- }
- `);
- });
- });
-
- describe('errors', () => {
- it('when used as an entity', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- }
-
- type Product {
- sku: ID!
- color: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Query {
- topProducts: [Product]
- }
-
- type Product @key(fields: "sku") {
- sku: ID!
- color: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_NO_ENTITY",
- "message": "[serviceB] Product -> Value types cannot be entities (using the \`@key\` directive). Please ensure that the \`Product\` type is extended properly or remove the \`@key\` directive if this is not an entity.",
- }
- `);
- });
-
- it('on field type mismatch', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- }
-
- type Product {
- sku: ID!
- color: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Query {
- topProducts: [Product]
- }
-
- type Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceB',
- };
-
- const { errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_FIELD_TYPE_MISMATCH",
- "message": "[serviceA] Product.color -> A field was defined differently in different services. \`serviceA\` and \`serviceB\` define \`Product.color\` as a String! and String respectively. In order to define \`Product\` in multiple places, the fields and their types must be identical.",
- }
- `);
- });
-
- it('on kind mismatch', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- }
-
- interface Product {
- sku: ID!
- color: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Query {
- topProducts: [Product]
- }
-
- type Product {
- sku: ID!
- color: String!
- }
- `,
- name: 'serviceB',
- };
-
- const { errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_KIND_MISMATCH",
- "message": "[serviceA] Product -> Found kind mismatch on expected value type belonging to services \`serviceA\` and \`serviceB\`. \`Product\` is defined as both a \`ObjectTypeDefinition\` and a \`InterfaceTypeDefinition\`. In order to define \`Product\` in multiple places, the kinds must be identical.",
- }
- `);
- });
-
- it('on union types mismatch', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- }
-
- type Couch {
- sku: ID!
- }
-
- type Mattress {
- sku: ID!
- }
-
- union Product = Couch | Mattress
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Query {
- topProducts: [Product]
- }
-
- type Couch {
- sku: ID!
- }
-
- type Cabinet {
- sku: ID!
- }
-
- union Product = Couch | Cabinet
- `,
- name: 'serviceB',
- };
-
- const { errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_UNION_TYPES_MISMATCH",
- "message": "[serviceA] Product -> The union \`Product\` is defined in services \`serviceA\` and \`serviceB\`, however their types do not match. Union types with the same name must also consist of identical types. The types Cabinet, Mattress are mismatched.",
- }
- `);
- });
- });
-
- it('composed type implements ALL interfaces that value types implement', () => {
- const serviceA = {
- typeDefs: gql`
- interface Node {
- id: ID!
- }
-
- interface Named {
- name: String
- }
-
- type Product implements Named & Node {
- id: ID!
- name: String
- }
-
- type Query {
- node(id: ID!): Node
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- interface Node {
- id: ID!
- }
-
- type Product implements Node {
- id: ID!
- name: String
- }
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- interface Named {
- name: String
- }
-
- type Product implements Named {
- id: ID!
- name: String
- }
- `,
- name: 'serviceC',
- };
-
- const serviceD = {
- typeDefs: gql`
- type Product {
- id: ID!
- name: String
- }
- `,
- name: 'serviceD',
- };
-
- const { schema, errors, composedSdl } = composeAndValidate([
- serviceA,
- serviceB,
- serviceC,
- serviceD,
- ]);
-
- expect(errors).toHaveLength(0);
- expect((schema.getType('Product') as GraphQLObjectType).getInterfaces())
- .toHaveLength(2);
-
- expect(printSchema(schema)).toContain('type Product implements Named & Node');
- expect(composedSdl).toContain('type Product implements Named & Node');
-
- });
-});
-
-describe('composition of schemas with directives', () => {
- /**
- * To see which usage sites indicate whether a directive is "executable" or
- * merely for use by the type-system ("type-system"), see the GraphQL spec:
- * https://graphql.github.io/graphql-spec/June2018/#sec-Type-System.Directives
- */
- it('preserves executable and purges type-system directives', () => {
- const serviceA = {
- typeDefs: gql`
- "directives at FIELDs are executable"
- directive @audit(risk: Int!) on FIELD
-
- "directives at FIELD_DEFINITIONs are for the type-system"
- directive @transparency(concealment: Int!) on FIELD_DEFINITION
-
- type EarthConcern {
- environmental: String! @transparency(concealment: 5)
- }
-
- extend type Query {
- importantDirectives: [EarthConcern!]!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- "directives at FIELDs are executable"
- directive @audit(risk: Int!) on FIELD
-
- "directives at FIELD_DEFINITIONs are for the type-system"
- directive @transparency(concealment: Int!) on FIELD_DEFINITION
-
- "directives at OBJECTs are for the type-system"
- directive @experimental on OBJECT
-
- extend type EarthConcern @experimental {
- societal: String! @transparency(concealment: 6)
- }
- `,
- name: 'serviceB',
- };
-
- const { schema, errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-
- const audit = schema.getDirective('audit');
- expect(audit).toMatchInlineSnapshot(`"@audit"`);
-
- const transparency = schema.getDirective('transparency');
- expect(transparency).toBeUndefined();
-
- const type = schema.getType('EarthConcern') as GraphQLObjectType;
-
- expect(type.astNode).toMatchInlineSnapshot(`
- type EarthConcern {
- environmental: String!
- }
- `);
-
- const fields = type.getFields();
-
- expect(fields['environmental'].astNode).toMatchInlineSnapshot(
- `environmental: String!`,
- );
-
- expect(fields['societal'].astNode).toMatchInlineSnapshot(
- `societal: String!`,
- );
- });
-
- it(`doesn't strip the special case @deprecated and @specifiedBy type-system directives`, () => {
- const specUrl = 'http://my-spec-url.com';
- const deprecationReason = "Don't remove me please";
-
- // Detecting >15.1.0 by the new addition of the `specifiedBy` directive
- const isAtLeastGraphqlVersionFifteenPointOne =
- specifiedDirectives.length >= 4;
-
- const serviceA = {
- typeDefs: gql`
- # This directive needs to be conditionally added depending on the testing
- # environment's version of graphql (>= 15.1.0 includes this new directive)
- ${
- isAtLeastGraphqlVersionFifteenPointOne
- ? `scalar MyScalar @specifiedBy(url: "${specUrl}")`
- : ''
- }
-
- type EarthConcern {
- environmental: String!
- }
-
- extend type Query {
- importantDirectives: [EarthConcern!]!
- @deprecated(reason: "${deprecationReason}")
- }
- `,
- name: 'serviceA',
- };
-
- const { schema, errors } = composeAndValidate([serviceA]);
- expect(errors).toHaveLength(0);
-
- const deprecated = schema.getDirective('deprecated');
- expect(deprecated).toMatchInlineSnapshot(`"@deprecated"`);
-
- const queryType = schema.getType('Query') as GraphQLObjectType;
- const field = queryType.getFields()['importantDirectives'];
-
- expect(field.isDeprecated).toBe(true);
- expect(field.deprecationReason).toEqual(deprecationReason);
-
- if (isAtLeastGraphqlVersionFifteenPointOne) {
- const specifiedBy = schema.getDirective('specifiedBy');
- expect(specifiedBy).toMatchInlineSnapshot(`"@specifiedBy"`);
- const customScalar = schema.getType('MyScalar');
- expect((customScalar as GraphQLScalarType).specifiedByUrl).toEqual(
- specUrl,
- );
- }
- });
-});
-
-it('composition of full-SDL schemas without any errors', () => {
- const serviceA = {
- typeDefs: gql`
- # Default directives
- directive @deprecated(
- reason: String = "No longer supported"
- ) on FIELD_DEFINITION | ENUM_VALUE
- directive @specifiedBy(url: String!) on SCALAR
- directive @include(
- if: String = "Included when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
- directive @skip(
- if: String = "Skipped when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
-
- # Federation directives
- directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
- directive @external on FIELD_DEFINITION
- directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
- directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
- directive @extends on OBJECT | INTERFACE
-
- # Custom type system directive (disregarded by gateway, unconcerned with serviceB's implementation)
- directive @myTypeSystemDirective on FIELD_DEFINITION
- # Custom executable directive (must be implemented in all services, definition must be identical)
- directive @myExecutableDirective on FIELD
-
- scalar _Any
- scalar _FieldSet
-
- union _Entity
-
- type _Service {
- sdl: String
- }
-
- schema {
- query: RootQuery
- mutation: RootMutation
- }
-
- type RootQuery {
- _service: _Service!
- _entities(representations: [_Any!]!): [_Entity]!
- product: Product
- }
-
- type Product @key(fields: "sku") {
- sku: String!
- price: Float
- }
-
- type RootMutation {
- updateProduct: Product
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- # Default directives
- directive @deprecated(
- reason: String = "No longer supported"
- ) on FIELD_DEFINITION | ENUM_VALUE
- directive @specifiedBy(url: String!) on SCALAR
- directive @include(
- if: String = "Included when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
- directive @skip(
- if: String = "Skipped when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
-
- # Federation directives
- directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
- directive @external on FIELD_DEFINITION
- directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
- directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
- directive @extends on OBJECT | INTERFACE
-
- # Custom type system directive (disregarded by gateway, unconcerned with serviceA's implementation)
- directive @myDirective on FIELD_DEFINITION
-
- # Custom executable directive (must be implemented in all services, definition must be identical)
- directive @myExecutableDirective on FIELD
-
- scalar _Any
- scalar _FieldSet
-
- union _Entity
-
- type _Service {
- sdl: String
- }
-
- type Query {
- _service: _Service!
- _entities(representations: [_Any!]!): [_Entity]!
- review: Review
- }
-
- type Review @key(fields: "id") {
- id: String!
- content: String
- }
-
- type Mutation {
- createReview: Review
- }
- `,
- name: 'serviceB',
- };
-
- const { errors } = composeAndValidate([serviceA, serviceB]);
- expect(errors).toHaveLength(0);
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/__tests__/normalize.test.ts b/gateway/node_modules/@apollo/federation/src/composition/__tests__/normalize.test.ts
deleted file mode 100644
index 6ce8b53..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/__tests__/normalize.test.ts
+++ /dev/null
@@ -1,410 +0,0 @@
-import gql from 'graphql-tag';
-import {
- defaultRootOperationTypes,
- replaceExtendedDefinitionsWithExtensions,
- normalizeTypeDefs,
- stripCommonPrimitives,
-} from '../normalize';
-import { astSerializer } from '../../snapshotSerializers';
-import { specifiedDirectives } from 'graphql';
-
-expect.addSnapshotSerializer(astSerializer);
-
-describe('SDL normalization and its respective parts', () => {
- describe('defaultRootOperationTypes', () => {
- it('transforms defined root operation types to respective extended default root operation types', () => {
- const typeDefs = gql`
- schema {
- query: RootQuery
- mutation: RootMutation
- }
-
- type RootQuery {
- product: Product
- }
-
- type Product {
- sku: String
- }
-
- type RootMutation {
- updateProduct: Product
- }
- `;
-
- const schemaWithDefaultedRootOperationTypes = defaultRootOperationTypes(
- typeDefs,
- );
- expect(schemaWithDefaultedRootOperationTypes).toMatchInlineSnapshot(`
- extend type Query {
- product: Product
- }
-
- type Product {
- sku: String
- }
-
- extend type Mutation {
- updateProduct: Product
- }
- `);
- });
-
- it('removes all types using a default root operation type name when a schema definition is provided (root types are defined by the user)', () => {
- const typeDefs = gql`
- schema {
- query: RootQuery
- }
-
- type RootQuery {
- product: Product
- }
-
- type Product {
- sku: String
- }
-
- type Query {
- removeThisEntireType: String
- }
-
- type Mutation {
- removeThisEntireType: String
- }
-
- type Subscription {
- removeThisEntireType: String
- }
- `;
-
- const schemaWithDefaultedRootOperationTypes = defaultRootOperationTypes(
- typeDefs,
- );
- expect(schemaWithDefaultedRootOperationTypes).toMatchInlineSnapshot(`
- extend type Query {
- product: Product
- }
-
- type Product {
- sku: String
- }
- `);
- });
-
- it('drops fields that reference an invalid default root operation type name', () => {
- const typeDefs = gql`
- schema {
- query: RootQuery
- mutation: RootMutation
- }
-
- type RootQuery {
- product: Product
- }
-
- type Query {
- removeThisEntireType: String
- }
-
- type RootMutation {
- keepThisField: String
- removeThisField: Query
- }
- `;
-
- const schemaWithDefaultedRootOperationTypes = defaultRootOperationTypes(
- typeDefs,
- );
- expect(schemaWithDefaultedRootOperationTypes).toMatchInlineSnapshot(`
- extend type Query {
- product: Product
- }
-
- extend type Mutation {
- keepThisField: String
- }
- `);
- });
- });
-
- describe('replaceExtendedDefinitionsWithExtensions', () => {
- it('transforms the @extends directive into type extensions', () => {
- const typeDefs = gql`
- type Product @extends @key(fields: "sku") {
- sku: String @external
- }
- `;
-
- expect(replaceExtendedDefinitionsWithExtensions(typeDefs))
- .toMatchInlineSnapshot(`
- extend type Product @key(fields: "sku") {
- sku: String @external
- }
- `);
- });
- });
-
- describe('stripCommonPrimitives', () => {
- it(`removes all common directive definitions`, () => {
- // Detecting >15.1.0 by the new addition of the `specifiedBy` directive
- const isAtLeastGraphqlVersionFifteenPointOne =
- specifiedDirectives.length >= 4;
-
- const typeDefs = gql`
- # Default directives
-
- # This directive needs to be conditionally added depending on the testing
- # environment's version of graphql (>= 15.1.0 includes this new directive)
- ${isAtLeastGraphqlVersionFifteenPointOne
- ? 'directive @specifiedBy(url: String!) on SCALAR'
- : ''}
- directive @deprecated(
- reason: String = "No longer supported"
- ) on FIELD_DEFINITION | ENUM_VALUE
- directive @include(
- if: String = "Included when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
- directive @skip(
- if: String = "Skipped when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
-
- # Federation directives
- directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
- directive @external on FIELD_DEFINITION
- directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
- directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
- directive @extends on OBJECT | INTERFACE
-
- type Query {
- thing: String
- }
- `;
-
- expect(stripCommonPrimitives(typeDefs)).toMatchInlineSnapshot(`
- type Query {
- thing: String
- }
- `);
- });
-
- it(`doesn't remove custom directive definitions`, () => {
- const typeDefs = gql`
- directive @custom on OBJECT
-
- type Query {
- thing: String
- }
- `;
-
- expect(stripCommonPrimitives(typeDefs)).toMatchInlineSnapshot(`
- directive @custom on OBJECT
-
- type Query {
- thing: String
- }
- `);
- });
-
- it(`removes all federation type definitions (scalars, unions, object types)`, () => {
- const typeDefs = gql`
- scalar _Any
- scalar _FieldSet
-
- union _Entity
-
- type _Service {
- sdl: String
- }
-
- type Query {
- thing: String
- }
- `;
-
- expect(stripCommonPrimitives(typeDefs)).toMatchInlineSnapshot(`
- type Query {
- thing: String
- }
- `);
- });
-
- it(`doesn't remove custom scalar, union, or object type definitions`, () => {
- const typeDefs = gql`
- scalar CustomScalar
-
- type CustomType {
- field: String!
- }
-
- union CustomUnion
-
- type Query {
- thing: String
- }
- `;
-
- expect(stripCommonPrimitives(typeDefs)).toMatchInlineSnapshot(`
- scalar CustomScalar
-
- type CustomType {
- field: String!
- }
-
- union CustomUnion
-
- type Query {
- thing: String
- }
- `);
- });
-
- it(`removes all federation field definitions (_service, _entities)`, () => {
- const typeDefs = gql`
- type Query {
- _service: _Service!
- _entities(representations: [_Any!]!): [_Entity]!
- thing: String
- }
- `;
-
- expect(stripCommonPrimitives(typeDefs)).toMatchInlineSnapshot(`
- type Query {
- thing: String
- }
- `);
- });
-
- it(`removes the Query type altogether if it has no fields left after normalization`, () => {
- const typeDefs = gql`
- type Query {
- _service: _Service!
- _entities(representations: [_Any!]!): [_Entity]!
- }
-
- type Custom {
- field: String
- }
- `;
-
- expect(stripCommonPrimitives(typeDefs)).toMatchInlineSnapshot(`
- type Custom {
- field: String
- }
- `);
- });
- });
-
- describe('normalizeTypeDefs', () => {
- it('integration', () => {
- // Detecting >15.1.0 by the new addition of the `specifiedBy` directive
- const isAtLeastGraphqlVersionFifteenPointOne =
- specifiedDirectives.length >= 4;
-
- const typeDefsToNormalize = gql`
- # Default directives
-
- # This directive needs to be conditionally added depending on the testing
- # environment's version of graphql (>= 15.1.0 includes this new directive)
- ${isAtLeastGraphqlVersionFifteenPointOne
- ? 'directive @specifiedBy(url: String!) on SCALAR'
- : ''}
- directive @deprecated(
- reason: String = "No longer supported"
- ) on FIELD_DEFINITION | ENUM_VALUE
- directive @include(
- if: String = "Included when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
- directive @skip(
- if: String = "Skipped when true."
- ) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
-
- directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
- directive @external on FIELD_DEFINITION
- directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
- directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
- directive @extends on OBJECT | INTERFACE
-
- scalar _Any
- scalar _FieldSet
-
- union _Entity
-
- type _Service {
- sdl: String
- }
-
- schema {
- query: RootQuery
- mutation: RootMutation
- }
-
- type RootQuery {
- _service: _Service!
- _entities(representations: [_Any!]!): [_Entity]!
- product: Product
- }
-
- type Product @extends @key(fields: "sku") {
- sku: String @external
- }
-
- type RootMutation {
- updateProduct: Product
- }
- `;
-
- const normalized = normalizeTypeDefs(typeDefsToNormalize);
-
- expect(normalized).toMatchInlineSnapshot(`
- extend type Query {
- product: Product
- }
-
- extend type Product @key(fields: "sku") {
- sku: String @external
- }
-
- extend type Mutation {
- updateProduct: Product
- }
- `);
- });
-
- it('should allow schema describing default types', () => {
- const typeDefsToNormalize = gql`
- schema {
- query: Query
- mutation: Mutation
- }
-
- type Query {
- product: Product
- }
-
- type Product @extends @key(fields: "sku") {
- sku: String @external
- }
-
- type Mutation {
- updateProduct: Product
- }
- `;
-
- const normalized = normalizeTypeDefs(typeDefsToNormalize);
-
- expect(normalized).toMatchInlineSnapshot(`
- extend type Query {
- product: Product
- }
-
- extend type Product @key(fields: "sku") {
- sku: String @external
- }
-
- extend type Mutation {
- updateProduct: Product
- }
- `);
- });
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/__tests__/tsconfig.json b/gateway/node_modules/@apollo/federation/src/composition/__tests__/tsconfig.json
deleted file mode 100644
index 4a90c6e..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/__tests__/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../../../tsconfig.test.base",
- "compilerOptions": {
- "strictNullChecks": false
- },
- "include": ["**/*"],
- "references": [{ "path": "../../../../../" }]
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/__tests__/utils.test.ts b/gateway/node_modules/@apollo/federation/src/composition/__tests__/utils.test.ts
deleted file mode 100644
index 90164b0..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/__tests__/utils.test.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import gql from 'graphql-tag';
-import deepFreeze from 'deep-freeze';
-import { stripExternalFieldsFromTypeDefs } from '../utils';
-import { astSerializer } from '../../snapshotSerializers';
-
-expect.addSnapshotSerializer(astSerializer);
-
-describe('Composition utility functions', () => {
- describe('stripExternalFieldsFromTypeDefs', () => {
- it('returns a new DocumentNode with @external fields removed as well as information about the removed fields', () => {
- const typeDefs = gql`
- type Query {
- product: Product
- }
-
- extend type Product @key(fields: "sku") {
- sku: String @external
- }
-
- type Mutation {
- updateProduct: Product
- }
-
- extend interface Account @key(fields: "id") {
- id: ID! @external
- }
- `;
-
- const {
- typeDefsWithoutExternalFields,
- strippedFields,
- } = stripExternalFieldsFromTypeDefs(typeDefs, 'serviceA');
-
- expect(typeDefsWithoutExternalFields).toMatchInlineSnapshot(`
- type Query {
- product: Product
- }
-
- extend type Product @key(fields: "sku")
-
- type Mutation {
- updateProduct: Product
- }
-
- extend interface Account @key(fields: "id")
- `);
-
- expect(strippedFields).toMatchInlineSnapshot(`
- Array [
- Object {
- "field": sku: String @external,
- "parentTypeName": "Product",
- "serviceName": "serviceA",
- },
- Object {
- "field": id: ID! @external,
- "parentTypeName": "Account",
- "serviceName": "serviceA",
- },
- ]
- `);
- });
-
- it("doesn't mutate the input DocumentNode", () => {
- const typeDefs = gql`
- type Query {
- product: Product
- }
-
- extend type Product @key(fields: "sku") {
- sku: String @external
- }
-
- type Mutation {
- updateProduct: Product
- }
- `;
-
- deepFreeze(typeDefs);
-
- // Assert that mutation does, in fact, throw
- expect(() => (typeDefs.blah = [])).toThrow();
- expect(() =>
- stripExternalFieldsFromTypeDefs(typeDefs, 'serviceA'),
- ).not.toThrow();
- });
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/compose.ts b/gateway/node_modules/@apollo/federation/src/composition/compose.ts
deleted file mode 100644
index f5693e6..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/compose.ts
+++ /dev/null
@@ -1,659 +0,0 @@
-import 'apollo-server-env';
-import {
- GraphQLSchema,
- extendSchema,
- Kind,
- isTypeDefinitionNode,
- isTypeExtensionNode,
- GraphQLError,
- GraphQLNamedType,
- isObjectType,
- FieldDefinitionNode,
- InputValueDefinitionNode,
- DocumentNode,
- GraphQLObjectType,
- specifiedDirectives,
- TypeDefinitionNode,
- DirectiveDefinitionNode,
- TypeExtensionNode,
- ObjectTypeDefinitionNode,
- NamedTypeNode,
-} from 'graphql';
-import { transformSchema } from 'apollo-graphql';
-import federationDirectives from '../directives';
-import {
- findDirectivesOnTypeOrField,
- isStringValueNode,
- parseSelections,
- mapFieldNamesToServiceName,
- stripExternalFieldsFromTypeDefs,
- typeNodesAreEquivalent,
- mapValues,
- isFederationDirective,
- executableDirectiveLocations,
- stripTypeSystemDirectivesFromTypeDefs,
- defaultRootOperationNameLookup,
- getFederationMetadata,
-} from './utils';
-import {
- ServiceDefinition,
- ExternalFieldDefinition,
- ServiceNameToKeyDirectivesMap,
- FederationType,
- FederationField,
- FederationDirective,
-} from './types';
-import { validateSDL } from 'graphql/validation/validate';
-import { compositionRules } from './rules';
-
-const EmptyQueryDefinition = {
- kind: Kind.OBJECT_TYPE_DEFINITION,
- name: { kind: Kind.NAME, value: defaultRootOperationNameLookup.query },
- fields: [],
- serviceName: null,
-};
-const EmptyMutationDefinition = {
- kind: Kind.OBJECT_TYPE_DEFINITION,
- name: { kind: Kind.NAME, value: defaultRootOperationNameLookup.mutation },
- fields: [],
- serviceName: null,
-};
-
-// Map of all type definitions to eventually be passed to extendSchema
-interface TypeDefinitionsMap {
- [name: string]: TypeDefinitionNode[];
-}
-// Map of all type extensions to eventually be passed to extendSchema
-interface TypeExtensionsMap {
- [name: string]: TypeExtensionNode[];
-}
-
-// Map of all directive definitions to eventually be passed to extendSchema
-interface DirectiveDefinitionsMap {
- [name: string]: { [serviceName: string]: DirectiveDefinitionNode };
-}
-
-/**
- * A map of base types to their owning service. Used by query planner to direct traffic.
- * This contains the base type's "owner". Any fields that extend this type in another service
- * are listed under "extensionFieldsToOwningServiceMap". extensionFieldsToOwningServiceMap are in the format { myField: my-service-name }
- *
- * Example resulting typeToServiceMap shape:
- *
- * const typeToServiceMap = {
- * Product: {
- * serviceName: "ProductService",
- * extensionFieldsToOwningServiceMap: {
- * reviews: "ReviewService", // Product.reviews comes from the ReviewService
- * dimensions: "ShippingService",
- * weight: "ShippingService"
- * }
- * }
- * }
- */
-interface TypeToServiceMap {
- [typeName: string]: {
- owningService?: string;
- extensionFieldsToOwningServiceMap: { [fieldName: string]: string };
- };
-}
-
-/*
- * Map of types to their key directives (maintains association to their services)
- *
- * Example resulting KeyDirectivesMap shape:
- *
- * const keyDirectives = {
- * Product: {
- * serviceA: ["sku", "upc"]
- * serviceB: ["color {id value}"] // Selection node simplified for readability
- * }
- * }
- */
-export interface KeyDirectivesMap {
- [typeName: string]: ServiceNameToKeyDirectivesMap;
-}
-
-/**
- * A set of type names that have been determined to be a value type, a type
- * shared across at least 2 services.
- */
-type ValueTypes = Set;
-
-export type ComposedGraphQLSchema = GraphQLSchema & {
- extensions: { serviceList: ServiceDefinition[] }
-};
-/**
- * Loop over each service and process its typeDefs (`definitions`)
- * - build up typeToServiceMap
- * - push individual definitions onto either typeDefinitionsMap or typeExtensionsMap
- */
-export function buildMapsFromServiceList(serviceList: ServiceDefinition[]) {
- const typeDefinitionsMap: TypeDefinitionsMap = Object.create(null);
- const typeExtensionsMap: TypeExtensionsMap = Object.create(null);
- const directiveDefinitionsMap: DirectiveDefinitionsMap = Object.create(null);
- const typeToServiceMap: TypeToServiceMap = Object.create(null);
- const externalFields: ExternalFieldDefinition[] = [];
- const keyDirectivesMap: KeyDirectivesMap = Object.create(null);
- const valueTypes: ValueTypes = new Set();
-
- for (const { typeDefs, name: serviceName } of serviceList) {
- // Build a new SDL with @external fields removed, as well as information about
- // the fields that were removed.
- const {
- typeDefsWithoutExternalFields,
- strippedFields,
- } = stripExternalFieldsFromTypeDefs(typeDefs, serviceName);
-
- externalFields.push(...strippedFields);
-
- // Type system directives from downstream services are not a concern of the
- // gateway, but rather the services on which the fields live which serve
- // those types. In other words, its up to an implementing service to
- // act on such directives, not the gateway.
- const typeDefsWithoutTypeSystemDirectives =
- stripTypeSystemDirectivesFromTypeDefs(typeDefsWithoutExternalFields);
-
- for (const definition of typeDefsWithoutTypeSystemDirectives.definitions) {
- if (
- definition.kind === Kind.OBJECT_TYPE_DEFINITION ||
- definition.kind === Kind.OBJECT_TYPE_EXTENSION
- ) {
- const typeName = definition.name.value;
-
- for (const keyDirective of findDirectivesOnTypeOrField(
- definition,
- 'key',
- )) {
- if (
- keyDirective.arguments &&
- isStringValueNode(keyDirective.arguments[0].value)
- ) {
- // Initialize the entry for this type if necessary
- keyDirectivesMap[typeName] = keyDirectivesMap[typeName] || {};
- // Initialize the entry for this service if necessary
- keyDirectivesMap[typeName][serviceName] =
- keyDirectivesMap[typeName][serviceName] || [];
- // Add @key metadata to the array
- keyDirectivesMap[typeName][serviceName].push(
- parseSelections(keyDirective.arguments[0].value.value),
- );
- }
- }
- }
-
- if (isTypeDefinitionNode(definition)) {
- const typeName = definition.name.value;
- /**
- * This type is a base definition (not an extension). If this type is already in the typeToServiceMap, then
- * 1. It was declared by a previous service, but this newer one takes precedence, or...
- * 2. It was extended by a service before declared
- */
- if (!typeToServiceMap[typeName]) {
- typeToServiceMap[typeName] = {
- extensionFieldsToOwningServiceMap: Object.create(null),
- };
- }
-
- typeToServiceMap[typeName].owningService = serviceName;
-
- /**
- * If this type already exists in the definitions map, push this definition to the array (newer defs
- * take precedence). If the types are determined to be identical, add the type name
- * to the valueTypes Set.
- *
- * If not, create the definitions array and add it to the typeDefinitionsMap.
- */
- if (typeDefinitionsMap[typeName]) {
- const isValueType = typeNodesAreEquivalent(
- typeDefinitionsMap[typeName][
- typeDefinitionsMap[typeName].length - 1
- ],
- definition,
- );
-
- if (isValueType) {
- valueTypes.add(typeName);
- }
-
- typeDefinitionsMap[typeName].push({ ...definition, serviceName });
- } else {
- typeDefinitionsMap[typeName] = [{ ...definition, serviceName }];
- }
- } else if (isTypeExtensionNode(definition)) {
- const typeName = definition.name.value;
-
- /**
- * This definition is an extension of an OBJECT type defined in another service.
- * TODO: handle extensions of non-object types?
- */
- if (
- definition.kind === Kind.OBJECT_TYPE_EXTENSION ||
- definition.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION
- ) {
- if (!definition.fields) break;
- const fields = mapFieldNamesToServiceName<
- FieldDefinitionNode | InputValueDefinitionNode
- >(definition.fields, serviceName);
-
- /**
- * If the type already exists in the typeToServiceMap, add the extended fields. If not, create the object
- * and add the extensionFieldsToOwningServiceMap, but don't add a serviceName. That will be added once that service
- * definition is processed.
- */
- if (typeToServiceMap[typeName]) {
- typeToServiceMap[typeName].extensionFieldsToOwningServiceMap = {
- ...typeToServiceMap[typeName].extensionFieldsToOwningServiceMap,
- ...fields,
- };
- } else {
- typeToServiceMap[typeName] = {
- extensionFieldsToOwningServiceMap: fields,
- };
- }
- }
-
- if (definition.kind === Kind.ENUM_TYPE_EXTENSION) {
- if (!definition.values) break;
-
- const values = mapFieldNamesToServiceName(
- definition.values,
- serviceName,
- );
-
- if (typeToServiceMap[typeName]) {
- typeToServiceMap[typeName].extensionFieldsToOwningServiceMap = {
- ...typeToServiceMap[typeName].extensionFieldsToOwningServiceMap,
- ...values,
- };
- } else {
- typeToServiceMap[typeName] = {
- extensionFieldsToOwningServiceMap: values,
- };
- }
- }
-
- /**
- * If an extension for this type already exists in the extensions map, push this extension to the
- * array (since a type can be extended by multiple services). If not, create the extensions array
- * and add it to the typeExtensionsMap.
- */
- if (typeExtensionsMap[typeName]) {
- typeExtensionsMap[typeName].push({ ...definition, serviceName });
- } else {
- typeExtensionsMap[typeName] = [{ ...definition, serviceName }];
- }
- } else if (definition.kind === Kind.DIRECTIVE_DEFINITION) {
- const directiveName = definition.name.value;
-
- // The composed schema should only contain directives and their
- // ExecutableDirectiveLocations. This filters out any TypeSystemDirectiveLocations.
- // A new DirectiveDefinitionNode with this filtered list will be what is
- // added to the schema.
- const executableLocations = definition.locations.filter(location =>
- executableDirectiveLocations.includes(location.value),
- );
-
- // If none of the directive's locations are executable, we don't need to
- // include it in the composed schema at all.
- if (executableLocations.length === 0) continue;
-
- const definitionWithExecutableLocations: DirectiveDefinitionNode = {
- ...definition,
- locations: executableLocations,
- };
-
- if (directiveDefinitionsMap[directiveName]) {
- directiveDefinitionsMap[directiveName][
- serviceName
- ] = definitionWithExecutableLocations;
- } else {
- directiveDefinitionsMap[directiveName] = {
- [serviceName]: definitionWithExecutableLocations,
- };
- }
- }
- }
- }
-
- // Since all Query/Mutation definitions in service schemas are treated as
- // extensions, we don't have a Query or Mutation DEFINITION in the definitions
- // list. Without a Query/Mutation definition, we can't _extend_ the type.
- // extendSchema will complain about this. We can't add an empty
- // GraphQLObjectType to the schema constructor, so we add an empty definition
- // here. We only add mutation if there is a mutation extension though.
- if (!typeDefinitionsMap.Query)
- typeDefinitionsMap.Query = [EmptyQueryDefinition];
- if (typeExtensionsMap.Mutation && !typeDefinitionsMap.Mutation)
- typeDefinitionsMap.Mutation = [EmptyMutationDefinition];
-
- return {
- typeToServiceMap,
- typeDefinitionsMap,
- typeExtensionsMap,
- directiveDefinitionsMap,
- externalFields,
- keyDirectivesMap,
- valueTypes,
- };
-}
-
-export function buildSchemaFromDefinitionsAndExtensions({
- typeDefinitionsMap,
- typeExtensionsMap,
- directiveDefinitionsMap,
-}: {
- typeDefinitionsMap: TypeDefinitionsMap;
- typeExtensionsMap: TypeExtensionsMap;
- directiveDefinitionsMap: DirectiveDefinitionsMap;
-}) {
- let errors: GraphQLError[] | undefined = undefined;
-
- let schema = new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- });
-
- // This interface and predicate is a TS / graphql-js workaround for now while
- // we're using a local graphql version < v15. This predicate _could_ be:
- // `node is ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode` in the
- // future to be more semantic. However this gives us type safety and flexibility
- // for now.
- interface HasInterfaces {
- interfaces?: ObjectTypeDefinitionNode['interfaces'];
- }
-
- function nodeHasInterfaces(node: any): node is HasInterfaces {
- return 'interfaces' in node;
- }
-
- // Extend the blank schema with the base type definitions (as an AST node)
- const definitionsDocument: DocumentNode = {
- kind: Kind.DOCUMENT,
- definitions: [
- ...Object.values(typeDefinitionsMap).flatMap(typeDefinitions => {
- // See if any of our Objects or Interfaces implement any interfaces at all.
- // If not, we can return early.
- if (!typeDefinitions.some(nodeHasInterfaces)) return typeDefinitions;
-
- const uniqueInterfaces: Map<
- string,
- NamedTypeNode
- > = (typeDefinitions as HasInterfaces[]).reduce(
- (map, objectTypeDef) => {
- objectTypeDef.interfaces?.forEach((iface) =>
- map.set(iface.name.value, iface),
- );
- return map;
- },
- new Map(),
- );
-
- // No interfaces, no aggregation - just return what we got.
- if (uniqueInterfaces.size === 0) return typeDefinitions;
-
- const [first, ...rest] = typeDefinitions;
-
- return [
- ...rest,
- {
- ...first,
- interfaces: Array.from(uniqueInterfaces.values()),
- },
- ];
-
- }),
- ...Object.values(directiveDefinitionsMap).map(
- definitions => Object.values(definitions)[0],
- ),
- ],
- };
-
- errors = validateSDL(definitionsDocument, schema, compositionRules);
- schema = extendSchema(schema, definitionsDocument, { assumeValidSDL: true });
-
- // Extend the schema with the extension definitions (as an AST node)
- const extensionsDocument: DocumentNode = {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeExtensionsMap).flat(),
- };
-
- errors.push(...validateSDL(extensionsDocument, schema, compositionRules));
-
- schema = extendSchema(schema, extensionsDocument, { assumeValidSDL: true });
-
- // Remove federation directives from the final schema
- schema = new GraphQLSchema({
- ...schema.toConfig(),
- directives: [
- ...schema.getDirectives().filter(x => !isFederationDirective(x)),
- ],
- });
-
- return { schema, errors };
-}
-
-/**
- * Using the various information we've collected about the schema, augment the
- * `schema` itself with `federation` metadata to the types and fields
- */
-export function addFederationMetadataToSchemaNodes({
- schema,
- typeToServiceMap,
- externalFields,
- keyDirectivesMap,
- valueTypes,
- directiveDefinitionsMap,
-}: {
- schema: GraphQLSchema;
- typeToServiceMap: TypeToServiceMap;
- externalFields: ExternalFieldDefinition[];
- keyDirectivesMap: KeyDirectivesMap;
- valueTypes: ValueTypes;
- directiveDefinitionsMap: DirectiveDefinitionsMap;
-}) {
- for (const [
- typeName,
- { owningService, extensionFieldsToOwningServiceMap },
- ] of Object.entries(typeToServiceMap)) {
- const namedType = schema.getType(typeName) as GraphQLNamedType;
- if (!namedType) continue;
-
- // Extend each type in the GraphQLSchema with the serviceName that owns it
- // and the key directives that belong to it
- const isValueType = valueTypes.has(typeName);
- const serviceName = isValueType ? null : owningService;
-
- const federationMetadata: FederationType = {
- ...getFederationMetadata(namedType),
- serviceName,
- isValueType,
- ...(keyDirectivesMap[typeName] && {
- keys: keyDirectivesMap[typeName],
- }),
- }
-
- namedType.extensions = {
- ...namedType.extensions,
- federation: federationMetadata,
- };
-
- // For object types, add metadata for all the @provides directives from its fields
- if (isObjectType(namedType)) {
- for (const field of Object.values(namedType.getFields())) {
- const [providesDirective] = findDirectivesOnTypeOrField(
- field.astNode,
- 'provides',
- );
-
- if (
- providesDirective &&
- providesDirective.arguments &&
- isStringValueNode(providesDirective.arguments[0].value)
- ) {
- const fieldFederationMetadata: FederationField = {
- ...getFederationMetadata(field),
- serviceName,
- provides: parseSelections(
- providesDirective.arguments[0].value.value,
- ),
- belongsToValueType: isValueType,
- }
-
- field.extensions = {
- ...field.extensions,
- federation: fieldFederationMetadata
- };
- }
- }
- }
-
- /**
- * For extension fields, do 2 things:
- * 1. Add serviceName metadata to all fields that belong to a type extension
- * 2. add metadata from the @requires directive for each field extension
- */
- for (const [fieldName, extendingServiceName] of Object.entries(
- extensionFieldsToOwningServiceMap,
- )) {
- // TODO: Why don't we need to check for non-object types here
- if (isObjectType(namedType)) {
- const field = namedType.getFields()[fieldName];
-
- const fieldFederationMetadata: FederationField = {
- ...getFederationMetadata(field),
- serviceName: extendingServiceName,
- }
-
- field.extensions = {
- ...field.extensions,
- federation: fieldFederationMetadata,
- };
-
- const [requiresDirective] = findDirectivesOnTypeOrField(
- field.astNode,
- 'requires',
- );
-
- if (
- requiresDirective &&
- requiresDirective.arguments &&
- isStringValueNode(requiresDirective.arguments[0].value)
- ) {
- const fieldFederationMetadata: FederationField = {
- ...getFederationMetadata(field),
- requires: parseSelections(
- requiresDirective.arguments[0].value.value,
- ),
- }
-
- field.extensions = {
- ...field.extensions,
- federation: fieldFederationMetadata,
- };
- }
- }
- }
- }
- // add externals metadata
- for (const field of externalFields) {
- const namedType = schema.getType(field.parentTypeName);
- if (!namedType) continue;
-
- const existingMetadata = getFederationMetadata(namedType);
- const typeFederationMetadata: FederationType = {
- ...existingMetadata,
- externals: {
- ...existingMetadata?.externals,
- [field.serviceName]: [
- ...(existingMetadata?.externals?.[field.serviceName] || []),
- field,
- ],
- },
- };
-
- namedType.extensions = {
- ...namedType.extensions,
- federation: typeFederationMetadata,
- };
- }
-
- // add all definitions of a specific directive for validation later
- for (const directiveName of Object.keys(directiveDefinitionsMap)) {
- const directive = schema.getDirective(directiveName);
- if (!directive) continue;
-
- const directiveFederationMetadata: FederationDirective = {
- ...getFederationMetadata(directive),
- directiveDefinitions: directiveDefinitionsMap[directiveName],
- }
-
- directive.extensions = {
- ...directive.extensions,
- federation: directiveFederationMetadata,
- }
- }
-}
-
-export function composeServices(services: ServiceDefinition[]) {
- const {
- typeToServiceMap,
- typeDefinitionsMap,
- typeExtensionsMap,
- directiveDefinitionsMap,
- externalFields,
- keyDirectivesMap,
- valueTypes,
- } = buildMapsFromServiceList(services);
-
- let { schema, errors } = buildSchemaFromDefinitionsAndExtensions({
- typeDefinitionsMap,
- typeExtensionsMap,
- directiveDefinitionsMap,
- });
-
- // TODO: We should fix this to take non-default operation root types in
- // implementing services into account.
- schema = new GraphQLSchema({
- ...schema.toConfig(),
- ...mapValues(defaultRootOperationNameLookup, typeName =>
- typeName
- ? (schema.getType(typeName) as GraphQLObjectType)
- : undefined,
- ),
- extensions: {
- serviceList: services
- }
- });
-
- // If multiple type definitions and extensions for the same type implement the
- // same interface, it will get added to the constructed object multiple times,
- // resulting in a schema validation error. We therefore need to remove
- // duplicate interfaces from object types manually.
- schema = transformSchema(schema, type => {
- if (isObjectType(type)) {
- const config = type.toConfig();
- return new GraphQLObjectType({
- ...config,
- interfaces: Array.from(new Set(config.interfaces)),
- });
- }
- return undefined;
- });
-
- addFederationMetadataToSchemaNodes({
- schema,
- typeToServiceMap,
- externalFields,
- keyDirectivesMap,
- valueTypes,
- directiveDefinitionsMap,
- });
-
- /**
- * At the end, we're left with a full GraphQLSchema that _also_ has `serviceName` fields for every type,
- * and every field that was extended. Fields that were _not_ extended (added on the base type by the owner),
- * there is no `serviceName`, and we should refer to the type's `serviceName`
- */
- return { schema: schema as ComposedGraphQLSchema, errors };
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/composeAndValidate.ts b/gateway/node_modules/@apollo/federation/src/composition/composeAndValidate.ts
deleted file mode 100644
index d53229b..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/composeAndValidate.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { composeServices } from './compose';
-import {
- validateComposedSchema,
- validateServicesBeforeComposition,
- validateServicesBeforeNormalization,
-} from './validate';
-import { ServiceDefinition } from './types';
-import { normalizeTypeDefs } from './normalize';
-import { printComposedSdl } from '../service/printComposedSdl';
-
-export function composeAndValidate(serviceList: ServiceDefinition[]) {
- const errors = validateServicesBeforeNormalization(serviceList);
-
- const normalizedServiceList = serviceList.map(({ name, typeDefs }) => ({
- name,
- typeDefs: normalizeTypeDefs(typeDefs),
- }));
-
- // generate errors or warnings of the individual services
- errors.push(...validateServicesBeforeComposition(normalizedServiceList));
-
- // generate a schema and any errors or warnings
- const compositionResult = composeServices(normalizedServiceList);
- errors.push(...compositionResult.errors);
-
- // validate the composed schema based on service information
- errors.push(
- ...validateComposedSchema({
- schema: compositionResult.schema,
- serviceList,
- }),
- );
-
- // We shouldn't try to print the SDL if there were errors during composition
- const composedSdl =
- errors.length === 0
- ? printComposedSdl(compositionResult.schema, serviceList)
- : undefined;
-
- // TODO remove the warnings array once no longer used by clients
- return {
- schema: compositionResult.schema,
- warnings: [],
- errors,
- composedSdl,
- };
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/index.ts b/gateway/node_modules/@apollo/federation/src/composition/index.ts
deleted file mode 100644
index 58c910b..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export * from './compose';
-export * from './composeAndValidate';
-export * from './types';
-export { compositionRules } from './rules';
-export { normalizeTypeDefs } from './normalize';
-export { defaultRootOperationNameLookup } from './utils';
diff --git a/gateway/node_modules/@apollo/federation/src/composition/normalize.ts b/gateway/node_modules/@apollo/federation/src/composition/normalize.ts
deleted file mode 100644
index 9f8fcac..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/normalize.ts
+++ /dev/null
@@ -1,321 +0,0 @@
-import { DefaultRootOperationTypeName } from './types';
-import {
- DocumentNode,
- visit,
- ObjectTypeDefinitionNode,
- ObjectTypeExtensionNode,
- Kind,
- InterfaceTypeDefinitionNode,
- VisitFn,
- specifiedDirectives,
-} from 'graphql';
-import {
- findDirectivesOnTypeOrField,
- defKindToExtKind,
- reservedRootFields,
- defaultRootOperationNameLookup
-} from './utils';
-import federationDirectives from '../directives';
-
-export function normalizeTypeDefs(typeDefs: DocumentNode) {
- // The order of this is important - `stripCommonPrimitives` must come after
- // `defaultRootOperationTypes` because it depends on the `Query` type being named
- // its default: `Query`.
- return stripCommonPrimitives(
- defaultRootOperationTypes(
- replaceExtendedDefinitionsWithExtensions(typeDefs),
- ),
- );
-}
-
-export function defaultRootOperationTypes(
- typeDefs: DocumentNode,
-): DocumentNode {
- // Array of default root operation names
- const defaultRootOperationNames = Object.values(
- defaultRootOperationNameLookup,
- );
-
- // Map of the given root operation type names to their respective default operation
- // type names, i.e. {RootQuery: 'Query'}
- let rootOperationTypeMap: {
- [key: string]: DefaultRootOperationTypeName;
- } = Object.create(null);
-
- let hasSchemaDefinitionOrExtension = false;
- visit(typeDefs, {
- OperationTypeDefinition(node) {
- // If we find at least one root operation type definition, we know the user has
- // specified either a schema definition or extension.
- hasSchemaDefinitionOrExtension = true;
- // Build the map of root operation type name to its respective default
- rootOperationTypeMap[node.type.name.value] =
- defaultRootOperationNameLookup[node.operation];
- },
- });
-
- // In this case, there's no defined schema or schema extension, so we use defaults
- if (!hasSchemaDefinitionOrExtension) {
- rootOperationTypeMap = {
- Query: 'Query',
- Mutation: 'Mutation',
- Subscription: 'Subscription',
- };
- }
-
- // A conflicting default definition exists when the user provides a schema
- // definition, but also defines types that use the default root operation
- // names (Query, Mutation, Subscription). Those types need to be removed.
- let schemaWithoutConflictingDefaultDefinitions;
- if (!hasSchemaDefinitionOrExtension) {
- // If no schema definition or extension exists, then there aren't any
- // conflicting defaults to worry about.
- schemaWithoutConflictingDefaultDefinitions = typeDefs;
- } else {
- // If the user provides a schema definition or extension, then using default
- // root operation names is considered an error for composition. This visit
- // drops the invalid type definitions/extensions altogether, as well as
- // fields that reference them.
- //
- // Example:
- //
- // schema {
- // query: RootQuery
- // }
- //
- // type Query { <--- this type definition is invalid (as well as Mutation or Subscription)
- // ...
- // }
- schemaWithoutConflictingDefaultDefinitions = visit(typeDefs, {
- ObjectTypeDefinition(node) {
- if (
- (defaultRootOperationNames as string[]).includes(node.name.value) &&
- !rootOperationTypeMap[node.name.value]
- ) {
- return null;
- }
- return;
- },
- ObjectTypeExtension(node) {
- if (
- (defaultRootOperationNames as string[]).includes(node.name.value) &&
- !rootOperationTypeMap[node.name.value]
- ) {
- return null;
- }
- return;
- },
- // This visitor handles the case where:
- // 1) A schema definition or extension is provided by the user
- // 2) A field exists that is of a _default_ root operation type. (Query, Mutation, Subscription)
- //
- // Example:
- //
- // schema {
- // mutation: RootMutation
- // }
- //
- // type RootMutation {
- // updateProduct: Query <--- remove this field altogether
- // }
- FieldDefinition(node) {
- if (
- node.type.kind === Kind.NAMED_TYPE &&
- (defaultRootOperationNames as string[]).includes(node.type.name.value)
- ) {
- return null;
- }
-
- if (
- node.type.kind === Kind.NON_NULL_TYPE &&
- node.type.type.kind === Kind.NAMED_TYPE &&
- (defaultRootOperationNames as string[]).includes(
- node.type.type.name.value,
- )
- ) {
- return null;
- }
- return;
- },
- });
- }
-
- const schemaWithDefaultRootTypes = visit(
- schemaWithoutConflictingDefaultDefinitions,
- {
- // Schema definitions and extensions are extraneous since we're transforming
- // the root operation types to their defaults.
- SchemaDefinition() {
- return null;
- },
- SchemaExtension() {
- return null;
- },
- ObjectTypeDefinition(node) {
- if (
- node.name.value in rootOperationTypeMap ||
- (defaultRootOperationNames as string[]).includes(node.name.value)
- ) {
- return {
- ...node,
- name: {
- ...node.name,
- value: rootOperationTypeMap[node.name.value] || node.name.value,
- },
- kind: Kind.OBJECT_TYPE_EXTENSION,
- };
- }
- return;
- },
- // schema {
- // query: RootQuery
- // }
- //
- // extend type RootQuery { <--- update this to `extend type Query`
- // ...
- // }
- ObjectTypeExtension(node) {
- if (
- node.name.value in rootOperationTypeMap ||
- (defaultRootOperationNames as string[]).includes(node.name.value)
- ) {
- return {
- ...node,
- name: {
- ...node.name,
- value: rootOperationTypeMap[node.name.value] || node.name.value,
- },
- };
- }
- return;
- },
- // Corresponding NamedTypes must also make the name switch, in the case that
- // they reference a root operation type that we've transformed
- //
- // schema {
- // query: RootQuery
- // mutation: RootMutation
- // }
- //
- // type RootQuery {
- // ...
- // }
- //
- // type RootMutation {
- // updateProduct: RootQuery <--- rename `RootQuery` to `Query`
- // }
- NamedType(node) {
- if (node.name.value in rootOperationTypeMap) {
- return {
- ...node,
- name: {
- ...node.name,
- value: rootOperationTypeMap[node.name.value],
- },
- };
- }
- return;
- },
- },
- );
-
- return schemaWithDefaultRootTypes;
-}
-
-// type definitions with the @extends directive should be treated
-// as type extensions.
-export function replaceExtendedDefinitionsWithExtensions(
- typeDefs: DocumentNode,
-) {
- const typeDefsWithExtendedTypesReplaced = visit(typeDefs, {
- ObjectTypeDefinition: visitor,
- InterfaceTypeDefinition: visitor,
- });
-
- function visitor(
- node: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode,
- ) {
- const isExtensionDefinition =
- findDirectivesOnTypeOrField(node, 'extends').length > 0;
-
- if (!isExtensionDefinition) {
- return node;
- }
-
- const filteredDirectives =
- node.directives &&
- node.directives.filter(directive => directive.name.value !== 'extends');
-
- return {
- ...node,
- ...(filteredDirectives && { directives: filteredDirectives }),
- kind: defKindToExtKind[node.kind],
- };
- }
-
- return typeDefsWithExtendedTypesReplaced;
-}
-
-// For non-ApolloServer libraries that support federation, this allows a
-// library to report the entire schema's SDL rather than an awkward, stripped out
-// subset of the schema. Generally there's no need to include the federation
-// primitives, but in many cases it's more difficult to exclude them.
-//
-// This removes the following from a GraphQL Document:
-// directives: @external, @key, @requires, @provides, @extends, @skip, @include, @deprecated, @specifiedBy
-// scalars: _Any, _FieldSet
-// union: _Entity
-// object type: _Service
-// Query fields: _service, _entities
-export function stripCommonPrimitives(document: DocumentNode) {
- const typeDefinitionVisitor: VisitFn<
- any,
- ObjectTypeDefinitionNode | ObjectTypeExtensionNode
- > = (node) => {
- // Remove the `_entities` and `_service` fields from the `Query` type
- if (node.name.value === defaultRootOperationNameLookup.query) {
- const filteredFieldDefinitions = node.fields?.filter(
- (fieldDefinition) =>
- !reservedRootFields.includes(fieldDefinition.name.value),
- );
-
- // If the 'Query' type is now empty just remove it
- if (!filteredFieldDefinitions || filteredFieldDefinitions.length === 0) {
- return null;
- }
-
- return {
- ...node,
- fields: filteredFieldDefinitions,
- };
- }
-
- // Remove the _Service type from the document
- const isFederationType = node.name.value === '_Service';
- return isFederationType ? null : node;
- };
-
- return visit(document, {
- // Remove all common directive definitions from the document
- DirectiveDefinition(node) {
- const isCommonDirective = [...federationDirectives, ...specifiedDirectives].some(
- (directive) => directive.name === node.name.value,
- );
- return isCommonDirective ? null : node;
- },
- // Remove all federation scalar definitions from the document
- ScalarTypeDefinition(node) {
- const isFederationScalar = ['_Any', '_FieldSet'].includes(
- node.name.value,
- );
- return isFederationScalar ? null : node;
- },
- // Remove all federation union definitions from the document
- UnionTypeDefinition(node) {
- const isFederationUnion = node.name.value === "_Entity";
- return isFederationUnion ? null : node;
- },
- ObjectTypeDefinition: typeDefinitionVisitor,
- ObjectTypeExtension: typeDefinitionVisitor,
- });
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/rules.ts b/gateway/node_modules/@apollo/federation/src/composition/rules.ts
deleted file mode 100644
index f4ed37e..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/rules.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { specifiedSDLRules } from 'graphql/validation/specifiedRules';
-
-/**
- * Since this module has overlapping names in the two modules (graphql-js and
- * our own, local validation rules) which we are importing from, we
- * intentionally are very explicit about the suffixes of imported members here,
- * so that the intention is clear.
- *
- * First, we'll import validation rules from graphql-js which we'll omit and
- * replace with our own validation rules. As noted above, we'll use aliases
- * with 'FromGraphqlJs' suffixes for clarity.
- */
-
-import {
- UniqueDirectivesPerLocationRule as UniqueDirectivesPerLocationRuleFromGraphqlJs,
-} from 'graphql';
-import {
- UniqueTypeNames as UniqueTypeNamesFromGraphqlJs,
-} from 'graphql/validation/rules/UniqueTypeNames';
-import {
- UniqueEnumValueNames as UniqueEnumValueNamesFromGraphqlJs,
-} from 'graphql/validation/rules/UniqueEnumValueNames';
-import {
- PossibleTypeExtensions as PossibleTypeExtensionsFromGraphqlJs,
-} from 'graphql/validation/rules/PossibleTypeExtensions';
-import {
- UniqueFieldDefinitionNames as UniqueFieldDefinitionNamesFromGraphqlJs,
-} from 'graphql/validation/rules/UniqueFieldDefinitionNames';
-
-/**
- * Then, we'll import our own validation rules to take the place of those that
- * we'll be customizing, taking care to alias them all to the same name with
- * "FromComposition" suffixes.
- */
-import {
- UniqueTypeNamesWithFields as UniqueTypeNamesWithFieldsFromComposition,
- MatchingEnums as MatchingEnumsFromComposition,
- PossibleTypeExtensions as PossibleTypeExtensionsFromComposition,
- UniqueFieldDefinitionNames as UniqueFieldDefinitionsNamesFromComposition,
- UniqueUnionTypes as UniqueUnionTypesFromComposition,
- } from './validate/sdl';
-
-const omit = [
- UniqueDirectivesPerLocationRuleFromGraphqlJs,
- UniqueTypeNamesFromGraphqlJs,
- UniqueEnumValueNamesFromGraphqlJs,
- PossibleTypeExtensionsFromGraphqlJs,
- UniqueFieldDefinitionNamesFromGraphqlJs,
-];
-
-export const compositionRules = specifiedSDLRules
- .filter(rule => !omit.includes(rule))
- .concat([
- UniqueFieldDefinitionsNamesFromComposition,
- UniqueTypeNamesWithFieldsFromComposition,
- MatchingEnumsFromComposition,
- UniqueUnionTypesFromComposition,
- PossibleTypeExtensionsFromComposition,
- ]);
diff --git a/gateway/node_modules/@apollo/federation/src/composition/types.ts b/gateway/node_modules/@apollo/federation/src/composition/types.ts
deleted file mode 100644
index 182ed0d..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/types.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-import {
- SelectionNode,
- DocumentNode,
- FieldDefinitionNode,
- DirectiveDefinitionNode,
-} from 'graphql';
-
-export type Maybe = null | undefined | T;
-
-export type ServiceName = string | null;
-
-export type DefaultRootOperationTypeName =
- | 'Query'
- | 'Mutation'
- | 'Subscription';
-
-export interface ExternalFieldDefinition {
- field: FieldDefinitionNode;
- parentTypeName: string;
- serviceName: string;
-}
-
-export interface ServiceNameToKeyDirectivesMap {
- [serviceName: string]: ReadonlyArray[];
-}
-
-export interface FederationType {
- serviceName?: ServiceName;
- keys?: ServiceNameToKeyDirectivesMap;
- externals?: {
- [serviceName: string]: ExternalFieldDefinition[];
- };
- isValueType?: boolean;
-}
-
-export interface FederationField {
- serviceName?: ServiceName;
- requires?: ReadonlyArray;
- provides?: ReadonlyArray;
- 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;
- }
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/utils.ts b/gateway/node_modules/@apollo/federation/src/composition/utils.ts
deleted file mode 100644
index 2c0a0ea..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/utils.ts
+++ /dev/null
@@ -1,583 +0,0 @@
-import 'apollo-server-env';
-import {
- InterfaceTypeExtensionNode,
- FieldDefinitionNode,
- Kind,
- StringValueNode,
- parse,
- OperationDefinitionNode,
- NameNode,
- DocumentNode,
- visit,
- ObjectTypeExtensionNode,
- DirectiveNode,
- GraphQLNamedType,
- GraphQLError,
- GraphQLSchema,
- isObjectType,
- GraphQLObjectType,
- getNamedType,
- GraphQLField,
- SelectionNode,
- isEqualType,
- FieldNode,
- TypeDefinitionNode,
- InputValueDefinitionNode,
- TypeExtensionNode,
- BREAK,
- print,
- ASTNode,
- DirectiveDefinitionNode,
- GraphQLDirective,
- OperationTypeNode,
- isDirective,
- isNamedType,
-} from 'graphql';
-import {
- ExternalFieldDefinition,
- DefaultRootOperationTypeName,
- Maybe,
- FederationType,
- FederationDirective,
- FederationField,
-} from './types';
-import federationDirectives from '../directives';
-
-export function isStringValueNode(node: any): node is StringValueNode {
- return node.kind === Kind.STRING;
-}
-
-// Create a map of { fieldName: serviceName } for each field.
-export function mapFieldNamesToServiceName(
- fields: ReadonlyArray,
- serviceName: string,
-) {
- return fields.reduce((prev, next) => {
- prev[next.name.value] = serviceName;
- return prev;
- }, Object.create(null));
-}
-
-export function findDirectivesOnTypeOrField(
- node: Maybe,
- directiveName: string,
-) {
- return node && node.directives
- ? node.directives.filter(
- directive => directive.name.value === directiveName,
- )
- : [];
-}
-
-export function stripExternalFieldsFromTypeDefs(
- typeDefs: DocumentNode,
- serviceName: string,
-): {
- typeDefsWithoutExternalFields: DocumentNode;
- strippedFields: ExternalFieldDefinition[];
-} {
- const strippedFields: ExternalFieldDefinition[] = [];
-
- const typeDefsWithoutExternalFields = visit(typeDefs, {
- ObjectTypeExtension: removeExternalFieldsFromExtensionVisitor(
- strippedFields,
- serviceName,
- ),
- InterfaceTypeExtension: removeExternalFieldsFromExtensionVisitor(
- strippedFields,
- serviceName,
- ),
- }) as DocumentNode;
-
- return { typeDefsWithoutExternalFields, strippedFields };
-}
-
-export function stripTypeSystemDirectivesFromTypeDefs(typeDefs: DocumentNode) {
- const typeDefsWithoutTypeSystemDirectives = visit(typeDefs, {
- Directive(node) {
- // The `deprecated` directive is an exceptional case that we want to leave in
- if (node.name.value === 'deprecated' || node.name.value === 'specifiedBy') return;
-
- const isFederationDirective = federationDirectives.some(
- ({ name }) => name === node.name.value,
- );
- // Returning `null` to a visit will cause it to be removed from the tree.
- return isFederationDirective ? undefined : null;
- },
- }) as DocumentNode;
-
- return typeDefsWithoutTypeSystemDirectives;
-}
-
-/**
- * Returns a closure that strips fields marked with `@external` and adds them
- * to an array.
- * @param collector
- * @param serviceName
- */
-function removeExternalFieldsFromExtensionVisitor<
- T extends InterfaceTypeExtensionNode | ObjectTypeExtensionNode
->(collector: ExternalFieldDefinition[], serviceName: string) {
- return (node: T) => {
- 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 {
- ...node,
- fields,
- };
- };
-}
-
-export function parseSelections(source: string) {
- return (parse(`query { ${source} }`)
- .definitions[0] as OperationDefinitionNode).selectionSet.selections;
-}
-
-export function hasMatchingFieldInDirectives({
- directives,
- fieldNameToMatch,
- namedType,
-}: {
- directives: DirectiveNode[];
- fieldNameToMatch: String;
- namedType: GraphQLNamedType;
-}) {
- return Boolean(
- namedType.astNode &&
- directives
- // for each key directive, get the fields arg
- .map(keyDirective =>
- keyDirective.arguments &&
- isStringValueNode(keyDirective.arguments[0].value)
- ? {
- typeName: namedType.astNode!.name.value,
- keyArgument: keyDirective.arguments[0].value.value,
- }
- : null,
- )
- // filter out any null/undefined args
- .filter(isNotNullOrUndefined)
- // flatten all selections of the "fields" arg to a list of fields
- .flatMap(selection => parseSelections(selection.keyArgument))
- // find a field that matches the @external field
- .some(
- field =>
- field.kind === Kind.FIELD && field.name.value === fieldNameToMatch,
- ),
- );
-}
-
-export const logServiceAndType = (
- serviceName: string,
- typeName: string,
- fieldName?: string,
-) => `[${serviceName}] ${typeName}${fieldName ? `.${fieldName} -> ` : ' -> '}`;
-
-export function logDirective(directiveName: string) {
- return `[@${directiveName}] -> `;
-}
-
-// TODO: allow passing of the other args here, rather than just message and code
-export function errorWithCode(
- code: string,
- message: string,
- nodes?: ReadonlyArray | ASTNode | undefined,
-) {
- return new GraphQLError(
- message,
- nodes,
- undefined,
- undefined,
- undefined,
- undefined,
- {
- code,
- },
- );
-}
-
-export function findTypesContainingFieldWithReturnType(
- schema: GraphQLSchema,
- node: GraphQLField,
-): GraphQLObjectType[] {
- const returnType = getNamedType(node.type);
- if (!isObjectType(returnType)) return [];
-
- const containingTypes: GraphQLObjectType[] = [];
- const types = schema.getTypeMap();
- for (const selectionSetType of Object.values(types)) {
- // Only object types have fields
- if (!isObjectType(selectionSetType)) continue;
- const allFields = selectionSetType.getFields();
-
- // only push types that have a field which returns the returnType
- Object.values(allFields).forEach(field => {
- const fieldReturnType = getNamedType(field.type);
- if (fieldReturnType === returnType) {
- containingTypes.push(fieldReturnType);
- }
- });
- }
- return containingTypes;
-}
-
-/**
- * Used for finding a field on the `schema` that returns `typeToFind`
- *
- * Used in validation of external directives to find uses of a field in a
- * `@provides` on another type.
- */
-export function findFieldsThatReturnType({
- schema,
- typeToFind,
-}: {
- schema: GraphQLSchema;
- typeToFind: GraphQLNamedType;
-}): GraphQLField[] {
- if (!isObjectType(typeToFind)) return [];
-
- const fieldsThatReturnType: GraphQLField[] = [];
- const types = schema.getTypeMap();
-
- for (const selectionSetType of Object.values(types)) {
- // for our purposes, only object types have fields that we care about.
- if (!isObjectType(selectionSetType)) continue;
-
- const fieldsOnNamedType = selectionSetType.getFields();
-
- // push fields that have return `typeToFind`
- Object.values(fieldsOnNamedType).forEach(field => {
- const fieldReturnType = getNamedType(field.type);
- if (fieldReturnType === typeToFind) {
- fieldsThatReturnType.push(field);
- }
- });
- }
- return fieldsThatReturnType;
-}
-
-/**
- * Searches recursively to see if a selection set includes references to
- * `typeToFind.fieldToFind`.
- *
- * Used in validation of external fields to find where/if a field is referenced
- * in a nested selection set for `@requires`
- *
- * For every selection, look at the root of the selection's type.
- * 1. If it's the type we're looking for, check its fields.
- * Return true if field matches. Skip to step 3 if not
- * 2. If it's not the type we're looking for, skip to step 3
- * 3. Get the return type for each subselection and run this function on the subselection.
- */
-export function selectionIncludesField({
- selections,
- selectionSetType,
- typeToFind,
- fieldToFind,
-}: {
- selections: readonly SelectionNode[];
- selectionSetType: GraphQLObjectType; // type which applies to `selections`
- typeToFind: GraphQLObjectType; // type where the `@external` lives
- fieldToFind: string;
-}): boolean {
- for (const selection of selections as FieldNode[]) {
- const selectionName: string = selection.name.value;
-
- // if the selected field matches the fieldname we're looking for,
- // and its type is correct, we're done. Return true;
- if (
- selectionName === fieldToFind &&
- isEqualType(selectionSetType, typeToFind)
- )
- return true;
-
- // if the field selection has a subselection, check each field recursively
-
- // check to make sure the parent type contains the field
- const typeIncludesField =
- selectionName &&
- Object.keys(selectionSetType.getFields()).includes(selectionName);
- if (!selectionName || !typeIncludesField) continue;
-
- // get the return type of the selection
- const returnType = getNamedType(
- selectionSetType.getFields()[selectionName].type,
- );
- if (!returnType || !isObjectType(returnType)) continue;
- const subselections =
- selection.selectionSet && selection.selectionSet.selections;
-
- // using the return type of a given selection and all the subselections,
- // recursively search for matching selections. typeToFind and fieldToFind
- // stay the same
- if (subselections) {
- const selectionDoesIncludeField = selectionIncludesField({
- selectionSetType: returnType,
- selections: subselections,
- typeToFind,
- fieldToFind,
- });
- if (selectionDoesIncludeField) return true;
- }
- }
- return false;
-}
-
-/**
- * Returns true if a @key directive is found on the type node
- *
- * @param node TypeDefinitionNode | TypeExtensionNode
- * @returns boolean
- */
-export function isTypeNodeAnEntity(
- node: TypeDefinitionNode | TypeExtensionNode,
-) {
- let isEntity = false;
-
- visit(node, {
- Directive(directive) {
- if (directive.name.value === 'key') {
- isEntity = true;
- return BREAK;
- }
- },
- });
-
- return isEntity;
-}
-
-/**
- * Diff two type nodes. This returns an object consisting of useful properties and their differences
- * - name: An array of length 0 or 2. If their type names are different, they will be added to the array.
- * (['Product', 'Product'])
- * - fields: An entry in the fields object can mean two things:
- * 1) a field was found on one type, but not the other (fieldName: ['String!'])
- * 2) a common field was found, but their types differ (fieldName: ['String!', 'Int!'])
- * - kind: An array of length 0 or 2. If their kinds are different, they will be added to the array.
- * (['InputObjectTypeDefinition', 'InterfaceTypeDefinition'])
- *
- * @param firstNode TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode
- * @param secondNode TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode
- */
-export function diffTypeNodes(
- firstNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode,
- secondNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode,
-) {
- const fieldsDiff: {
- [fieldName: string]: string[];
- } = Object.create(null);
-
- const unionTypesDiff: {
- [typeName: string]: boolean;
- } = Object.create(null);
-
- const locationsDiff: Set = new Set();
-
- const argumentsDiff: {
- [argumentName: string]: string[];
- } = Object.create(null);
-
- const document: DocumentNode = {
- kind: Kind.DOCUMENT,
- definitions: [firstNode, secondNode],
- };
-
- function fieldVisitor(node: FieldDefinitionNode | InputValueDefinitionNode) {
- const fieldName = node.name.value;
-
- const type = print(node.type);
-
- if (!fieldsDiff[fieldName]) {
- fieldsDiff[fieldName] = [type];
- return;
- }
-
- // If we've seen this field twice and the types are the same, remove this
- // field from the diff result
- const fieldTypes = fieldsDiff[fieldName];
- if (fieldTypes[0] === type) {
- delete fieldsDiff[fieldName];
- } else {
- fieldTypes.push(type);
- }
- }
-
- visit(document, {
- FieldDefinition: fieldVisitor,
- InputValueDefinition: fieldVisitor,
- UnionTypeDefinition(node) {
- if (!node.types) return 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 a location already exists in the Set, then we've seen it once.
- // This means we can remove it from the final diff, since both directives
- // have this location in common.
- if (locationsDiff.has(locationName)) {
- locationsDiff.delete(locationName);
- } else {
- locationsDiff.add(locationName);
- }
- });
-
- if (!node.arguments) return;
-
- // Arguments must have the same name and type. As matches are found, they
- // are deleted from the diff. Anything left in the diff after looping
- // represents a discrepancy between the two sets of arguments.
- node.arguments.forEach(argument => {
- const argumentName = argument.name.value;
- const printedType = print(argument.type);
- if (argumentsDiff[argumentName]) {
- if (printedType === argumentsDiff[argumentName][0]) {
- // If the existing entry is equal to printedType, it means there's no
- // diff, so we can remove the entry from the diff object
- 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,
- };
-}
-
-/**
- * A common implementation of diffTypeNodes to ensure two type nodes are equivalent
- *
- * @param firstNode TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode
- * @param secondNode TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode
- */
-export function typeNodesAreEquivalent(
- firstNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode,
- secondNode: TypeDefinitionNode | TypeExtensionNode | DirectiveDefinitionNode,
-) {
- 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
- );
-}
-
-/**
- * A map of `Kind`s from their definition to their respective extensions
- */
-export const defKindToExtKind: { [kind: string]: string } = {
- [Kind.SCALAR_TYPE_DEFINITION]: Kind.SCALAR_TYPE_EXTENSION,
- [Kind.OBJECT_TYPE_DEFINITION]: Kind.OBJECT_TYPE_EXTENSION,
- [Kind.INTERFACE_TYPE_DEFINITION]: Kind.INTERFACE_TYPE_EXTENSION,
- [Kind.UNION_TYPE_DEFINITION]: Kind.UNION_TYPE_EXTENSION,
- [Kind.ENUM_TYPE_DEFINITION]: Kind.ENUM_TYPE_EXTENSION,
- [Kind.INPUT_OBJECT_TYPE_DEFINITION]: Kind.INPUT_OBJECT_TYPE_EXTENSION,
-};
-
-// Transform an object's values via a callback function
-export function mapValues(
- object: Record,
- callback: (value: T) => U,
-): Record {
- const result: Record = Object.create(null);
-
- for (const [key, value] of Object.entries(object)) {
- result[key] = callback(value);
- }
-
- return result;
-}
-
-export function isNotNullOrUndefined(
- value: T | null | undefined,
-): value is T {
- return value !== null && typeof value !== 'undefined';
-}
-
-export const executableDirectiveLocations = [
- 'QUERY',
- 'MUTATION',
- 'SUBSCRIPTION',
- 'FIELD',
- 'FRAGMENT_DEFINITION',
- 'FRAGMENT_SPREAD',
- 'INLINE_FRAGMENT',
- 'VARIABLE_DEFINITION',
-];
-
-export function isFederationDirective(directive: GraphQLDirective): boolean {
- return federationDirectives.some(({ name }) => name === directive.name);
-}
-
-export const reservedRootFields = ['_service', '_entities'];
-
-// Map of OperationTypeNode to its respective default root operation type name
-export const defaultRootOperationNameLookup: {
- [node in OperationTypeNode]: DefaultRootOperationTypeName;
-} = {
- query: 'Query',
- mutation: 'Mutation',
- subscription: 'Subscription',
-};
-
-// This function is overloaded for 3 different input types. Each input type
-// maps to a particular return type, hence the overload.
-export function getFederationMetadata(obj: GraphQLNamedType): FederationType | undefined;
-export function getFederationMetadata(obj: GraphQLField): FederationField | undefined;
-export function getFederationMetadata(obj: GraphQLDirective): FederationDirective | undefined;
-export function getFederationMetadata(obj: any) {
- if (typeof obj === "undefined") return undefined;
- else if (isNamedType(obj)) return obj.extensions?.federation as FederationType | undefined;
- else if (isDirective(obj)) return obj.extensions?.federation as FederationDirective | undefined;
- else return obj.extensions?.federation as FederationField | undefined;
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/__tests__/tsconfig.json b/gateway/node_modules/@apollo/federation/src/composition/validate/__tests__/tsconfig.json
deleted file mode 100644
index 7d619d5..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/__tests__/tsconfig.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "extends": "../../../../../tsconfig.test.base",
- "include": ["**/*"],
- "references": [{ "path": "../../../../" }]
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/index.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/index.ts
deleted file mode 100644
index fc9385c..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/index.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { GraphQLSchema, GraphQLError, validateSchema } from 'graphql';
-import { ServiceDefinition } from '../types';
-
-// import validators
-import * as preNormalizationRules from './preNormalization';
-import * as preCompositionRules from './preComposition';
-import * as postCompositionRules from './postComposition';
-
-const preNormalizationValidators = Object.values(preNormalizationRules);
-
-export function validateServicesBeforeNormalization(
- services: ServiceDefinition[],
-) {
- const errors: GraphQLError[] = [];
-
- for (const serviceDefinition of services) {
- for (const validator of preNormalizationValidators) {
- errors.push(...validator(serviceDefinition));
- }
- }
-
- return errors;
-}
-
-const preCompositionValidators = Object.values(preCompositionRules);
-
-export const validateServicesBeforeComposition = (
- services: ServiceDefinition[],
-) => {
- const warningsOrErrors: GraphQLError[] = [];
-
- for (const serviceDefinition of services) {
- for (const validator of preCompositionValidators) {
- warningsOrErrors.push(...validator(serviceDefinition));
- }
- }
-
- return warningsOrErrors;
-};
-
-const postCompositionValidators = Object.values(postCompositionRules);
-
-export const validateComposedSchema = ({
- schema,
- serviceList,
-}: {
- schema: GraphQLSchema;
- serviceList: ServiceDefinition[];
-}): GraphQLError[] => {
- const warningsOrErrors: GraphQLError[] = [];
-
- // https://github.com/graphql/graphql-js/blob/4b55f10f16cc77302613e8ad67440259c68633df/src/type/validate.js#L56
- warningsOrErrors.push(...validateSchema(schema));
- for (const validator of postCompositionValidators) {
- warningsOrErrors.push(...validator({ schema, serviceList }));
- }
-
- return warningsOrErrors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/executableDirectivesIdentical.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/executableDirectivesIdentical.test.ts
deleted file mode 100644
index 695e24e..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/executableDirectivesIdentical.test.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { executableDirectivesIdentical } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('executableDirectivesIdentical', () => {
- it('throws no errors when custom, executable directives are defined identically every service', () => {
- const serviceA = {
- typeDefs: gql`
- directive @stream on FIELD
- directive @instrument(tag: String!) on FIELD
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- directive @stream on FIELD
- directive @instrument(tag: String!) on FIELD
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const errors = executableDirectivesIdentical({ schema, serviceList });
- expect(errors).toHaveLength(0);
- });
-
- it('throws no errors when directives (excluding their TypeSystemDirectiveLocations) are identical for every service', () => {
- const serviceA = {
- typeDefs: gql`
- directive @stream on FIELD
- directive @instrument(tag: String!) on FIELD | FIELD_DEFINITION
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- directive @stream on FIELD
- directive @instrument(tag: String!) on FIELD
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const errors = executableDirectivesIdentical({ schema, serviceList });
- expect(errors).toHaveLength(0);
- });
-
- it("throws errors when custom, executable directives aren't defined with the same locations in every service", () => {
- const serviceA = {
- typeDefs: gql`
- directive @stream on FIELD
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- directive @stream on FIELD | QUERY
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- directive @stream on INLINE_FRAGMENT
- `,
- name: 'serviceC',
- };
-
- const serviceList = [serviceA, serviceB, serviceC];
- const { schema } = composeServices(serviceList);
- const errors = executableDirectivesIdentical({ schema, serviceList });
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXECUTABLE_DIRECTIVES_IDENTICAL",
- "message": "[@stream] -> custom directives must be defined identically across all services. See below for a list of current implementations:
- serviceA: directive @stream on FIELD
- serviceB: directive @stream on FIELD | QUERY
- serviceC: directive @stream on INLINE_FRAGMENT",
- },
- ]
- `);
- });
-
- it("throws errors when custom, executable directives aren't defined with the same arguments in every service", () => {
- const serviceA = {
- typeDefs: gql`
- directive @instrument(tag: String!) on FIELD
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- directive @instrument(tag: Boolean) on FIELD
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const errors = executableDirectivesIdentical({ schema, serviceList });
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXECUTABLE_DIRECTIVES_IDENTICAL",
- "message": "[@instrument] -> custom directives must be defined identically across all services. See below for a list of current implementations:
- serviceA: directive @instrument(tag: String!) on FIELD
- serviceB: directive @instrument(tag: Boolean) on FIELD",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/executableDirectivesInAllServices.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/executableDirectivesInAllServices.test.ts
deleted file mode 100644
index 3e090dc..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/executableDirectivesInAllServices.test.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { executableDirectivesInAllServices } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('executableDirectivesInAllServices', () => {
- it('throws no errors when custom, executable directives are defined in every service', () => {
- const serviceA = {
- typeDefs: gql`
- directive @stream on FIELD
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- directive @stream on FIELD
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const errors = executableDirectivesInAllServices({ schema, serviceList });
- expect(errors).toHaveLength(0);
- });
-
- it("throws no errors when type system directives aren't defined in every service", () => {
- const serviceA = {
- typeDefs: gql`
- directive @stream on FIELD
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- directive @stream on FIELD
- # This directive is ignored by composition and therefore post-composition validators
- directive @ignored on FIELD_DEFINITION
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const errors = executableDirectivesInAllServices({ schema, serviceList });
- expect(errors).toHaveLength(0);
- });
-
- it("throws errors when custom, executable directives aren't defined in every service", () => {
- const serviceA = {
- typeDefs: gql`
- directive @stream on FIELD
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Query {
- thing: String
- }
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- extend type Query {
- otherThing: String
- }
- `,
- name: 'serviceC',
- };
-
- const serviceList = [serviceA, serviceB, serviceC];
- const { schema } = composeServices(serviceList);
- const errors = executableDirectivesInAllServices({ schema, serviceList });
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXECUTABLE_DIRECTIVES_IN_ALL_SERVICES",
- "message": "[@stream] -> Custom directives must be implemented in every service. The following services do not implement the @stream directive: serviceB, serviceC.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalMissingOnBase.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalMissingOnBase.test.ts
deleted file mode 100644
index 5f9f086..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalMissingOnBase.test.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { externalMissingOnBase as validateExternalMissingOnBase } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('externalMissingOnBase', () => {
- it('warns when an @external field does not have a matching field on the base type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- id: String! @external
- price: Int! @requires(fields: "sku id")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- id: String!
- test: Int @external
- }
- `,
- name: 'serviceC',
- };
-
- const serviceList = [serviceA, serviceB, serviceC];
- const { schema } = composeServices([serviceA, serviceB, serviceC]);
- const warnings = validateExternalMissingOnBase({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTERNAL_MISSING_ON_BASE",
- "message": "[serviceB] Product.id -> marked @external but id was defined in serviceC, not in the service that owns Product (serviceA)",
- },
- Object {
- "code": "EXTERNAL_MISSING_ON_BASE",
- "message": "[serviceC] Product.test -> marked @external but test is not defined on the base service of Product (serviceA)",
- },
- ]
- `);
- });
-
- it("warns when an @external field isn't defined anywhere else", () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- specialId: String! @external
- id: String! @requires(fields: "specialId")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalMissingOnBase({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTERNAL_MISSING_ON_BASE",
- "message": "[serviceB] Product.specialId -> marked @external but specialId is not defined on the base service of Product (serviceA)",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalTypeMismatch.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalTypeMismatch.test.ts
deleted file mode 100644
index 4669beb..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalTypeMismatch.test.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import gql from 'graphql-tag';
-import { externalTypeMismatch as validateExternalTypeMismatch } from '../';
-import { composeServices } from '../../../compose';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('validateExternalDirectivesOnSchema', () => {
- it('warns when the type of an @external field doesnt match the base', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku skew") {
- sku: String!
- skew: String
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String @external
- skew: String! @external
- price: Int! @requires(fields: "sku skew")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalTypeMismatch({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTERNAL_TYPE_MISMATCH",
- "message": "[serviceB] Product.sku -> Type \`String\` does not match the type of the original field in serviceA (\`String!\`)",
- },
- Object {
- "code": "EXTERNAL_TYPE_MISMATCH",
- "message": "[serviceB] Product.skew -> Type \`String!\` does not match the type of the original field in serviceA (\`String\`)",
- },
- ]
- `);
- });
-
- it("warns when an @external field's type does not exist in the composed schema", () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: NonExistentType! @external
- id: String! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalTypeMismatch({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTERNAL_TYPE_MISMATCH",
- "message": "[serviceB] Product.sku -> the type of the @external field does not exist in the resulting composed schema",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalUnused.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalUnused.test.ts
deleted file mode 100644
index e3156c0..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/externalUnused.test.ts
+++ /dev/null
@@ -1,380 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { externalUnused as validateExternalUnused } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('externalUnused', () => {
- it('warns when there is an unused @external field', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "id") {
- sku: String!
- upc: String!
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- id: ID! @external
- price: Int! @requires(fields: "id")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTERNAL_UNUSED",
- "message": "[serviceB] Product.sku -> is marked as @external but is not used by a @requires, @key, or @provides directive.",
- },
- ]
- `);
- });
-
- it('does not warn when @external is selected by a @key', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- price: Float!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it('does not warn when @external is selected by a @requires', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it('does not warn when @external is selected by a @provides', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- id: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- price: Int! @provides(fields: "id")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it('does not warn when @external is selected by a @provides used from another type', () => {
- const serviceA = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- username: String
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Review {
- author: User @provides(fields: "username")
- }
-
- extend type User @key(fields: "id") {
- username: String @external
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it.todo(
- 'does not error when @provides selects an external field in a subselection',
- );
-
- it.todo('errors when there is an invalid selection in @requires');
-
- it('does not warn when @external is selected by a @requires used from another type', () => {
- const serviceA = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- username: String
- }
-
- type AccountRoles {
- canRead: Boolean
- canWrite: Boolean
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Review {
- author: User
- }
-
- extend type User @key(fields: "id") {
- roles: AccountRoles!
- isAdmin: Boolean! @requires(fields: "roles { canWrite }")
- }
-
- # Externals -- only referenced by the @requires on User.isAdmin
- extend type AccountRoles {
- canWrite: Boolean @external
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it('does not warn when @external is selected by a @requires in a deep subselection', () => {
- const serviceA = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- username: String
- }
-
- type AccountRoles {
- canRead: Group
- canWrite: Group
- }
-
- type Group {
- id: ID!
- name: String
- members: [User]
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Review {
- author: User
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- roles: AccountRoles!
- username: String @external
- isAdmin: Boolean!
- @requires(
- fields: """
- roles {
- canWrite {
- members {
- username
- }
- }
- canRead {
- members {
- username
- }
- }
- }
- """
- )
- }
-
- # Externals -- only referenced by the @requires on User.isAdmin
- extend type AccountRoles {
- canWrite: Group @external
- canRead: Group @external
- }
-
- extend type Group {
- members: [User] @external
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it('does not warn when @external is used on type with multiple @key directives', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "upc") @key(fields: "sku") {
- upc: String
- sku: String
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "upc") {
- upc: String @external
- }
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String @external
- }
- `,
- name: 'serviceC',
- };
-
- const serviceList = [serviceA, serviceB, serviceC];
- const { schema } = composeServices(serviceList);
- const warnings = validateExternalUnused({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it('does not error when @external is used on a field of a concrete type that implements a shared field of an implemented interface', () => {
- const serviceA = {
- typeDefs: gql`
- type Car implements Vehicle @key(fields: "id") {
- id: ID!
- speed: Int
- }
- interface Vehicle {
- id: ID!
- speed: Int
- }
- `,
- name: 'serviceA',
- };
- const serviceB = {
- typeDefs: gql`
- extend type Car implements Vehicle @key(fields: "id") {
- id: ID! @external
- speed: Int @external
- }
- interface Vehicle {
- id: ID!
- speed: Int
- }
- `,
- name: 'serviceB',
- };
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const errors = validateExternalUnused({ schema, serviceList });
- expect(errors).toHaveLength(0);
- });
-
- it('does error when @external is used on a field of a concrete type is not shared by its implemented interface', () => {
- const serviceA = {
- typeDefs: gql`
- type Car implements Vehicle @key(fields: "id") {
- id: ID!
- speed: Int
- wheelSize: Int
- }
- interface Vehicle {
- id: ID!
- speed: Int
- }
- `,
- name: 'serviceA',
- };
- const serviceB = {
- typeDefs: gql`
- extend type Car implements Vehicle @key(fields: "id") {
- id: ID! @external
- speed: Int @external
- wheelSize: Int @external
- }
- interface Vehicle {
- id: ID!
- speed: Int
- }
- `,
- name: 'serviceB',
- };
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const errors = validateExternalUnused({ schema, serviceList });
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTERNAL_UNUSED",
- "message": "[serviceB] Car.wheelSize -> is marked as @external but is not used by a @requires, @key, or @provides directive.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keyFieldsMissingOnBase.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keyFieldsMissingOnBase.test.ts
deleted file mode 100644
index 5b32294..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keyFieldsMissingOnBase.test.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { keyFieldsMissingOnBase as validateKeyFieldsMissingOnBase } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('keyFieldsMissingOnBase', () => {
- it('returns no warnings with proper @key usage', () => {
- const serviceA = {
- // FIXME: add second key "upc" when duplicate directives are supported
- // i.e. @key(fields: "sku") @key(fields: "upc")
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateKeyFieldsMissingOnBase({ schema, serviceList });
- expect(warnings).toHaveLength(0);
- });
-
- it('warns if @key references a field added by another service', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku uid") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- uid: String!
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateKeyFieldsMissingOnBase({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "KEY_FIELDS_MISSING_ON_BASE",
- "message": "[serviceA] Product -> A @key selects uid, but Product.uid was either created or overwritten by serviceB, not serviceA",
- },
- ]
- `);
- });
-
- // FIXME: shouldn't composition _allow_ this with a warning?
- // right now, it errors during composition
- xit('warns if @key references a field that was overwritten', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: ID! # overwritten from base service
- weight: Float!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateKeyFieldsMissingOnBase({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot();
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keyFieldsSelectInvalidType.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keyFieldsSelectInvalidType.test.ts
deleted file mode 100644
index 2d77ff8..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keyFieldsSelectInvalidType.test.ts
+++ /dev/null
@@ -1,132 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { keyFieldsSelectInvalidType as validateKeyFieldsSelectInvalidType } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('keyFieldsSelectInvalidType', () => {
- it('returns no warnings with proper @key usage', () => {
- const serviceA = {
- // FIXME: add second key "upc" when duplicate directives are supported
- // i.e. @key(fields: "sku") @key(fields: "upc")
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateKeyFieldsSelectInvalidType({
- schema,
- serviceList,
- });
- expect(warnings).toHaveLength(0);
- });
-
- it('warns if @key references fields of an interface type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "featuredItem") {
- featuredItem: Node!
- sku: String!
- }
-
- interface Node {
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- price: Int! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateKeyFieldsSelectInvalidType({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "KEY_FIELDS_SELECT_INVALID_TYPE",
- "message": "[serviceA] Product -> A @key selects Product.featuredItem, which is an interface type. Keys cannot select interfaces.",
- },
- ]
- `);
- });
-
- it('warns if @key references fields of a union type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "price") {
- sku: String!
- price: Numeric!
- }
-
- union Numeric = Float | Int
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- sku: String! @external
- name: String!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateKeyFieldsSelectInvalidType({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "KEY_FIELDS_SELECT_INVALID_TYPE",
- "message": "[serviceA] Product -> A @key selects Product.price, which is a union type. Keys cannot select union types.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keysMatchBaseService.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keysMatchBaseService.test.ts
deleted file mode 100644
index 5c2854f..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/keysMatchBaseService.test.ts
+++ /dev/null
@@ -1,117 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { keysMatchBaseService as validateKeysMatchBaseService } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('keysMatchBaseService', () => {
- it('returns no errors with proper @key usage', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- price: Int!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const validationErrors = validateKeysMatchBaseService({
- schema,
- serviceList,
- });
- expect(validationErrors).toHaveLength(0);
- });
-
- it('requires a @key to be specified on the originating type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- price: Int!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const validationErrors = validateKeysMatchBaseService({
- schema,
- serviceList,
- });
- expect(validationErrors).toHaveLength(1);
- expect(validationErrors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "KEY_MISSING_ON_BASE",
- "message": "[serviceA] Product -> appears to be an entity but no @key directives are specified on the originating type.",
- }
- `);
- });
-
- it('requires extending services to use a @key specified by the originating type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku upc") {
- sku: String!
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- price: Int!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const validationErrors = validateKeysMatchBaseService({
- schema,
- serviceList,
- });
- expect(validationErrors).toHaveLength(1);
- expect(validationErrors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "KEY_NOT_SPECIFIED",
- "message": "[serviceB] Product -> extends from serviceA but specifies an invalid @key directive. Valid @key directives are specified by the originating type. Available @key directives for this type are:
- @key(fields: \\"sku upc\\")",
- }
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesFieldsMissingExternals.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesFieldsMissingExternals.test.ts
deleted file mode 100644
index 0eed1d2..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesFieldsMissingExternals.test.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { providesFieldsMissingExternal as validateProdivesFieldsMissingExternal } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('providesFieldsMissingExternal', () => {
- it('does not warn with proper @provides usage', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- username: String
- }
- `,
- name: 'serviceB',
- };
-
- const serviceC = {
- typeDefs: gql`
- type Review @key(fields: "id") {
- id: ID!
- product: Product @provides(fields: "id")
- author: User @provides(fields: "username")
- }
-
- extend type Product @key(fields: "sku") {
- sku: String! @external
- id: ID! @external
- price: Int!
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- username: String @external
- }
- `,
- name: 'serviceC',
- };
-
- const serviceList = [serviceA, serviceB, serviceC];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toEqual([]);
- const warnings = validateProdivesFieldsMissingExternal({
- schema,
- serviceList,
- });
- expect(warnings).toEqual([]);
- });
-
- it('warns when there is a @provides with no matching @external field', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Review @key(fields: "id") {
- id: ID!
- product: Product @provides(fields: "id")
- }
-
- extend type Product @key(fields: "sku") {
- sku: String! @external
- price: Int!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toEqual([]);
- const warnings = validateProdivesFieldsMissingExternal({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_FIELDS_MISSING_EXTERNAL",
- "message": "[serviceB] Review.product -> provides the field \`id\` and requires Product.id to be marked as @external.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesFieldsSelectInvalidType.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesFieldsSelectInvalidType.test.ts
deleted file mode 100644
index 364b491..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesFieldsSelectInvalidType.test.ts
+++ /dev/null
@@ -1,214 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { providesFieldsSelectInvalidType as validateprovidesFieldsSelectInvalidType } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('providesFieldsSelectInvalidType', () => {
- it('returns no warnings with proper @provides usage', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- upc: String! @external
- price: Int! @provides(fields: "upc")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateprovidesFieldsSelectInvalidType({
- schema,
- serviceList,
- });
- expect(warnings).toHaveLength(0);
- });
-
- it('warns if @provides references fields of a list type', () => {
- const serviceA = {
- typeDefs: gql`
- type Review @key(fields: "id") {
- id: ID!
- author: User @provides(fields: "wishLists")
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- wishLists: [WishList] @external
- }
-
- extend type WishList @key(fields: "id") {
- id: ID! @external
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- wishLists: [WishList]
- }
-
- type WishList @key(fields: "id") {
- id: ID!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateprovidesFieldsSelectInvalidType({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_FIELDS_SELECT_INVALID_TYPE",
- "message": "[serviceA] Review.author -> A @provides selects User.wishLists, which is a list type. A field cannot @provide lists.",
- },
- ]
- `);
- });
-
- it('warns if @provides references fields of an interface type', () => {
- const serviceA = {
- typeDefs: gql`
- type Review @key(fields: "id") {
- id: ID!
- author: User @provides(fields: "account")
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- account: Account @external
- }
-
- extend interface Account {
- username: String @external
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- account: Account
- }
-
- interface Account {
- username: String
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateprovidesFieldsSelectInvalidType({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_FIELDS_SELECT_INVALID_TYPE",
- "message": "[serviceA] Review.author -> A @provides selects User.account, which is an interface type. A field cannot @provide interfaces.",
- },
- ]
- `);
- });
-
- it('warns if @provides references fields of a union type', () => {
- const serviceA = {
- typeDefs: gql`
- type Review @key(fields: "id") {
- id: ID!
- author: User @provides(fields: "account")
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- account: Account @external
- }
-
- extend union Account = PasswordAccount | SMSAccount
-
- extend type PasswordAccount @key(fields: "email") {
- email: String! @external
- }
-
- extend type SMSAccount @key(fields: "phone") {
- phone: String! @external
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- account: Account
- }
-
- union Account = PasswordAccount | SMSAccount
-
- type PasswordAccount @key(fields: "email") {
- email: String!
- }
-
- type SMSAccount @key(fields: "phone") {
- phone: String!
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema, errors } = composeServices(serviceList);
- expect(errors).toHaveLength(0);
-
- const warnings = validateprovidesFieldsSelectInvalidType({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_FIELDS_SELECT_INVALID_TYPE",
- "message": "[serviceA] Review.author -> A @provides selects User.account, which is a union type. A field cannot @provide union types.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesNotOnEntity.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesNotOnEntity.test.ts
deleted file mode 100644
index 1a87fc9..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/providesNotOnEntity.test.ts
+++ /dev/null
@@ -1,259 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { providesNotOnEntity as validateProvidesNotOnEntity } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('providesNotOnEntity', () => {
- it('does not warn when @provides used on an entity', () => {
- const serviceA = {
- typeDefs: gql`
- type LineItem @key(fields: "sku") {
- sku: String!
- quantity: Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product {
- lineItem: LineItem @provides(fields: "quantity")
- lineItemNonNull: LineItem! @provides(fields: "quantity")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateProvidesNotOnEntity({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`Array []`);
- });
-
- it('does not warn when @provides used on a list of entity', () => {
- const serviceA = {
- typeDefs: gql`
- type LineItem @key(fields: "sku") {
- sku: String!
- quantity: Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Product {
- lineItems: [LineItem] @provides(fields: "quantity")
- lineItemsNonNull: [LineItem]! @provides(fields: "quantity")
- nonNullLineItems: [LineItem!] @provides(fields: "quantity")
- nonNullLineItemsNonNull: [LineItem!]! @provides(fields: "quantity")
- deep: [[LineItem!]!]! @provides(fields: "quantity")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateProvidesNotOnEntity({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`Array []`);
- });
-
- it('does not warn when @provides used on an entity of a child type', () => {
- const serviceA = {
- typeDefs: gql`
- type User @key(fields: "id") {
- id: ID!
- username: String
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- type Review {
- author: User @provides(fields: "username")
- }
-
- type User {
- username: String @external
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateProvidesNotOnEntity({ schema, serviceList });
- expect(warnings).toEqual([]);
- });
-
- it('warns when there is a @provides on a type that is not an entity', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- id: ID!
- }
-
- type LineItem {
- sku: String!
- quantity: Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- lineItem: LineItem @provides(fields: "quantity")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateProvidesNotOnEntity({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_NOT_ON_ENTITY",
- "message": "[serviceB] Product.lineItem -> uses the @provides directive but \`Product.lineItem\` does not return a type that has a @key. Try adding a @key to the \`LineItem\` type.",
- },
- ]
- `);
- });
-
- it('warns when there is a @provides on a type that is not a list of entity', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- id: ID!
- }
-
- type LineItem {
- sku: String!
- quantity: Int!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- lineItems: [LineItem] @provides(fields: "quantity")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateProvidesNotOnEntity({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_NOT_ON_ENTITY",
- "message": "[serviceB] Product.lineItems -> uses the @provides directive but \`Product.lineItems\` does not return a type that has a @key. Try adding a @key to the \`LineItem\` type.",
- },
- ]
- `);
- });
-
- it('warns when there is a @provides on a non-object type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- id: ID!
- }
-
- enum Category {
- BOOK
- MOVIE
- SONG
- ALBUM
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- category: Category @provides(fields: "id")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateProvidesNotOnEntity({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_NOT_ON_ENTITY",
- "message": "[serviceB] Product.category -> uses the @provides directive but \`Product.category\` returns \`Category\`, which is not an Object or List type. @provides can only be used on Object types with at least one @key, or Lists of such Objects.",
- },
- ]
- `);
- });
-
- it('warns when there is a @provides on a list of non-object type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- id: ID!
- }
-
- enum Category {
- BOOK
- MOVIE
- SONG
- ALBUM
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- categories: [Category] @provides(fields: "id")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateProvidesNotOnEntity({ schema, serviceList });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "PROVIDES_NOT_ON_ENTITY",
- "message": "[serviceB] Product.categories -> uses the @provides directive but \`Product.categories\` returns \`[Category]\`, which is not an Object or List type. @provides can only be used on Object types with at least one @key, or Lists of such Objects.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/requiresFieldsMissingExternals.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/requiresFieldsMissingExternals.test.ts
deleted file mode 100644
index c1e824f..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/requiresFieldsMissingExternals.test.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { requiresFieldsMissingExternal as validateRequiresFieldsMissingExternal } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('requiresFieldsMissingExternal', () => {
- it('does not warn with proper @requires usage', () => {
- const serviceA = {
- typeDefs: gql`
- type Product {
- sku: String!
- upc: String!
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- id: ID! @external
- price: Int! @requires(fields: "id")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateRequiresFieldsMissingExternal({
- schema,
- serviceList,
- });
- expect(warnings).toEqual([]);
- });
-
- it('warns when there is a @requires with no matching @external field', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const serviceB = {
- typeDefs: gql`
- extend type Product {
- price: Int! @requires(fields: "id")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateRequiresFieldsMissingExternal({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "REQUIRES_FIELDS_MISSING_EXTERNAL",
- "message": "[serviceB] Product.price -> requires the field \`id\` to be marked as @external.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/requiresFieldsMissingOnBase.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/requiresFieldsMissingOnBase.test.ts
deleted file mode 100644
index 945a505..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/requiresFieldsMissingOnBase.test.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import gql from 'graphql-tag';
-import { composeServices } from '../../../compose';
-import { requiresFieldsMissingOnBase as validateRequiresFieldsMissingOnBase } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('requiresFieldsMissingOnBase', () => {
- it('does not warn with proper @requires usage', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- }
- `,
- name: 'serviceA',
- };
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- id: ID!
- weight: Float! @requires(fields: "sku")
- }
- `,
- name: 'serviceB',
- };
-
- const serviceList = [serviceA, serviceB];
- const { schema } = composeServices(serviceList);
- const warnings = validateRequiresFieldsMissingOnBase({
- schema,
- serviceList,
- });
- expect(warnings).toEqual([]);
- });
-
- it('warns when requires selects a field not found on the base type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- }
- `,
- name: 'serviceA',
- };
- const serviceB = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- id: ID!
- }
- `,
- name: 'serviceB',
- };
- const serviceC = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- id: ID! @external
- weight: Float! @requires(fields: "id")
- }
- `,
- name: 'serviceC',
- };
- const serviceList = [serviceA, serviceB, serviceC];
- const { schema } = composeServices(serviceList);
- const warnings = validateRequiresFieldsMissingOnBase({
- schema,
- serviceList,
- });
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "REQUIRES_FIELDS_MISSING_ON_BASE",
- "message": "[serviceC] Product.weight -> requires the field \`id\` to be @external. @external fields must exist on the base type, not an extension.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/tsconfig.json b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/tsconfig.json
deleted file mode 100644
index 9bcedd5..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/__tests__/tsconfig.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "extends": "../../../../../../tsconfig.test.base",
- "include": ["**/*"],
- "references": [{ "path": "../../../../../" }]
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/executableDirectivesIdentical.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/executableDirectivesIdentical.ts
deleted file mode 100644
index a0fa2cb..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/executableDirectivesIdentical.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import 'apollo-server-env';
-import { GraphQLError, isSpecifiedDirective, print } from 'graphql';
-import {
- errorWithCode,
- isFederationDirective,
- logDirective,
- typeNodesAreEquivalent,
- getFederationMetadata,
-} from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * A custom directive must be defined identically across all services. This means
- * they must have the same name and same locations. Locations are the "on" part of
- * a directive, for example:
- * directive @stream on FIELD | QUERY
- */
-export const executableDirectivesIdentical: PostCompositionValidator = ({
- schema,
-}) => {
- const errors: GraphQLError[] = [];
-
- const customDirectives = schema
- .getDirectives()
- .filter(x => !isFederationDirective(x) && !isSpecifiedDirective(x));
-
- customDirectives.forEach(directive => {
- const directiveFederationMetadata = getFederationMetadata(directive);
-
- if (!directiveFederationMetadata) return;
-
- const definitions = Object.entries(
- directiveFederationMetadata.directiveDefinitions,
- );
-
- // Side-by-side compare all definitions of a single directive, if there's a
- // discrepancy in any of those diffs, we should provide an error.
- const shouldError = definitions.some(([, definition], index) => {
- // Skip the non-comparison step
- if (index === 0) return;
- const [, previousDefinition] = definitions[index - 1];
- return !typeNodesAreEquivalent(definition, previousDefinition);
- });
-
- if (shouldError) {
- errors.push(
- errorWithCode(
- 'EXECUTABLE_DIRECTIVES_IDENTICAL',
- 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}: ${print(definition)}`;
- })
- .join('\n')}`,
- ),
- );
- }
- });
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/executableDirectivesInAllServices.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/executableDirectivesInAllServices.ts
deleted file mode 100644
index 131d0bd..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/executableDirectivesInAllServices.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import 'apollo-server-env';
-import { GraphQLError, isSpecifiedDirective } from 'graphql';
-import {
- errorWithCode,
- isFederationDirective,
- logDirective,
- getFederationMetadata,
-} from '../../utils';
-import { PostCompositionValidator } from '.';
-/**
- * All custom directives with executable locations must be implemented in every
- * service. This validator is not responsible for ensuring the directives are an
- * ExecutableDirective, however composition ensures this by filtering out all
- * TypeSystemDirectiveLocations.
- */
-export const executableDirectivesInAllServices: PostCompositionValidator = ({
- schema,
- serviceList,
-}) => {
- const errors: GraphQLError[] = [];
-
- const customExecutableDirectives = schema
- .getDirectives()
- .filter(x => !isFederationDirective(x) && !isSpecifiedDirective(x));
-
- customExecutableDirectives.forEach(directive => {
- const directiveFederationMetadata = 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;
- },
- [] as string[],
- );
-
- if (serviceNamesWithoutDirective.length > 0) {
- errors.push(
- errorWithCode(
- 'EXECUTABLE_DIRECTIVES_IN_ALL_SERVICES',
- 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;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalMissingOnBase.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalMissingOnBase.ts
deleted file mode 100644
index 1dcaa7b..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalMissingOnBase.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import 'apollo-server-env';
-import { isObjectType, GraphQLError } from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * All fields marked with @external must exist on the base type
- */
-export const externalMissingOnBase: PostCompositionValidator = ({ schema }) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(namedType)) continue;
-
- const typeFederationMetadata = getFederationMetadata(namedType);
-
- // If externals is populated, we need to look at each one and confirm
- // that field exists on base service
- if (typeFederationMetadata?.externals) {
- // loop over every service that has extensions with @external
- for (const [serviceName, externalFieldsForService] of Object.entries(
- typeFederationMetadata.externals,
- )) {
- // for a single service, loop over the external fields.
- for (const { field: externalField } of externalFieldsForService) {
- const externalFieldName = externalField.name.value;
- const allFields = namedType.getFields();
- const matchingBaseField = allFields[externalFieldName];
-
- // @external field referenced a field that isn't defined anywhere
- if (!matchingBaseField) {
- errors.push(
- errorWithCode(
- 'EXTERNAL_MISSING_ON_BASE',
- logServiceAndType(serviceName, typeName, externalFieldName) +
- `marked @external but ${externalFieldName} is not defined on the base service of ${typeName} (${typeFederationMetadata.serviceName})`,
- ),
- );
- continue;
- }
-
- // if the field has a serviceName, then it wasn't defined by the
- // service that owns the type
- const fieldFederationMetadata = getFederationMetadata(matchingBaseField);
-
- if (fieldFederationMetadata?.serviceName) {
- errors.push(
- errorWithCode(
- 'EXTERNAL_MISSING_ON_BASE',
- logServiceAndType(serviceName, typeName, externalFieldName) +
- `marked @external but ${externalFieldName} was defined in ${fieldFederationMetadata.serviceName}, not in the service that owns ${typeName} (${typeFederationMetadata.serviceName})`,
- ),
- );
- }
- }
- }
- }
- }
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalTypeMismatch.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalTypeMismatch.ts
deleted file mode 100644
index 2347607..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalTypeMismatch.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { isObjectType, typeFromAST, isEqualType, GraphQLError, GraphQLType } from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * All fields marked with @external must match the type definition of the base service.
- * Additional warning if the type of the @external field doesn't exist at all on the schema
- */
-export const externalTypeMismatch: PostCompositionValidator = ({ schema }) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(namedType)) continue;
-
- // If externals is populated, we need to look at each one and confirm
- // there is a matching @requires
- const typeFederationMetadata = getFederationMetadata(namedType);
- if (typeFederationMetadata?.externals) {
- // loop over every service that has extensions with @external
- for (const [serviceName, externalFieldsForService] of Object.entries(
- typeFederationMetadata.externals,
- )) {
- // for a single service, loop over the external fields.
- for (const { field: externalField } of externalFieldsForService) {
- const externalFieldName = externalField.name.value;
- const allFields = namedType.getFields();
- const matchingBaseField = allFields[externalFieldName];
-
- // FIXME: TypeScript doesn’t currently support passing in a type union
- // to an overloaded function like `typeFromAST`
- // See https://github.com/Microsoft/TypeScript/issues/14107
- const externalFieldType = typeFromAST(
- schema,
- externalField.type as any,
- ) as GraphQLType;
-
- if (!externalFieldType) {
- errors.push(
- errorWithCode(
- 'EXTERNAL_TYPE_MISMATCH',
- logServiceAndType(serviceName, typeName, externalFieldName) +
- `the type of the @external field does not exist in the resulting composed schema`,
- ),
- );
- } else if (
- matchingBaseField &&
- !isEqualType(matchingBaseField.type, externalFieldType)
- ) {
- errors.push(
- errorWithCode(
- 'EXTERNAL_TYPE_MISMATCH',
- logServiceAndType(serviceName, typeName, externalFieldName) +
- `Type \`${externalFieldType}\` does not match the type of the original field in ${typeFederationMetadata.serviceName} (\`${matchingBaseField.type}\`)`,
- ),
- );
- }
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalUnused.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalUnused.ts
deleted file mode 100644
index 2c671ef..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/externalUnused.ts
+++ /dev/null
@@ -1,237 +0,0 @@
-import { isObjectType, GraphQLError, Kind } from 'graphql';
-import {
- findDirectivesOnTypeOrField,
- logServiceAndType,
- hasMatchingFieldInDirectives,
- errorWithCode,
- findFieldsThatReturnType,
- parseSelections,
- isStringValueNode,
- selectionIncludesField,
- getFederationMetadata,
-} from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * for every @external field, there should be a @requires, @key, or @provides
- * directive that uses it
- */
-export const externalUnused: PostCompositionValidator = ({ schema }) => {
- const errors: GraphQLError[] = [];
- const types = schema.getTypeMap();
- for (const [parentTypeName, parentType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(parentType)) continue;
- // If externals is populated, we need to look at each one and confirm
- // it is used
- const typeFederationMetadata = getFederationMetadata(parentType);
-
- // Escape a validation case that's falling through incorrectly. This case
- // is handled by `keysMatchBaseService`.
- if (typeFederationMetadata) {
- const {serviceName, keys} = typeFederationMetadata;
- if (serviceName && keys && !keys[serviceName]) continue;
- }
-
- if (typeFederationMetadata?.externals) {
- // loop over every service that has extensions with @external
- for (const [serviceName, externalFieldsForService] of Object.entries(
- typeFederationMetadata.externals,
- )) {
- // for a single service, loop over the external fields.
- for (const { field: externalField } of externalFieldsForService) {
- const externalFieldName = externalField.name.value;
-
- // check the selected fields of every @key provided by `serviceName`
- const hasMatchingKeyOnType = Boolean(
- hasMatchingFieldInDirectives({
- directives: findDirectivesOnTypeOrField(
- parentType.astNode,
- 'key',
- ),
- fieldNameToMatch: externalFieldName,
- namedType: parentType,
- }),
- );
- if (hasMatchingKeyOnType) continue;
-
- /*
- @provides is most commonly used from another type than where
- the @external directive is applied. We need to find all
- fields on any type in the schema that return this type
- and see if they have a provides directive that uses this
- external field
-
- extend type Review {
- author: User @provides(fields: "username")
- }
-
- extend type User @key(fields: "id") {
- id: ID! @external
- username: String @external
- reviews: [Review]
- }
- */
- const hasMatchingProvidesOnAnotherType = findFieldsThatReturnType({
- schema,
- typeToFind: parentType,
- }).some(field =>
- findDirectivesOnTypeOrField(field.astNode, 'provides').some(
- directive => {
- if (!directive.arguments) return false;
- const selections =
- isStringValueNode(directive.arguments[0].value) &&
- parseSelections(directive.arguments[0].value.value);
- // find the selections which are fields with names matching
- // our external field name
- return (
- selections &&
- selections.some(
- selection =>
- selection.kind === Kind.FIELD &&
- selection.name.value === externalFieldName,
- )
- );
- },
- ),
- );
-
- if (hasMatchingProvidesOnAnotherType) continue;
-
- /**
- * @external fields can be selected by subfields of a selection on another type
- *
- * For example, with these defs, `canWrite` is marked as external and is
- * referenced by a selection set inside the @requires of User.isAdmin
- *
- * extend type User @key(fields: "id") {
- * roles: AccountRoles!
- * isAdmin: Boolean! @requires(fields: "roles { canWrite permission { status } }")
- * }
- * extend type AccountRoles {
- * canWrite: Boolean @external
- * permission: Permission @external
- * }
- *
- * extend type Permission {
- * status: String @external
- * }
- *
- * So, we need to search for fields with requires, then parse the selection sets,
- * and try to recursively find the external field's PARENT type, then the external field's name
- */
- const hasMatchingRequiresOnAnotherType = Object.values(
- schema.getTypeMap(),
- ).some(namedType => {
- if (!isObjectType(namedType)) return false;
- // for every object type, loop over its fields and find fields
- // with requires directives
- return Object.values(namedType.getFields()).some(field =>
- findDirectivesOnTypeOrField(field.astNode, 'requires').some(
- directive => {
- if (!directive.arguments) return false;
- const selections =
- isStringValueNode(directive.arguments[0].value) &&
- parseSelections(directive.arguments[0].value.value);
-
- if (!selections) return false;
- return selectionIncludesField({
- selections,
- selectionSetType: namedType,
- typeToFind: parentType,
- fieldToFind: externalFieldName,
- });
- },
- ),
- );
- });
-
- if (hasMatchingRequiresOnAnotherType) continue;
-
- const hasMatchingRequiresOnType = Object.values(
- parentType.getFields(),
- ).some(maybeRequiresField => {
- const fieldOwner = getFederationMetadata(maybeRequiresField)?.serviceName;
- if (fieldOwner !== serviceName) return false;
-
- const requiresDirectives = findDirectivesOnTypeOrField(
- maybeRequiresField.astNode,
- 'requires',
- );
-
- return hasMatchingFieldInDirectives({
- directives: requiresDirectives,
- fieldNameToMatch: externalFieldName,
- namedType: parentType,
- });
- });
-
- if (hasMatchingRequiresOnType) continue;
-
- /**
- * @external fields can be required when an interface is returned by
- * a field and its concrete implementations need to be defined in a
- * service which use non-key fields from other services. Take for example:
- *
- * // Service A
- * type Car implements Vehicle @key(fields: "id") {
- * id: ID!
- * speed: Int
- * }
- *
- * interface Vehicle {
- * id: ID!
- * speed: Int
- * }
- *
- * // Service B
- * type Query {
- * vehicles: [Vehicle]
- * }
- *
- * extend type Car implements Vehicle @key(fields: "id") {
- * id: ID! @external
- * speed: Int @external
- * }
- *
- * interface Vehicle {
- * id: ID!
- * speed: Int
- * }
- *
- * Service B defines Car.speed as an external field which is okay
- * because it is required for Query.vehicles to exist in the schema
- */
- const fieldsOnInterfacesImplementedByParentType: Set = new Set();
-
- // Loop over the parent's interfaces
- for (const _interface of parentType.getInterfaces()) {
- // Collect the field names from each interface in a set
- for (const fieldName in _interface.getFields()) {
- fieldsOnInterfacesImplementedByParentType.add(fieldName);
- }
- }
-
- // If the set contains our field's name, no error is generated
- if (fieldsOnInterfacesImplementedByParentType.has(externalFieldName)) {
- continue;
- }
-
- errors.push(
- errorWithCode(
- 'EXTERNAL_UNUSED',
- logServiceAndType(
- serviceName,
- parentTypeName,
- externalFieldName,
- ) +
- `is marked as @external but is not used by a @requires, @key, or @provides directive.`,
- ),
- );
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/index.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/index.ts
deleted file mode 100644
index 6e7a351..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/index.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-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 type PostCompositionValidator = ({
- schema,
- serviceList,
-}: {
- schema: GraphQLSchema;
- serviceList: ServiceDefinition[];
-}) => GraphQLError[];
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keyFieldsMissingOnBase.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keyFieldsMissingOnBase.ts
deleted file mode 100644
index a2d7384..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keyFieldsMissingOnBase.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { isObjectType, FieldNode, GraphQLError } from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * - The fields argument can not select fields that were overwritten by another service
- */
-export const keyFieldsMissingOnBase: PostCompositionValidator = ({
- schema,
-}) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!isObjectType(namedType)) continue;
-
- const typeFederationMetadata = getFederationMetadata(namedType);
- if (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 as FieldNode[]) {
- const name = field.name.value;
-
- // find corresponding field for each selected field
- const matchingField = allFieldsInType[name];
-
- // NOTE: We don't need to warn if there is no matching field.
- // keyFieldsSelectInvalidType already does that :)
- if (matchingField) {
- const fieldFederationMetadata = getFederationMetadata(matchingField);
- // warn if not from base type OR IF IT WAS OVERWITTEN
- if (fieldFederationMetadata?.serviceName) {
- errors.push(
- errorWithCode(
- 'KEY_FIELDS_MISSING_ON_BASE',
- logServiceAndType(serviceName, typeName) +
- `A @key selects ${name}, but ${typeName}.${name} was either created or overwritten by ${fieldFederationMetadata.serviceName}, not ${serviceName}`,
- ),
- );
- }
- }
- }
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keyFieldsSelectInvalidType.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keyFieldsSelectInvalidType.ts
deleted file mode 100644
index 63d089c..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keyFieldsSelectInvalidType.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import {
- isObjectType,
- FieldNode,
- isInterfaceType,
- isNonNullType,
- getNullableType,
- isUnionType,
- GraphQLError,
-} from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * - The fields argument can not have root fields that result in a list
- * - The fields argument can not have root fields that result in an interface
- * - The fields argument can not have root fields that result in a union type
- */
-export const keyFieldsSelectInvalidType: PostCompositionValidator = ({
- schema,
-}) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!isObjectType(namedType)) continue;
-
- const typeFederationMetadata = getFederationMetadata(namedType);
- if (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 as FieldNode[]) {
- const name = field.name.value;
-
- // find corresponding field for each selected field
- const matchingField = allFieldsInType[name];
- if (!matchingField) {
- errors.push(
- errorWithCode(
- 'KEY_FIELDS_SELECT_INVALID_TYPE',
- logServiceAndType(serviceName, typeName) +
- `A @key selects ${name}, but ${typeName}.${name} could not be found`,
- ),
- );
- }
-
- if (matchingField) {
- if (
- isInterfaceType(matchingField.type) ||
- (isNonNullType(matchingField.type) &&
- isInterfaceType(getNullableType(matchingField.type)))
- ) {
- errors.push(
- errorWithCode(
- 'KEY_FIELDS_SELECT_INVALID_TYPE',
- logServiceAndType(serviceName, typeName) +
- `A @key selects ${typeName}.${name}, which is an interface type. Keys cannot select interfaces.`,
- ),
- );
- }
-
- if (
- isUnionType(matchingField.type) ||
- (isNonNullType(matchingField.type) &&
- isUnionType(getNullableType(matchingField.type)))
- ) {
- errors.push(
- errorWithCode(
- 'KEY_FIELDS_SELECT_INVALID_TYPE',
- logServiceAndType(serviceName, typeName) +
- `A @key selects ${typeName}.${name}, which is a union type. Keys cannot select union types.`,
- ),
- );
- }
- }
- }
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keysMatchBaseService.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keysMatchBaseService.ts
deleted file mode 100644
index 62e4cc5..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/keysMatchBaseService.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { isObjectType, GraphQLError, SelectionNode } from 'graphql';
-import {
- logServiceAndType,
- errorWithCode,
- getFederationMetadata,
-} from '../../utils';
-import { PostCompositionValidator } from '.';
-import { printWithReducedWhitespace } from '../../../service';
-
-/**
- * 1. KEY_MISSING_ON_BASE - Originating types must specify at least 1 @key directive
- * 2. MULTIPLE_KEYS_ON_EXTENSION - Extending services may not use more than 1 @key directive
- * 3. KEY_NOT_SPECIFIED - Extending services must use a valid @key specified by the originating type
- */
-export const keysMatchBaseService: PostCompositionValidator = function ({
- schema,
-}) {
- const errors: GraphQLError[] = [];
- const types = schema.getTypeMap();
- for (const [parentTypeName, parentType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(parentType)) continue;
-
- const typeFederationMetadata = getFederationMetadata(parentType);
-
- if (typeFederationMetadata) {
- const { serviceName, keys } = typeFederationMetadata;
-
- if (serviceName && keys) {
- if (!keys[serviceName]) {
- errors.push(
- errorWithCode(
- 'KEY_MISSING_ON_BASE',
- 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)
- // No need to validate that the owning service matches its specified keys
- .filter(([service]) => service !== serviceName)
- .forEach(([extendingService, keyFields]) => {
- // Extensions can't specify more than one key
- if (keyFields.length > 1) {
- errors.push(
- errorWithCode(
- 'MULTIPLE_KEYS_ON_EXTENSION',
- logServiceAndType(extendingService, parentTypeName) +
- `is extended from service ${serviceName} but specifies multiple @key directives. Extensions may only specify one @key.`,
- ),
- );
- return;
- }
-
- // This isn't representative of an invalid graph, but it is an existing
- // limitation of the query planner that we want to validate against for now.
- // In the future, `@key`s just need to be "reachable" through a number of
- // services which can link one key to another via "joins".
- const extensionKey = printFieldSet(keyFields[0]);
- if (!availableKeys.includes(extensionKey)) {
- errors.push(
- errorWithCode(
- 'KEY_NOT_SPECIFIED',
- 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: readonly SelectionNode[]): string {
- return selections.map(printWithReducedWhitespace).join(' ');
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesFieldsMissingExternal.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesFieldsMissingExternal.ts
deleted file mode 100644
index 6a4cb2e..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesFieldsMissingExternal.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { isObjectType, FieldNode, GraphQLError } from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * for every field in a @provides, there should be a matching @external
- */
-export const providesFieldsMissingExternal: PostCompositionValidator = ({
- schema,
-}) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(namedType)) continue;
-
- // for each field, if there's a requires on it, check that there's a matching
- // @external field, and that the types referenced are from the base type
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = getFederationMetadata(field);
- const serviceName = fieldFederationMetadata?.serviceName;
-
- // serviceName should always exist on fields that have @provides federation data, since
- // the only case where serviceName wouldn't exist is on a base type, and in that case,
- // the `provides` metadata should never get added to begin with. This should be caught in
- // composition work. This kind of error should be validated _before_ composition.
- if (!serviceName) continue;
-
- const fieldType = field.type;
- if (!isObjectType(fieldType)) continue;
-
- const fieldTypeFederationMetadata = getFederationMetadata(fieldType);
-
- const externalFieldsOnTypeForService = fieldTypeFederationMetadata?.externals?.[serviceName];
-
- if (fieldFederationMetadata?.provides) {
- const selections = fieldFederationMetadata.provides as FieldNode[];
- for (const selection of selections) {
- const foundMatchingExternal = externalFieldsOnTypeForService
- ? externalFieldsOnTypeForService.some(
- ext => ext.field.name.value === selection.name.value,
- )
- : undefined;
- if (!foundMatchingExternal) {
- errors.push(
- errorWithCode(
- 'PROVIDES_FIELDS_MISSING_EXTERNAL',
- logServiceAndType(serviceName, typeName, fieldName) +
- `provides the field \`${selection.name.value}\` and requires ${fieldType}.${selection.name.value} to be marked as @external.`,
- ),
- );
- }
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesFieldsSelectInvalidType.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesFieldsSelectInvalidType.ts
deleted file mode 100644
index 8b30847..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesFieldsSelectInvalidType.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-import {
- GraphQLError,
- isObjectType,
- FieldNode,
- isListType,
- isInterfaceType,
- isNonNullType,
- getNullableType,
- isUnionType,
-} from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * - The fields argument can not have root fields that result in a list
- * - The fields argument can not have root fields that result in an interface
- * - The fields argument can not have root fields that result in a union type
- */
-export const providesFieldsSelectInvalidType: PostCompositionValidator = ({
- schema,
-}) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- if (!isObjectType(namedType)) continue;
-
- // for each field, if there's a provides on it, check the type of the field
- // it references
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = getFederationMetadata(field);
- const serviceName = fieldFederationMetadata?.serviceName;
-
- // serviceName should always exist on fields that have @provides federation data, since
- // the only case where serviceName wouldn't exist is on a base type, and in that case,
- // the `provides` metadata should never get added to begin with. This should be caught in
- // composition work. This kind of error should be validated _before_ composition.
- if (!serviceName) continue;
-
- const fieldType = field.type;
- if (!isObjectType(fieldType)) continue;
- const allFields = fieldType.getFields();
-
- if (fieldFederationMetadata?.provides) {
- const selections = fieldFederationMetadata.provides as FieldNode[];
- for (const selection of selections) {
- const name = selection.name.value;
- const matchingField = allFields[name];
- if (!matchingField) {
- errors.push(
- errorWithCode(
- 'PROVIDES_FIELDS_SELECT_INVALID_TYPE',
- logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${name}, but ${fieldType.name}.${name} could not be found`,
- ),
- );
- continue;
- }
-
- if (
- isListType(matchingField.type) ||
- (isNonNullType(matchingField.type) &&
- isListType(getNullableType(matchingField.type)))
- ) {
- errors.push(
- errorWithCode(
- 'PROVIDES_FIELDS_SELECT_INVALID_TYPE',
- logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${fieldType.name}.${name}, which is a list type. A field cannot @provide lists.`,
- ),
- );
- }
- if (
- isInterfaceType(matchingField.type) ||
- (isNonNullType(matchingField.type) &&
- isInterfaceType(getNullableType(matchingField.type)))
- ) {
- errors.push(
- errorWithCode(
- 'PROVIDES_FIELDS_SELECT_INVALID_TYPE',
- logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${fieldType.name}.${name}, which is an interface type. A field cannot @provide interfaces.`,
- ),
- );
- }
-
- if (
- isUnionType(matchingField.type) ||
- (isNonNullType(matchingField.type) &&
- isUnionType(getNullableType(matchingField.type)))
- ) {
- errors.push(
- errorWithCode(
- 'PROVIDES_FIELDS_SELECT_INVALID_TYPE',
- logServiceAndType(serviceName, typeName, fieldName) +
- `A @provides selects ${fieldType.name}.${name}, which is a union type. A field cannot @provide union types.`,
- ),
- );
- }
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesNotOnEntity.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesNotOnEntity.ts
deleted file mode 100644
index 6fd8f36..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/providesNotOnEntity.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import {
- isObjectType,
- GraphQLError,
- isListType,
- isNonNullType,
-} from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * Provides directive can only be added to return types that are entities
- */
-export const providesNotOnEntity: PostCompositionValidator = ({ schema }) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(namedType)) continue;
-
- // for each field, if there's a provides on it, check that the containing
- // type has a `key` field under the federation metadata.
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = getFederationMetadata(field)
- const serviceName = fieldFederationMetadata?.serviceName;
-
- // serviceName should always exist on fields that have @provides federation data, since
- // the only case where serviceName wouldn't exist is on a base type, and in that case,
- // the `provides` metadata should never get added to begin with. This should be caught in
- // composition work. This kind of error should be validated _before_ composition.
- if (
- !serviceName &&
- fieldFederationMetadata?.provides &&
- !fieldFederationMetadata?.belongsToValueType
- )
- throw Error(
- 'Internal Consistency Error: field with provides information does not have service name.',
- );
- if (!serviceName) continue;
-
- const getBaseType = (type: any): any =>
- isListType(type) || isNonNullType(type)
- ? getBaseType(type.ofType)
- : type;
- const baseType = getBaseType(field.type);
-
- // field has a @provides directive on it
- if (fieldFederationMetadata?.provides) {
- if (!isObjectType(baseType)) {
- errors.push(
- errorWithCode(
- 'PROVIDES_NOT_ON_ENTITY',
- logServiceAndType(serviceName, typeName, fieldName) +
- `uses the @provides directive but \`${typeName}.${fieldName}\` returns \`${field.type}\`, which is not an Object or List type. @provides can only be used on Object types with at least one @key, or Lists of such Objects.`,
- ),
- );
- continue;
- }
-
- const fieldType = types[baseType.name];
- const selectedFieldIsEntity = getFederationMetadata(fieldType)?.keys;
-
- if (!selectedFieldIsEntity) {
- errors.push(
- errorWithCode(
- 'PROVIDES_NOT_ON_ENTITY',
- logServiceAndType(serviceName, typeName, fieldName) +
- `uses the @provides directive but \`${typeName}.${fieldName}\` does not return a type that has a @key. Try adding a @key to the \`${baseType}\` type.`,
- ),
- );
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/requiresFieldsMissingExternal.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/requiresFieldsMissingExternal.ts
deleted file mode 100644
index 02c049f..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/requiresFieldsMissingExternal.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import { isObjectType, FieldNode, GraphQLError } from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * for every @requires, there should be a matching @external
- */
-export const requiresFieldsMissingExternal: PostCompositionValidator = ({
- schema,
-}) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(namedType)) continue;
-
- // for each field, if there's a requires on it, check that there's a matching
- // @external field, and that the types referenced are from the base type
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = getFederationMetadata(field);
- const serviceName = fieldFederationMetadata?.serviceName;
-
- // serviceName should always exist on fields that have @requires federation data, since
- // the only case where serviceName wouldn't exist is on a base type, and in that case,
- // the `requires` metadata should never get added to begin with. This should be caught in
- // composition work. This kind of error should be validated _before_ composition.
- if (!serviceName) continue;
-
- if (fieldFederationMetadata?.requires) {
- const typeFederationMetadata = getFederationMetadata(namedType);
- const externalFieldsOnTypeForService =
- typeFederationMetadata?.externals?.[serviceName];
-
- const selections = fieldFederationMetadata?.requires as FieldNode[];
- for (const selection of selections) {
- const foundMatchingExternal = externalFieldsOnTypeForService
- ? externalFieldsOnTypeForService.some(
- ext => ext.field.name.value === selection.name.value,
- )
- : undefined;
- if (!foundMatchingExternal) {
- errors.push(
- errorWithCode(
- 'REQUIRES_FIELDS_MISSING_EXTERNAL',
- logServiceAndType(serviceName, typeName, fieldName) +
- `requires the field \`${selection.name.value}\` to be marked as @external.`,
- ),
- );
- }
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/requiresFieldsMissingOnBase.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/requiresFieldsMissingOnBase.ts
deleted file mode 100644
index 401dcd6..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/postComposition/requiresFieldsMissingOnBase.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { isObjectType, FieldNode, GraphQLError } from 'graphql';
-import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
-import { PostCompositionValidator } from '.';
-
-/**
- * The fields arg in @requires can only reference fields on the base type
- */
-export const requiresFieldsMissingOnBase: PostCompositionValidator = ({
- schema,
-}) => {
- const errors: GraphQLError[] = [];
-
- const types = schema.getTypeMap();
- for (const [typeName, namedType] of Object.entries(types)) {
- // Only object types have fields
- if (!isObjectType(namedType)) continue;
-
- // for each field, if there's a requires on it, check that there's a matching
- // @external field, and that the types referenced are from the base type
- for (const [fieldName, field] of Object.entries(namedType.getFields())) {
- const fieldFederationMetadata = getFederationMetadata(field);
- const serviceName = fieldFederationMetadata?.serviceName;
-
- // serviceName should always exist on fields that have @requires federation data, since
- // the only case where serviceName wouldn't exist is on a base type, and in that case,
- // the `requires` metadata should never get added to begin with. This should be caught in
- // composition work. This kind of error should be validated _before_ composition.
- if (!serviceName) continue;
-
- if (fieldFederationMetadata?.requires) {
- const selections = fieldFederationMetadata.requires as FieldNode[];
- for (const selection of selections) {
- // check the selections are from the _base_ type (no serviceName)
- const matchingFieldOnType = namedType.getFields()[
- selection.name.value
- ];
- const typeFederationMetadata = getFederationMetadata(matchingFieldOnType);
-
- if (typeFederationMetadata?.serviceName) {
- errors.push(
- errorWithCode(
- 'REQUIRES_FIELDS_MISSING_ON_BASE',
- logServiceAndType(serviceName, typeName, fieldName) +
- `requires the field \`${selection.name.value}\` to be @external. @external fields must exist on the base type, not an extension.`,
- ),
- );
- }
- }
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/duplicateEnumOrScalar.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/duplicateEnumOrScalar.test.ts
deleted file mode 100644
index cde9552..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/duplicateEnumOrScalar.test.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-import gql from 'graphql-tag';
-import { duplicateEnumOrScalar as validateDuplicateEnumOrScalar } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('duplicateEnumOrScalar', () => {
- it('does not error with proper enum and scalar usage', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- shippingDate: Date
- type: ProductType
- }
-
- enum ProductType {
- BOOK
- FURNITURE
- }
-
- extend enum ProductType {
- DIGITAL
- }
-
- scalar Date
- `,
- name: 'serviceA',
- };
-
- const warnings = validateDuplicateEnumOrScalar(serviceA);
- expect(warnings).toEqual([]);
- });
- it('errors when there are multiple definitions of the same enum', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
-
- enum ProductType {
- BOOK
- FURNITURE
- }
-
- enum ProductType {
- DIGITAL
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateDuplicateEnumOrScalar(serviceA);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "DUPLICATE_ENUM_DEFINITION",
- "message": "[serviceA] ProductType -> The enum, \`ProductType\` was defined multiple times in this service. Remove one of the definitions for \`ProductType\`",
- },
- ]
- `);
- });
-
- it('errors when there are multiple definitions of the same scalar', () => {
- const serviceA = {
- typeDefs: gql`
- scalar Date
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- deliveryDate: Date
- }
-
- scalar Date
- `,
- name: 'serviceA',
- };
-
- const warnings = validateDuplicateEnumOrScalar(serviceA);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "DUPLICATE_SCALAR_DEFINITION",
- "message": "[serviceA] Date -> The scalar, \`Date\` was defined multiple times in this service. Remove one of the definitions for \`Date\`",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/duplicateEnumValue.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/duplicateEnumValue.test.ts
deleted file mode 100644
index 6bc91a5..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/duplicateEnumValue.test.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import gql from 'graphql-tag';
-import { duplicateEnumValue as validateDuplicateEnumValue } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('duplicateEnumValue', () => {
- it('does not error with proper enum usage', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
-
- enum ProductType {
- BOOK
- FURNITURE
- }
-
- extend enum ProductType {
- DIGITAL
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateDuplicateEnumValue(serviceA);
- expect(warnings).toEqual([]);
- });
- it('errors when there are duplicate enum values in a single service', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
-
- enum ProductType {
- BOOK
- FURNITURE
- }
-
- extend enum ProductType {
- DIGITAL
- BOOK
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateDuplicateEnumValue(serviceA);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "DUPLICATE_ENUM_VALUE",
- "message": "[serviceA] ProductType.BOOK -> The enum, \`ProductType\` has multiple definitions of the \`BOOK\` value.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/externalUsedOnBase.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/externalUsedOnBase.test.ts
deleted file mode 100644
index 2b1cad0..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/externalUsedOnBase.test.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import gql from 'graphql-tag';
-import { externalUsedOnBase as validateExternalUsedOnBase } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('externalUsedOnBase', () => {
- it('does not warn when no externals directives are defined', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateExternalUsedOnBase(serviceA);
- expect(warnings).toEqual([]);
- });
-
- it('warns when there is a @external field on a base type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String! @external
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateExternalUsedOnBase(serviceA);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTERNAL_USED_ON_BASE",
- "message": "[serviceA] Product.upc -> Found extraneous @external directive. @external cannot be used on base types.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/keyFieldsMissingExternal.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/keyFieldsMissingExternal.test.ts
deleted file mode 100644
index 3811694..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/keyFieldsMissingExternal.test.ts
+++ /dev/null
@@ -1,181 +0,0 @@
-import gql from 'graphql-tag';
-import { keyFieldsMissingExternal as validateKeyFieldsMissingExternal } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('keyFieldsMissingExternal', () => {
- it('has no warnings when @key fields reference an @external field', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String! @external
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateKeyFieldsMissingExternal(serviceA);
- expect(warnings).toHaveLength(0);
- });
-
- it('has no warnings with correct selection set / nested @external usage', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Car @key(fields: "model { name kit { upc } } year") {
- model: Model! @external
- year: String! @external
- color: String!
- }
-
- extend type Model {
- name: String! @external
- kit: Kit @external
- }
-
- extend type Kit {
- upc: String! @external
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateKeyFieldsMissingExternal(serviceA);
- expect(warnings).toHaveLength(0);
- });
-
- it('has no warnings with @deprecated directive usage', () => {
- const serviceA = {
- typeDefs: gql`
- extend type Car @key(fields: "model { name kit { upc } } year") {
- model: Model! @external
- year: String! @external
- color: String! @deprecated(reason: "Use colors instead")
- colors: Color!
- }
-
- extend type Model {
- name: String! @external
- kit: Kit @external
- }
-
- extend type Kit {
- upc: String! @external
- }
-
- enum Color {
- Red
- Blue
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateKeyFieldsMissingExternal(serviceA);
- expect(warnings).toHaveLength(0);
- });
-
- it("warns when a @key argument doesn't reference an @external field", () => {
- const serviceA = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateKeyFieldsMissingExternal(serviceA);
- expect(warnings).toHaveLength(1);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "KEY_FIELDS_MISSING_EXTERNAL",
- "message": "[serviceA] Product -> A @key directive specifies the \`sku\` field which has no matching @external field.",
- },
- ]
- `);
- });
-
- it("warns when a @key argument references a field that isn't known", () => {
- const serviceA = {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- upc: String! @external
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateKeyFieldsMissingExternal(serviceA);
- expect(warnings).toHaveLength(1);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "KEY_FIELDS_MISSING_EXTERNAL",
- "message": "[serviceA] Product -> A @key directive specifies a field which is not found in this service. Add a field to this type with @external.",
- },
- ]
- `);
- });
-
- it("warns when a @key argument doesn't reference an @external field", () => {
- const serviceA = {
- typeDefs: gql`
- extend type Car @key(fields: "model { name kit { upc } } year") {
- model: Model! @external
- year: String! @external
- }
-
- extend type Model {
- name: String!
- kit: Kit
- }
-
- type Kit {
- upc: String!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateKeyFieldsMissingExternal(serviceA);
- expect(warnings).toHaveLength(3);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "KEY_FIELDS_MISSING_EXTERNAL",
- "message": "[serviceA] Model -> A @key directive specifies the \`name\` field which has no matching @external field.",
- },
- Object {
- "code": "KEY_FIELDS_MISSING_EXTERNAL",
- "message": "[serviceA] Model -> A @key directive specifies the \`kit\` field which has no matching @external field.",
- },
- Object {
- "code": "KEY_FIELDS_MISSING_EXTERNAL",
- "message": "[serviceA] Kit -> A @key directive specifies the \`upc\` field which has no matching @external field.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/requiresUsedOnBase.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/requiresUsedOnBase.test.ts
deleted file mode 100644
index fc5d42c..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/requiresUsedOnBase.test.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import gql from 'graphql-tag';
-import { requiresUsedOnBase as validateRequiresUsedOnBase } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('requiresUsedOnBase', () => {
- it('does not warn when no requires directives are defined', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "color { id value }") {
- sku: String!
- upc: String!
- color: Color!
- }
-
- type Color {
- id: ID!
- value: String!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateRequiresUsedOnBase(serviceA);
- expect(warnings).toEqual([]);
- });
-
- it('warns when there is a @requires field on a base type', () => {
- const serviceA = {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: String!
- upc: String! @requires(fields: "sku")
- id: ID!
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateRequiresUsedOnBase(serviceA);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "REQUIRES_USED_ON_BASE",
- "message": "[serviceA] Product.upc -> Found extraneous @requires directive. @requires cannot be used on base types.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/reservedFieldUsed.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/reservedFieldUsed.test.ts
deleted file mode 100644
index 8d03a00..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/reservedFieldUsed.test.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-import gql from 'graphql-tag';
-import { reservedFieldUsed as validateReservedFieldUsed } from '..';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('reservedFieldUsed', () => {
- it('has no warnings when _service and _entities arent used', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateReservedFieldUsed(serviceA);
- expect(warnings).toEqual([]);
- });
-
- it('warns when _service or _entities is used at the query root', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- _service: String!
- _entities: String!
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateReservedFieldUsed(serviceA);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "RESERVED_FIELD_USED",
- "message": "[serviceA] Query._service -> _service is a field reserved for federation and can't be used at the Query root.",
- },
- Object {
- "code": "RESERVED_FIELD_USED",
- "message": "[serviceA] Query._entities -> _entities is a field reserved for federation and can't be used at the Query root.",
- },
- ]
- `);
- });
-
- it('warns when _service or _entities is used in a schema extension', () => {
- const schemaDefinition = {
- typeDefs: gql`
- schema {
- query: RootQuery
- }
-
- type RootQuery {
- product: Product
- _entities: String!
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'schemaDefinition',
- };
-
- const schemaExtension = {
- typeDefs: gql`
- extend schema {
- query: RootQuery
- }
-
- type RootQuery {
- _service: String
- product: Product
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'schemaExtension',
- };
-
- const schemaDefinitionWarnings = validateReservedFieldUsed(
- schemaDefinition,
- );
- const schemaExtensionWarnings = validateReservedFieldUsed(schemaExtension);
-
- expect(schemaDefinitionWarnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "RESERVED_FIELD_USED",
- "message": "[schemaDefinition] RootQuery._entities -> _entities is a field reserved for federation and can't be used at the Query root.",
- },
- ]
- `);
- expect(schemaExtensionWarnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "RESERVED_FIELD_USED",
- "message": "[schemaExtension] RootQuery._service -> _service is a field reserved for federation and can't be used at the Query root.",
- },
- ]
- `);
- });
-
- it('warns when reserved fields are used on custom Query types', () => {
- const serviceA = {
- typeDefs: gql`
- schema {
- query: RootQuery
- }
-
- type RootQuery {
- product: Product
- _service: String
- _entities: String
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateReservedFieldUsed(serviceA);
-
- expect(warnings).toHaveLength(2);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "RESERVED_FIELD_USED",
- "message": "[serviceA] RootQuery._service -> _service is a field reserved for federation and can't be used at the Query root.",
- },
- Object {
- "code": "RESERVED_FIELD_USED",
- "message": "[serviceA] RootQuery._entities -> _entities is a field reserved for federation and can't be used at the Query root.",
- },
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/tsconfig.json b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/tsconfig.json
deleted file mode 100644
index 9bcedd5..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/__tests__/tsconfig.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "extends": "../../../../../../tsconfig.test.base",
- "include": ["**/*"],
- "references": [{ "path": "../../../../../" }]
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/duplicateEnumOrScalar.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/duplicateEnumOrScalar.ts
deleted file mode 100644
index b375205..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/duplicateEnumOrScalar.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { visit, GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-
-import { logServiceAndType, errorWithCode } from '../../utils';
-
-export const duplicateEnumOrScalar = ({
- name: serviceName,
- typeDefs,
-}: ServiceDefinition) => {
- const errors: GraphQLError[] = [];
-
- // keep track of every enum and scalar and error if there are ever duplicates
- const enums: string[] = [];
- const scalars: string[] = [];
-
- visit(typeDefs, {
- EnumTypeDefinition(definition) {
- const name = definition.name.value;
- if (enums.includes(name)) {
- errors.push(
- errorWithCode(
- 'DUPLICATE_ENUM_DEFINITION',
- logServiceAndType(serviceName, name) +
- `The enum, \`${name}\` was defined multiple times in this service. Remove one of the definitions for \`${name}\``,
- ),
- );
- return definition;
- }
- enums.push(name);
- return definition;
- },
- ScalarTypeDefinition(definition) {
- const name = definition.name.value;
- if (scalars.includes(name)) {
- errors.push(
- errorWithCode(
- 'DUPLICATE_SCALAR_DEFINITION',
- logServiceAndType(serviceName, name) +
- `The scalar, \`${name}\` was defined multiple times in this service. Remove one of the definitions for \`${name}\``,
- ),
- );
- return definition;
- }
- scalars.push(name);
- return definition;
- },
- });
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/duplicateEnumValue.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/duplicateEnumValue.ts
deleted file mode 100644
index 5e83eb4..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/duplicateEnumValue.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { visit, GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-
-import { logServiceAndType, errorWithCode } from '../../utils';
-
-export const duplicateEnumValue = ({
- name: serviceName,
- typeDefs,
-}: ServiceDefinition) => {
- const errors: GraphQLError[] = [];
-
- const enums: { [name: string]: string[] } = {};
-
- visit(typeDefs, {
- EnumTypeDefinition(definition) {
- const name = definition.name.value;
- const enumValues =
- definition.values && definition.values.map(value => value.name.value);
-
- if (!enumValues) return definition;
-
- if (enums[name] && enums[name].length) {
- enumValues.map(valueName => {
- if (enums[name].includes(valueName)) {
- errors.push(
- errorWithCode(
- 'DUPLICATE_ENUM_VALUE',
- logServiceAndType(serviceName, name, valueName) +
- `The enum, \`${name}\` has multiple definitions of the \`${valueName}\` value.`,
- ),
- );
- return;
- }
- enums[name].push(valueName);
- });
- } else {
- enums[name] = enumValues;
- }
-
- return definition;
- },
- EnumTypeExtension(definition) {
- const name = definition.name.value;
- const enumValues =
- definition.values && definition.values.map(value => value.name.value);
-
- if (!enumValues) return definition;
-
- if (enums[name] && enums[name].length) {
- enumValues.map(valueName => {
- if (enums[name].includes(valueName)) {
- errors.push(
- errorWithCode(
- 'DUPLICATE_ENUM_VALUE',
- logServiceAndType(serviceName, name, valueName) +
- `The enum, \`${name}\` has multiple definitions of the \`${valueName}\` value.`,
- ),
- );
- return;
- }
- enums[name].push(valueName);
- });
- } else {
- enums[name] = enumValues;
- }
-
- return definition;
- },
- });
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/externalUsedOnBase.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/externalUsedOnBase.ts
deleted file mode 100644
index ddb2b2b..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/externalUsedOnBase.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { visit, GraphQLError } from 'graphql';
-import { ServiceDefinition } from '../../types';
-
-import { logServiceAndType, errorWithCode } from '../../utils';
-
-/**
- * - There are no fields with @external on base type definitions
- */
-export const externalUsedOnBase = ({
- name: serviceName,
- typeDefs,
-}: ServiceDefinition) => {
- const errors: GraphQLError[] = [];
-
- visit(typeDefs, {
- ObjectTypeDefinition(typeDefinition) {
- if (typeDefinition.fields) {
- for (const field of typeDefinition.fields) {
- if (field.directives) {
- for (const directive of field.directives) {
- const name = directive.name.value;
- if (name === 'external') {
- errors.push(
- errorWithCode(
- 'EXTERNAL_USED_ON_BASE',
- logServiceAndType(
- serviceName,
- typeDefinition.name.value,
- field.name.value,
- ) +
- `Found extraneous @external directive. @external cannot be used on base types.`,
- ),
- );
- }
- }
- }
- }
- }
- },
- });
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/index.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/index.ts
deleted file mode 100644
index c2d78e4..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export { externalUsedOnBase } from './externalUsedOnBase';
-export { requiresUsedOnBase } from './requiresUsedOnBase';
-export { keyFieldsMissingExternal } from './keyFieldsMissingExternal';
-export { reservedFieldUsed } from './reservedFieldUsed';
-export { duplicateEnumOrScalar } from './duplicateEnumOrScalar';
-export { duplicateEnumValue } from './duplicateEnumValue';
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/keyFieldsMissingExternal.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/keyFieldsMissingExternal.ts
deleted file mode 100644
index eb8fc64..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/keyFieldsMissingExternal.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-import {
- visit,
- visitWithTypeInfo,
- TypeInfo,
- parse,
- GraphQLSchema,
- GraphQLError,
- specifiedDirectives,
-} from 'graphql';
-import { buildSchemaFromSDL } from 'apollo-graphql';
-import { federationDirectives } from '../../../directives';
-import { ServiceDefinition } from '../../types';
-import {
- findDirectivesOnTypeOrField,
- isStringValueNode,
- logServiceAndType,
- errorWithCode,
- isNotNullOrUndefined
-} from '../../utils';
-
-/**
- * For every @key directive, it must reference a field marked as @external
- */
-export const keyFieldsMissingExternal = ({
- name: serviceName,
- typeDefs,
-}: ServiceDefinition) => {
- const errors: GraphQLError[] = [];
-
- // Build an array that accounts for all key directives on type extensions.
- let keyDirectiveInfoOnTypeExtensions: {
- typeName: string;
- keyArgument: string;
- }[] = [];
- visit(typeDefs, {
- ObjectTypeExtension(node) {
- const keyDirectivesOnTypeExtension = findDirectivesOnTypeOrField(
- node,
- 'key',
- );
-
- const keyDirectivesInfo = keyDirectivesOnTypeExtension
- .map(keyDirective =>
- keyDirective.arguments &&
- isStringValueNode(keyDirective.arguments[0].value)
- ? {
- typeName: node.name.value,
- keyArgument: keyDirective.arguments[0].value.value,
- }
- : null,
- )
- .filter(isNotNullOrUndefined);
-
- keyDirectiveInfoOnTypeExtensions.push(...keyDirectivesInfo);
- },
- });
-
- // this allows us to build a partial schema
- let schema = new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- });
- try {
- schema = buildSchemaFromSDL(typeDefs, schema);
- } catch (e) {
- errors.push(e);
- return errors;
- }
-
- const typeInfo = new TypeInfo(schema);
-
- for (const { typeName, keyArgument } of keyDirectiveInfoOnTypeExtensions) {
- const keyDirectiveSelectionSet = parse(
- `fragment __generated on ${typeName} { ${keyArgument} }`,
- );
- visit(
- keyDirectiveSelectionSet,
- visitWithTypeInfo(typeInfo, {
- Field() {
- const fieldDef = typeInfo.getFieldDef();
- const parentType = typeInfo.getParentType();
- if (parentType) {
- if (!fieldDef) {
- // TODO: find all fields that have @external and suggest them / heursitic match
- errors.push(
- errorWithCode(
- 'KEY_FIELDS_MISSING_EXTERNAL',
- logServiceAndType(serviceName, parentType.name) +
- `A @key directive specifies a field which is not found in this service. Add a field to this type with @external.`,
- ),
- );
- return;
- }
- const externalDirectivesOnField = findDirectivesOnTypeOrField(
- fieldDef.astNode,
- 'external',
- );
-
- if (externalDirectivesOnField.length === 0) {
- errors.push(
- errorWithCode(
- 'KEY_FIELDS_MISSING_EXTERNAL',
- logServiceAndType(serviceName, parentType.name) +
- `A @key directive specifies the \`${fieldDef.name}\` field which has no matching @external field.`,
- ),
- );
- }
- }
- },
- }),
- );
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/requiresUsedOnBase.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/requiresUsedOnBase.ts
deleted file mode 100644
index a70a32b..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/requiresUsedOnBase.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { GraphQLError, visit } from 'graphql';
-import { ServiceDefinition } from '../../types';
-
-import { logServiceAndType, errorWithCode } from '../../utils';
-
-/**
- * - There are no fields with @requires on base type definitions
- */
-export const requiresUsedOnBase = ({
- name: serviceName,
- typeDefs,
-}: ServiceDefinition) => {
- const errors: GraphQLError[] = [];
-
- visit(typeDefs, {
- ObjectTypeDefinition(typeDefinition) {
- if (typeDefinition.fields) {
- for (const field of typeDefinition.fields) {
- if (field.directives) {
- for (const directive of field.directives) {
- const name = directive.name.value;
- if (name === 'requires') {
- errors.push(
- errorWithCode(
- 'REQUIRES_USED_ON_BASE',
- logServiceAndType(
- serviceName,
- typeDefinition.name.value,
- field.name.value,
- ) +
- `Found extraneous @requires directive. @requires cannot be used on base types.`,
- ),
- );
- }
- }
- }
- }
- }
- },
- });
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/reservedFieldUsed.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/reservedFieldUsed.ts
deleted file mode 100644
index 0434f7b..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preComposition/reservedFieldUsed.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { GraphQLError, visit } from 'graphql';
-import { ServiceDefinition } from '../../types';
-import {
- logServiceAndType,
- errorWithCode,
- reservedRootFields
-} from '../../utils';
-
-/**
- * - Schemas should not define the _service or _entitites fields on the query root
- */
-export const reservedFieldUsed = ({
- name: serviceName,
- typeDefs,
-}: ServiceDefinition) => {
- const errors: GraphQLError[] = [];
-
- let rootQueryName = 'Query';
- visit(typeDefs, {
- // find the Query type if redefined
- OperationTypeDefinition(node) {
- if (node.operation === 'query') {
- rootQueryName = node.type.name.value;
- }
- },
- });
-
- visit(typeDefs, {
- ObjectTypeDefinition(node) {
- if (node.name.value === rootQueryName && node.fields) {
- for (const field of node.fields) {
- const { value: fieldName } = field.name;
- if (reservedRootFields.includes(fieldName)) {
- errors.push(
- errorWithCode(
- 'RESERVED_FIELD_USED',
- logServiceAndType(serviceName, rootQueryName, fieldName) +
- `${fieldName} is a field reserved for federation and can\'t be used at the Query root.`,
- ),
- );
- }
- }
- }
- },
- });
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/__tests__/rootFieldUsed.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/__tests__/rootFieldUsed.test.ts
deleted file mode 100644
index 69f4673..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/__tests__/rootFieldUsed.test.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-import gql from 'graphql-tag';
-import { rootFieldUsed as validateRootFieldUsed } from '../';
-import { graphqlErrorSerializer } from '../../../../snapshotSerializers';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-
-describe('rootFieldUsed', () => {
- it('has no warnings when no schema definition or extension is provided', () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- product: Product
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateRootFieldUsed(serviceA);
- expect(warnings).toHaveLength(0);
- });
-
- it('has no warnings when a schema definition / extension is provided, when no default root operation type names are used', () => {
- const schemaDefinition = {
- typeDefs: gql`
- schema {
- query: RootQuery
- }
-
- type RootQuery {
- product: Product
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'schemaDefinition',
- };
-
- const schemaExtension = {
- typeDefs: gql`
- extend schema {
- query: RootQuery
- }
-
- type RootQuery {
- product: Product
- }
-
- type Product {
- sku: String
- }
- `,
- name: 'schemaExtension',
- };
-
- const schemaDefinitionWarnings = validateRootFieldUsed(schemaDefinition);
- const schemaExtensionWarnings = validateRootFieldUsed(schemaExtension);
-
- expect(schemaDefinitionWarnings).toEqual([]);
- expect(schemaExtensionWarnings).toEqual([]);
- });
-
- it('warns when a schema definition / extension is provided, as well as a default root type or extension', () => {
- const serviceA = {
- typeDefs: gql`
- schema {
- query: RootQuery
- }
-
- type RootQuery {
- product: Product
- }
-
- type Product {
- sku: String
- }
-
- type Query {
- invalidUseOfQuery: Boolean
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateRootFieldUsed(serviceA);
-
- expect(warnings).toHaveLength(1);
- expect(warnings[0].extensions.code).toEqual('ROOT_QUERY_USED');
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "ROOT_QUERY_USED",
- "message": "[serviceA] Query -> Found invalid use of default root operation name \`Query\`. \`Query\` is disallowed when \`Schema.query\` is set to a type other than \`Query\`.",
- },
- ]
- `);
- });
-
- it('warns against using default operation type names (Query, Mutation, Subscription) when a non-default operation type name is provided in the schema definition', () => {
- const serviceA = {
- typeDefs: gql`
- schema {
- mutation: RootMutation
- }
-
- type RootMutation {
- updateProduct(sku: ID!): Product
- }
-
- type Mutation {
- invalidUseOfMutation: Boolean
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateRootFieldUsed(serviceA);
-
- expect(warnings).toHaveLength(1);
- expect(warnings).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "ROOT_MUTATION_USED",
- "message": "[serviceA] Mutation -> Found invalid use of default root operation name \`Mutation\`. \`Mutation\` is disallowed when \`Schema.mutation\` is set to a type other than \`Mutation\`.",
- },
- ]
- `);
- });
-
- it("doesn't warn against using default operation type names when no schema definition is provided", () => {
- const serviceA = {
- typeDefs: gql`
- type Query {
- validUseOfQuery: Boolean
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateRootFieldUsed(serviceA);
- expect(warnings).toHaveLength(0);
- });
-
- it("doesn't warn against using default operation type names when a schema is defined", () => {
- const serviceA = {
- typeDefs: gql`
- schema {
- mutation: Mutation
- }
-
- type Query {
- validUseOfQuery: Boolean
- }
-
- type Mutation {
- validUseOfMutation: Product
- }
- `,
- name: 'serviceA',
- };
-
- const warnings = validateRootFieldUsed(serviceA);
- expect(warnings).toHaveLength(0);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/index.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/index.ts
deleted file mode 100644
index 7ff7179..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { rootFieldUsed } from './rootFieldUsed';
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/rootFieldUsed.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/rootFieldUsed.ts
deleted file mode 100644
index 1e6bdc1..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/preNormalization/rootFieldUsed.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-import {
- GraphQLError,
- visit,
- ObjectTypeDefinitionNode,
- ObjectTypeExtensionNode,
-} from 'graphql';
-import { ServiceDefinition, DefaultRootOperationTypeName } from '../../types';
-import {
- logServiceAndType,
- errorWithCode,
- defaultRootOperationNameLookup
-} from '../../utils';
-
-/**
- * - When a schema definition or extension is provided, warn user against using
- * default root operation type names for types or extensions
- * (Query, Mutation, Subscription)
- */
-export const rootFieldUsed = ({
- name: serviceName,
- typeDefs,
-}: ServiceDefinition) => {
- const errors: GraphQLError[] = [];
-
- // Array of default root operation names
- const defaultRootOperationNames = Object.values(
- defaultRootOperationNameLookup,
- );
-
- const disallowedTypeNames: {
- [key in DefaultRootOperationTypeName]?: boolean;
- } = {};
-
- let hasSchemaDefinitionOrExtension = false;
- visit(typeDefs, {
- OperationTypeDefinition(node) {
- // If we find at least one root operation type definition, we know the user has
- // specified either a schema definition or extension.
- hasSchemaDefinitionOrExtension = true;
-
- if (
- !defaultRootOperationNames.includes(node.type.name
- .value as DefaultRootOperationTypeName)
- ) {
- disallowedTypeNames[
- defaultRootOperationNameLookup[node.operation]
- ] = true;
- }
- },
- });
-
- // If a schema or schema extension is defined, we need to warn for each improper
- // usage of default root operation names. The conditions for an improper usage are:
- // 1. root operation type is defined as a non-default name (i.e. query: RootQuery)
- // 2. the respective default operation type name is used as a regular type
- if (hasSchemaDefinitionOrExtension) {
- visit(typeDefs, {
- ObjectTypeDefinition: visitType,
- ObjectTypeExtension: visitType,
- });
-
- function visitType(
- node: ObjectTypeDefinitionNode | ObjectTypeExtensionNode,
- ) {
- if (
- disallowedTypeNames[node.name.value as DefaultRootOperationTypeName]
- ) {
- const rootOperationName = node.name.value;
- errors.push(
- errorWithCode(
- `ROOT_${rootOperationName.toUpperCase()}_USED`,
- logServiceAndType(serviceName, rootOperationName) +
- `Found invalid use of default root operation name \`${rootOperationName}\`. \`${rootOperationName}\` is disallowed when \`Schema.${rootOperationName.toLowerCase()}\` is set to a type other than \`${rootOperationName}\`.`,
- ),
- );
- }
- }
- }
-
- return errors;
-};
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/matchingEnums.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/matchingEnums.test.ts
deleted file mode 100644
index 77b8645..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/matchingEnums.test.ts
+++ /dev/null
@@ -1,205 +0,0 @@
-import {
- GraphQLEnumType,
- Kind,
- DocumentNode,
- validate,
- GraphQLSchema,
- specifiedDirectives,
-} from 'graphql';
-import { validateSDL } from 'graphql/validation/validate';
-import gql from 'graphql-tag';
-import { composeServices, buildMapsFromServiceList } from '../../../compose';
-import {
- astSerializer,
- typeSerializer,
- selectionSetSerializer,
-} from '../../../../snapshotSerializers';
-import { normalizeTypeDefs } from '../../../normalize';
-import federationDirectives from '../../../../directives';
-import { ServiceDefinition } from '../../../types';
-import { MatchingEnums } from '../matchingEnums';
-
-expect.addSnapshotSerializer(astSerializer);
-expect.addSnapshotSerializer(typeSerializer);
-expect.addSnapshotSerializer(selectionSetSerializer);
-
-// simulate the first half of the composition process
-const createDefinitionsDocumentForServices = (
- serviceList: ServiceDefinition[],
-): DocumentNode => {
- const { typeDefinitionsMap } = buildMapsFromServiceList(serviceList);
- return {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeDefinitionsMap).flat(),
- };
-};
-
-describe('matchingEnums', () => {
- let schema: GraphQLSchema;
-
- // create a blank schema for each test
- beforeEach(() => {
- schema = new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- });
- });
-
- it('does not error with matching enums across services', () => {
- const serviceList = [
- {
- typeDefs: gql`
- enum ProductCategory {
- BED
- BATH
- }
- `,
- name: 'serviceA',
- },
-
- {
- typeDefs: gql`
- enum ProductCategory {
- BED
- BATH
- }
- `,
- name: 'serviceB',
- },
- ];
-
- const definitionsDocument = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitionsDocument, schema, [MatchingEnums]);
- expect(errors).toHaveLength(0);
- });
-
- it('errors when enums in separate services dont match', () => {
- const serviceList = [
- {
- typeDefs: gql`
- enum ProductCategory {
- BED
- BATH
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- enum ProductCategory {
- BEYOND
- }
- `,
- name: 'serviceB',
- },
- ];
-
- const definitionsDocument = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitionsDocument, schema, [MatchingEnums]);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: The \`ProductCategory\` enum does not have identical values in all services. Groups of services with identical values are: [serviceA], [serviceB]],
- ]
- `);
- });
-
- it('errors when enums in separate services dont match', () => {
- const serviceList = [
- {
- typeDefs: gql`
- type Query {
- products: [Product]!
- }
-
- type Product @key(fields: "sku") {
- sku: String!
- upc: String!
- type: ProductType
- }
-
- enum ProductType {
- BOOK
- FURNITURE
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- enum ProductType {
- FURNITURE
- BOOK
- DIGITAL
- }
- `,
- name: 'serviceB',
- },
- {
- typeDefs: gql`
- enum ProductType {
- FURNITURE
- BOOK
- DIGITAL
- }
- `,
- name: 'serviceC',
- },
- ];
-
- const definitionsDocument = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitionsDocument, schema, [MatchingEnums]);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: The \`ProductType\` enum does not have identical values in all services. Groups of services with identical values are: [serviceA], [serviceB, serviceC]],
- ]
- `);
- });
-
- it('errors when an enum name is defined as another type in a service', () => {
- const serviceList = [
- {
- typeDefs: gql`
- enum ProductType {
- BOOK
- FURNITURE
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type ProductType {
- id: String
- }
- `,
- name: 'serviceB',
- },
- {
- typeDefs: gql`
- enum ProductType {
- FURNITURE
- BOOK
- DIGITAL
- }
- `,
- name: 'serviceC',
- },
- ];
-
- const definitionsDocument = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitionsDocument, schema, [MatchingEnums]);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- [GraphQLError: [serviceA] ProductType -> ProductType is an enum in [serviceA, serviceC], but not in [serviceB]],
- ]
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/matchingUnions.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/matchingUnions.test.ts
deleted file mode 100644
index 7a3ec2b..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/matchingUnions.test.ts
+++ /dev/null
@@ -1,132 +0,0 @@
-import {
- GraphQLSchema,
- specifiedDirectives,
- Kind,
- DocumentNode,
-} from 'graphql';
-import { validateSDL } from 'graphql/validation/validate';
-import gql from 'graphql-tag';
-import {
- typeSerializer,
- graphqlErrorSerializer,
-} from '../../../../snapshotSerializers';
-import { UniqueUnionTypes } from '..';
-import { ServiceDefinition } from '../../../types';
-import { buildMapsFromServiceList } from '../../../compose';
-import federationDirectives from '../../../../directives';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-expect.addSnapshotSerializer(typeSerializer);
-
-function createDocumentsForServices(
- serviceList: ServiceDefinition[],
-): DocumentNode[] {
- const { typeDefinitionsMap, typeExtensionsMap } = buildMapsFromServiceList(
- serviceList,
- );
- return [
- {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeDefinitionsMap).flat(),
- },
- {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeExtensionsMap).flat(),
- },
- ];
-}
-
-describe('MatchingUnions', () => {
- let schema: GraphQLSchema;
-
- // create a blank schema for each test
- beforeEach(() => {
- schema = new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- });
- });
-
- it('enforces unique union names on non-identical union types', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- union ProductOrError = Product | Error
-
- type Error {
- code: Int!
- message: String!
- }
-
- type Product @key(fields: "sku") {
- sku: ID!
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- union ProductOrError = Product
-
- type Error {
- code: Int!
- message: String!
- }
-
- extend type Product @key(fields: "sku") {
- sku: ID! @external
- colors: [String]
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [UniqueUnionTypes]);
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_UNION_TYPES_MISMATCH",
- "message": "[serviceA] ProductOrError -> The union \`ProductOrError\` is defined in services \`serviceA\` and \`serviceB\`, however their types do not match. Union types with the same name must also consist of identical types. The type Error is mismatched.",
- }
- `);
- });
-
- it('permits duplicate union names for identical union types', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- union ProductOrError = Product | Error
-
- type Error {
- code: Int!
- message: String!
- }
-
- type Product @key(fields: "sku") {
- sku: ID!
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- union ProductOrError = Product | Error
-
- type Error {
- code: Int!
- message: String!
- }
-
- type Product @key(fields: "sku") {
- sku: ID!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [UniqueUnionTypes]);
- expect(errors).toHaveLength(0);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/possibleTypeExtensions.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/possibleTypeExtensions.test.ts
deleted file mode 100644
index 7be0198..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/possibleTypeExtensions.test.ts
+++ /dev/null
@@ -1,198 +0,0 @@
-import {
- Kind,
- DocumentNode,
- GraphQLSchema,
- specifiedDirectives,
- extendSchema,
-} from 'graphql';
-import { validateSDL } from 'graphql/validation/validate';
-import gql from 'graphql-tag';
-import { buildMapsFromServiceList } from '../../../compose';
-import {
- typeSerializer,
- graphqlErrorSerializer,
-} from '../../../../snapshotSerializers';
-import federationDirectives from '../../../../directives';
-import { ServiceDefinition } from '../../../types';
-import { PossibleTypeExtensions } from '../possibleTypeExtensions';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-expect.addSnapshotSerializer(typeSerializer);
-
-// simulate the first half of the composition process
-const createDefinitionsDocumentForServices = (
- serviceList: ServiceDefinition[],
-): {
- definitions: DocumentNode;
- extensions: DocumentNode;
-} => {
- const { typeDefinitionsMap, typeExtensionsMap } = buildMapsFromServiceList(
- serviceList,
- );
- return {
- definitions: {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeDefinitionsMap).flat(),
- },
- extensions: {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeExtensionsMap).flat(),
- },
- };
-};
-
-describe('PossibleTypeExtensionsType', () => {
- let schema: GraphQLSchema;
-
- // create a blank schema for each test
- beforeEach(() => {
- schema = new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- });
- });
-
- it('does not error with matching enums across services', () => {
- const serviceList = [
- {
- typeDefs: gql`
- extend type Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
-
- {
- typeDefs: gql`
- type Product {
- id: ID!
- }
- `,
- name: 'serviceB',
- },
- ];
-
- const { definitions, extensions } = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitions, schema, [PossibleTypeExtensions]);
- schema = extendSchema(schema, definitions, { assumeValidSDL: true });
- errors.push(...validateSDL(extensions, schema, [PossibleTypeExtensions]));
- expect(errors).toHaveLength(0);
- });
-
- it('errors when there is an extension with no base', () => {
- const serviceList = [
- {
- typeDefs: gql`
- extend type Product {
- id: ID!
- }
- `,
- name: 'serviceA',
- },
- ];
-
- const { definitions, extensions } = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitions, schema, [PossibleTypeExtensions]);
- schema = extendSchema(schema, definitions, { assumeValidSDL: true });
- errors.push(...validateSDL(extensions, schema, [PossibleTypeExtensions]));
-
- expect(errors).toHaveLength(1);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTENSION_WITH_NO_BASE",
- "message": "[serviceA] Product -> \`Product\` is an extension type, but \`Product\` is not defined in any service",
- },
- ]
- `);
- });
-
- it('errors when trying to extend a type with a different `Kind`', () => {
- const serviceList = [
- {
- typeDefs: gql`
- extend type Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
-
- {
- typeDefs: gql`
- input Product {
- id: ID!
- }
- `,
- name: 'serviceB',
- },
- ];
-
- const { definitions, extensions } = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitions, schema, [PossibleTypeExtensions]);
- schema = extendSchema(schema, definitions, { assumeValidSDL: true });
- errors.push(...validateSDL(extensions, schema, [PossibleTypeExtensions]));
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "EXTENSION_OF_WRONG_KIND",
- "message": "[serviceA] Product -> \`Product\` was originally defined as a InputObjectTypeDefinition and can only be extended by a InputObjectTypeExtension. serviceA defines Product as a ObjectTypeExtension",
- },
- ]
- `);
- });
-
- it('does not error', () => {
- const serviceList = [
- {
- typeDefs: gql`
- extend interface Product {
- name: String
- }
- extend type Book implements Product {
- sku: ID!
- name: String
- }
- `,
- name: 'serviceA',
- },
-
- {
- typeDefs: gql`
- type Book {
- id: ID!
- }
-
- interface Product {
- sku: ID!
- }
- `,
- name: 'serviceB',
- },
- ];
-
- const { definitions, extensions } = createDefinitionsDocumentForServices(
- serviceList,
- );
- const errors = validateSDL(definitions, schema, [PossibleTypeExtensions]);
- schema = extendSchema(schema, definitions, { assumeValidSDL: true });
- errors.push(...validateSDL(extensions, schema, [PossibleTypeExtensions]));
- schema = extendSchema(schema, extensions, { assumeValidSDL: true });
-
- expect(schema.getType('Book')).toMatchInlineSnapshot(`
- type Book implements Product {
- id: ID!
- sku: ID!
- name: String
- }
- `);
- expect(errors).toHaveLength(0);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/tsconfig.json b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/tsconfig.json
deleted file mode 100644
index 9bcedd5..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/tsconfig.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "extends": "../../../../../../tsconfig.test.base",
- "include": ["**/*"],
- "references": [{ "path": "../../../../../" }]
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/uniqueFieldDefinitionNames.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/uniqueFieldDefinitionNames.test.ts
deleted file mode 100644
index cf56c59..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/uniqueFieldDefinitionNames.test.ts
+++ /dev/null
@@ -1,268 +0,0 @@
-import {
- GraphQLSchema,
- specifiedDirectives,
- DocumentNode,
- Kind,
- extendSchema,
-} from 'graphql';
-import { validateSDL } from 'graphql/validation/validate';
-import gql from 'graphql-tag';
-import { typeSerializer } from '../../../../snapshotSerializers';
-import { buildMapsFromServiceList } from '../../../compose';
-import federationDirectives from '../../../../directives';
-import { UniqueFieldDefinitionNames } from '..';
-import { ServiceDefinition } from '../../../types';
-
-expect.addSnapshotSerializer(typeSerializer);
-
-// simulate the first half of the composition process
-function createDocumentsForServices(
- serviceList: ServiceDefinition[],
-): DocumentNode[] {
- const { typeDefinitionsMap, typeExtensionsMap } = buildMapsFromServiceList(
- serviceList,
- );
- return [
- {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeDefinitionsMap).flat(),
- },
- {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeExtensionsMap).flat(),
- },
- ];
-}
-
-describe('UniqueFieldDefinitionNames', () => {
- let schema: GraphQLSchema;
-
- // create a blank schema for each test
- beforeEach(() => {
- schema = new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- });
- });
-
- describe('enforces unique field names for', () => {
- it('object type definitions', () => {
- const [definitions, extensions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- extend type Product {
- sku: Int!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueFieldDefinitionNames,
- ]);
- schema = extendSchema(schema, definitions, {
- assumeValidSDL: true,
- });
-
- errors.push(
- ...validateSDL(extensions, schema, [UniqueFieldDefinitionNames]),
- );
-
- expect(errors).toHaveLength(1);
- expect(errors[0].message).toMatch(
- 'Field "Product.sku" already exists in the schema.',
- );
- });
-
- it('interface definitions', () => {
- const [definitions, extensions] = createDocumentsForServices([
- {
- typeDefs: gql`
- interface Product {
- sku: ID!
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- extend interface Product {
- sku: String!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueFieldDefinitionNames,
- ]);
- schema = extendSchema(schema, definitions, { assumeValidSDL: true });
- errors.push(
- ...validateSDL(extensions, schema, [UniqueFieldDefinitionNames]),
- );
- expect(errors).toHaveLength(1);
- expect(errors[0].message).toMatch(
- 'Field "Product.sku" already exists in the schema.',
- );
- });
-
- it('input object definitions', () => {
- const [definitions, extensions] = createDocumentsForServices([
- {
- typeDefs: gql`
- input Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- extend input Product {
- sku: String!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueFieldDefinitionNames,
- ]);
- schema = extendSchema(schema, definitions, { assumeValidSDL: true });
- errors.push(
- ...validateSDL(extensions, schema, [UniqueFieldDefinitionNames]),
- );
- expect(errors).toHaveLength(1);
- expect(errors[0].message).toMatch(
- 'Field "Product.sku" already exists in the schema.',
- );
- });
- });
-
- describe('permits duplicate field names for', () => {
- it('value types (identical object types)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueFieldDefinitionNames,
- ]);
- expect(errors).toHaveLength(0);
- });
-
- it('value types (identical interface types)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- interface Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- interface Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueFieldDefinitionNames,
- ]);
- expect(errors).toHaveLength(0);
- });
-
- it('value types (identical input types)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- input Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- input Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueFieldDefinitionNames,
- ]);
- expect(errors).toHaveLength(0);
- });
-
- it('object type definitions (non-identical, value types with type mismatch)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- color: String
- quantity: Int
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- sku: String!
- color: String
- quantity: Int!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueFieldDefinitionNames,
- ]);
- expect(errors).toHaveLength(0);
- });
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/uniqueTypeNamesWithFields.test.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/uniqueTypeNamesWithFields.test.ts
deleted file mode 100644
index a56c6c6..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/__tests__/uniqueTypeNamesWithFields.test.ts
+++ /dev/null
@@ -1,541 +0,0 @@
-import {
- GraphQLSchema,
- specifiedDirectives,
- Kind,
- DocumentNode,
-} from 'graphql';
-import { validateSDL } from 'graphql/validation/validate';
-import gql from 'graphql-tag';
-import {
- typeSerializer,
- graphqlErrorSerializer,
-} from '../../../../snapshotSerializers';
-import federationDirectives from '../../../../directives';
-import { UniqueTypeNamesWithFields } from '..';
-import { ServiceDefinition } from '../../../types';
-import { buildMapsFromServiceList } from '../../../compose';
-
-expect.addSnapshotSerializer(graphqlErrorSerializer);
-expect.addSnapshotSerializer(typeSerializer);
-
-function createDocumentsForServices(
- serviceList: ServiceDefinition[],
-): DocumentNode[] {
- const { typeDefinitionsMap, typeExtensionsMap } = buildMapsFromServiceList(
- serviceList,
- );
- return [
- {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeDefinitionsMap).flat(),
- },
- {
- kind: Kind.DOCUMENT,
- definitions: Object.values(typeExtensionsMap).flat(),
- },
- ];
-}
-
-describe('UniqueTypeNamesWithFields', () => {
- let schema: GraphQLSchema;
-
- // create a blank schema for each test
- beforeEach(() => {
- schema = new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- });
- });
-
- describe('enforces unique type names for', () => {
- it('object type definitions (non-identical, non-value types)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- color: String!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(1);
- expect(errors[0].message).toMatch(
- 'There can be only one type named "Product".',
- );
- });
-
- it('object type definitions (non-identical, value types with type mismatch)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- color: String
- quantity: Int
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- sku: String!
- color: String
- quantity: Int!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(2);
- expect(errors).toMatchInlineSnapshot(`
- Array [
- Object {
- "code": "VALUE_TYPE_FIELD_TYPE_MISMATCH",
- "message": "[serviceA] Product.sku -> A field was defined differently in different services. \`serviceA\` and \`serviceB\` define \`Product.sku\` as a ID! and String! respectively. In order to define \`Product\` in multiple places, the fields and their types must be identical.",
- },
- Object {
- "code": "VALUE_TYPE_FIELD_TYPE_MISMATCH",
- "message": "[serviceA] Product.quantity -> A field was defined differently in different services. \`serviceA\` and \`serviceB\` define \`Product.quantity\` as a Int and Int! respectively. In order to define \`Product\` in multiple places, the fields and their types must be identical.",
- },
- ]
- `);
- });
-
- it('object type definitions (overlapping fields, but non-value types)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- color: String
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- sku: ID!
- blah: Int!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(1);
- expect(errors[0].message).toMatch(
- 'There can be only one type named "Product".',
- );
- });
-
- it('interface definitions', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- interface Product {
- sku: ID!
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- interface Product {
- color: String!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(1);
- expect(errors[0].message).toMatch(
- 'There can be only one type named "Product".',
- );
- });
-
- it('input definitions', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- input Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- input Product {
- color: String!
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(1);
- expect(errors[0].message).toMatch(
- 'There can be only one type named "Product".',
- );
- });
- });
-
- describe('permits duplicate type names for', () => {
- it('scalar types', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- scalar JSON
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- scalar JSON
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(0);
- });
-
- it('enum types (congruency enforced in other validations)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- enum Category {
- Furniture
- Supplies
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- enum Category {
- Things
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(0);
- });
-
- it('input types', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- input Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- input Product {
- sku: ID
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(0);
- });
-
- it('value types (non-entity type definitions that are identical)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- sku: ID
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(0);
- });
- });
-
- describe('edge cases', () => {
- it('value types must be of the same kind', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- input Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- sku: ID
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
-
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_KIND_MISMATCH",
- "message": "[serviceA] Product -> Found kind mismatch on expected value type belonging to services \`serviceA\` and \`serviceB\`. \`Product\` is defined as both a \`ObjectTypeDefinition\` and a \`InputObjectTypeDefinition\`. In order to define \`Product\` in multiple places, the kinds must be identical.",
- }
- `);
- });
-
- it('value types must be of the same kind (scalar)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- scalar DateTime
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type DateTime {
- day: Int
- formatted: String
- # ...
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
-
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_KIND_MISMATCH",
- "message": "[serviceA] DateTime -> Found kind mismatch on expected value type belonging to services \`serviceA\` and \`serviceB\`. \`DateTime\` is defined as both a \`ObjectTypeDefinition\` and a \`ScalarTypeDefinition\`. In order to define \`DateTime\` in multiple places, the kinds must be identical.",
- }
- `);
- });
-
- it('value types must be of the same kind (union)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- union DateTime = Date | Time
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type DateTime {
- day: Int
- formatted: String
- # ...
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
-
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_KIND_MISMATCH",
- "message": "[serviceA] DateTime -> Found kind mismatch on expected value type belonging to services \`serviceA\` and \`serviceB\`. \`DateTime\` is defined as both a \`ObjectTypeDefinition\` and a \`UnionTypeDefinition\`. In order to define \`DateTime\` in multiple places, the kinds must be identical.",
- }
- `);
- });
-
- it('value types must be of the same kind (enum)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- enum DateTime {
- DATE
- TIME
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type DateTime {
- day: Int
- formatted: String
- # ...
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
-
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_KIND_MISMATCH",
- "message": "[serviceA] DateTime -> Found kind mismatch on expected value type belonging to services \`serviceA\` and \`serviceB\`. \`DateTime\` is defined as both a \`ObjectTypeDefinition\` and a \`EnumTypeDefinition\`. In order to define \`DateTime\` in multiple places, the kinds must be identical.",
- }
- `);
- });
-
- it('value types cannot be entities (part 1)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product {
- sku: ID
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_NO_ENTITY",
- "message": "[serviceA] Product -> Value types cannot be entities (using the \`@key\` directive). Please ensure that the \`Product\` type is extended properly or remove the \`@key\` directive if this is not an entity.",
- }
- `);
- });
-
- it('value types cannot be entities (part 2)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: ID
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(1);
- expect(errors[0]).toMatchInlineSnapshot(`
- Object {
- "code": "VALUE_TYPE_NO_ENTITY",
- "message": "[serviceB] Product -> Value types cannot be entities (using the \`@key\` directive). Please ensure that the \`Product\` type is extended properly or remove the \`@key\` directive if this is not an entity.",
- }
- `);
- });
-
- it('no false positives for properly formed entities (that look like value types)', () => {
- const [definitions] = createDocumentsForServices([
- {
- typeDefs: gql`
- type Product @key(fields: "sku") {
- sku: ID
- }
- `,
- name: 'serviceA',
- },
- {
- typeDefs: gql`
- extend type Product @key(fields: "sku") {
- sku: ID @external
- }
- `,
- name: 'serviceB',
- },
- ]);
-
- const errors = validateSDL(definitions, schema, [
- UniqueTypeNamesWithFields,
- ]);
- expect(errors).toHaveLength(0);
- });
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/index.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/index.ts
deleted file mode 100644
index 5a3ed57..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export { UniqueTypeNamesWithFields } from './uniqueTypeNamesWithFields';
-export { MatchingEnums } from './matchingEnums';
-export { PossibleTypeExtensions } from './possibleTypeExtensions';
-export { UniqueFieldDefinitionNames } from './uniqueFieldDefinitionNames';
-export { UniqueUnionTypes } from './matchingUnions';
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/matchingEnums.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/matchingEnums.ts
deleted file mode 100644
index bb16296..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/matchingEnums.ts
+++ /dev/null
@@ -1,123 +0,0 @@
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-import {
- ASTVisitor,
- Kind,
- EnumTypeDefinitionNode,
- EnumValueDefinitionNode,
- TypeDefinitionNode,
-} from 'graphql';
-import { errorWithCode, logServiceAndType } from '../../utils';
-import { isString } from 'util';
-
-function isEnumDefinition(node: TypeDefinitionNode) {
- return node.kind === Kind.ENUM_TYPE_DEFINITION;
-}
-
-type TypeToDefinitionsMap = {
- [typeNems: string]: TypeDefinitionNode[];
-};
-
-export function MatchingEnums(context: SDLValidationContext): ASTVisitor {
- const { definitions } = context.getDocument();
-
- // group all definitions by name
- // { MyTypeName: [{ serviceName: "A", name: {...}}]}
- let definitionsByName: {
- [typeName: string]: TypeDefinitionNode[];
- } = (definitions as TypeDefinitionNode[]).reduce(
- (typeToDefinitionsMap: TypeToDefinitionsMap, node) => {
- const name = node.name.value;
- if (typeToDefinitionsMap[name]) {
- typeToDefinitionsMap[name].push(node);
- } else {
- typeToDefinitionsMap[name] = [node];
- }
- return typeToDefinitionsMap;
- },
- {},
- );
-
- // map over each group of definitions.
- for (const [name, definitions] of Object.entries(definitionsByName)) {
- // if every definition in the list is an enum, we don't need to error about type,
- // but we do need to check to make sure every service has the same enum values
- if (definitions.every(isEnumDefinition)) {
- // a simple list of services to enum values for a given enum
- // [{ serviceName: "serviceA", values: ["FURNITURE", "BOOK"] }]
- let simpleEnumDefs: Array<{ serviceName: string; values: string[] }> = [];
-
- // build the simpleEnumDefs list
- for (const {
- values,
- serviceName,
- } of definitions as EnumTypeDefinitionNode[]) {
- if (serviceName && values)
- simpleEnumDefs.push({
- serviceName,
- values: values.map(
- (enumValue: EnumValueDefinitionNode) => enumValue.name.value,
- ),
- });
- }
-
- // values need to be in order to build the matchingEnumGroups
- for (const definition of simpleEnumDefs) {
- definition.values = definition.values.sort();
- }
-
- // groups of services with matching values, keyed by enum values
- // like {"FURNITURE,BOOK": ["ServiceA", "ServiceB"], "FURNITURE,DIGITAL": ["serviceC"]}
- let matchingEnumGroups: { [values: string]: string[] } = {};
-
- // build matchingEnumDefs
- for (const definition of simpleEnumDefs) {
- const key = definition.values.join();
- if (matchingEnumGroups[key]) {
- matchingEnumGroups[key].push(definition.serviceName);
- } else {
- matchingEnumGroups[key] = [definition.serviceName];
- }
- }
-
- if (Object.keys(matchingEnumGroups).length > 1) {
- context.reportError(
- errorWithCode(
- 'ENUM_MISMATCH',
- `The \`${name}\` enum does not have identical values in all services. Groups of services with identical values are: ${Object.values(
- matchingEnumGroups,
- )
- .map(serviceNames => `[${serviceNames.join(', ')}]`)
- .join(', ')}`,
- ),
- );
- }
- } else if (definitions.some(isEnumDefinition)) {
- // if only SOME definitions in the list are enums, we need to error
-
- // first, find the services, where the defs ARE enums
- const servicesWithEnum = definitions
- .filter(isEnumDefinition)
- .map(definition => definition.serviceName)
- .filter(isString);
-
- // find the services where the def isn't an enum
- const servicesWithoutEnum = definitions
- .filter(d => !isEnumDefinition(d))
- .map(d => d.serviceName)
- .filter(isString);
-
- context.reportError(
- errorWithCode(
- 'ENUM_MISMATCH_TYPE',
- logServiceAndType(servicesWithEnum[0], name) +
- `${name} is an enum in [${servicesWithEnum.join(
- ', ',
- )}], but not in [${servicesWithoutEnum.join(', ')}]`,
- ),
- );
- }
- }
-
- // we don't need any visitors for this validation rule
- return {};
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/matchingUnions.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/matchingUnions.ts
deleted file mode 100644
index 7a74fb8..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/matchingUnions.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { GraphQLError, ASTVisitor, UnionTypeDefinitionNode } from 'graphql';
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-import xorBy from 'lodash.xorby';
-import { Maybe } from '../../types';
-import { errorWithCode, logServiceAndType } from '../../utils';
-import {
- existedTypeNameMessage,
- duplicateTypeNameMessage,
-} from './uniqueTypeNamesWithFields';
-
-/**
- * Unique type names
- * A GraphQL document is only valid if all defined types have unique names.
- * Modified to allow duplicate enum and scalar names
- */
-export function UniqueUnionTypes(context: SDLValidationContext): ASTVisitor {
- const knownTypes: {
- [typeName: string]: UnionTypeDefinitionNode;
- } = Object.create(null);
- const schema = context.getSchema();
-
- return {
- UnionTypeDefinition: validateUnionTypes,
- };
-
- function validateUnionTypes(node: UnionTypeDefinitionNode) {
- const typeName = node.name.value;
- const typeFromSchema = schema && schema.getType(typeName);
- const typeNodeFromSchema =
- typeFromSchema &&
- (typeFromSchema.astNode as Maybe);
-
- const typeNodeFromDefs = knownTypes[typeName];
- const duplicateTypeNode = typeNodeFromSchema || typeNodeFromDefs;
-
- // Exception for identical union types
- if (duplicateTypeNode) {
- const unionDiff = xorBy(
- node.types,
- duplicateTypeNode.types,
- 'name.value',
- );
-
- const diffLength = unionDiff.length;
- if (diffLength > 0) {
- context.reportError(
- errorWithCode(
- 'VALUE_TYPE_UNION_TYPES_MISMATCH',
- `${logServiceAndType(
- duplicateTypeNode.serviceName!,
- typeName,
- )}The union \`${typeName}\` is defined in services \`${
- duplicateTypeNode.serviceName
- }\` and \`${
- node.serviceName
- }\`, however their types do not match. Union types with the same name must also consist of identical types. The type${
- diffLength > 1 ? 's' : ''
- } ${unionDiff.map(diffEntry => diffEntry.name.value).join(', ')} ${
- diffLength > 1 ? 'are' : 'is'
- } mismatched.`,
- [node, duplicateTypeNode],
- ),
- );
- }
-
- return false;
- }
-
- if (typeFromSchema) {
- context.reportError(
- new GraphQLError(existedTypeNameMessage(typeName), node.name),
- );
- return;
- }
-
- if (knownTypes[typeName]) {
- context.reportError(
- new GraphQLError(duplicateTypeNameMessage(typeName), [
- knownTypes[typeName],
- node.name,
- ]),
- );
- } else {
- knownTypes[typeName] = node;
- }
-
- return false;
- }
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/possibleTypeExtensions.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/possibleTypeExtensions.ts
deleted file mode 100644
index f7e3785..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/possibleTypeExtensions.ts
+++ /dev/null
@@ -1,129 +0,0 @@
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-import {
- ASTVisitor,
- isObjectType,
- isScalarType,
- isInterfaceType,
- isUnionType,
- isEnumType,
- isInputObjectType,
- Kind,
- isTypeDefinitionNode,
- ObjectTypeExtensionNode,
- InterfaceTypeExtensionNode,
- GraphQLNamedType,
-} from 'graphql';
-import {
- errorWithCode,
- logServiceAndType,
- defKindToExtKind,
-} from '../../utils';
-
-type FederatedExtensionNode = (
- | ObjectTypeExtensionNode
- | InterfaceTypeExtensionNode) & {
- serviceName?: string | null;
-};
-
-// This is a variant of the PossibleTypeExtensions validator in graphql-js.
-// it was modified to only check object/interface extensions. A custom error
-// message was also added.
-// original here: https://github.com/graphql/graphql-js/blob/master/src/validation/rules/PossibleTypeExtensions.js
-export function PossibleTypeExtensions(
- context: SDLValidationContext,
-): ASTVisitor {
- const schema = context.getSchema();
- const definedTypes = Object.create(null);
-
- for (const def of context.getDocument().definitions) {
- if (isTypeDefinitionNode(def)) {
- definedTypes[def.name.value] = def;
- }
- }
-
- const checkExtension = (node: FederatedExtensionNode) => {
- const typeName = node.name.value;
- const defNode = definedTypes[typeName];
- const existingType = schema && schema.getType(typeName);
-
- const serviceName = node.serviceName;
- if (!serviceName) return;
-
- if (defNode) {
- const expectedKind = defKindToExtKind[defNode.kind];
- const baseKind = defNode.kind;
- if (expectedKind !== node.kind) {
- context.reportError(
- errorWithCode(
- 'EXTENSION_OF_WRONG_KIND',
- logServiceAndType(serviceName, typeName) +
- `\`${typeName}\` was originally defined as a ${baseKind} and can only be extended by a ${expectedKind}. ${serviceName} defines ${typeName} as a ${node.kind}`,
- ),
- );
- }
- } else if (existingType) {
- const expectedKind = typeToExtKind(existingType);
- const baseKind = typeToKind(existingType);
- if (expectedKind !== node.kind) {
- context.reportError(
- errorWithCode(
- 'EXTENSION_OF_WRONG_KIND',
- logServiceAndType(serviceName, typeName) +
- `\`${typeName}\` was originally defined as a ${baseKind} and can only be extended by a ${expectedKind}. ${serviceName} defines ${typeName} as a ${node.kind}`,
- ),
- );
- }
- } else {
- context.reportError(
- errorWithCode(
- 'EXTENSION_WITH_NO_BASE',
- logServiceAndType(serviceName, typeName) +
- `\`${typeName}\` is an extension type, but \`${typeName}\` is not defined in any service`,
- ),
- );
- }
- };
-
- return {
- ObjectTypeExtension: checkExtension,
- InterfaceTypeExtension: checkExtension,
- };
-}
-
-// These following utility functions/objects are part of the
-// PossibleTypeExtensions validations in graphql-js, but not exported.
-// https://github.com/graphql/graphql-js/blob/d8c1dfdc9dbbdef2400363cb0748d50cbeef39a8/src/validation/rules/PossibleTypeExtensions.js#L110
-function typeToExtKind(type: GraphQLNamedType) {
- if (isScalarType(type)) {
- return Kind.SCALAR_TYPE_EXTENSION;
- } else if (isObjectType(type)) {
- return Kind.OBJECT_TYPE_EXTENSION;
- } else if (isInterfaceType(type)) {
- return Kind.INTERFACE_TYPE_EXTENSION;
- } else if (isUnionType(type)) {
- return Kind.UNION_TYPE_EXTENSION;
- } else if (isEnumType(type)) {
- return Kind.ENUM_TYPE_EXTENSION;
- } else if (isInputObjectType(type)) {
- return Kind.INPUT_OBJECT_TYPE_EXTENSION;
- }
- return null;
-}
-
-// this function is purely for printing out the `Kind` of the base type def.
-function typeToKind(type: GraphQLNamedType) {
- if (isScalarType(type)) {
- return Kind.SCALAR_TYPE_DEFINITION;
- } else if (isObjectType(type)) {
- return Kind.OBJECT_TYPE_DEFINITION;
- } else if (isInterfaceType(type)) {
- return Kind.INTERFACE_TYPE_DEFINITION;
- } else if (isUnionType(type)) {
- return Kind.UNION_TYPE_DEFINITION;
- } else if (isEnumType(type)) {
- return Kind.ENUM_TYPE_DEFINITION;
- } else if (isInputObjectType(type)) {
- return Kind.INPUT_OBJECT_TYPE_DEFINITION;
- }
- return null;
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/uniqueFieldDefinitionNames.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/uniqueFieldDefinitionNames.ts
deleted file mode 100644
index 4491741..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/uniqueFieldDefinitionNames.ts
+++ /dev/null
@@ -1,208 +0,0 @@
-import {
- ASTVisitor,
- NameNode,
- GraphQLError,
- InputObjectTypeDefinitionNode,
- InterfaceTypeDefinitionNode,
- ObjectTypeDefinitionNode,
- InputObjectTypeExtensionNode,
- InterfaceTypeExtensionNode,
- ObjectTypeExtensionNode,
- GraphQLNamedType,
- isObjectType,
- isInterfaceType,
- isInputObjectType,
-} from 'graphql';
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-import { TypeMap } from 'graphql/type/schema';
-import { Maybe } from '../../types';
-import { diffTypeNodes, logServiceAndType } from '../../utils';
-
-type TypeNodeWithFields = TypeDefinitionWithFields | TypeExtensionWithFields;
-
-type TypeDefinitionWithFields =
- | InputObjectTypeDefinitionNode
- | InterfaceTypeDefinitionNode
- | ObjectTypeDefinitionNode;
-
-type TypeExtensionWithFields =
- | InputObjectTypeExtensionNode
- | InterfaceTypeExtensionNode
- | ObjectTypeExtensionNode;
-
-export function duplicateFieldDefinitionNameMessage(
- typeName: string,
- fieldName: string,
-): string {
- return `Field "${typeName}.${fieldName}" can only be defined once.`;
-}
-
-export function existedFieldDefinitionNameMessage(
- typeName: string,
- fieldName: string,
- serviceName: string,
-): string {
- return `${logServiceAndType(
- serviceName,
- typeName,
- fieldName,
- )}Field "${typeName}.${fieldName}" already exists in the schema. It cannot also be defined in this type extension. If this is meant to be an external field, add the \`@external\` directive.`;
-}
-
-/**
- * Unique field definition names
- *
- * A GraphQL complex type is only valid if all its fields are uniquely named.
- * Modified to permit duplicate field names on value types.
- */
-export function UniqueFieldDefinitionNames(
- context: SDLValidationContext,
-): ASTVisitor {
- const schema = context.getSchema();
- const existingTypeMap: TypeMap = schema
- ? schema.getTypeMap()
- : Object.create(null);
- interface FieldToNameNodeMap {
- [fieldName: string]: NameNode;
- }
- const knownFieldNames: {
- [typeName: string]: FieldToNameNodeMap;
- } = Object.create(null);
-
- const possibleValueTypes: {
- [key: string]: TypeNodeWithFields | undefined;
- } = Object.create(null);
-
- // Maintain original functionality for type extensions, but substitute our
- // more permissive validator for base types to allow value types
- return {
- InputObjectTypeExtension: checkFieldUniqueness,
- InterfaceTypeExtension: checkFieldUniqueness,
- ObjectTypeExtension: checkFieldUniqueness,
- InputObjectTypeDefinition: checkFieldUniquenessExcludingValueTypes,
- InterfaceTypeDefinition: checkFieldUniquenessExcludingValueTypes,
- ObjectTypeDefinition: checkFieldUniquenessExcludingValueTypes,
- };
-
- function checkFieldUniqueness(node: TypeExtensionWithFields) {
- const typeName = node.name.value;
-
- if (!knownFieldNames[typeName]) {
- knownFieldNames[typeName] = Object.create(null);
- }
-
- if (!node.fields) {
- return false;
- }
-
- const fieldNames = knownFieldNames[typeName];
-
- for (const fieldDef of node.fields) {
- const fieldName = fieldDef.name.value;
-
- if (hasField(existingTypeMap[typeName], fieldName)) {
- context.reportError(
- new GraphQLError(
- existedFieldDefinitionNameMessage(
- typeName,
- fieldName,
- existingTypeMap[typeName].astNode!.serviceName!,
- ),
- fieldDef.name,
- ),
- );
- } else if (fieldNames[fieldName]) {
- context.reportError(
- new GraphQLError(
- duplicateFieldDefinitionNameMessage(typeName, fieldName),
- [fieldNames[fieldName], fieldDef.name],
- ),
- );
- } else {
- fieldNames[fieldName] = fieldDef.name;
- }
- }
-
- return false;
- }
-
- /**
- * Similar to checkFieldUniqueness above, with some extra permissions:
- *
- * 1) Non-uniqueness *on value types* (same field names, same field types) should be permitted
- * 2) *Near* value types are also permitted here (with relevant errors in uniqueTypeNamesWithFields)
- * - Near value types share only the same type name and field names. Permitting these cases allows
- * us to catch and warn on likely user errors.
- *
- * @param node TypeDefinitionWithFields
- */
- function checkFieldUniquenessExcludingValueTypes(
- node: TypeDefinitionWithFields,
- ) {
- const typeName = node.name.value;
-
- const valueTypeFromSchema =
- existingTypeMap[typeName] &&
- (existingTypeMap[typeName].astNode as Maybe);
- const duplicateTypeNode =
- valueTypeFromSchema || possibleValueTypes[node.name.value];
-
- if (duplicateTypeNode) {
- const { fields } = diffTypeNodes(node, duplicateTypeNode);
-
- // This is the condition required for a *near* value type. At this point, we know the
- // parent type names are the same. We know the field names are the same if either:
- // 1) the field has no entry in the fields diff (they're identical), or
- // 2) the field's diff entry is an array of length 2 (both nodes have the field, but the field types are different)
- if (Object.values(fields).every(diffEntry => diffEntry.length === 2)) {
- return false;
- }
- } else {
- possibleValueTypes[node.name.value] = node;
- }
-
- if (!knownFieldNames[typeName]) {
- knownFieldNames[typeName] = Object.create(null);
- }
-
- if (!node.fields) {
- return false;
- }
-
- const fieldNames = knownFieldNames[typeName];
-
- for (const fieldDef of node.fields) {
- const fieldName = fieldDef.name.value;
- if (hasField(existingTypeMap[typeName], fieldName)) {
- context.reportError(
- new GraphQLError(
- existedFieldDefinitionNameMessage(
- typeName,
- fieldName,
- existingTypeMap[typeName].astNode!.serviceName!,
- ),
- fieldDef.name,
- ),
- );
- } else if (fieldNames[fieldName]) {
- context.reportError(
- new GraphQLError(
- duplicateFieldDefinitionNameMessage(typeName, fieldName),
- [fieldNames[fieldName], fieldDef.name],
- ),
- );
- } else {
- fieldNames[fieldName] = fieldDef.name;
- }
- }
-
- return false;
- }
-}
-
-function hasField(type: GraphQLNamedType, fieldName: string) {
- if (isObjectType(type) || isInterfaceType(type) || isInputObjectType(type)) {
- return Boolean(type.getFields()[fieldName]);
- }
- return false;
-}
diff --git a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/uniqueTypeNamesWithFields.ts b/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/uniqueTypeNamesWithFields.ts
deleted file mode 100644
index 5615c6e..0000000
--- a/gateway/node_modules/@apollo/federation/src/composition/validate/sdl/uniqueTypeNamesWithFields.ts
+++ /dev/null
@@ -1,172 +0,0 @@
-import {
- GraphQLError,
- ASTVisitor,
- TypeDefinitionNode,
-} from 'graphql';
-
-import { SDLValidationContext } from 'graphql/validation/ValidationContext';
-import { Maybe } from '../../types';
-import {
- isTypeNodeAnEntity,
- diffTypeNodes,
- errorWithCode,
- logServiceAndType,
-} from '../../utils';
-
-export function duplicateTypeNameMessage(typeName: string): string {
- return `There can be only one type named "${typeName}".`;
-}
-
-export function existedTypeNameMessage(typeName: string): string {
- return `Type "${typeName}" already exists in the schema. It cannot also be defined in this type definition.`;
-}
-
-/**
- * Unique type names
- * A GraphQL document is only valid if all defined types have unique names.
- * Modified to allow duplicate enum and scalar names
- */
-export function UniqueTypeNamesWithFields(
- context: SDLValidationContext,
-): ASTVisitor {
- const knownTypes: {
- [typeName: string]: TypeDefinitionNode;
- } = Object.create(null);
- const schema = context.getSchema();
-
- return {
- ScalarTypeDefinition: checkTypeName,
- ObjectTypeDefinition: checkTypeName,
- InterfaceTypeDefinition: checkTypeName,
- UnionTypeDefinition: checkTypeName,
- EnumTypeDefinition: checkTypeName,
- InputObjectTypeDefinition: checkTypeName,
- };
-
- function checkTypeName(node: TypeDefinitionNode) {
- const typeName = node.name.value;
- const typeFromSchema = schema && schema.getType(typeName);
- const typeNodeFromSchema =
- typeFromSchema &&
- (typeFromSchema.astNode as Maybe);
-
- const typeNodeFromDefs = knownTypes[typeName];
- const duplicateTypeNode = typeNodeFromSchema || typeNodeFromDefs;
-
- /*
- * Return early for value types
- * Value types:
- * 1) have the same kind (type, interface, input), extensions are excluded
- * 2) are not entities
- * 3) have the same set of fields
- */
- if (duplicateTypeNode) {
- const possibleErrors: GraphQLError[] = [];
- // By inspecting the diff, we can warn when field types mismatch.
- // A diff entry will exist when a field exists on one type and not the other, or if there is a type mismatch on the field
- // i.e. { sku: [Int, String!], color: [String] }
- const { kind, fields } = diffTypeNodes(node, duplicateTypeNode);
-
- const fieldsDiff = Object.entries(fields);
-
- // Error if the kinds don't match
- if (kind.length > 0) {
- context.reportError(
- errorWithCode(
- 'VALUE_TYPE_KIND_MISMATCH',
- `${logServiceAndType(
- duplicateTypeNode.serviceName!,
- typeName,
- )}Found kind mismatch on expected value type belonging to services \`${
- duplicateTypeNode.serviceName
- }\` and \`${
- node.serviceName
- }\`. \`${typeName}\` is defined as both a \`${
- kind[0]
- }\` and a \`${
- kind[1]
- }\`. In order to define \`${typeName}\` in multiple places, the kinds must be identical.`,
- [node, duplicateTypeNode],
- ),
- );
- return;
- }
-
- const typesHaveSameShape =
- fieldsDiff.length === 0 ||
- fieldsDiff.every(([fieldName, types]) => {
- // If a diff entry has two types, then the field name matches but the types do not.
- // In this case, we can push a useful error to hint to the user that we
- // think they tried to define a value type, but one of the fields has a type mismatch.
- if (types.length === 2) {
- possibleErrors.push(
- errorWithCode(
- 'VALUE_TYPE_FIELD_TYPE_MISMATCH',
- `${logServiceAndType(
- duplicateTypeNode.serviceName!,
- typeName,
- fieldName,
- )}A field was defined differently in different services. \`${
- duplicateTypeNode.serviceName
- }\` and \`${
- node.serviceName
- }\` define \`${typeName}.${fieldName}\` as a ${types[1]} and ${
- types[0]
- } respectively. In order to define \`${typeName}\` in multiple places, the fields and their types must be identical.`,
- [node, duplicateTypeNode],
- ),
- );
- return true;
- }
- return false;
- });
-
- // Once we determined that types have the same shape (name, kind, and field
- // names), we can provide useful errors
- if (typesHaveSameShape) {
- // Report errors that were collected while determining the matching shape of the types
- possibleErrors.forEach(error => context.reportError(error));
-
- // Error if either is an entity
- if (isTypeNodeAnEntity(node) || isTypeNodeAnEntity(duplicateTypeNode)) {
- const entityNode = isTypeNodeAnEntity(duplicateTypeNode)
- ? duplicateTypeNode
- : node;
-
- context.reportError(
- errorWithCode(
- 'VALUE_TYPE_NO_ENTITY',
- `${logServiceAndType(
- entityNode.serviceName!,
- typeName,
- )}Value types cannot be entities (using the \`@key\` directive). Please ensure that the \`${typeName}\` type is extended properly or remove the \`@key\` directive if this is not an entity.`,
- [node, duplicateTypeNode],
- ),
- );
- }
-
- return false;
- }
- }
-
- if (typeFromSchema) {
- context.reportError(
- new GraphQLError(existedTypeNameMessage(typeName), node.name),
- );
- return;
- }
-
- if (knownTypes[typeName]) {
- context.reportError(
- new GraphQLError(duplicateTypeNameMessage(typeName), [
- knownTypes[typeName],
- node.name,
- ]),
- );
- } else {
- knownTypes[typeName] = node;
- }
-
- return false;
- }
-}
diff --git a/gateway/node_modules/@apollo/federation/src/csdlDirectives.ts b/gateway/node_modules/@apollo/federation/src/csdlDirectives.ts
deleted file mode 100644
index 4a3fd10..0000000
--- a/gateway/node_modules/@apollo/federation/src/csdlDirectives.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-import {
- GraphQLDirective,
- DirectiveLocation,
- GraphQLNonNull,
- GraphQLString,
- GraphQLInt,
-} from 'graphql';
-
-export const ComposedGraphDirective = new GraphQLDirective({
- name: 'composedGraph',
- locations: [DirectiveLocation.SCHEMA],
- args: {
- version: {
- type: GraphQLNonNull(GraphQLInt),
- },
- },
-});
-
-export const GraphDirective = new GraphQLDirective({
- name: 'graph',
- locations: [DirectiveLocation.SCHEMA],
- args: {
- name: {
- type: GraphQLNonNull(GraphQLString),
- },
- url: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const OwnerDirective = new GraphQLDirective({
- name: 'owner',
- locations: [DirectiveLocation.OBJECT],
- args: {
- graph: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const KeyDirective = new GraphQLDirective({
- name: 'key',
- locations: [DirectiveLocation.OBJECT],
- args: {
- fields: {
- type: GraphQLNonNull(GraphQLString),
- },
- graph: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const ResolveDirective = new GraphQLDirective({
- name: 'resolve',
- locations: [DirectiveLocation.FIELD_DEFINITION],
- args: {
- graph: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const ProvidesDirective = new GraphQLDirective({
- name: 'provides',
- locations: [DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const RequiresDirective = new GraphQLDirective({
- name: 'requires',
- locations: [DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const csdlDirectives = [
- ComposedGraphDirective,
- GraphDirective,
- OwnerDirective,
- KeyDirective,
- ResolveDirective,
- ProvidesDirective,
- RequiresDirective,
-];
-
-export default csdlDirectives;
diff --git a/gateway/node_modules/@apollo/federation/src/directives.ts b/gateway/node_modules/@apollo/federation/src/directives.ts
deleted file mode 100644
index dfd723c..0000000
--- a/gateway/node_modules/@apollo/federation/src/directives.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-import {
- GraphQLDirective,
- DirectiveLocation,
- GraphQLNonNull,
- GraphQLString,
- GraphQLNamedType,
- isInputObjectType,
- GraphQLInputObjectType,
- DirectiveNode,
- ScalarTypeDefinitionNode,
- ObjectTypeDefinitionNode,
- InterfaceTypeDefinitionNode,
- UnionTypeDefinitionNode,
- EnumTypeDefinitionNode,
- ScalarTypeExtensionNode,
- ObjectTypeExtensionNode,
- InterfaceTypeExtensionNode,
- UnionTypeExtensionNode,
- EnumTypeExtensionNode,
- GraphQLField,
- FieldDefinitionNode,
-} from 'graphql';
-
-export const KeyDirective = new GraphQLDirective({
- name: 'key',
- locations: [DirectiveLocation.OBJECT, DirectiveLocation.INTERFACE],
- args: {
- fields: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const ExtendsDirective = new GraphQLDirective({
- name: 'extends',
- locations: [DirectiveLocation.OBJECT, DirectiveLocation.INTERFACE],
-});
-
-export const ExternalDirective = new GraphQLDirective({
- name: 'external',
- locations: [DirectiveLocation.OBJECT, DirectiveLocation.FIELD_DEFINITION],
-});
-
-export const RequiresDirective = new GraphQLDirective({
- name: 'requires',
- locations: [DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const ProvidesDirective = new GraphQLDirective({
- name: 'provides',
- locations: [DirectiveLocation.FIELD_DEFINITION],
- args: {
- fields: {
- type: GraphQLNonNull(GraphQLString),
- },
- },
-});
-
-export const federationDirectives = [
- KeyDirective,
- ExtendsDirective,
- ExternalDirective,
- RequiresDirective,
- ProvidesDirective,
-];
-
-export default federationDirectives;
-
-export type ASTNodeWithDirectives =
- | ScalarTypeDefinitionNode
- | ObjectTypeDefinitionNode
- | InterfaceTypeDefinitionNode
- | UnionTypeDefinitionNode
- | EnumTypeDefinitionNode
- | ScalarTypeExtensionNode
- | ObjectTypeExtensionNode
- | InterfaceTypeExtensionNode
- | UnionTypeExtensionNode
- | EnumTypeExtensionNode
- | FieldDefinitionNode;
-
-// | GraphQLField
-export type GraphQLNamedTypeWithDirectives = Exclude<
- GraphQLNamedType,
- GraphQLInputObjectType
->;
-
-function hasDirectives(
- node: ASTNodeWithDirectives,
-): node is ASTNodeWithDirectives & {
- directives: ReadonlyArray;
-} {
- return Boolean('directives' in node && node.directives);
-}
-
-export function gatherDirectives(
- type: GraphQLNamedTypeWithDirectives | GraphQLField,
-): DirectiveNode[] {
- let directives: DirectiveNode[] = [];
- if ('extensionASTNodes' in type && type.extensionASTNodes) {
- for (const node of type.extensionASTNodes) {
- if (hasDirectives(node)) {
- directives = directives.concat(node.directives);
- }
- }
- }
-
- if (type.astNode && hasDirectives(type.astNode))
- directives = directives.concat(type.astNode.directives);
-
- return directives;
-}
-
-export function typeIncludesDirective(
- type: GraphQLNamedType,
- directiveName: string,
-): boolean {
- if (isInputObjectType(type)) return false;
- const directives = gatherDirectives(type as GraphQLNamedTypeWithDirectives);
- return directives.some(directive => directive.name.value === directiveName);
-}
diff --git a/gateway/node_modules/@apollo/federation/src/index.ts b/gateway/node_modules/@apollo/federation/src/index.ts
deleted file mode 100644
index 036f8a0..0000000
--- a/gateway/node_modules/@apollo/federation/src/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import "core-js/features/array/flat";
-import "core-js/features/array/flat-map";
-
-export * from './composition';
-export * from './service';
diff --git a/gateway/node_modules/@apollo/federation/src/service/__tests__/buildFederatedSchema.test.ts b/gateway/node_modules/@apollo/federation/src/service/__tests__/buildFederatedSchema.test.ts
deleted file mode 100644
index 3693b1b..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/__tests__/buildFederatedSchema.test.ts
+++ /dev/null
@@ -1,627 +0,0 @@
-import gql from 'graphql-tag';
-import { Kind, graphql, DocumentNode, execute } from 'graphql';
-import { buildFederatedSchema } from '../buildFederatedSchema';
-import { typeSerializer } from '../../snapshotSerializers';
-
-expect.addSnapshotSerializer(typeSerializer);
-
-const EMPTY_DOCUMENT = {
- kind: Kind.DOCUMENT,
- definitions: [],
-};
-
-describe('buildFederatedSchema', () => {
- it(`should mark a type with a key field as an entity`, () => {
- const schema = buildFederatedSchema(gql`
- type Product @key(fields: "upc") {
- upc: String!
- name: String
- price: Int
- }
- `);
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
-type Product {
- upc: String!
- name: String
- price: Int
-}
-`);
-
- expect(schema.getType('_Entity')).toMatchInlineSnapshot(
- `union _Entity = Product`,
- );
- });
-
- it(`should mark a type with multiple key fields as an entity`, () => {
- const schema = buildFederatedSchema(gql`
- type Product @key(fields: "upc") @key(fields: "sku") {
- upc: String!
- sku: String!
- name: String
- price: Int
- }
- `);
-
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
-type Product {
- upc: String!
- sku: String!
- name: String
- price: Int
-}
-`);
-
- expect(schema.getType('_Entity')).toMatchInlineSnapshot(
- `union _Entity = Product`,
- );
- });
-
- it(`should not mark a type without a key field as an entity`, () => {
- const schema = buildFederatedSchema(gql`
- type Money {
- amount: Int!
- currencyCode: String!
- }
- `);
-
- expect(schema.getType('Money')).toMatchInlineSnapshot(`
-type Money {
- amount: Int!
- currencyCode: String!
-}
-`);
- });
-
- it('should preserve description text in generated SDL', async () => {
- const query = `query GetServiceDetails {
- _service {
- sdl
- }
- }`;
- const schema = buildFederatedSchema(gql`
- "A user. This user is very complicated and requires so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so much description text"
- type User @key(fields: "id") {
- """
- The unique ID of the user.
- """
- id: ID!
- "The user's name."
- name: String
- username: String
- foo(
- "Description 1"
- arg1: String
- "Description 2"
- arg2: String
- "Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3"
- arg3: String
- ): String
- }
- `);
-
- const { data, errors } = await graphql(schema, query);
- expect(errors).toBeUndefined();
- expect(data?._service.sdl).toEqual(`"""
-A user. This user is very complicated and requires so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so much description text
-"""
-type User @key(fields: "id") {
- """The unique ID of the user."""
- id: ID!
-
- """The user's name."""
- name: String
- username: String
- foo(
- """Description 1"""
- arg1: String
-
- """Description 2"""
- arg2: String
-
- """
- Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3 Description 3
- """
- arg3: String
- ): String
-}
-`);
- });
-
- describe(`should add an _entities query root field to the schema`, () => {
- it(`when a query root type with the default name has been defined`, () => {
- const schema = buildFederatedSchema(gql`
- type Query {
- rootField: String
- }
- type Product @key(fields: "upc") {
- upc: ID!
- }
- `);
-
- expect(schema.getQueryType()).toMatchInlineSnapshot(`
-type Query {
- _entities(representations: [_Any!]!): [_Entity]!
- _service: _Service!
- rootField: String
-}
-`);
- });
-
- it(`when a query root type with a non-default name has been defined`, () => {
- const schema = buildFederatedSchema(gql`
- schema {
- query: QueryRoot
- }
-
- type QueryRoot {
- rootField: String
- }
- type Product @key(fields: "upc") {
- upc: ID!
- }
- `);
-
- expect(schema.getQueryType()).toMatchInlineSnapshot(`
-type QueryRoot {
- _entities(representations: [_Any!]!): [_Entity]!
- _service: _Service!
- rootField: String
-}
-`);
- });
- });
- describe(`should not add an _entities query root field to the schema`, () => {
- it(`when no query root type has been defined`, () => {
- const schema = buildFederatedSchema(EMPTY_DOCUMENT);
-
- expect(schema.getQueryType()).toMatchInlineSnapshot(`
-type Query {
- _service: _Service!
-}
-`);
- });
- it(`when no types with keys are found`, () => {
- const schema = buildFederatedSchema(gql`
- type Query {
- rootField: String
- }
- `);
-
- expect(schema.getQueryType()).toMatchInlineSnapshot(`
-type Query {
- _service: _Service!
- rootField: String
-}
-`);
- });
- it(`when only an interface with keys are found`, () => {
- const schema = buildFederatedSchema(gql`
- type Query {
- rootField: String
- }
- interface Product @key(fields: "upc") {
- upc: ID!
- }
- `);
-
- expect(schema.getQueryType()).toMatchInlineSnapshot(`
-type Query {
- _service: _Service!
- rootField: String
-}
-`);
- });
- });
- describe('_entities root field', () => {
- it('executes resolveReference for a type if found', async () => {
- const query = `query GetEntities($representations: [_Any!]!) {
- _entities(representations: $representations) {
- ... on Product {
- name
- }
- ... on User {
- firstName
- }
- }
- }`;
-
- const variables = {
- representations: [
- { __typename: 'Product', upc: 1 },
- { __typename: 'User', id: 1 },
- ],
- };
-
- const schema = buildFederatedSchema([
- {
- typeDefs: gql`
- type Product @key(fields: "upc") {
- upc: Int
- name: String
- }
- type User @key(fields: "id") {
- firstName: String
- }
- `,
- resolvers: {
- Product: {
- __resolveReference(object) {
- expect(object.upc).toEqual(1);
- return { name: 'Apollo Gateway' };
- },
- },
- User: {
- __resolveReference(object) {
- expect(object.id).toEqual(1);
- return Promise.resolve({ firstName: 'James' });
- },
- },
- },
- },
- ]);
- const { data, errors } = await graphql(
- schema,
- query,
- null,
- null,
- variables,
- );
- expect(errors).toBeUndefined();
- expect(data._entities[0].name).toEqual('Apollo Gateway');
- expect(data._entities[1].firstName).toEqual('James');
- });
- it('executes resolveReference with default representation values', async () => {
- const query = `query GetEntities($representations: [_Any!]!) {
- _entities(representations: $representations) {
- ... on Product {
- upc
- name
- }
- }
- }`;
-
- const variables = {
- representations: [
- { __typename: 'Product', upc: 1, name: 'Apollo Gateway' },
- ],
- };
-
- const schema = buildFederatedSchema(gql`
- type Product @key(fields: "upc") {
- upc: Int
- name: String
- }
- `);
- const { data, errors } = await graphql(
- schema,
- query,
- null,
- null,
- variables,
- );
- expect(errors).toBeUndefined();
- expect(data._entities[0].name).toEqual('Apollo Gateway');
- });
- });
- describe('_service root field', () => {
- it('keeps extension types when owner type is not present', async () => {
- const query = `query GetServiceDetails {
- _service {
- sdl
- }
- }`;
- const schema = buildFederatedSchema(gql`
- type Review {
- id: ID
- }
-
- extend type Review {
- title: String
- }
-
- extend type Product @key(fields: "upc") {
- upc: String @external
- reviews: [Review]
- }
- `);
-
- const { data, errors } = await graphql(schema, query);
- expect(errors).toBeUndefined();
- expect(data._service.sdl)
- .toEqual(`extend type Product @key(fields: "upc") {
- upc: String @external
- reviews: [Review]
-}
-
-type Review {
- id: ID
- title: String
-}
-`);
- });
- it('keeps extension interface when owner interface is not present', async () => {
- const query = `query GetServiceDetails {
- _service {
- sdl
- }
- }`;
- const schema = buildFederatedSchema(gql`
- type Review {
- id: ID
- }
-
- extend type Review {
- title: String
- }
-
- interface Node @key(fields: "id") {
- id: ID!
- }
-
- extend interface Product @key(fields: "upc") {
- upc: String @external
- reviews: [Review]
- }
- `);
-
- const { data, errors } = await graphql(schema, query);
- expect(errors).toBeUndefined();
- expect(data._service.sdl).toEqual(`interface Node @key(fields: "id") {
- id: ID!
-}
-
-extend interface Product @key(fields: "upc") {
- upc: String @external
- reviews: [Review]
-}
-
-type Review {
- id: ID
- title: String
-}
-`);
- });
- it('returns valid sdl for @key directives', async () => {
- const query = `query GetServiceDetails {
- _service {
- sdl
- }
- }`;
- const schema = buildFederatedSchema(gql`
- type Product @key(fields: "upc") {
- upc: String!
- name: String
- price: Int
- }
- `);
-
- const { data, errors } = await graphql(schema, query);
- expect(errors).toBeUndefined();
- expect(data._service.sdl).toEqual(`type Product @key(fields: "upc") {
- upc: String!
- name: String
- price: Int
-}
-`);
- });
- it('returns valid sdl for multiple @key directives', async () => {
- const query = `query GetServiceDetails {
- _service {
- sdl
- }
- }`;
- const schema = buildFederatedSchema(gql`
- type Product @key(fields: "upc") @key(fields: "name") {
- upc: String!
- name: String
- price: Int
- }
- `);
-
- const { data, errors } = await graphql(schema, query);
- expect(errors).toBeUndefined();
- expect(data._service.sdl)
- .toEqual(`type Product @key(fields: "upc") @key(fields: "name") {
- upc: String!
- name: String
- price: Int
-}
-`);
- });
- it('supports all federation directives', async () => {
- const query = `query GetServiceDetails {
- _service {
- sdl
- }
- }`;
-
- const schema = buildFederatedSchema(gql`
- type Review @key(fields: "id") {
- id: ID!
- body: String
- author: User @provides(fields: "email")
- product: Product @provides(fields: "upc")
- }
-
- extend type User @key(fields: "email") {
- email: String @external
- reviews: [Review]
- }
-
- extend type Product @key(fields: "upc") {
- upc: String @external
- reviews: [Review]
- }
- `);
-
- const { data, errors } = await graphql(schema, query);
- expect(errors).toBeUndefined();
- expect(data._service.sdl)
- .toEqual(`extend type Product @key(fields: "upc") {
- upc: String @external
- reviews: [Review]
-}
-
-type Review @key(fields: "id") {
- id: ID!
- body: String
- author: User @provides(fields: "email")
- product: Product @provides(fields: "upc")
-}
-
-extend type User @key(fields: "email") {
- email: String @external
- reviews: [Review]
-}
-`);
- });
- it('keeps custom directives', async () => {
- const query = `query GetServiceDetails {
- _service {
- sdl
- }
- }`;
-
- const schema = buildFederatedSchema(gql`
- directive @custom on FIELD
-
- extend type User @key(fields: "email") {
- email: String @external
- }
- `);
-
- const { data, errors } = await graphql(schema, query);
- expect(errors).toBeUndefined();
- expect(data._service.sdl).toEqual(`directive @custom on FIELD
-
-extend type User @key(fields: "email") {
- email: String @external
-}
-`);
- });
- });
-});
-
-describe('legacy interface', () => {
- const resolvers = {
- Query: {
- product: () => ({}),
- },
- Product: {
- upc: () => '1234',
- price: () => 10,
- },
- };
- const typeDefs: DocumentNode[] = [
- gql`
- type Query {
- product: Product
- }
- type Product @key(fields: "upc") {
- upc: String!
- name: String
- }
- `,
- gql`
- extend type Product {
- price: Int
- }
- `,
- ];
- it('allows legacy schema module interface as an input with an array of typeDefs and resolvers', async () => {
- const schema = buildFederatedSchema({ typeDefs, resolvers });
- expect(schema.getType('_Entity')).toMatchInlineSnapshot(
- `union _Entity = Product`,
- );
- expect(
- await execute(
- schema,
- gql`
- {
- product {
- price
- upc
- }
- }
- `,
- ),
- ).toEqual({
- data: {
- product: { upc: '1234', price: 10 },
- },
- });
- });
- it('allows legacy schema module interface as a single module', async () => {
- const schema = buildFederatedSchema({
- typeDefs: gql`
- type Query {
- product: Product
- }
- type Product @key(fields: "upc") {
- upc: String!
- name: String
- price: Int
- }
- `,
- resolvers,
- });
- expect(schema.getType('_Entity')).toMatchInlineSnapshot(
- `union _Entity = Product`,
- );
- expect(
- await execute(
- schema,
- gql`
- {
- product {
- price
- upc
- }
- }
- `,
- ),
- ).toEqual({
- data: {
- product: { upc: '1234', price: 10 },
- },
- });
- });
- it('allows legacy schema module interface as a single module without resolvers', async () => {
- const schema = buildFederatedSchema({
- typeDefs: gql`
- type Query {
- product: Product
- }
- type Product @key(fields: "upc") {
- upc: String!
- name: String
- price: Int
- }
- `,
- });
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
-type Product {
- upc: String!
- name: String
- price: Int
-}
-`);
- expect(schema.getType('_Entity')).toMatchInlineSnapshot(
- `union _Entity = Product`,
- );
- });
- it('allows legacy schema module interface as a simple array of documents', async () => {
- const schema = buildFederatedSchema({ typeDefs });
- expect(schema.getType('Product')).toMatchInlineSnapshot(`
-type Product {
- upc: String!
- name: String
- price: Int
-}
-`);
- expect(schema.getType('_Entity')).toMatchInlineSnapshot(
- `union _Entity = Product`,
- );
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/service/__tests__/printComposedSdl.test.ts b/gateway/node_modules/@apollo/federation/src/service/__tests__/printComposedSdl.test.ts
deleted file mode 100644
index 2d45b62..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/__tests__/printComposedSdl.test.ts
+++ /dev/null
@@ -1,311 +0,0 @@
-import { fixtures } from 'apollo-federation-integration-testsuite';
-import { composeAndValidate } from '../../composition';
-import { parse, GraphQLError, visit, StringValueNode } from 'graphql';
-
-describe('printComposedSdl', () => {
- let composedSdl: string | undefined, errors: GraphQLError[];
-
- beforeAll(() => {
- // composeAndValidate calls `printComposedSdl` to return `composedSdl`
- ({ composedSdl, errors } = composeAndValidate(fixtures));
- });
-
- it('composes without errors', () => {
- expect(errors).toHaveLength(0);
- });
-
- it('produces a parseable output', () => {
- expect(() => parse(composedSdl!)).not.toThrow();
- })
-
- it('prints a fully composed schema correctly', () => {
- expect(composedSdl).toMatchInlineSnapshot(`
- "schema
- @graph(name: \\"accounts\\", url: \\"https://accounts.api.com\\")
- @graph(name: \\"books\\", url: \\"https://books.api.com\\")
- @graph(name: \\"documents\\", url: \\"https://documents.api.com\\")
- @graph(name: \\"inventory\\", url: \\"https://inventory.api.com\\")
- @graph(name: \\"product\\", url: \\"https://product.api.com\\")
- @graph(name: \\"reviews\\", url: \\"https://reviews.api.com\\")
- @composedGraph(version: 1)
- {
- query: Query
- mutation: Mutation
- }
-
- directive @composedGraph(version: Int!) on SCHEMA
-
- directive @graph(name: String!, url: String!) on SCHEMA
-
- directive @owner(graph: String!) on OBJECT
-
- directive @key(fields: String!, graph: String!) on OBJECT
-
- directive @resolve(graph: String!) on FIELD_DEFINITION
-
- directive @provides(fields: String!) on FIELD_DEFINITION
-
- directive @requires(fields: String!) on FIELD_DEFINITION
-
- directive @stream on FIELD
-
- directive @transform(from: String!) on FIELD
-
- union AccountType = PasswordAccount | SMSAccount
-
- type Amazon {
- referrer: String
- }
-
- union Body = Image | Text
-
- type Book implements Product
- @owner(graph: \\"books\\")
- @key(fields: \\"{ isbn }\\", graph: \\"books\\")
- @key(fields: \\"{ isbn }\\", graph: \\"inventory\\")
- @key(fields: \\"{ isbn }\\", graph: \\"product\\")
- @key(fields: \\"{ isbn }\\", graph: \\"reviews\\")
- {
- isbn: String!
- title: String
- year: Int
- similarBooks: [Book]!
- metadata: [MetadataOrError]
- inStock: Boolean @resolve(graph: \\"inventory\\")
- isCheckedOut: Boolean @resolve(graph: \\"inventory\\")
- upc: String! @resolve(graph: \\"product\\")
- sku: String! @resolve(graph: \\"product\\")
- name(delimeter: String = \\" \\"): String @resolve(graph: \\"product\\") @requires(fields: \\"{ title year }\\")
- price: String @resolve(graph: \\"product\\")
- details: ProductDetailsBook @resolve(graph: \\"product\\")
- reviews: [Review] @resolve(graph: \\"reviews\\")
- relatedReviews: [Review!]! @resolve(graph: \\"reviews\\") @requires(fields: \\"{ similarBooks { isbn } }\\")
- }
-
- union Brand = Ikea | Amazon
-
- type Car implements Vehicle
- @owner(graph: \\"product\\")
- @key(fields: \\"{ id }\\", graph: \\"product\\")
- @key(fields: \\"{ id }\\", graph: \\"reviews\\")
- {
- id: String!
- description: String
- price: String
- retailPrice: String @resolve(graph: \\"reviews\\") @requires(fields: \\"{ price }\\")
- }
-
- type Error {
- code: Int
- message: String
- }
-
- type Furniture implements Product
- @owner(graph: \\"product\\")
- @key(fields: \\"{ upc }\\", graph: \\"product\\")
- @key(fields: \\"{ sku }\\", graph: \\"product\\")
- @key(fields: \\"{ sku }\\", graph: \\"inventory\\")
- @key(fields: \\"{ upc }\\", graph: \\"reviews\\")
- {
- upc: String!
- sku: String!
- name: String
- price: String
- brand: Brand
- metadata: [MetadataOrError]
- details: ProductDetailsFurniture
- inStock: Boolean @resolve(graph: \\"inventory\\")
- isHeavy: Boolean @resolve(graph: \\"inventory\\")
- reviews: [Review] @resolve(graph: \\"reviews\\")
- }
-
- type Ikea {
- asile: Int
- }
-
- type Image {
- name: String!
- attributes: ImageAttributes!
- }
-
- type ImageAttributes {
- url: String!
- }
-
- type KeyValue {
- key: String!
- value: String!
- }
-
- type Library
- @owner(graph: \\"books\\")
- @key(fields: \\"{ id }\\", graph: \\"books\\")
- @key(fields: \\"{ id }\\", graph: \\"accounts\\")
- {
- id: ID!
- name: String
- userAccount(id: ID! = 1): User @resolve(graph: \\"accounts\\") @requires(fields: \\"{ name }\\")
- }
-
- union MetadataOrError = KeyValue | Error
-
- type Mutation {
- login(username: String!, password: String!): User @resolve(graph: \\"accounts\\")
- reviewProduct(upc: String!, body: String!): Product @resolve(graph: \\"reviews\\")
- updateReview(review: UpdateReviewInput!): Review @resolve(graph: \\"reviews\\")
- deleteReview(id: ID!): Boolean @resolve(graph: \\"reviews\\")
- }
-
- type Name {
- first: String
- last: String
- }
-
- type PasswordAccount
- @owner(graph: \\"accounts\\")
- @key(fields: \\"{ email }\\", graph: \\"accounts\\")
- {
- email: String!
- }
-
- interface Product {
- upc: String!
- sku: String!
- name: String
- price: String
- details: ProductDetails
- inStock: Boolean
- reviews: [Review]
- }
-
- interface ProductDetails {
- country: String
- }
-
- type ProductDetailsBook implements ProductDetails {
- country: String
- pages: Int
- }
-
- type ProductDetailsFurniture implements ProductDetails {
- country: String
- color: String
- }
-
- type Query {
- user(id: ID!): User @resolve(graph: \\"accounts\\")
- me: User @resolve(graph: \\"accounts\\")
- book(isbn: String!): Book @resolve(graph: \\"books\\")
- books: [Book] @resolve(graph: \\"books\\")
- library(id: ID!): Library @resolve(graph: \\"books\\")
- body: Body! @resolve(graph: \\"documents\\")
- product(upc: String!): Product @resolve(graph: \\"product\\")
- vehicle(id: String!): Vehicle @resolve(graph: \\"product\\")
- topProducts(first: Int = 5): [Product] @resolve(graph: \\"product\\")
- topCars(first: Int = 5): [Car] @resolve(graph: \\"product\\")
- topReviews(first: Int = 5): [Review] @resolve(graph: \\"reviews\\")
- }
-
- type Review
- @owner(graph: \\"reviews\\")
- @key(fields: \\"{ id }\\", graph: \\"reviews\\")
- {
- id: ID!
- body(format: Boolean = false): String
- author: User @provides(fields: \\"{ username }\\")
- product: Product
- metadata: [MetadataOrError]
- }
-
- type SMSAccount
- @owner(graph: \\"accounts\\")
- @key(fields: \\"{ number }\\", graph: \\"accounts\\")
- {
- number: String
- }
-
- type Text {
- name: String!
- attributes: TextAttributes!
- }
-
- type TextAttributes {
- bold: Boolean
- text: String
- }
-
- union Thing = Car | Ikea
-
- input UpdateReviewInput {
- id: ID!
- body: String
- }
-
- type User
- @owner(graph: \\"accounts\\")
- @key(fields: \\"{ id }\\", graph: \\"accounts\\")
- @key(fields: \\"{ username name { first last } }\\", graph: \\"accounts\\")
- @key(fields: \\"{ id }\\", graph: \\"inventory\\")
- @key(fields: \\"{ id }\\", graph: \\"product\\")
- @key(fields: \\"{ id }\\", graph: \\"reviews\\")
- {
- id: ID!
- name: Name
- username: String
- birthDate(locale: String): String
- account: AccountType
- metadata: [UserMetadata]
- goodDescription: Boolean @resolve(graph: \\"inventory\\") @requires(fields: \\"{ metadata { description } }\\")
- vehicle: Vehicle @resolve(graph: \\"product\\")
- thing: Thing @resolve(graph: \\"product\\")
- reviews: [Review] @resolve(graph: \\"reviews\\")
- numberOfReviews: Int! @resolve(graph: \\"reviews\\")
- goodAddress: Boolean @resolve(graph: \\"reviews\\") @requires(fields: \\"{ metadata { address } }\\")
- }
-
- type UserMetadata {
- name: String
- address: String
- description: String
- }
-
- type Van implements Vehicle
- @owner(graph: \\"product\\")
- @key(fields: \\"{ id }\\", graph: \\"product\\")
- @key(fields: \\"{ id }\\", graph: \\"reviews\\")
- {
- id: String!
- description: String
- price: String
- retailPrice: String @resolve(graph: \\"reviews\\") @requires(fields: \\"{ price }\\")
- }
-
- interface Vehicle {
- id: String!
- description: String
- price: String
- retailPrice: String
- }
- "
- `);
- });
-
- it('fieldsets are parseable', () => {
- const parsedCsdl = parse(composedSdl!);
- const fieldSets: string[] = [];
-
- // Collect all args with the 'fields' name (from @key, @provides, @requires directives)
- visit(parsedCsdl, {
- Argument(node) {
- if (node.name.value === 'fields') {
- fieldSets.push((node.value as StringValueNode).value);
- }
- },
- });
-
- // Ensure each found 'fields' arg is graphql parseable
- fieldSets.forEach((unparsed) => {
- expect(() => parse(unparsed)).not.toThrow();
- });
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/service/__tests__/printFederatedSchema.test.ts b/gateway/node_modules/@apollo/federation/src/service/__tests__/printFederatedSchema.test.ts
deleted file mode 100644
index b0eddad..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/__tests__/printFederatedSchema.test.ts
+++ /dev/null
@@ -1,216 +0,0 @@
-import { fixtures } from 'apollo-federation-integration-testsuite';
-import { composeAndValidate } from '../../composition';
-import { printSchema } from '../printFederatedSchema';
-
-describe('printFederatedSchema', () => {
- const { schema, errors } = composeAndValidate(fixtures);
-
- it('composes without errors', () => {
- expect(errors).toHaveLength(0);
- });
-
- it('prints a fully composed schema correctly', () => {
- expect(printSchema(schema)).toMatchInlineSnapshot(`
- "directive @stream on FIELD
-
- directive @transform(from: String!) on FIELD
-
- union AccountType = PasswordAccount | SMSAccount
-
- type Amazon {
- referrer: String
- }
-
- union Body = Image | Text
-
- type Book implements Product @key(fields: \\"isbn\\") {
- isbn: String!
- title: String
- year: Int
- similarBooks: [Book]!
- metadata: [MetadataOrError]
- inStock: Boolean
- isCheckedOut: Boolean
- upc: String!
- sku: String!
- name(delimeter: String = \\" \\"): String @requires(fields: \\"title year\\")
- price: String
- details: ProductDetailsBook
- reviews: [Review]
- relatedReviews: [Review!]! @requires(fields: \\"similarBooks { isbn }\\")
- }
-
- union Brand = Ikea | Amazon
-
- type Car implements Vehicle @key(fields: \\"id\\") {
- id: String!
- description: String
- price: String
- retailPrice: String @requires(fields: \\"price\\")
- }
-
- type Error {
- code: Int
- message: String
- }
-
- type Furniture implements Product @key(fields: \\"sku\\") @key(fields: \\"upc\\") {
- upc: String!
- sku: String!
- name: String
- price: String
- brand: Brand
- metadata: [MetadataOrError]
- details: ProductDetailsFurniture
- inStock: Boolean
- isHeavy: Boolean
- reviews: [Review]
- }
-
- type Ikea {
- asile: Int
- }
-
- type Image {
- name: String!
- attributes: ImageAttributes!
- }
-
- type ImageAttributes {
- url: String!
- }
-
- type KeyValue {
- key: String!
- value: String!
- }
-
- type Library @key(fields: \\"id\\") {
- id: ID!
- name: String
- userAccount(id: ID! = 1): User @requires(fields: \\"name\\")
- }
-
- union MetadataOrError = KeyValue | Error
-
- type Mutation {
- login(username: String!, password: String!): User
- reviewProduct(upc: String!, body: String!): Product
- updateReview(review: UpdateReviewInput!): Review
- deleteReview(id: ID!): Boolean
- }
-
- type Name {
- first: String
- last: String
- }
-
- type PasswordAccount @key(fields: \\"email\\") {
- email: String!
- }
-
- interface Product {
- upc: String!
- sku: String!
- name: String
- price: String
- details: ProductDetails
- inStock: Boolean
- reviews: [Review]
- }
-
- interface ProductDetails {
- country: String
- }
-
- type ProductDetailsBook implements ProductDetails {
- country: String
- pages: Int
- }
-
- type ProductDetailsFurniture implements ProductDetails {
- country: String
- color: String
- }
-
- type Query {
- user(id: ID!): User
- me: User
- book(isbn: String!): Book
- books: [Book]
- library(id: ID!): Library
- body: Body!
- product(upc: String!): Product
- vehicle(id: String!): Vehicle
- topProducts(first: Int = 5): [Product]
- topCars(first: Int = 5): [Car]
- topReviews(first: Int = 5): [Review]
- }
-
- type Review @key(fields: \\"id\\") {
- id: ID!
- body(format: Boolean = false): String
- author: User @provides(fields: \\"username\\")
- product: Product
- metadata: [MetadataOrError]
- }
-
- type SMSAccount @key(fields: \\"number\\") {
- number: String
- }
-
- type Text {
- name: String!
- attributes: TextAttributes!
- }
-
- type TextAttributes {
- bold: Boolean
- text: String
- }
-
- union Thing = Car | Ikea
-
- input UpdateReviewInput {
- id: ID!
- body: String
- }
-
- type User @key(fields: \\"id\\") @key(fields: \\"username name { first last }\\") {
- id: ID!
- name: Name
- username: String
- birthDate(locale: String): String
- account: AccountType
- metadata: [UserMetadata]
- goodDescription: Boolean @requires(fields: \\"metadata { description }\\")
- vehicle: Vehicle
- thing: Thing
- reviews: [Review]
- numberOfReviews: Int!
- goodAddress: Boolean @requires(fields: \\"metadata { address }\\")
- }
-
- type UserMetadata {
- name: String
- address: String
- description: String
- }
-
- type Van implements Vehicle @key(fields: \\"id\\") {
- id: String!
- description: String
- price: String
- retailPrice: String @requires(fields: \\"price\\")
- }
-
- interface Vehicle {
- id: String!
- description: String
- price: String
- retailPrice: String
- }
- "
- `);
- });
-});
diff --git a/gateway/node_modules/@apollo/federation/src/service/__tests__/tsconfig.json b/gateway/node_modules/@apollo/federation/src/service/__tests__/tsconfig.json
deleted file mode 100644
index 4a7651f..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/__tests__/tsconfig.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "extends": "../../../../tsconfig.test.base",
- "include": ["**/*"],
- "references": [{ "path": "../../../" }]
-}
diff --git a/gateway/node_modules/@apollo/federation/src/service/buildFederatedSchema.ts b/gateway/node_modules/@apollo/federation/src/service/buildFederatedSchema.ts
deleted file mode 100644
index 16481e0..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/buildFederatedSchema.ts
+++ /dev/null
@@ -1,134 +0,0 @@
-import {
- DocumentNode,
- GraphQLSchema,
- isObjectType,
- isUnionType,
- GraphQLUnionType,
- GraphQLObjectType,
- specifiedDirectives,
-} from 'graphql';
-import {
- buildSchemaFromSDL,
- transformSchema,
- GraphQLSchemaModule,
- modulesFromSDL,
- addResolversToSchema,
- GraphQLResolverMap,
-} from 'apollo-graphql';
-import federationDirectives, { typeIncludesDirective } from '../directives';
-
-import { serviceField, entitiesField, EntityType } from '../types';
-
-import { printSchema } from './printFederatedSchema';
-
-import 'apollo-server-env';
-
-type LegacySchemaModule = {
- typeDefs: DocumentNode | DocumentNode[];
- resolvers?: GraphQLResolverMap;
-};
-
-export function buildFederatedSchema(
- modulesOrSDL:
- | (GraphQLSchemaModule | DocumentNode)[]
- | DocumentNode
- | LegacySchemaModule,
-): GraphQLSchema {
- // ApolloServer supports passing an array of DocumentNode along with a single
- // map of resolvers to build a schema. Long term we don't want to support this
- // style anymore as we move towards a more structured approach to modules,
- // however, it has tripped several teams up to not support this signature
- // in buildFederatedSchema. Especially as teams migrate from
- // `new ApolloServer({ typeDefs: DocumentNode[], resolvers })` to
- // `new ApolloServer({ schema: buildFederatedSchema({ typeDefs: DocumentNode[], resolvers }) })`
- //
- // The last type in the union for `modulesOrSDL` supports this "legacy" input
- // style in a simple manner (by just adding the resolvers to the first typeDefs entry)
- //
- let shapedModulesOrSDL: (GraphQLSchemaModule | DocumentNode)[] | DocumentNode;
- if ('typeDefs' in modulesOrSDL) {
- const { typeDefs, resolvers } = modulesOrSDL;
- const augmentedTypeDefs = Array.isArray(typeDefs) ? typeDefs : [typeDefs];
- shapedModulesOrSDL = augmentedTypeDefs.map((typeDefs, i) => {
- const module: GraphQLSchemaModule = { typeDefs };
- // add the resolvers to the first "module" in the array
- if (i === 0 && resolvers) module.resolvers = resolvers;
- return module;
- });
- } else {
- shapedModulesOrSDL = modulesOrSDL;
- }
-
- const modules = modulesFromSDL(shapedModulesOrSDL);
-
- let schema = buildSchemaFromSDL(
- modules,
- new GraphQLSchema({
- query: undefined,
- directives: [...specifiedDirectives, ...federationDirectives],
- }),
- );
-
- // At this point in time, we have a schema to be printed into SDL which is
- // representative of what the user defined for their schema. This is before
- // we process any of the federation directives and add custom federation types
- // so its the right place to create our service definition sdl.
- //
- // We have to use a modified printSchema from graphql-js which includes
- // support for preserving the *uses* of federation directives while removing
- // their *definitions* from the sdl.
- const sdl = printSchema(schema);
-
- // Add an empty query root type if none has been defined
- if (!schema.getQueryType()) {
- schema = new GraphQLSchema({
- ...schema.toConfig(),
- query: new GraphQLObjectType({
- name: 'Query',
- fields: {},
- }),
- });
- }
-
- const entityTypes = Object.values(schema.getTypeMap()).filter(
- type => isObjectType(type) && typeIncludesDirective(type, 'key'),
- );
- const hasEntities = entityTypes.length > 0;
-
- schema = transformSchema(schema, type => {
- // Add `_entities` and `_service` fields to query root type
- if (isObjectType(type) && type === schema.getQueryType()) {
- const config = type.toConfig();
- return new GraphQLObjectType({
- ...config,
- fields: {
- ...(hasEntities && { _entities: entitiesField }),
- _service: {
- ...serviceField,
- resolve: () => ({ sdl }),
- },
- ...config.fields,
- },
- });
- }
-
- return undefined;
- });
-
- schema = transformSchema(schema, type => {
- if (hasEntities && isUnionType(type) && type.name === EntityType.name) {
- return new GraphQLUnionType({
- ...EntityType.toConfig(),
- types: entityTypes.filter(isObjectType),
- });
- }
- return undefined;
- });
-
- for (const module of modules) {
- if (!module.resolvers) continue;
- addResolversToSchema(schema, module.resolvers);
- }
-
- return schema;
-}
diff --git a/gateway/node_modules/@apollo/federation/src/service/index.ts b/gateway/node_modules/@apollo/federation/src/service/index.ts
deleted file mode 100644
index c8cfc97..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './buildFederatedSchema';
-export * from './printFederatedSchema';
diff --git a/gateway/node_modules/@apollo/federation/src/service/printComposedSdl.ts b/gateway/node_modules/@apollo/federation/src/service/printComposedSdl.ts
deleted file mode 100644
index 3ed6f94..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/printComposedSdl.ts
+++ /dev/null
@@ -1,514 +0,0 @@
-import {
- GraphQLSchema,
- isSpecifiedDirective,
- isIntrospectionType,
- isSpecifiedScalarType,
- GraphQLNamedType,
- GraphQLDirective,
- isScalarType,
- isObjectType,
- isInterfaceType,
- isUnionType,
- isEnumType,
- isInputObjectType,
- GraphQLScalarType,
- GraphQLObjectType,
- GraphQLInterfaceType,
- GraphQLUnionType,
- GraphQLEnumType,
- GraphQLInputObjectType,
- GraphQLArgument,
- GraphQLInputField,
- astFromValue,
- print,
- GraphQLField,
- GraphQLEnumValue,
- GraphQLString,
- DEFAULT_DEPRECATION_REASON,
- ASTNode,
- SelectionNode,
-} from 'graphql';
-import { Maybe, ServiceDefinition, FederationType, FederationField } from '../composition';
-import { isFederationType } from '../types';
-import { isFederationDirective } from '../composition/utils';
-import csdlDirectives from '../csdlDirectives';
-
-type Options = {
- /**
- * Descriptions are defined as preceding string literals, however an older
- * experimental version of the SDL supported preceding comments as
- * descriptions. Set to true to enable this deprecated behavior.
- * This option is provided to ease adoption and will be removed in v16.
- *
- * Default: false
- */
- commentDescriptions?: boolean;
-};
-
-/**
- * Accepts options as a second argument:
- *
- * - commentDescriptions:
- * Provide true to use preceding comments as the description.
- *
- */
-export function printComposedSdl(
- schema: GraphQLSchema,
- serviceList: ServiceDefinition[],
- options?: Options,
-): string {
- return printFilteredSchema(
- schema,
- // Federation change: we need service and url information for the @graph directives
- serviceList,
- // Federation change: treat the directives defined by the federation spec
- // similarly to the directives defined by the GraphQL spec (ie, don't print
- // their definitions).
- (n) => !isSpecifiedDirective(n) && !isFederationDirective(n),
- isDefinedType,
- options,
- );
-}
-
-export function printIntrospectionSchema(
- schema: GraphQLSchema,
- options?: Options,
-): string {
- return printFilteredSchema(
- schema,
- [],
- isSpecifiedDirective,
- isIntrospectionType,
- options,
- );
-}
-
-// Federation change: treat the types defined by the federation spec
-// similarly to the directives defined by the GraphQL spec (ie, don't print
-// their definitions).
-function isDefinedType(type: GraphQLNamedType): boolean {
- return (
- !isSpecifiedScalarType(type) &&
- !isIntrospectionType(type) &&
- !isFederationType(type)
- );
-}
-
-function printFilteredSchema(
- schema: GraphQLSchema,
- // Federation change: we need service and url information for the @graph directives
- serviceList: ServiceDefinition[],
- directiveFilter: (type: GraphQLDirective) => boolean,
- typeFilter: (type: GraphQLNamedType) => boolean,
- options?: Options,
-): string {
- // Federation change: include directive definitions for CSDL
- const directives = [
- ...csdlDirectives,
- ...schema.getDirectives().filter(directiveFilter),
- ];
- const types = Object.values(schema.getTypeMap())
- .sort((type1, type2) => type1.name.localeCompare(type2.name))
- .filter(typeFilter);
-
- return (
- [printSchemaDefinition(schema, serviceList)]
- .concat(
- directives.map(directive => printDirective(directive, options)),
- types.map(type => printType(type, options)),
- )
- .filter(Boolean)
- .join('\n\n') + '\n'
- );
-}
-
-function printSchemaDefinition(
- schema: GraphQLSchema,
- serviceList: ServiceDefinition[],
-): string | undefined {
- const operationTypes = [];
-
- const queryType = schema.getQueryType();
- if (queryType) {
- operationTypes.push(` query: ${queryType.name}`);
- }
-
- const mutationType = schema.getMutationType();
- if (mutationType) {
- operationTypes.push(` mutation: ${mutationType.name}`);
- }
-
- const subscriptionType = schema.getSubscriptionType();
- if (subscriptionType) {
- operationTypes.push(` subscription: ${subscriptionType.name}`);
- }
-
- return (
- 'schema' +
- // Federation change: print @graph and @composedGraph schema directives
- printFederationSchemaDirectives(serviceList) +
- `\n{\n${operationTypes.join('\n')}\n}`
- );
-}
-
-function printFederationSchemaDirectives(serviceList: ServiceDefinition[]) {
- return (
- serviceList.map(service => `\n @graph(name: "${service.name}", url: "${service.url}")`).join('') +
- `\n @composedGraph(version: 1)`
- );
-}
-
-export function printType(type: GraphQLNamedType, options?: Options): string {
- if (isScalarType(type)) {
- return printScalar(type, options);
- } else if (isObjectType(type)) {
- return printObject(type, options);
- } else if (isInterfaceType(type)) {
- return printInterface(type, options);
- } else if (isUnionType(type)) {
- return printUnion(type, options);
- } else if (isEnumType(type)) {
- return printEnum(type, options);
- } else if (isInputObjectType(type)) {
- return printInputObject(type, options);
- }
-
- throw Error('Unexpected type: ' + (type as GraphQLNamedType).toString());
-}
-
-function printScalar(type: GraphQLScalarType, options?: Options): string {
- return printDescription(options, type) + `scalar ${type.name}`;
-}
-
-function printObject(type: GraphQLObjectType, options?: Options): string {
- const interfaces = type.getInterfaces();
- const implementedInterfaces = interfaces.length
- ? ' implements ' + interfaces.map(i => i.name).join(' & ')
- : '';
-
- // Federation change: print `extend` keyword on type extensions.
- //
- // The implementation assumes that an owned type will have fields defined
- // since that is required for a valid schema. Types that are *only*
- // extensions will not have fields on the astNode since that ast doesn't
- // exist.
- //
- // XXX revist extension checking
- const isExtension =
- type.extensionASTNodes && type.astNode && !type.astNode.fields;
-
- return (
- printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `type ${type.name}` +
- implementedInterfaces +
- // Federation addition for printing @owner and @key usages
- printFederationTypeDirectives(type) +
- printFields(options, type)
- );
-}
-
-// Federation change: print usages of the @owner and @key directives.
-function printFederationTypeDirectives(type: GraphQLObjectType): string {
- const metadata: FederationType = type.extensions?.federation;
- if (!metadata) return '';
-
- const { serviceName: ownerService, keys } = metadata;
- if (!ownerService || !keys) return '';
-
- // Separate owner @keys from the rest of the @keys so we can print them
- // adjacent to the @owner directive.
- const { [ownerService]: ownerKeys, ...restKeys } = keys
- const ownerEntry: [string, (readonly SelectionNode[])[]] = [ownerService, ownerKeys];
- const restEntries = Object.entries(restKeys);
-
- return (
- `\n @owner(graph: "${ownerService}")` +
- [ownerEntry, ...restEntries].map(([service, keys]) =>
- keys
- .map(
- (selections) =>
- `\n @key(fields: "${printFieldSet(selections)}", graph: "${service}")`,
- )
- .join(''),
- )
- .join('')
- );
-}
-
-function printInterface(type: GraphQLInterfaceType, options?: Options): string {
- // Federation change: print `extend` keyword on type extensions.
- // See printObject for assumptions made.
- //
- // XXX revist extension checking
- const isExtension =
- type.extensionASTNodes && type.astNode && !type.astNode.fields;
-
- return (
- printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `interface ${type.name}` +
- printFields(options, type)
- );
-}
-
-function printUnion(type: GraphQLUnionType, options?: Options): string {
- const types = type.getTypes();
- const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
- return printDescription(options, type) + 'union ' + type.name + possibleTypes;
-}
-
-function printEnum(type: GraphQLEnumType, options?: Options): string {
- const values = type
- .getValues()
- .map(
- (value, i) =>
- printDescription(options, value, ' ', !i) +
- ' ' +
- value.name +
- printDeprecated(value),
- );
-
- return (
- printDescription(options, type) + `enum ${type.name}` + printBlock(values)
- );
-}
-
-function printInputObject(
- type: GraphQLInputObjectType,
- options?: Options,
-): string {
- const fields = Object.values(type.getFields()).map(
- (f, i) =>
- printDescription(options, f, ' ', !i) + ' ' + printInputValue(f),
- );
- return (
- printDescription(options, type) + `input ${type.name}` + printBlock(fields)
- );
-}
-
-function printFields(
- options: Options | undefined,
- type: GraphQLObjectType | GraphQLInterfaceType,
-) {
-
- const fields = Object.values(type.getFields()).map(
- (f, i) =>
- printDescription(options, f, ' ', !i) +
- ' ' +
- f.name +
- printArgs(options, f.args, ' ') +
- ': ' +
- String(f.type) +
- printDeprecated(f) +
- printFederationFieldDirectives(f, type),
- );
-
- // Federation change: for entities, we want to print the block on a new line.
- // This is just a formatting nice-to-have.
- const isEntity = Boolean(type.extensions?.federation?.keys);
-
- return printBlock(fields, isEntity);
-}
-
-export function printWithReducedWhitespace(ast: ASTNode): string {
- return print(ast)
- .replace(/\s+/g, ' ')
- .trim();
-}
-
-/**
- * Federation change: print fieldsets for @key, @requires, and @provides directives
- *
- * @param selections
- */
-function printFieldSet(selections: readonly SelectionNode[]): string {
- return `{ ${selections.map(printWithReducedWhitespace).join(' ')} }`;
-}
-
-/**
- * Federation change: print @resolve, @requires, and @provides directives
- *
- * @param field
- * @param parentType
- */
-function printFederationFieldDirectives(
- field: GraphQLField,
- parentType: GraphQLObjectType | GraphQLInterfaceType,
-): string {
- if (!field.extensions?.federation) return '';
-
- const {
- serviceName,
- requires = [],
- provides = [],
- }: FederationField = field.extensions.federation;
-
- let printed = '';
- // If a `serviceName` exists, we only want to print a `@resolve` directive
- // if the `serviceName` differs from the `parentType`'s `serviceName`
- if (
- serviceName &&
- serviceName !== parentType.extensions?.federation?.serviceName
- ) {
- printed += ` @resolve(graph: "${serviceName}")`;
- }
-
- if (requires.length > 0) {
- printed += ` @requires(fields: "${printFieldSet(requires)}")`;
- }
-
- if (provides.length > 0) {
- printed += ` @provides(fields: "${printFieldSet(provides)}")`;
- }
-
- return printed;
-}
-
-// Federation change: `onNewLine` is a formatting nice-to-have for printing
-// types that have a list of directives attached, i.e. an entity.
-function printBlock(items: string[], onNewLine?: boolean) {
- return items.length !== 0
- ? onNewLine
- ? '\n{\n' + items.join('\n') + '\n}'
- : ' {\n' + items.join('\n') + '\n}'
- : '';
-}
-
-function printArgs(
- options: Options | undefined,
- args: GraphQLArgument[],
- indentation = '',
-) {
- if (args.length === 0) {
- return '';
- }
-
- // If every arg does not have a description, print them on one line.
- if (args.every((arg) => !arg.description)) {
- return '(' + args.map(printInputValue).join(', ') + ')';
- }
-
- return (
- '(\n' +
- args
- .map(
- (arg, i) =>
- printDescription(options, arg, ' ' + indentation, !i) +
- ' ' +
- indentation +
- printInputValue(arg),
- )
- .join('\n') +
- '\n' +
- indentation +
- ')'
- );
-}
-
-function printInputValue(arg: GraphQLInputField) {
- const defaultAST = astFromValue(arg.defaultValue, arg.type);
- let argDecl = arg.name + ': ' + String(arg.type);
- if (defaultAST) {
- argDecl += ` = ${print(defaultAST)}`;
- }
- return argDecl;
-}
-
-function printDirective(directive: GraphQLDirective, options?: Options) {
- return (
- printDescription(options, directive) +
- 'directive @' +
- directive.name +
- printArgs(options, directive.args) +
- (directive.isRepeatable ? ' repeatable' : '') +
- ' on ' +
- directive.locations.join(' | ')
- );
-}
-
-function printDeprecated(
- fieldOrEnumVal: GraphQLField | GraphQLEnumValue,
-) {
- if (!fieldOrEnumVal.isDeprecated) {
- return '';
- }
- const reason = fieldOrEnumVal.deprecationReason;
- const reasonAST = astFromValue(reason, GraphQLString);
- if (reasonAST && reason !== DEFAULT_DEPRECATION_REASON) {
- return ' @deprecated(reason: ' + print(reasonAST) + ')';
- }
- return ' @deprecated';
-}
-
-function printDescription }>(
- options: Options | undefined,
- def: T,
- indentation = '',
- firstInBlock = true,
-): string {
- const { description } = def;
- if (description == null) {
- return '';
- }
-
- if (options?.commentDescriptions === true) {
- return printDescriptionWithComments(description, indentation, firstInBlock);
- }
-
- const preferMultipleLines = description.length > 70;
- const blockString = printBlockString(description, '', preferMultipleLines);
- const prefix =
- indentation && !firstInBlock ? '\n' + indentation : indentation;
-
- return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
-}
-
-function printDescriptionWithComments(
- description: string,
- indentation: string,
- firstInBlock: boolean,
-) {
- const prefix = indentation && !firstInBlock ? '\n' : '';
- const comment = description
- .split('\n')
- .map((line) => indentation + (line !== '' ? '# ' + line : '#'))
- .join('\n');
-
- return prefix + comment + '\n';
-}
-
-/**
- * Print a block string in the indented block form by adding a leading and
- * trailing blank line. However, if a block string starts with whitespace and is
- * a single-line, adding a leading blank line would strip that whitespace.
- *
- * @internal
- */
-export function printBlockString(
- value: string,
- indentation: string = '',
- preferMultipleLines: boolean = false,
-): string {
- const isSingleLine = value.indexOf('\n') === -1;
- const hasLeadingSpace = value[0] === ' ' || value[0] === '\t';
- const hasTrailingQuote = value[value.length - 1] === '"';
- const hasTrailingSlash = value[value.length - 1] === '\\';
- const printAsMultipleLines =
- !isSingleLine ||
- hasTrailingQuote ||
- hasTrailingSlash ||
- preferMultipleLines;
-
- let result = '';
- // Format a multi-line block quote to account for leading space.
- if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {
- result += '\n' + indentation;
- }
- result += indentation ? value.replace(/\n/g, '\n' + indentation) : value;
- if (printAsMultipleLines) {
- result += '\n';
- }
-
- return '"""' + result.replace(/"""/g, '\\"""') + '"""';
-}
diff --git a/gateway/node_modules/@apollo/federation/src/service/printFederatedSchema.ts b/gateway/node_modules/@apollo/federation/src/service/printFederatedSchema.ts
deleted file mode 100644
index 0d963d6..0000000
--- a/gateway/node_modules/@apollo/federation/src/service/printFederatedSchema.ts
+++ /dev/null
@@ -1,454 +0,0 @@
-/**
- * Forked from graphql-js schemaPrinter.js file @ v14.7.0
- * This file has been modified to support printing federated
- * schema, including associated federation directives.
- */
-
-import {
- GraphQLSchema,
- isSpecifiedDirective,
- isIntrospectionType,
- isSpecifiedScalarType,
- GraphQLNamedType,
- GraphQLDirective,
- isScalarType,
- isObjectType,
- isInterfaceType,
- isUnionType,
- isEnumType,
- isInputObjectType,
- GraphQLScalarType,
- GraphQLObjectType,
- GraphQLInterfaceType,
- GraphQLUnionType,
- GraphQLEnumType,
- GraphQLInputObjectType,
- GraphQLArgument,
- GraphQLInputField,
- astFromValue,
- print,
- GraphQLField,
- GraphQLEnumValue,
- GraphQLString,
- DEFAULT_DEPRECATION_REASON,
- ASTNode,
-} from 'graphql';
-import { Maybe } from '../composition';
-import { isFederationType } from '../types';
-import { isFederationDirective } from '../composition/utils';
-import federationDirectives, { gatherDirectives } from '../directives';
-
-type Options = {
- /**
- * Descriptions are defined as preceding string literals, however an older
- * experimental version of the SDL supported preceding comments as
- * descriptions. Set to true to enable this deprecated behavior.
- * This option is provided to ease adoption and will be removed in v16.
- *
- * Default: false
- */
- commentDescriptions?: boolean;
-};
-
-/**
- * Accepts options as a second argument:
- *
- * - commentDescriptions:
- * Provide true to use preceding comments as the description.
- *
- */
-export function printSchema(schema: GraphQLSchema, options?: Options): string {
- return printFilteredSchema(
- schema,
- // Federation change: treat the directives defined by the federation spec
- // similarly to the directives defined by the GraphQL spec (ie, don't print
- // their definitions).
- (n) => !isSpecifiedDirective(n) && !isFederationDirective(n),
- isDefinedType,
- options,
- );
-}
-
-export function printIntrospectionSchema(
- schema: GraphQLSchema,
- options?: Options,
-): string {
- return printFilteredSchema(
- schema,
- isSpecifiedDirective,
- isIntrospectionType,
- options,
- );
-}
-
-// Federation change: treat the types defined by the federation spec
-// similarly to the directives defined by the GraphQL spec (ie, don't print
-// their definitions).
-function isDefinedType(type: GraphQLNamedType): boolean {
- return (
- !isSpecifiedScalarType(type) &&
- !isIntrospectionType(type) &&
- !isFederationType(type)
- );
-}
-
-function printFilteredSchema(
- schema: GraphQLSchema,
- directiveFilter: (type: GraphQLDirective) => boolean,
- typeFilter: (type: GraphQLNamedType) => boolean,
- options?: Options,
-): string {
- const directives = schema.getDirectives().filter(directiveFilter);
- const types = Object.values(schema.getTypeMap())
- .sort((type1, type2) => type1.name.localeCompare(type2.name))
- .filter(typeFilter);
-
- return (
- [printSchemaDefinition(schema)]
- .concat(
- directives.map(directive => printDirective(directive, options)),
- types.map(type => printType(type, options)),
- )
- .filter(Boolean)
- .join('\n\n') + '\n'
- );
-}
-
-function printSchemaDefinition(schema: GraphQLSchema): string | undefined {
- if (isSchemaOfCommonNames(schema)) {
- return;
- }
-
- const operationTypes = [];
-
- const queryType = schema.getQueryType();
- if (queryType) {
- operationTypes.push(` query: ${queryType.name}`);
- }
-
- const mutationType = schema.getMutationType();
- if (mutationType) {
- operationTypes.push(` mutation: ${mutationType.name}`);
- }
-
- const subscriptionType = schema.getSubscriptionType();
- if (subscriptionType) {
- operationTypes.push(` subscription: ${subscriptionType.name}`);
- }
-
- return `schema {\n${operationTypes.join('\n')}\n}`;
-}
-
-/**
- * GraphQL schema define root types for each type of operation. These types are
- * the same as any other type and can be named in any manner, however there is
- * a common naming convention:
- *
- * schema {
- * query: Query
- * mutation: Mutation
- * }
- *
- * When using this naming convention, the schema description can be omitted.
- */
-function isSchemaOfCommonNames(schema: GraphQLSchema): boolean {
- const queryType = schema.getQueryType();
- if (queryType && queryType.name !== 'Query') {
- return false;
- }
-
- const mutationType = schema.getMutationType();
- if (mutationType && mutationType.name !== 'Mutation') {
- return false;
- }
-
- const subscriptionType = schema.getSubscriptionType();
- if (subscriptionType && subscriptionType.name !== 'Subscription') {
- return false;
- }
-
- return true;
-}
-
-export function printType(type: GraphQLNamedType, options?: Options): string {
- if (isScalarType(type)) {
- return printScalar(type, options);
- } else if (isObjectType(type)) {
- return printObject(type, options);
- } else if (isInterfaceType(type)) {
- return printInterface(type, options);
- } else if (isUnionType(type)) {
- return printUnion(type, options);
- } else if (isEnumType(type)) {
- return printEnum(type, options);
- } else if (isInputObjectType(type)) {
- return printInputObject(type, options);
- }
-
- throw Error('Unexpected type: ' + (type as GraphQLNamedType).toString());
-}
-
-function printScalar(type: GraphQLScalarType, options?: Options): string {
- return printDescription(options, type) + `scalar ${type.name}`;
-}
-
-function printObject(type: GraphQLObjectType, options?: Options): string {
- const interfaces = type.getInterfaces();
- const implementedInterfaces = interfaces.length
- ? ' implements ' + interfaces.map(i => i.name).join(' & ')
- : '';
-
- // Federation change: print `extend` keyword on type extensions.
- //
- // The implementation assumes that an owned type will have fields defined
- // since that is required for a valid schema. Types that are *only*
- // extensions will not have fields on the astNode since that ast doesn't
- // exist.
- //
- // XXX revist extension checking
- const isExtension =
- type.extensionASTNodes && type.astNode && !type.astNode.fields;
-
- return (
- printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `type ${type.name}${implementedInterfaces}` +
- // Federation addition for printing @key usages
- printFederationDirectives(type) +
- printFields(options, type)
- );
-}
-
-function printInterface(type: GraphQLInterfaceType, options?: Options): string {
- // Federation change: print `extend` keyword on type extensions.
- // See printObject for assumptions made.
- //
- // XXX revist extension checking
- const isExtension =
- type.extensionASTNodes && type.astNode && !type.astNode.fields;
-
- return (
- printDescription(options, type) +
- (isExtension ? 'extend ' : '') +
- `interface ${type.name}` +
- // Federation change: graphql@14 doesn't support interfaces implementing interfaces
- // printImplementedInterfaces(type) +
- printFederationDirectives(type) +
- printFields(options, type)
- );
-}
-
-function printUnion(type: GraphQLUnionType, options?: Options): string {
- const types = type.getTypes();
- const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
- return printDescription(options, type) + 'union ' + type.name + possibleTypes;
-}
-
-function printEnum(type: GraphQLEnumType, options?: Options): string {
- const values = type
- .getValues()
- .map(
- (value, i) =>
- printDescription(options, value, ' ', !i) +
- ' ' +
- value.name +
- printDeprecated(value),
- );
-
- return (
- printDescription(options, type) + `enum ${type.name}` + printBlock(values)
- );
-}
-
-function printInputObject(type: GraphQLInputObjectType, options?: Options): string {
- const fields = Object.values(type.getFields()).map(
- (f, i) =>
- printDescription(options, f, ' ', !i) + ' ' + printInputValue(f),
- );
- return (
- printDescription(options, type) + `input ${type.name}` + printBlock(fields)
- );
-}
-
-function printFields(
- options: Options | undefined,
- type: GraphQLObjectType | GraphQLInterfaceType,
-) {
- const fields = Object.values(type.getFields()).map(
- (f, i) =>
- printDescription(options, f, ' ', !i) +
- ' ' +
- f.name +
- printArgs(options, f.args, ' ') +
- ': ' +
- String(f.type) +
- printDeprecated(f) +
- printFederationDirectives(f),
- );
- return printBlock(fields);
-}
-
-// Federation change: *do* print the usages of federation directives.
-function printFederationDirectives(
- type: GraphQLNamedType | GraphQLField,
-): string {
- if (!type.astNode) return '';
- if (isInputObjectType(type)) return '';
-
- const allDirectives = gatherDirectives(type)
- .filter((n) =>
- federationDirectives.some((fedDir) => fedDir.name === n.name.value),
- )
- .map(print);
- const dedupedDirectives = [...new Set(allDirectives)];
-
- return dedupedDirectives.length > 0 ? ' ' + dedupedDirectives.join(' ') : '';
-}
-
-export function printWithReducedWhitespace(ast: ASTNode): string {
- return print(ast)
- .replace(/\s+/g, ' ')
- .trim();
-}
-
-function printBlock(items: string[]) {
- return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : '';
-}
-
-function printArgs(
- options: Options | undefined,
- args: GraphQLArgument[],
- indentation = '',
-) {
- if (args.length === 0) {
- return '';
- }
-
- // If every arg does not have a description, print them on one line.
- if (args.every(arg => !arg.description)) {
- return '(' + args.map(printInputValue).join(', ') + ')';
- }
-
- return (
- '(\n' +
- args
- .map(
- (arg, i) =>
- printDescription(options, arg, ' ' + indentation, !i) +
- ' ' +
- indentation +
- printInputValue(arg),
- )
- .join('\n') +
- '\n' +
- indentation +
- ')'
- );
-}
-
-function printInputValue(arg: GraphQLInputField) {
- const defaultAST = astFromValue(arg.defaultValue, arg.type);
- let argDecl = arg.name + ': ' + String(arg.type);
- if (defaultAST) {
- argDecl += ` = ${print(defaultAST)}`;
- }
- return argDecl;
-}
-
-function printDirective(directive: GraphQLDirective, options?: Options) {
- return (
- printDescription(options, directive) +
- 'directive @' +
- directive.name +
- printArgs(options, directive.args) +
- (directive.isRepeatable ? ' repeatable' : '') +
- ' on ' +
- directive.locations.join(' | ')
- );
-}
-
-function printDeprecated(
- fieldOrEnumVal: GraphQLField | GraphQLEnumValue,
-) {
- if (!fieldOrEnumVal.isDeprecated) {
- return '';
- }
- const reason = fieldOrEnumVal.deprecationReason;
- const reasonAST = astFromValue(reason, GraphQLString);
- if (reasonAST && reason !== '' && reason !== DEFAULT_DEPRECATION_REASON) {
- return ' @deprecated(reason: ' + print(reasonAST) + ')';
- }
- return ' @deprecated';
-}
-
-function printDescription }>(
- options: Options | undefined,
- def: T,
- indentation = '',
- firstInBlock = true,
-): string {
- const { description } = def;
- if (description == null) {
- return '';
- }
-
- if (options?.commentDescriptions === true) {
- return printDescriptionWithComments(description, indentation, firstInBlock);
- }
-
- const preferMultipleLines = description.length > 70;
- const blockString = printBlockString(description, '', preferMultipleLines);
- const prefix =
- indentation && !firstInBlock ? '\n' + indentation : indentation;
-
- return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
-}
-
-function printDescriptionWithComments(
- description: string,
- indentation: string,
- firstInBlock: boolean,
-) {
- const prefix = indentation && !firstInBlock ? '\n' : '';
- const comment = description
- .split('\n')
- .map(line => indentation + (line !== '' ? '# ' + line : '#'))
- .join('\n');
-
- return prefix + comment + '\n';
-}
-
-/**
- * Print a block string in the indented block form by adding a leading and
- * trailing blank line. However, if a block string starts with whitespace and is
- * a single-line, adding a leading blank line would strip that whitespace.
- *
- * @internal
- */
-export function printBlockString(
- value: string,
- indentation: string = '',
- preferMultipleLines: boolean = false,
-): string {
- const isSingleLine = value.indexOf('\n') === -1;
- const hasLeadingSpace = value[0] === ' ' || value[0] === '\t';
- const hasTrailingQuote = value[value.length - 1] === '"';
- const hasTrailingSlash = value[value.length - 1] === '\\';
- const printAsMultipleLines =
- !isSingleLine ||
- hasTrailingQuote ||
- hasTrailingSlash ||
- preferMultipleLines;
-
- let result = '';
- // Format a multi-line block quote to account for leading space.
- if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {
- result += '\n' + indentation;
- }
- result += indentation ? value.replace(/\n/g, '\n' + indentation) : value;
- if (printAsMultipleLines) {
- result += '\n';
- }
-
- return '"""' + result.replace(/"""/g, '\\"""') + '"""';
-}
diff --git a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/astSerializer.ts b/gateway/node_modules/@apollo/federation/src/snapshotSerializers/astSerializer.ts
deleted file mode 100644
index b3dc7eb..0000000
--- a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/astSerializer.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { ASTNode, print } from 'graphql';
-import { Plugin, Config, Refs } from 'pretty-format';
-
-export default {
- test(value: any) {
- return value && typeof value.kind === 'string';
- },
-
- serialize(
- value: ASTNode,
- _config: Config,
- indentation: string,
- _depth: number,
- _refs: Refs,
- _printer: any,
- ): string {
- return print(value)
- .trim()
- .replace(/\n/g, '\n' + indentation);
- },
-} as Plugin;
diff --git a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/graphqlErrorSerializer.ts b/gateway/node_modules/@apollo/federation/src/snapshotSerializers/graphqlErrorSerializer.ts
deleted file mode 100644
index 3363d74..0000000
--- a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/graphqlErrorSerializer.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { GraphQLError } from 'graphql';
-import { Plugin } from 'pretty-format';
-
-export default {
- test(value: any) {
- return value && value instanceof GraphQLError;
- },
-
- print(value: GraphQLError, print) {
- return print({
- message: value.message,
- code: value.extensions ? value.extensions.code : 'MISSING_ERROR',
- });
- },
-} as Plugin;
diff --git a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/index.ts b/gateway/node_modules/@apollo/federation/src/snapshotSerializers/index.ts
deleted file mode 100644
index df46968..0000000
--- a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export { default as astSerializer } from './astSerializer';
-export { default as selectionSetSerializer } from './selectionSetSerializer';
-export { default as typeSerializer } from './typeSerializer';
-export { default as graphqlErrorSerializer } from './graphqlErrorSerializer';
-
-declare global {
- namespace jest {
- interface Expect {
- /**
- * Adds a module to format application-specific data structures for serialization.
- */
- addSnapshotSerializer(serializer: import('pretty-format').Plugin): void;
- }
- }
-}
diff --git a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/selectionSetSerializer.ts b/gateway/node_modules/@apollo/federation/src/snapshotSerializers/selectionSetSerializer.ts
deleted file mode 100644
index 33dfba4..0000000
--- a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/selectionSetSerializer.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { print, SelectionNode, isSelectionNode } from 'graphql';
-import { Plugin } from 'pretty-format';
-
-export default {
- test(value: any) {
- return (
- Array.isArray(value) && value.length > 0 && value.every(isSelectionNode)
- );
- },
- print(selectionNodes: SelectionNode[]): string {
- return selectionNodes.map(node => print(node)).join('\n');
- },
-} as Plugin;
diff --git a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/typeSerializer.ts b/gateway/node_modules/@apollo/federation/src/snapshotSerializers/typeSerializer.ts
deleted file mode 100644
index 7b78e18..0000000
--- a/gateway/node_modules/@apollo/federation/src/snapshotSerializers/typeSerializer.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { isNamedType, GraphQLNamedType, printType } from 'graphql';
-import { Plugin } from 'pretty-format';
-
-export default {
- test(value: any) {
- return value && isNamedType(value);
- },
- print(value: GraphQLNamedType) {
- return printType(value);
- },
-} as Plugin;
diff --git a/gateway/node_modules/@apollo/federation/src/types.ts b/gateway/node_modules/@apollo/federation/src/types.ts
deleted file mode 100644
index 4198f7d..0000000
--- a/gateway/node_modules/@apollo/federation/src/types.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-import {
- GraphQLFieldConfig,
- GraphQLString,
- GraphQLUnionType,
- GraphQLObjectType,
- GraphQLScalarType,
- GraphQLNonNull,
- GraphQLList,
- GraphQLType,
- GraphQLNamedType,
- isNamedType,
- GraphQLResolveInfo,
- isObjectType,
-} from 'graphql';
-import { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue';
-
-export const EntityType = new GraphQLUnionType({
- name: '_Entity',
- types: [],
-});
-
-export const ServiceType = new GraphQLObjectType({
- name: '_Service',
- fields: {
- sdl: {
- type: GraphQLString,
- description:
- 'The sdl representing the federated service capabilities. Includes federation directives, removes federation types, and includes rest of full schema after schema directives have been applied',
- },
- },
-});
-
-export const AnyType = new GraphQLScalarType({
- name: '_Any',
- serialize(value) {
- return value;
- },
-});
-
-function isPromise(value: PromiseOrValue): value is Promise {
- return Boolean(value && 'then' in value && typeof value.then === 'function');
-}
-
-function addTypeNameToPossibleReturn(
- maybeObject: null | T,
- typename: string,
-): null | T & { __typename: string } {
- if (maybeObject !== null && typeof maybeObject === 'object') {
- Object.defineProperty(maybeObject, '__typename', {
- value: typename,
- });
- }
- return maybeObject as null | T & { __typename: string };
-}
-
-export type GraphQLReferenceResolver = (
- reference: object,
- context: TContext,
- info: GraphQLResolveInfo,
-) => any;
-
-declare module 'graphql/type/definition' {
- interface GraphQLObjectType {
- resolveReference?: GraphQLReferenceResolver;
- }
-
- interface GraphQLObjectTypeConfig {
- resolveReference?: GraphQLReferenceResolver;
- }
-}
-
-export const entitiesField: GraphQLFieldConfig = {
- type: new GraphQLNonNull(new GraphQLList(EntityType)),
- args: {
- representations: {
- type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(AnyType))),
- },
- },
- resolve(_source, { representations }, context, info) {
- return representations.map((reference: { __typename: string } & object) => {
- const { __typename } = reference;
-
- const type = info.schema.getType(__typename);
- if (!type || !isObjectType(type)) {
- throw new Error(
- `The _entities resolver tried to load an entity for type "${__typename}", but no object type of that name was found in the schema`,
- );
- }
-
- const resolveReference = type.resolveReference
- ? type.resolveReference
- : function defaultResolveReference() {
- return reference;
- };
-
- // FIXME somehow get this to show up special in Studio traces?
- const result = resolveReference(reference, context, info);
-
- if (isPromise(result)) {
- return result.then((x: any) =>
- addTypeNameToPossibleReturn(x, __typename),
- );
- }
-
- return addTypeNameToPossibleReturn(result, __typename);
- });
- },
-};
-
-export const serviceField: GraphQLFieldConfig = {
- type: new GraphQLNonNull(ServiceType),
-};
-
-export const federationTypes: GraphQLNamedType[] = [
- ServiceType,
- AnyType,
- EntityType,
-];
-
-export function isFederationType(type: GraphQLType): boolean {
- return (
- isNamedType(type) && federationTypes.some(({ name }) => name === type.name)
- );
-}
diff --git a/gateway/node_modules/@apollo/gateway/CHANGELOG.md b/gateway/node_modules/@apollo/gateway/CHANGELOG.md
deleted file mode 100644
index 46d835d..0000000
--- a/gateway/node_modules/@apollo/gateway/CHANGELOG.md
+++ /dev/null
@@ -1,257 +0,0 @@
-# CHANGELOG for `@apollo/gateway`
-
-## 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.
-
-- Whenever "AccessDenied" 403 error comes from Apollo, provide a useful error message indicating how to resolve the problem. [PR #245](https://github.com/apollographql/federation/pull/245)
-
-## v0.21.0
-
-- Fix `Cannot convert undefined or null to object` error which occurred when nullable variables were declared/used within an operation (i.e. `query`) document but `variables` was undefined on the request. [PR #167](https://github.com/apollographql/federation/pull/167) [Issue #196](https://github.com/apollographql/federation/issues/196)
-- When using a custom `fetcher` on a `RemoteGraphQLDataSource`, use that fetcher's `Request` initialization in order to satisfy and of its own implementation details. This is necessary, for example, when using `make-fetch-happen`. [PR #188](https://github.com/apollographql/federation/pull/188) [Issue #191](https://github.com/apollographql/federation/issues/191)
-
-## v0.20.4
-
-- Adjust a `preinstall` script which was only intended to be executed by the monorepo tool-chain, not merely by installing the `@apollo/gateway` package as a dependency in another project. [PR #185](https://github.com/apollographql/federation/pull/185) [Issue #184](https://github.com/apollographql/federation/issues/184)
-
-## v0.20.3
-
-- Read managed federation configuration from the `apollo` option to `ApolloGateway.load` rather than the deprecated `engine` option, when available (ie, when running Apollo Server v2.18+), and update error messages referring to the old Engine and Graph Manager product names. [PR #148](https://github.com/apollographql/federation/pull/148)
-- __FIX__: Directives which are located on inline fragments should not be skipped and should be sent to the service [PR #178](https://github.com/apollographql/federation/pull/178)
-
-## v0.20.2
-
-- __FIX__: Minifying a String argument should escape quotes and slashes [PR #174](https://github.com/apollographql/federation/pull/174)
-
-## v0.20.1
-
-- Replace the query planner implementation with a new implementation written in rust and integrated into the gateway
- via wasm. [PR #4534](https://github.com/apollographql/apollo-server/pull/4534)
-
-## v0.20.0
-
-- Only changes in the similarly versioned `@apollo/federation` package.
-
-## v0.19.1
-
-- Only changes in the similarly versioned `@apollo/federation` package.
-
-## v0.19.0
-
-- Only changes in the similarly versioned `@apollo/federation` package.
-
-## v0.18.1
-
-- __FIX__: Pass null required fields correctly within the parent object to resolvers. When a composite field was null, it would sometimes be expanded into an object with all null subfields and passed to the resolver. This fix prevents this expansion and sets the field to null, as originally intended. [PR #4157](https://github.com/apollographql/apollo-server/pull/4157)
-- __FIX__: Prevent gateway from entering an inoperable state after an initial configuration load failure. [PR #4277](https://github.com/apollographql/apollo-server/pull/4277)
-
-## v0.18.0
-
-- The `RemoteGraphQLDataSource`'s `didEncounterError` method will now receive [`Response`](https://github.com/apollographql/apollo-server/blob/43470d6561bee31101f3afc56bdd154db3f92b30/packages/apollo-server-env/src/fetch.d.ts#L98-L111) as the third argument when it is available, making its signature `(error: Error, fetchRequest: Request, fetchResponse?: Response)`. This compliments the existing [`Request`](https://github.com/apollographql/apollo-server/blob/43470d6561bee31101f3afc56bdd154db3f92b30/packages/apollo-server-env/src/fetch.d.ts#L37-L45) type it was already receiving. Both of these types are [HTTP WHATWG Fetch API](https://fetch.spec.whatwg.org/) types, not `GraphQLRequest`, `GraphQLResponse` types.
-
-## v0.17.0
-
-- __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 #4313](https://github.com/apollographql/apollo-server/pull/4313)
-
-## v0.16.11
-
-- Only changes in the similarly versioned `@apollo/federation` package.
-
-## v0.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)
-- __FIX__: The cache implementation for the HTTP-fetcher which is used when communicating with the Apollo Registry when the gateway is configured to use [managed federation](https://www.apollographql.com/docs/graph-manager/managed-federation/overview/) will no longer write to its cache when it receives a 304 response. This is necessary since such a response indicates that the cache used to conditionally make the request must already be present. This does not affect GraphQL requests at runtime, only the polling and fetching mechanism for retrieving composed schemas under manged federation. [PR #4325](https://github.com/apollographql/apollo-server/pull/4325)
-- __FIX__: The `mergeFieldNodeSelectionSets` method no longer mutates original FieldNode objects. Before, it was updating the selection set of the original object, corrupting the data accross requests.
-
-## v0.16.9
-
-- Only changes in the similarly versioned `@apollo/federation` package.
-
-## v0.16.7
-
-- Bumped the version of `apollo-server-core`, but no other changes!
-
-## v0.16.6
-
-- Only changes in the similarly versioned `@apollo/federation` package.
-
-## v0.16.5
-
-- Only changes in the similarly versioned `@apollo/federation` package.
-
-## v0.16.4
-
-- __NEW__: Provide the `requestContext` as an argument to the experimental callback function `experimental_didResolveQueryPlan`. [#4173](https://github.com/apollographql/apollo-server/pull/4173)
-
-## v0.16.3
-
-- This updates a dependency of `apollo-server-core` that is only used for its TypeScript typings, not for any runtime dependencies. The reason for the upgrade is that the `apollo-server-core` package (again, used only for types!) was affected by a GitHub Security Advisory. [See the related `CHANGELOG.md` for Apollo Server for more details, including a link to the advisory](https://github.com/apollographql/apollo-server/blob/354d9910e1c87af93c7d50263a28554b449e48db/CHANGELOG.md#v2142).
-
-## v0.16.2
-
-- __FIX__: Collapse nested required fields into a single body in the query plan. Before, some nested fields' selection sets were getting split, causing some of their subfields to be dropped when executing the query. This fix collapses the split selection sets into one. [#4064](https://github.com/apollographql/apollo-server/pull/4064)
-
-## v0.16.1
-
-- __NEW__: Provide the ability to pass a custom `fetcher` during `RemoteGraphQLDataSource` construction to be used when executing operations against downstream services. Providing a custom `fetcher` may be necessary to accommodate more advanced needs, e.g., configuring custom TLS certificates for internal services. [PR #4149](https://github.com/apollographql/apollo-server/pull/4149)
-
- The `fetcher` specified should be a compliant implementor of the [Fetch API standard](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This addition compliments, though is still orthognonal to, similar behavior originally introduced in [#3783](https://github.com/apollographql/apollo-server/pull/3783), which allowed customization of the implementation used to fetch _gateway configuration and federated SDL from services_ in managed and unmanaged modes, but didn't affect the communication that takes place during _operation execution_.
-
- For now, the default `fetcher` will remain the same ([`node-fetch`](https://npm.im/node-fetch)) implementation. A future major-version bump will update it to be consistent with other feature-rich implementations of the Fetch API which are used elsewhere in the Apollo Server stack where we use [`make-fetch-happen`](https://npm.im/make-fetch-happen). In all likelihood, `ApolloGateway` will pass its own `fetcher` to the `RemoteGraphQLDataSource` during service initialization.
-
-## v0.16.0
-
-- __BREAKING__: Use a content delivery network for managed configuration, fetch storage secrets and composition configuration from different domains: https://storage-secrets.api.apollographql.com and https://federation.api.apollographql.com. Please mind any firewall for outgoing traffic. [#4080](https://github.com/apollographql/apollo-server/pull/4080)
-
-## v0.15.1
-
-- __FIX__: Correctly handle unions with nested conditions that have no `possibleTypes` [#4071](https://github.com/apollographql/apollo-server/pull/4071)
-- __FIX__: Normalize root operation types when reporting to Apollo Graph Manager. Federation always uses the default names `Query`, `Mutation`, and `Subscription` for root operation types even if downstream services choose different names; now we properly normalize traces received from downstream services in the same way. [#4100](https://github.com/apollographql/apollo-server/pull/4100)
-
-## v0.15.0
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/e37384a49b2bf474eed0de3e9f4a1bebaeee64c7)
-
-- __BREAKING__: Drop support for Node.js 8 and Node.js 10. This is being done primarily for performance gains which stand to be seen by transpiling to a newer ECMAScript target. For more details, see the related PR. [#4031](https://github.com/apollographql/apollo-server/pull/4031)
-- __Performance:__ Cache stringified representations of downstream query bodies within the query plan to address performance cost incurred by repeatedly `print`ing the same`DocumentNode`s with the `graphql` printer. This improvement is more pronounced on larger documents. [PR #4018](https://github.com/apollographql/apollo-server/pull/4018)
-- __Deprecation:__ Deprecated the `ENGINE_API_KEY` environment variable in favor of its new name, `APOLLO_KEY`. The new name mirrors the name used within Apollo Graph Manager. Aside from the rename, the functionality remains otherwise identical. Continued use of `ENGINE_API_KEY` will result in deprecation warnings being printed to the server console. Support for `ENGINE_API_KEY` will be removed in a future, major update. [#3923](https://github.com/apollographql/apollo-server/pull/3923)
-- __Deprecation:__ Deprecated the `APOLLO_SCHEMA_TAG` environment variable in favor of its new name, `APOLLO_GRAPH_VARIANT`. The new name mirrors the name used within Apollo Graph Manager. Aside from the rename, the functionality remains otherwise identical. Use of the now-deprecated name will result in a deprecation warning being printed to the server console. Support will be removed entirely in a future, major update. To avoid misconfiguration, runtime errors will be thrown if the new and deprecated versions are _both_ set. [#3855](https://github.com/apollographql/apollo-server/pull/3855)
-- Add inadvertently excluded `apollo-server-errors` runtime dependency. [#3927](https://github.com/apollographql/apollo-server/pull/3927)
-
-## v0.14.1
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/b898396e9fcd3b9092b168f9aac8466ca186fa6b)
-
-- __FIX__: Resolve condition which surfaced in `0.14.0` which prevented loading the configuration using managed federation. [PR #3979](https://github.com/apollographql/apollo-server/pull/3979)
-
-## v0.14.0
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/71a3863f59f4ab2c9052c316479d94c6708c4309)
-
-- Several previously unhandled Promise rejection errors stemming from, e.g. connectivity, failures when communicating with Apollo Graph Manager within asynchronous code are now handled. [PR #3811](https://github.com/apollographql/apollo-server/pull/3811)
-- Provide a more helpful error message when encountering expected errors. [PR #3811](https://github.com/apollographql/apollo-server/pull/3811)
-- General improvements and clarity to error messages and logging. [PR #3811](https://github.com/apollographql/apollo-server/pull/3811)
-- Warn of a possible misconfiguration when local service configuration is provided (via `serviceList` or `localServiceList`) and a remote Apollo Graph Manager configuration is subsequently found as well. [PR #3868](https://github.com/apollographql/apollo-server/pull/3868)
-- During composition, the unavailability of a downstream service in unmanaged federation mode will no longer result in a partially composed schema which merely lacks the types provided by the downed service. This prevents unexpected validation errors for clients querying a graph which lacks types which were merely unavailable during the initial composition but were intended to be part of the graph. [PR #3867](https://github.com/apollographql/apollo-server/pull/3867)
-- Support providing a custom logger implementation (e.g. [`winston`](https://npm.im/winston), [`bunyan`](https://npm.im/bunyan), etc.) to capture gateway-sourced console output. This allows the use of existing, production logging facilities or the possibiltiy to use advanced structure in logging, such as console output which is encapsulated in JSON. The same PR that introduces this support also introduces a `logger` property to the `GraphQLRequestContext` that is exposed to `GraphQLDataSource`s and Apollo Server plugins, making it possible to attach additional properties (as supported by the logger implementation) to specific requests, if desired, by leveraging custom implementations in those components respectively. When not provided, these will still output to `console`. [PR #3894](https://github.com/apollographql/apollo-server/pull/3894)
-- Drop use of `loglevel-debug`. This removes the very long date and time prefix in front of each log line and also the support for the `DEBUG=apollo-gateway:` environment variable. Both of these were uncommonly necessary or seldom used (with the environment variable also being undocumented). The existing behavior can be preserved by providing a `logger` that uses `loglevel-debug`, if desired, and more details can be found in the PR. [PR #3896](https://github.com/apollographql/apollo-server/pull/3896)
-- Fix Typescript generic typing for datasource contexts [#3865](https://github.com/apollographql/apollo-server/pull/3865) This is a fix for the `TContext` typings of the gateway's exposed `GraphQLDataSource` implementations. In their current form, they don't work as intended, or in any manner that's useful for typing the `context` property throughout the class methods. This introduces a type argument `TContext` to the class itself (which defaults to `Record` for existing implementations) and removes the non-operational type arguments on the class methods themselves.
-- Implement retry logic for requests to GCS [PR #3836](https://github.com/apollographql/apollo-server/pull/3836) Note: coupled with this change is a small alteration in how the gateway polls GCS for updates in managed mode. Previously, the tick was on a specific interval. Now, every tick starts after the round of fetches to GCS completes. For more details, see the linked PR.
-- Gateway issues health checks to downstream services via `serviceHealthCheck` configuration option. Note: expected behavior differs between managed and unmanaged federation. See PR for new test cases and documentation. [#3930](https://github.com/apollographql/apollo-server/pull/3930)
-
-
-## v0.13.2
-
-- __BREAKING__: The behavior and signature of `RemoteGraphQLDataSource`'s `didReceiveResponse` method has been changed. No changes are necessary _unless_ your implementation has overridden the default behavior of this method by either extending the class and overriding the method or by providing `didReceiveResponse` as a parameter to the `RemoteGraphQLDataSource`'s constructor options. Implementations which have provided their own `didReceiveResponse` using either of these methods should view the PR linked here for details on what has changed. [PR #3743](https://github.com/apollographql/apollo-server/pull/3743)
-- __NEW__: Setting the `apq` option to `true` on the `RemoteGraphQLDataSource` will enable the use of [automated persisted queries (APQ)](https://www.apollographql.com/docs/apollo-server/performance/apq/) when sending queries to downstream services. Depending on the complexity of queries sent to downstream services, this technique can greatly reduce the size of the payloads being transmitted over the network. Downstream implementing services must also support APQ functionality to participate in this feature (Apollo Server does by default unless it has been explicitly disabled). As with normal APQ behavior, a downstream server must have received and registered a query once before it will be able to serve an APQ request. [#3744](https://github.com/apollographql/apollo-server/pull/3744)
-- __NEW__: Experimental feature: compress downstream requests via generated fragments [#3791](https://github.com/apollographql/apollo-server/pull/3791) This feature enables the gateway to generate fragments for queries to downstream services in order to minimize bytes over the wire and parse time. This can be enabled via the gateway config by setting `experimental_autoFragmentization: true`. It is currently disabled by default.
-- Introduce `make-fetch-happen` package. Remove `cachedFetcher` in favor of the caching implementation provided by this package. [#3783](https://github.com/apollographql/apollo-server/pull/3783/files)
-
-## v0.12.1
-
-- Update to include [fixes from `@apollo/federation`](https://github.com/apollographql/apollo-server/blob/main/packages/apollo-federation/CHANGELOG.md).
-
-## v0.12.0
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/9c0aa1e661ccc2c5a1471b781102637dd47e21b1)
-
-- Reduce interface expansion for types contained to a single service [#3582](https://github.com/apollographql/apollo-server/pull/3582)
-- Instantiate one `CachedFetcher` per gateway instance. This resolves a condition where multiple federated gateways would utilize the same cache store could result in an `Expected undefined to be a GraphQLSchema` error. [#3704](https://github.com/apollographql/apollo-server/pull/3704)
-- Gateway: minimize downstream request size [#3737](https://github.com/apollographql/apollo-server/pull/3737)
-- experimental: Allow configuration of the query plan store by introducing an `experimental_approximateQueryPlanStoreMiB` property to the `ApolloGateway` constructor options which overrides the default cache size of 30MiB. [#3755](https://github.com/apollographql/apollo-server/pull/3755)
-
-## v0.11.6
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/0743d6b2f1737758cf09e80d2086917772bc00c9)
-
-- Fix onSchemaChange callbacks for unmanaged configs [#3605](https://github.com/apollographql/apollo-server/pull/3605)
-
-## v0.11.4
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/a0a60e73e04e913d388de8324f7d17e4406deea2)
-
- * Gateway over-merging fields of unioned types [#3581](https://github.com/apollographql/apollo-server/pull/3581)
-
-## 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.8
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/5d94e986f04457ec17114791ee6db3ece4213dd8)
-
-- Fix Gateway / Playground Query Plan view [#3418](https://github.com/apollographql/apollo-server/pull/3418)
-- Gateway schema change listener bug + refactor [#3411](https://github.com/apollographql/apollo-server/pull/3411) introduces a change to the `experimental_didUpdateComposition` hook and `experimental_pollInterval` configuration behavior.
- 1. Previously, the `experimental_didUpdateComposition` hook wouldn't be reliably called unless the `experimental_pollInterval` was set. If it _was_ called, it was sporadic and didn't necessarily mark the timing of an actual composition update. After this change, the hook is called on a successful composition update.
- 2. The `experimental_pollInterval` configuration option now affects both the GCS polling interval when gateway is configured for managed federation, as well as the polling interval of services. The former being newly introduced behavior.
-- Gateway cached DataSource bug [#3412](https://github.com/apollographql/apollo-server/pull/3412) introduces a fix for managed federation users where `DataSource`s wouldn't update correctly if a service's url changed. This bug was introduced with heavier DataSource caching in [#3388](https://github.com/apollographql/apollo-server/pull/3388). By inspecting the `url` as well, `DataSource`s will now update correctly when a composition update occurs.
-- Gateway - don't log updates on startup [#3421](https://github.com/apollographql/apollo-server/pull/3421) Fine tune gateway startup logging - on load, instead of logging an "update", log the service id, variant, and mode in which gateway is running.
-
-## v0.10.7
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/fc7462ec5f8604bd6cba99aa9a377a9b8e045566)
-
-- Add export for experimental observability functions types. [#3371](https://github.com/apollographql/apollo-server/pull/3371)
-- Fix double instantiation of DataSources [#3388](https://github.com/apollographql/apollo-server/pull/3388)
-
-## v0.10.6
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/aa200ce24b834320fc79d2605dac340b37d3e434)
-
-- Fix debug query plan logging [#3376](https://github.com/apollographql/apollo-server/pull/3376)
-- Add `context` object to `GraphQLDataSource.didReceiveResponse` arguments [#3360](https://github.com/apollographql/apollo-server/pull/3360)
-
-## v0.10.1
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/029c8dca3af812ee70589cdb6de749df3d2843d8)
-
-- Make service definition cache local to ApolloGateway object [#3191](https://github.com/apollographql/apollo-server/pull/3191)
-- Fix value type behavior within composition and execution [#3182](https://github.com/apollographql/apollo-server/pull/3182)
-- Validate variables at the gateway level [#3213](https://github.com/apollographql/apollo-server/pull/3213)
-
-## v0.9.1
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/a1c41152a35c837af27d1dee081fc273de07a28e)
-
-- Optimize buildQueryPlan when two FetchGroups are on the same service [#3135](https://github.com/apollographql/apollo-server/pull/3135)
-- Construct and use RemoteGraphQLDataSource to issue introspection query to Federated Services [#3120](https://github.com/apollographql/apollo-server/pull/3120)
-
-## v0.9.0
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/99f78c6782bce170186ba6ef311182a8c9f281b7)
-
-- Add experimental observability functions [#3110](https://github.com/apollographql/apollo-server/pull/3110)
-
-## v0.8.2
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/b0a9ce0615d19b7241e64883b5d5d7730cc13fcb)
-
-- Handle `null` @requires selections correctly during execution [#3138](https://github.com/apollographql/apollo-server/pull/3138)
-
-## v0.6.13
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/a06594117dbbf1e8abdb7b366b69a94ab808b065)
-
-- Proxy errors from downstream services [#3019](https://github.com/apollographql/apollo-server/pull/3019)
-- Handle schema defaultVariables correctly within downstream fetches [#2963](https://github.com/apollographql/apollo-server/pull/2963)
-
-## v0.6.12
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/5974b2ce405a06bc331230400b9073f6381738d3)
-
-- Fix `@requires` bug preventing array and null values. [PR #2928](https://github.com/apollographql/apollo-server/pull/2928)
-
-## v0.6.5
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/9dcfe6f91fa7b4187a644efe1522cf444ffc1251)
-
-- Relax constraints of root operation type names in validation [#2783](ttps://github.com/apollographql/apollo-server/pull/2783)
-
-## v0.6.2
-
-> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/e113127b1ff9802de3bc5574bcae55256f0ef656)
-
-- Resolve an issue with \__proto__ pollution in deepMerge() [#2779](https://github.com/apollographql/apollo-server/pull/2779)
diff --git a/gateway/node_modules/@apollo/gateway/LICENSE.md b/gateway/node_modules/@apollo/gateway/LICENSE.md
deleted file mode 100644
index c177b43..0000000
--- a/gateway/node_modules/@apollo/gateway/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-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.
diff --git a/gateway/node_modules/@apollo/gateway/README.md b/gateway/node_modules/@apollo/gateway/README.md
deleted file mode 100644
index e0bb61f..0000000
--- a/gateway/node_modules/@apollo/gateway/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Apollo Gateway
-
-This package provides utilities for combining multiple GraphQL microservices into a single GraphQL endpoint.
-
-Each microservice should implement the [federation schema specification](https://www.apollographql.com/docs/apollo-server/federation/federation-spec/). This can be done either through [Apollo Federation](https://github.com/apollographql/federation/tree/HEAD/federation-js) or a variety of other open source products.
-
-For complete documentation, see the [Apollo Gateway API reference](https://www.apollographql.com/docs/apollo-server/api/apollo-gateway/).
-
-## Usage
-
-```js
-const { ApolloServer } = require("apollo-server");
-const { ApolloGateway } = require("@apollo/gateway");
-
-const gateway = new ApolloGateway({
- serviceList: [
- { name: "accounts", url: "http://localhost:4001/graphql" },
- // List of federation-capable GraphQL endpoints...
- ]
-});
-
-const server = new ApolloServer({ gateway });
-
-server.listen().then(({ url }) => {
- console.log(`🚀 Server ready at ${url}`);
-});
-```
diff --git a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.d.ts b/gateway/node_modules/@apollo/gateway/dist/QueryPlan.d.ts
deleted file mode 100644
index 2e738c9..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.d.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { FragmentDefinitionNode, OperationDefinitionNode, SelectionNode as GraphQLJSSelectionNode } from 'graphql';
-import { ComposedGraphQLSchema } from '@apollo/federation';
-export declare type ResponsePath = (string | number)[];
-export declare type WasmPointer = number;
-declare type FragmentMap = {
- [fragmentName: string]: FragmentDefinitionNode;
-};
-export declare type OperationContext = {
- schema: ComposedGraphQLSchema;
- operation: OperationDefinitionNode;
- fragments: FragmentMap;
- queryPlannerPointer: WasmPointer;
- operationString: string;
-};
-export interface QueryPlan {
- kind: 'QueryPlan';
- node?: PlanNode;
-}
-export declare type PlanNode = SequenceNode | ParallelNode | FetchNode | FlattenNode;
-export interface SequenceNode {
- kind: 'Sequence';
- nodes: PlanNode[];
-}
-export interface ParallelNode {
- kind: 'Parallel';
- nodes: PlanNode[];
-}
-export interface FetchNode {
- kind: 'Fetch';
- serviceName: string;
- variableUsages?: string[];
- requires?: QueryPlanSelectionNode[];
- operation: string;
-}
-export interface FlattenNode {
- kind: 'Flatten';
- path: ResponsePath;
- node: PlanNode;
-}
-export declare type QueryPlanSelectionNode = QueryPlanFieldNode | QueryPlanInlineFragmentNode;
-export interface QueryPlanFieldNode {
- readonly kind: 'Field';
- readonly alias?: string;
- readonly name: string;
- readonly selections?: QueryPlanSelectionNode[];
-}
-export interface QueryPlanInlineFragmentNode {
- readonly kind: 'InlineFragment';
- readonly typeCondition?: string;
- readonly selections: QueryPlanSelectionNode[];
-}
-export declare function serializeQueryPlan(queryPlan: QueryPlan): string;
-export declare function getResponseName(node: QueryPlanFieldNode): string;
-export declare const trimSelectionNodes: (selections: readonly GraphQLJSSelectionNode[]) => QueryPlanSelectionNode[];
-export {};
-//# sourceMappingURL=QueryPlan.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.d.ts.map b/gateway/node_modules/@apollo/gateway/dist/QueryPlan.d.ts.map
deleted file mode 100644
index 9c78a36..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"QueryPlan.d.ts","sourceRoot":"","sources":["../src/QueryPlan.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EAEvB,aAAa,IAAI,sBAAsB,EACxC,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,oBAAY,YAAY,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAE/C,oBAAY,WAAW,GAAG,MAAM,CAAC;AAEjC,aAAK,WAAW,GAAG;IAAE,CAAC,YAAY,EAAE,MA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W,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,sBAAsB,EAAE,CAAC;CAC/C;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,UAItD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAEhE;AAUD,eAAO,MAAM,kBAAkB,eACjB,SAAS,sBAAsB,EAAE,KAC5C,sBAAsB,EA8BxB,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.js b/gateway/node_modules/@apollo/gateway/dist/QueryPlan.js
deleted file mode 100644
index 577c95b..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.js
+++ /dev/null
@@ -1,42 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.trimSelectionNodes = exports.getResponseName = exports.serializeQueryPlan = void 0;
-const graphql_1 = require("graphql");
-const pretty_format_1 = __importDefault(require("pretty-format"));
-const snapshotSerializers_1 = require("./snapshotSerializers");
-function serializeQueryPlan(queryPlan) {
- return pretty_format_1.default(queryPlan, {
- plugins: [snapshotSerializers_1.queryPlanSerializer, snapshotSerializers_1.astSerializer],
- });
-}
-exports.serializeQueryPlan = serializeQueryPlan;
-function getResponseName(node) {
- return node.alias ? node.alias : node.name;
-}
-exports.getResponseName = getResponseName;
-exports.trimSelectionNodes = (selections) => {
- const remapped = [];
- selections.forEach((selection) => {
- var _a;
- if (selection.kind === graphql_1.Kind.FIELD) {
- remapped.push({
- kind: graphql_1.Kind.FIELD,
- name: selection.name.value,
- selections: selection.selectionSet &&
- exports.trimSelectionNodes(selection.selectionSet.selections),
- });
- }
- if (selection.kind === graphql_1.Kind.INLINE_FRAGMENT) {
- remapped.push({
- kind: graphql_1.Kind.INLINE_FRAGMENT,
- typeCondition: (_a = selection.typeCondition) === null || _a === void 0 ? void 0 : _a.name.value,
- selections: exports.trimSelectionNodes(selection.selectionSet.selections),
- });
- }
- });
- return remapped;
-};
-//# sourceMappingURL=QueryPlan.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.js.map b/gateway/node_modules/@apollo/gateway/dist/QueryPlan.js.map
deleted file mode 100644
index ce4aad8..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/QueryPlan.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"QueryPlan.js","sourceRoot":"","sources":["../src/QueryPlan.ts"],"names":[],"mappings":";;;;;;AAAA,qCAKiB;AACjB,kEAAyC;AACzC,+DAA2E;AAqE3E,SAAgB,kBAAkB,CAAC,SAAoB;IACrD,OAAO,uBAAY,CAAC,SAAS,EAAE;QAC7B,OAAO,EAAE,CAAC,yCAAmB,EAAE,mCAAa,CAAC;KAC9C,CAAC,CAAC;AACL,CAAC;AAJD,gDAIC;AAED,SAAgB,eAAe,CAAC,IAAwB;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAC7C,CAAC;AAFD,0CAEC;AAUY,QAAA,kBAAkB,GAAG,CAChC,UAA6C,EACnB,EAAE;IAQ5B,MAAM,QAAQ,GAA6B,EAAE,CAAC;IAE9C,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;;QAC/B,IAAI,SAAS,CAAC,IAAI,KAAK,cAAI,CAAC,KAAK,EAAE;YACjC,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,cAAI,CAAC,KAAK;gBAChB,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK;gBAC1B,UAAU,EACR,SAAS,CAAC,YAAY;oBACtB,0BAAkB,CAAC,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC;aACxD,CAAC,CAAC;SACJ;QACD,IAAI,SAAS,CAAC,IAAI,KAAK,cAAI,CAAC,eAAe,EAAE;YAC3C,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,cAAI,CAAC,eAAe;gBAC1B,aAAa,QAAE,SAAS,CAAC,aAAa,0CAAE,IAAI,CAAC,KAAK;gBAClD,UAAU,EAAE,0BAAkB,CAAC,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC;aAClE,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.d.ts b/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.d.ts
deleted file mode 100644
index 960da12..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.d.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { DocumentNode } from 'graphql';
-import { QueryPlan, OperationContext, WasmPointer } from './QueryPlan';
-import { ComposedGraphQLSchema } from '@apollo/federation';
-export interface BuildQueryPlanOptions {
- autoFragmentization: boolean;
-}
-export declare function buildQueryPlan(operationContext: OperationContext, options?: BuildQueryPlanOptions): QueryPlan;
-interface BuildOperationContextOptions {
- schema: ComposedGraphQLSchema;
- operationDocument: DocumentNode;
- operationString: string;
- queryPlannerPointer: WasmPointer;
- operationName?: string;
-}
-export declare function buildOperationContext({ schema, operationDocument, operationString, queryPlannerPointer, operationName, }: BuildOperationContextOptions): OperationContext;
-export {};
-//# sourceMappingURL=buildQueryPlan.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.d.ts.map b/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.d.ts.map
deleted file mode 100644
index 4085f98..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"buildQueryPlan.d.ts","sourceRoot":"","sources":["../src/buildQueryPlan.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAMb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,MAAM,WAAW,qBAAqB;IACpC,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,GAAE,qBAAsD,GAC9D,SAAS,CAOX;AAGD,UAAU,4BAA4B;IACpC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,iBAAiB,EAAE,YAAY,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,WAAW,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,EAAE,4BAA4B,GAAG,gBAAgB,CAuDjD"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.js b/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.js
deleted file mode 100644
index 0d4dfce..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.js
+++ /dev/null
@@ -1,59 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.buildOperationContext = exports.buildQueryPlan = void 0;
-const graphql_1 = require("graphql");
-const query_planner_wasm_1 = require("@apollo/query-planner-wasm");
-function buildQueryPlan(operationContext, options = { autoFragmentization: false }) {
- return query_planner_wasm_1.getQueryPlan(operationContext.queryPlannerPointer, operationContext.operationString, options);
-}
-exports.buildQueryPlan = buildQueryPlan;
-;
-function buildOperationContext({ schema, operationDocument, operationString, queryPlannerPointer, operationName, }) {
- let operation;
- let operationCount = 0;
- const fragments = Object.create(null);
- operationDocument.definitions.forEach(definition => {
- switch (definition.kind) {
- case graphql_1.Kind.OPERATION_DEFINITION:
- operationCount++;
- if (!operationName && operationCount > 1) {
- throw new graphql_1.GraphQLError('Must provide operation name if query contains ' +
- 'multiple operations.');
- }
- if (!operationName ||
- (definition.name && definition.name.value === operationName)) {
- operation = definition;
- }
- break;
- case graphql_1.Kind.FRAGMENT_DEFINITION:
- fragments[definition.name.value] = definition;
- break;
- }
- });
- if (!operation) {
- if (operationName) {
- throw new graphql_1.GraphQLError(`Unknown operation named "${operationName}".`);
- }
- else {
- throw new graphql_1.GraphQLError('Must provide an operation.');
- }
- }
- const trimmedOperationString = operationCount > 1
- ? graphql_1.print({
- kind: graphql_1.Kind.DOCUMENT,
- definitions: [
- operation,
- ...Object.values(fragments),
- ],
- })
- : operationString;
- return {
- schema,
- operation,
- fragments,
- queryPlannerPointer,
- operationString: trimmedOperationString
- };
-}
-exports.buildOperationContext = buildOperationContext;
-//# sourceMappingURL=buildQueryPlan.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.js.map b/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.js.map
deleted file mode 100644
index 1274381..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/buildQueryPlan.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"buildQueryPlan.js","sourceRoot":"","sources":["../src/buildQueryPlan.ts"],"names":[],"mappings":";;;AAAA,qCAOiB;AAOjB,mEAA0D;AAM1D,SAAgB,cAAc,CAC5B,gBAAkC,EAClC,UAAiC,EAAE,mBAAmB,EAAE,KAAK,EAAE;IAG/D,OAAO,iCAAY,CACjB,gBAAgB,CAAC,mBAAmB,EACpC,gBAAgB,CAAC,eAAe,EAChC,OAAO,CACR,CAAC;AACJ,CAAC;AAVD,wCAUC;AASA,CAAC;AAEF,SAAgB,qBAAqB,CAAC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,OAAO;QACL,MAAM;QACN,SAAS;QACT,SAAS;QACT,mBAAmB;QACnB,eAAe,EAAE,sBAAsB;KACxC,CAAC;AACJ,CAAC;AA7DD,sDA6DC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/cache.d.ts b/gateway/node_modules/@apollo/gateway/dist/cache.d.ts
deleted file mode 100644
index b88c891..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/cache.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { CacheManager } from 'make-fetch-happen';
-import { Request, Response, Headers } from 'apollo-server-env';
-import { InMemoryLRUCache } from 'apollo-server-caching';
-interface CachedRequest {
- body: string;
- status: number;
- statusText: string;
- headers: Headers;
-}
-export declare class HttpRequestCache implements CacheManager {
- cache: InMemoryLRUCache;
- constructor(cache?: InMemoryLRUCache);
- delete(request: Request): Promise;
- put(request: Request, response: Response): Promise;
- match(request: Request): Promise;
-}
-export {};
-//# sourceMappingURL=cache.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/cache.d.ts.map b/gateway/node_modules/@apollo/gateway/dist/cache.d.ts.map
deleted file mode 100644
index e95f0ed..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/cache.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAQzD,UAAU,aAAa;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,qBAAa,gBAAiB,YAAW,YAAY;IAE1C,KAAK,EAAE,gBAAgB,CAAC,aAAa,CAAC;gBAAtC,KAAK,GAAE,gBAAgB,CAAC,aAAa,CAE1C;IAIE,MAAM,CAAC,OAAO,EAAE,OAAO;IAOvB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;IAwBxC,KAAK,CAAC,OAAO,EAAE,OAAO;CAS7B"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/cache.js b/gateway/node_modules/@apollo/gateway/dist/cache.js
deleted file mode 100644
index 1a24bf9..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/cache.js
+++ /dev/null
@@ -1,46 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.HttpRequestCache = void 0;
-const apollo_server_env_1 = require("apollo-server-env");
-const apollo_server_caching_1 = require("apollo-server-caching");
-const MAX_SIZE = 5 * 1024 * 1024;
-function cacheKey(request) {
- return `gateway:request-cache:${request.method}:${request.url}`;
-}
-class HttpRequestCache {
- constructor(cache = new apollo_server_caching_1.InMemoryLRUCache({
- maxSize: MAX_SIZE,
- })) {
- this.cache = cache;
- }
- async delete(request) {
- const key = cacheKey(request);
- const entry = await this.cache.get(key);
- await this.cache.delete(key);
- return Boolean(entry);
- }
- async put(request, response) {
- if (request.method === "HEAD" || response.status === 304) {
- return response;
- }
- const body = await response.text();
- this.cache.set(cacheKey(request), {
- body,
- status: response.status,
- statusText: response.statusText,
- headers: response.headers,
- });
- return new apollo_server_env_1.Response(body, response);
- }
- async match(request) {
- return this.cache.get(cacheKey(request)).then(response => {
- if (response) {
- const { body, ...requestInit } = response;
- return new apollo_server_env_1.Response(body, requestInit);
- }
- return;
- });
- }
-}
-exports.HttpRequestCache = HttpRequestCache;
-//# sourceMappingURL=cache.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/cache.js.map b/gateway/node_modules/@apollo/gateway/dist/cache.js.map
deleted file mode 100644
index a6ad409..0000000
--- a/gateway/node_modules/@apollo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,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAgB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACvD,IAAI,QAAQ,EAAE;gBACZ,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,EAAE,GAAG,QAAQ,CAAC;gBAC1C,OAAO,IAAI,4BAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;aACxC;YACD,OAAO;QACT,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAhDD,4CAgDC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.d.ts b/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.d.ts
deleted file mode 100644
index 5572375..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { GraphQLRequestContext, GraphQLResponse } from 'apollo-server-types';
-import { GraphQLSchema, DocumentNode } from 'graphql';
-import { GraphQLDataSource } from './types';
-export declare class LocalGraphQLDataSource = Record> implements GraphQLDataSource {
- readonly schema: GraphQLSchema;
- constructor(schema: GraphQLSchema);
- process({ request, context, }: Pick, 'request' | 'context'>): Promise;
- sdl(): DocumentNode;
-}
-//# sourceMappingURL=LocalGraphQLDataSource.d.ts.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.d.ts.map b/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.d.ts.map
deleted file mode 100644
index 98b685b..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"LocalGraphQLDataSource.d.ts","sourceRoot":"","sources":["../../src/datasources/LocalGraphQLDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,aAAa,EAGb,YAAY,EAEb,MAAM,SAAS,CAAC;AAIjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,qBAAa,sBAAsB,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,YAAW,iBAAiB,CAAC,QAAQ,CAAC;aACxG,MAAM,EAAE,aAAa;gBAArB,MAAM,EAAE,aAAa;IAI3C,OAAO,CAAC,EACZ,OAAO,EACP,OAAO,GACR,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG,OAAO,CACvE,eAAe,CAChB;IAUM,GAAG,IAAI,YAAY;CAY3B"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.js b/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.js
deleted file mode 100644
index 1c134b1..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.js
+++ /dev/null
@@ -1,33 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LocalGraphQLDataSource = void 0;
-const graphql_1 = require("graphql");
-const schemaInstrumentation_1 = require("apollo-server-core/dist/utils/schemaInstrumentation");
-class LocalGraphQLDataSource {
- constructor(schema) {
- this.schema = schema;
- schemaInstrumentation_1.enablePluginsForSchemaResolvers(schema);
- }
- async process({ request, context, }) {
- return graphql_1.graphql({
- schema: this.schema,
- source: request.query,
- variableValues: request.variables,
- operationName: request.operationName,
- contextValue: context,
- });
- }
- sdl() {
- const result = graphql_1.graphqlSync({
- schema: this.schema,
- source: `{ _service { sdl }}`,
- });
- if (result.errors) {
- throw new Error(result.errors.map(error => error.message).join('\n\n'));
- }
- const sdl = result.data && result.data._service && result.data._service.sdl;
- return graphql_1.parse(sdl);
- }
-}
-exports.LocalGraphQLDataSource = LocalGraphQLDataSource;
-//# sourceMappingURL=LocalGraphQLDataSource.js.map
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.js.map b/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.js.map
deleted file mode 100644
index c2053ad..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/datasources/LocalGraphQLDataSource.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"LocalGraphQLDataSource.js","sourceRoot":"","sources":["../../src/datasources/LocalGraphQLDataSource.ts"],"names":[],"mappings":";;;AACA,qCAMiB;AACjB,+FAE6D;AAG7D,MAAa,sBAAsB;IACjC,YAA4B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;QAC/C,uDAA+B,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EACZ,OAAO,EACP,OAAO,GACsD;QAG7D,OAAO,iBAAO,CAAC;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,OAAO,CAAC,KAAM;YACtB,cAAc,EAAE,OAAO,CAAC,SAAS;YACjC,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,YAAY,EAAE,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,GAAG;QACR,MAAM,MAAM,GAAG,qBAAW,CAAC;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,qBAAqB;SAC9B,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SACzE;QAED,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAC5E,OAAO,eAAK,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;CACF;AAhCD,wDAgCC"}
\ No newline at end of file
diff --git a/gateway/node_modules/@apollo/gateway/dist/datasources/RemoteGraphQLDataSource.d.ts b/gateway/node_modules/@apollo/gateway/dist/datasources/RemoteGraphQLDataSource.d.ts
deleted file mode 100644
index 632f4cd..0000000
--- a/gateway/node_modules/@apollo/gateway/dist/datasources/RemoteGraphQLDataSource.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { GraphQLRequestContext, GraphQLResponse, ValueOrPromise } from 'apollo-server-types';
-import { ApolloError } from 'apollo-server-errors';
-import { fetch, Request, Response } from 'apollo-server-env';
-import { GraphQLDataSource } from './types';
-export declare class RemoteGraphQLDataSource = Record> implements GraphQLDataSource {
- fetcher: typeof fetch;
- constructor(config?: Partial> & object & ThisType>);
- url: string;
- apq: boolean;
- process({ request, context, }: Pick, 'request' | 'context'>): Promise;
- private sendRequest;
- willSendRequest?(requestContext: Pick, 'request' | 'context'>): ValueOrPromise;
- didReceiveResponse?(requestContext: Required, 'request' | 'response' | 'context'>>): ValueOrPromise;
- didEncounterError(error: Error, _fetchRequest: Request, _fetchResponse?: Response): void;
- parseBody(fetchResponse: Response, _fetchRequest?: Request, _context?: TContext): Promise