diff --git a/.changeset/heavy-horses-watch.md b/.changeset/heavy-horses-watch.md new file mode 100644 index 0000000000000..60b1cc8383397 --- /dev/null +++ b/.changeset/heavy-horses-watch.md @@ -0,0 +1,40 @@ +--- +'@graphql-mesh/cache-inmemory-lru': patch +'@graphql-mesh/cli': patch +'@graphql-mesh/config': patch +'@graphql-mesh/graphql': patch +'@graphql-mesh/json-schema': patch +'@graphql-mesh/mongoose': patch +'@graphql-mesh/mysql': patch +'@graphql-mesh/neo4j': patch +'@graphql-mesh/new-openapi': patch +'@graphql-mesh/odata': patch +'@graphql-mesh/openapi': patch +'@graphql-mesh/raml': patch +'@graphql-mesh/soap': patch +'@graphql-mesh/thrift': patch +'@omnigraph/json-schema': patch +'@omnigraph/raml': patch +'@graphql-mesh/merger-bare': patch +'@graphql-mesh/merger-federation': patch +'@graphql-mesh/merger-stitching': patch +'@graphql-mesh/runtime': patch +'@graphql-mesh/store': patch +'@graphql-mesh/transform-cache': patch +'@graphql-mesh/transform-encapsulate': patch +'@graphql-mesh/transform-extend': patch +'@graphql-mesh/transform-federation': patch +'@graphql-mesh/transform-filter-schema': patch +'@graphql-mesh/transform-mock': patch +'@graphql-mesh/transform-naming-convention': patch +'@graphql-mesh/transform-prefix': patch +'@graphql-mesh/transform-prune': patch +'@graphql-mesh/transform-rename': patch +'@graphql-mesh/transform-replace-field': patch +'@graphql-mesh/transform-snapshot': patch +'@graphql-mesh/transform-type-merging': patch +'@graphql-mesh/types': patch +'@graphql-mesh/utils': patch +--- + +fix - align graphql-tools versions diff --git a/.changeset/red-hairs-know.md b/.changeset/red-hairs-know.md new file mode 100644 index 0000000000000..fd528732627cd --- /dev/null +++ b/.changeset/red-hairs-know.md @@ -0,0 +1,14 @@ +--- +'@graphql-mesh/cache-inmemory-lru': minor +'@graphql-mesh/cli': minor +'@graphql-mesh/graphql': minor +'@graphql-mesh/json-schema': minor +'@graphql-mesh/new-openapi': minor +'@graphql-mesh/raml': minor +'@graphql-mesh/runtime': minor +'@graphql-mesh/store': minor +'@graphql-mesh/types': minor +'@graphql-mesh/utils': minor +--- + +enhance: reduce memory consumption diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index d6bbdadc091ef..224da36d34a42 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -44,9 +44,9 @@ jobs: uses: actions/cache@v2 with: path: '**/node_modules' - key: ${{ runner.os }}-17-yarn-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-17-node-modules-${{ hashFiles('yarn.lock') }} restore-keys: | - ${{ runner.os }}-17-yarn- + ${{ runner.os }}-17-node-modules- - name: Install Dependencies using Yarn run: yarn install --ignore-engines && git checkout yarn.lock diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1721ca6237fe..4f8206313e0a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,12 +35,10 @@ jobs: uses: actions/cache@v2 with: path: '**/node_modules' - key: ${{ runner.os }}-17-yarn-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-17-node-modules-${{ hashFiles('yarn.lock') }} restore-keys: | - ${{ runner.os }}-17-yarn- + ${{ runner.os }}-17-node-modules- - - name: Install Dependencies using Yarn - run: yarn install --ignore-engines && git checkout yarn.lock - name: Create Release Pull Request or Publish to npm id: changesets uses: changesets/action@v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8b9a83bb4fef8..0904f89277da5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,9 +22,9 @@ jobs: uses: actions/cache@v2 with: path: '**/node_modules' - key: ${{ runner.os }}-17-yarn-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-17-node-modules-${{ hashFiles('yarn.lock') }} restore-keys: | - ${{ runner.os }}-17-yarn- + ${{ runner.os }}-17-node-modules- - name: Install Dependencies using Yarn run: yarn install --ignore-engines && git checkout yarn.lock @@ -46,9 +46,9 @@ jobs: uses: actions/cache@v2 with: path: '**/node_modules' - key: ${{ runner.os }}-17-yarn-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-17-node-modules-${{ hashFiles('yarn.lock') }} restore-keys: | - ${{ runner.os }}-17-yarn- + ${{ runner.os }}-17-node-modules- - name: Install Dependencies using Yarn run: yarn install --ignore-engines && git checkout yarn.lock @@ -101,9 +101,9 @@ jobs: uses: actions/cache@v2 with: path: '**/node_modules' - key: ${{ runner.os }}-${{matrix.node-version}}-yarn-${{ hashFiles('yarn.lock') }} + key: ${{ runner.os }}-${{matrix.node-version}}-node-modules-${{ hashFiles('yarn.lock') }} restore-keys: | - ${{ runner.os }}-${{matrix.node-version}}-yarn- + ${{ runner.os }}-${{matrix.node-version}}-node-modules- - name: Install Dependencies using Yarn run: yarn install --ignore-engines && git checkout yarn.lock - name: Cache Jest diff --git a/examples/graphql-file-upload-example/package.json b/examples/graphql-file-upload-example/package.json index 7e19c958d272a..5658c42f354e4 100644 --- a/examples/graphql-file-upload-example/package.json +++ b/examples/graphql-file-upload-example/package.json @@ -11,7 +11,7 @@ "@graphql-mesh/cli": "0.61.0", "@graphql-mesh/graphql": "0.21.6", "concurrently": "5.3.0", - "@graphql-yoga/node": "0.1.0-beta.4", + "@graphql-yoga/node": "0.1.1-canary-cabb320.0", "sharp": "0.26.3", "graphql": "16.0.1" } diff --git a/package.json b/package.json index 115ed7e68d6da..e8d1da3168831 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "prettier:check": "prettier --ignore-path .gitignore --check \"**/*.{ts,tsx,graphql,yml}\"", "test": "jest --forceExit --no-watchman", "test-and-build": "yarn build && yarn test", - "prerelease": "yarn build", + "prerelease": "yarn install && yarn build", "release": "changeset publish", "release:canary": "(node scripts/canary-release.js && yarn build && yarn changeset publish --tag $NPM_TAG) || echo Skipping Canary..." }, diff --git a/packages/cache/inmemory-lru/src/index.ts b/packages/cache/inmemory-lru/src/index.ts index 317b6ef602ef0..d857a2c5aa60a 100644 --- a/packages/cache/inmemory-lru/src/index.ts +++ b/packages/cache/inmemory-lru/src/index.ts @@ -1,10 +1,15 @@ -import { globalLruCache } from '@graphql-mesh/utils'; -import { KeyValueCache, KeyValueCacheSetOptions } from '@graphql-mesh/types'; +import { createLruCache, LRUCache } from '@graphql-mesh/utils'; +import { KeyValueCache, KeyValueCacheSetOptions, YamlConfig } from '@graphql-mesh/types'; type CacheEntry = { expiresAt: number; value: V }; export default class InMemoryLRUCache implements KeyValueCache { private cacheIdentifier = Date.now(); + private lruCache: LRUCache; + + constructor(options?: YamlConfig.InMemoryLRUConfig) { + this.lruCache = createLruCache(options?.max, options?.ttl); + } private nextTick() { // Make sure this is scheduled for next tick because LRU Cache is synchronous @@ -14,9 +19,9 @@ export default class InMemoryLRUCache implements KeyValueCache { async get(key: string) { await this.nextTick(); - const entry: CacheEntry = globalLruCache.get(`${this.cacheIdentifier}-${key}`); + const entry: CacheEntry = this.lruCache.get(`${this.cacheIdentifier}-${key}`); if (entry?.expiresAt && Date.now() > entry.expiresAt) { - globalLruCache.delete(key); + this.lruCache.delete(key); return undefined; } return entry?.value; @@ -24,7 +29,7 @@ export default class InMemoryLRUCache implements KeyValueCache { async set(key: string, value: V, options?: KeyValueCacheSetOptions) { await this.nextTick(); - globalLruCache.set(`${this.cacheIdentifier}-${key}`, { + this.lruCache.set(`${this.cacheIdentifier}-${key}`, { expiresAt: options?.ttl ? Date.now() + options.ttl * 1000 : Infinity, value, }); @@ -32,6 +37,6 @@ export default class InMemoryLRUCache implements KeyValueCache { async delete(key: string) { await this.nextTick(); - globalLruCache.delete(`${this.cacheIdentifier}-${key}`); + this.lruCache.delete(`${this.cacheIdentifier}-${key}`); } } diff --git a/packages/cache/inmemory-lru/yaml-config.graphql b/packages/cache/inmemory-lru/yaml-config.graphql index 2923273d5c182..4a8813f96f334 100644 --- a/packages/cache/inmemory-lru/yaml-config.graphql +++ b/packages/cache/inmemory-lru/yaml-config.graphql @@ -4,4 +4,5 @@ type Cache { type InMemoryLRUConfig @md { max: Int + ttl: Int } diff --git a/packages/cli/package.json b/packages/cli/package.json index d1564b1364609..f4c46fe5924d3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -48,13 +48,13 @@ "@graphql-mesh/utils": "0.29.0", "@graphql-mesh/store": "0.3.29", "@graphql-mesh/types": "0.66.6", - "@graphql-tools/code-file-loader": "7.2.4", - "@graphql-tools/utils": "8.6.2", - "@graphql-tools/load": "7.5.2", - "@graphql-tools/graphql-file-loader": "7.3.4", - "@graphql-tools/wrap": "8.4.4", + "@graphql-tools/code-file-loader": "7.2.5", + "@graphql-tools/utils": "8.6.3", + "@graphql-tools/load": "7.5.3", + "@graphql-tools/graphql-file-loader": "7.3.5", + "@graphql-tools/wrap": "8.4.6", "@graphql-yoga/render-graphiql": "0.1.0-beta.1", - "@graphql-yoga/node": "0.1.0-beta.4", + "@graphql-yoga/node": "0.1.1-canary-cabb320.0", "body-parser": "1.19.2", "cookie-parser": "1.4.6", "cors": "2.8.5", diff --git a/packages/cli/src/commands/serve/graphql-handler.ts b/packages/cli/src/commands/serve/graphql-handler.ts index 1592d541fec40..b9bf3fef80ae1 100644 --- a/packages/cli/src/commands/serve/graphql-handler.ts +++ b/packages/cli/src/commands/serve/graphql-handler.ts @@ -10,6 +10,8 @@ function shouldRenderGraphiQL(req: IncomingMessage) { export const graphqlHandler = (mesh$: Promise): RequestHandler => { const yoga$ = mesh$.then(mesh => createServer({ + parserCache: false, + validationCache: false, plugins: [ ...mesh.plugins, useExtendContext(({ req, res }) => ({ diff --git a/packages/cli/src/commands/ts-artifacts.ts b/packages/cli/src/commands/ts-artifacts.ts index ff83c2c9fd658..1f1c0ace3454c 100644 --- a/packages/cli/src/commands/ts-artifacts.ts +++ b/packages/cli/src/commands/ts-artifacts.ts @@ -293,9 +293,14 @@ export async function ${cliParams.builtMeshFactoryName}(): Promise(meshConfig); } -export async function ${cliParams.builtMeshSDKFactoryName}() { - const { execute } = await ${cliParams.builtMeshFactoryName}(); - return getSdk((document, variables, context) => execute(document, variables, context)); +export async function ${ + cliParams.builtMeshSDKFactoryName + }(globalContext: TGlobalContext) { + const { execute, meshContext } = await ${cliParams.builtMeshFactoryName}(); + return getSdk((document, variables, context) => execute(document, variables, ({ + ...context, + ...meshContext, + }))); }`; return { diff --git a/packages/config/package.json b/packages/config/package.json index e9faf56058783..3306990db40de 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -30,11 +30,11 @@ "@graphql-mesh/types": "0.66.6", "@graphql-mesh/store": "0.3.29", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/merge": "8.2.3", - "@graphql-tools/utils": "8.6.2", - "@graphql-tools/load": "7.5.2", - "@graphql-tools/code-file-loader": "7.2.4", - "@graphql-tools/graphql-file-loader": "7.3.4", + "@graphql-tools/merge": "8.2.4", + "@graphql-tools/utils": "8.6.3", + "@graphql-tools/load": "7.5.3", + "@graphql-tools/code-file-loader": "7.2.5", + "@graphql-tools/graphql-file-loader": "7.3.5", "param-case": "3.0.4", "@envelop/core": "2.1.0", "tslib": "^2.3.1", diff --git a/packages/handlers/graphql/package.json b/packages/handlers/graphql/package.json index 37105e2fa90ac..2f4958df5acac 100644 --- a/packages/handlers/graphql/package.json +++ b/packages/handlers/graphql/package.json @@ -26,10 +26,10 @@ "@graphql-mesh/store": "0.3.29", "@graphql-mesh/utils": "0.29.0", "@graphql-mesh/types": "0.66.6", - "@graphql-tools/url-loader": "7.9.2", - "@graphql-tools/wrap": "8.4.4", - "@graphql-tools/delegate": "8.5.3", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/url-loader": "7.9.4", + "@graphql-tools/wrap": "8.4.6", + "@graphql-tools/delegate": "8.5.4", + "@graphql-tools/utils": "8.6.3", "tslib": "^2.3.1" }, "publishConfig": { diff --git a/packages/handlers/graphql/src/index.ts b/packages/handlers/graphql/src/index.ts index b7f18613c5055..436ba9a03cd1c 100644 --- a/packages/handlers/graphql/src/index.ts +++ b/packages/handlers/graphql/src/index.ts @@ -41,7 +41,7 @@ export default class GraphQLHandler implements MeshHandler { this.config = config; this.baseDir = baseDir; this.cache = cache; - this.nonExecutableSchema = store.proxy('schema.graphql', PredefinedProxyOptions.GraphQLSchemaWithDiffing); + this.nonExecutableSchema = store.proxy('introspectionSchema', PredefinedProxyOptions.GraphQLSchemaWithDiffing); this.importFn = importFn; } diff --git a/packages/handlers/json-schema/package.json b/packages/handlers/json-schema/package.json index e60f44dfb138d..8e4b8418f04ff 100644 --- a/packages/handlers/json-schema/package.json +++ b/packages/handlers/json-schema/package.json @@ -27,7 +27,7 @@ "@graphql-mesh/types": "0.66.6", "@graphql-mesh/utils": "0.29.0", "@graphql-mesh/store": "0.3.29", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "graphql-compose": "9.0.7", "@omnigraph/json-schema": "0.17.7", "tslib": "^2.3.1", diff --git a/packages/handlers/json-schema/src/index.ts b/packages/handlers/json-schema/src/index.ts index b28dd52600a24..aaa6faa7c90eb 100644 --- a/packages/handlers/json-schema/src/index.ts +++ b/packages/handlers/json-schema/src/index.ts @@ -22,7 +22,7 @@ export default class JsonSchemaHandler implements MeshHandler { this.baseDir = baseDir; this.cache = cache; this.pubsub = pubsub; - this.jsonSchema = store.proxy('jsonSchema.json', JsonSchemaWithDiff); + this.jsonSchema = store.proxy('jsonSchemaBundle', JsonSchemaWithDiff); this.logger = logger; this.fetch = getCachedFetch(this.cache); } diff --git a/packages/handlers/mongoose/package.json b/packages/handlers/mongoose/package.json index cabc6becf4f0d..f9614bb7f081e 100644 --- a/packages/handlers/mongoose/package.json +++ b/packages/handlers/mongoose/package.json @@ -33,7 +33,7 @@ "graphql-compose-mongoose": "9.7.1", "graphql-compose-connection": "8.2.1", "graphql-compose-pagination": "8.3.0", - "@graphql-tools/stitching-directives": "2.2.2", + "@graphql-tools/stitching-directives": "2.2.4", "tslib": "^2.3.1" }, "publishConfig": { diff --git a/packages/handlers/mysql/package.json b/packages/handlers/mysql/package.json index c70c6211bbf8c..72dbb18c43840 100644 --- a/packages/handlers/mysql/package.json +++ b/packages/handlers/mysql/package.json @@ -35,7 +35,7 @@ "mysql-utilities": "1.1.3", "graphql-scalars": "1.15.0", "tslib": "^2.3.1", - "@graphql-tools/utils": "8.6.2" + "@graphql-tools/utils": "8.6.3" }, "devDependencies": { "@types/graphql-fields": "1.3.4", diff --git a/packages/handlers/neo4j/package.json b/packages/handlers/neo4j/package.json index cb3dc97e45d50..7a00ad08271c5 100644 --- a/packages/handlers/neo4j/package.json +++ b/packages/handlers/neo4j/package.json @@ -32,7 +32,7 @@ "neo4j-driver": "4.4.3", "neo4j-graphql-js": "2.19.4", "tslib": "^2.3.1", - "@graphql-tools/utils": "8.6.2" + "@graphql-tools/utils": "8.6.3" }, "publishConfig": { "access": "public", diff --git a/packages/handlers/new-openapi/src/index.ts b/packages/handlers/new-openapi/src/index.ts index 55d19535957f0..45266da6ec4a3 100644 --- a/packages/handlers/new-openapi/src/index.ts +++ b/packages/handlers/new-openapi/src/index.ts @@ -24,7 +24,7 @@ export default class OpenAPIHandler implements MeshHandler { this.config = config; this.baseDir = baseDir; this.fetch = getCachedFetch(cache); - this.bundleStoreProxy = store.proxy('oas-bundle.js', PredefinedProxyOptions.JsonWithoutValidation); + this.bundleStoreProxy = store.proxy('jsonSchemaBundle', PredefinedProxyOptions.JsonWithoutValidation); this.pubsub = pubsub; this.logger = logger; } diff --git a/packages/handlers/odata/package.json b/packages/handlers/odata/package.json index 7e1df36c7eb7c..aae09807b28f8 100644 --- a/packages/handlers/odata/package.json +++ b/packages/handlers/odata/package.json @@ -30,7 +30,7 @@ "@graphql-mesh/types": "0.66.6", "@graphql-mesh/store": "0.3.29", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "http-string-parser": "0.0.6", "cross-undici-fetch": "0.1.25", "dataloader": "2.0.0", diff --git a/packages/handlers/openapi/package.json b/packages/handlers/openapi/package.json index f3895416cc895..b297e6b9e93d4 100644 --- a/packages/handlers/openapi/package.json +++ b/packages/handlers/openapi/package.json @@ -30,7 +30,7 @@ "@graphql-mesh/types": "0.66.6", "@graphql-mesh/store": "0.3.29", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "cross-undici-fetch": "0.1.25", "deep-equal": "2.0.5", "form-urlencoded": "6.0.6", diff --git a/packages/handlers/raml/src/index.ts b/packages/handlers/raml/src/index.ts index f6a30ceb3fef5..fca86e52ff0b4 100644 --- a/packages/handlers/raml/src/index.ts +++ b/packages/handlers/raml/src/index.ts @@ -16,7 +16,7 @@ export default class RAMLHandler implements MeshHandler { this.config = config; this.baseDir = baseDir; this.fetch = getCachedFetch(cache); - this.bundleStoreProxy = store.proxy('raml-bundle.js', PredefinedProxyOptions.JsonWithoutValidation); + this.bundleStoreProxy = store.proxy('jsonSchemaBundle', PredefinedProxyOptions.JsonWithoutValidation); this.pubsub = pubsub; this.logger = logger; } diff --git a/packages/handlers/soap/package.json b/packages/handlers/soap/package.json index b82f02da481b5..74539b490f55a 100644 --- a/packages/handlers/soap/package.json +++ b/packages/handlers/soap/package.json @@ -26,7 +26,7 @@ "@graphql-mesh/types": "0.66.6", "@graphql-mesh/store": "0.3.29", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "graphql-scalars": "1.15.0", "soap": "0.43.0", "tslib": "^2.3.1" diff --git a/packages/handlers/thrift/package.json b/packages/handlers/thrift/package.json index dfb92b0012d26..5cc709b184fa5 100644 --- a/packages/handlers/thrift/package.json +++ b/packages/handlers/thrift/package.json @@ -33,7 +33,7 @@ "@graphql-mesh/types": "0.66.6", "@graphql-mesh/store": "0.3.29", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "fetchache": "0.1.1", "graphql-scalars": "1.15.0", "url-join": "4.0.1", diff --git a/packages/loaders/json-schema/package.json b/packages/loaders/json-schema/package.json index cf565a40f9f1e..b18ce4b50dbc0 100644 --- a/packages/loaders/json-schema/package.json +++ b/packages/loaders/json-schema/package.json @@ -32,7 +32,7 @@ "json-machete": "0.5.17", "@graphql-mesh/types": "0.66.6", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "to-json-schema": "0.2.5", "graphql-compose": "9.0.7", "graphql-scalars": "1.15.0", diff --git a/packages/loaders/raml/package.json b/packages/loaders/raml/package.json index 4cfe459fed793..47452d87fbd19 100644 --- a/packages/loaders/raml/package.json +++ b/packages/loaders/raml/package.json @@ -29,7 +29,7 @@ "json-machete": "0.5.17", "to-json-schema": "0.2.5", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "tslib": "^2.3.1", "change-case": "4.1.2" }, diff --git a/packages/mergers/bare/package.json b/packages/mergers/bare/package.json index cecad953738a7..a6e5b76e89058 100644 --- a/packages/mergers/bare/package.json +++ b/packages/mergers/bare/package.json @@ -26,9 +26,9 @@ "@graphql-mesh/types": "0.66.6", "@graphql-mesh/utils": "0.29.0", "fetchache": "0.1.1", - "@graphql-tools/schema": "8.3.2", - "@graphql-tools/wrap": "8.4.4", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/schema": "8.3.3", + "@graphql-tools/wrap": "8.4.6", + "@graphql-tools/utils": "8.6.3", "tslib": "^2.3.1" }, "publishConfig": { diff --git a/packages/mergers/federation/package.json b/packages/mergers/federation/package.json index 48531e2f3f69b..cafe29c34c5bd 100644 --- a/packages/mergers/federation/package.json +++ b/packages/mergers/federation/package.json @@ -24,11 +24,11 @@ }, "dependencies": { "@graphql-mesh/types": "0.66.6", - "@graphql-tools/wrap": "8.4.4", + "@graphql-tools/wrap": "8.4.6", "@apollo/gateway": "0.48.3", - "@graphql-tools/schema": "8.3.2", + "@graphql-tools/schema": "8.3.3", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "@graphql-mesh/store": "0.3.29", "tslib": "^2.3.1" }, diff --git a/packages/mergers/stitching/package.json b/packages/mergers/stitching/package.json index 23d8f404c129f..053124865aa1f 100644 --- a/packages/mergers/stitching/package.json +++ b/packages/mergers/stitching/package.json @@ -24,14 +24,14 @@ }, "dependencies": { "@graphql-mesh/types": "0.66.6", - "@graphql-tools/stitch": "8.5.0", - "@graphql-tools/wrap": "8.4.4", + "@graphql-tools/stitch": "8.5.2", + "@graphql-tools/wrap": "8.4.6", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/delegate": "8.5.3", - "@graphql-tools/stitching-directives": "2.2.2", - "@graphql-tools/schema": "8.3.2", + "@graphql-tools/delegate": "8.5.4", + "@graphql-tools/stitching-directives": "2.2.4", + "@graphql-tools/schema": "8.3.3", "@graphql-mesh/store": "0.3.29", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "tslib": "^2.3.1" }, "publishConfig": { diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 8b9d02ea25093..cb726a1b32c0c 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -27,12 +27,12 @@ "@n1ru4l/in-memory-live-query-store": "0.9.0", "@graphql-mesh/types": "0.66.6", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/delegate": "8.5.3", - "@graphql-tools/batch-delegate": "8.2.4", - "@graphql-tools/resolvers-composition": "6.4.2", - "@graphql-tools/schema": "8.3.2", - "@graphql-tools/wrap": "8.4.4", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/delegate": "8.5.4", + "@graphql-tools/batch-delegate": "8.2.6", + "@graphql-tools/resolvers-composition": "6.4.3", + "@graphql-tools/schema": "8.3.3", + "@graphql-tools/wrap": "8.4.6", + "@graphql-tools/utils": "8.6.3", "@envelop/core": "2.1.0", "@envelop/live-query": "3.1.0", "tslib": "^2.3.1", diff --git a/packages/runtime/src/get-mesh.ts b/packages/runtime/src/get-mesh.ts index da7f4347b0729..3fedeab230833 100644 --- a/packages/runtime/src/get-mesh.ts +++ b/packages/runtime/src/get-mesh.ts @@ -34,7 +34,6 @@ import { ResolverDataBasedFactory, DefaultLogger, parseWithCache, - globalLruCache, printWithCache, } from '@graphql-mesh/utils'; @@ -303,13 +302,14 @@ See more at https://www.graphql-mesh.com/docs/recipes/live-queries`); }) ); + const compiledQueries = new Map(); if (options.documents?.length) { - logger.info(`Compiling operation documents`); + getMeshLogger.debug(() => `Compiling operation documents`); for (const documentSource of options.documents || []) { - globalLruCache.set(`sdl_${documentSource.rawSDL}`, documentSource.document); - const documentJson = JSON.stringify(documentSource.document); - globalLruCache.set(`documentJson_${documentJson}`, documentSource.rawSDL); - globalLruCache.set(`compiled_${documentSource.rawSDL}`, compileQuery(unifiedSchema, documentSource.document)); + compiledQueries.set( + documentSource.rawSDL || printWithCache(documentSource.document), + compileQuery(unifiedSchema, documentSource.document || parseWithCache(documentSource.rawSDL)) + ); } } @@ -337,20 +337,19 @@ See more at https://www.graphql-mesh.com/docs/recipes/live-queries`); errors.forEach(error => logger.error(error.stack || error.message)); }), { + onParse({ setParseFn }) { + setParseFn(parseWithCache); + }, onValidate({ params, setResult }) { - const sdl = printWithCache(params.documentAST); - const cacheKey = `compiled_${sdl}`; - if (globalLruCache.has(cacheKey)) { + const sdl = printWithCache(params.documentAST).trim(); + if (compiledQueries.has(sdl)) { setResult([]); } }, - onParse({ setParseFn }) { - setParseFn(parseWithCache); - }, onSubscribe({ args: subscriptionArgs, setSubscribeFn }) { const sdl = printWithCache(subscriptionArgs.document); const cacheKey = `compiled_${sdl}`; - const compiledQuery = globalLruCache.get(cacheKey) as CompiledQuery | ExecutionResult; + const compiledQuery = compiledQueries.get(cacheKey) as CompiledQuery | ExecutionResult; if (compiledQuery != null) { logger.debug( () => @@ -373,7 +372,7 @@ See more at https://www.graphql-mesh.com/docs/recipes/live-queries`); onExecute({ args: executionArgs, setResultAndStopExecution, setExecuteFn }) { const sdl = printWithCache(executionArgs.document); const cacheKey = `compiled_${sdl}`; - const compiledQuery = globalLruCache.get(cacheKey) as CompiledQuery | ExecutionResult; + const compiledQuery = compiledQueries.get(cacheKey); if (compiledQuery != null) { logger.debug( () => diff --git a/packages/store/package.json b/packages/store/package.json index cf2f850840049..e41ed0297a556 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -28,7 +28,7 @@ "dependencies": { "@graphql-inspector/core": "3.1.1", "@graphql-mesh/utils": "0.29.0", - "@graphql-tools/utils": "8.6.2", + "@graphql-tools/utils": "8.6.3", "@graphql-mesh/types": "0.66.6", "tslib": "^2.3.1" }, diff --git a/packages/store/src/index.ts b/packages/store/src/index.ts index 087463cf52feb..9b8db10921e11 100644 --- a/packages/store/src/index.ts +++ b/packages/store/src/index.ts @@ -42,15 +42,14 @@ export interface FsStoreStorageAdapterOptions { export class FsStoreStorageAdapter implements StoreStorageAdapter { constructor(private options: FsStoreStorageAdapterOptions) {} - private getWrittenFileName(key: string) { - const jsFileName = `${key}.ts`; + private getAbsolutePath(jsFileName: string) { return pathModule.isAbsolute(jsFileName) ? jsFileName : pathModule.join(this.options.cwd, jsFileName); } - async read(key: string, options: ProxyOptions): Promise { - const filePath = this.getWrittenFileName(key); + async read(key: string): Promise { + const absoluteModulePath = this.getAbsolutePath(key); try { - return await this.options.importFn(filePath).then(m => m.default || m); + return await this.options.importFn(absoluteModulePath).then(m => m.default || m); } catch (e) { if (e.message.startsWith('Cannot find module')) { return undefined; @@ -61,13 +60,14 @@ export class FsStoreStorageAdapter implements StoreStorageAdapter { async write(key: string, data: TData, options: ProxyOptions): Promise { const asString = await options.codify(data, key); - const filePath = this.getWrittenFileName(key); - await writeFile(filePath, flatString(asString)); - await this.options.importFn(filePath); + const modulePath = this.getAbsolutePath(key); + const filePath = modulePath + '.ts'; + await writeFile(filePath, flatString(`// @ts-nocheck\n` + asString)); + await this.options.importFn(modulePath); } async delete(key: string): Promise { - const filePath = this.getWrittenFileName(key); + const filePath = this.getAbsolutePath(key) + '.ts'; return fs.promises.unlink(filePath); } } @@ -95,15 +95,13 @@ export enum PredefinedProxyOptionsName { GraphQLSchemaWithDiffing = 'GraphQLSchemaWithDiffing', } -const escapeForTemplateLiteral = (str: string) => str.split('`').join('\\`').split('$').join('\\$'); - export const PredefinedProxyOptions: Record> = { JsonWithoutValidation: { - codify: v => `export default ${JSON.stringify(v, null, 2)}`, + codify: v => `export default JSON.parse(decodeURIComponent('${encodeURIComponent(JSON.stringify(v))}'))`, validate: () => null, }, StringWithoutValidation: { - codify: v => `export default \`${escapeForTemplateLiteral(v)}\``, + codify: v => `export default 'decodeURIComponent(${encodeURIComponent(v)}')`, validate: () => null, }, GraphQLSchemaWithDiffing: { @@ -111,9 +109,9 @@ export const PredefinedProxyOptions: Record(request: ExecutionRequest) { const { document, variables, context, operationName, rootValue } = request; const documentStr = printWithCache(document); logger.debug(() => `Executing ${documentStr}`); const cacheKey = [prefix, documentStr, operationName].join('_'); - let compiledQueryFn: CompiledQuery['query'] | CompiledQuery['subscribe'] = globalLruCache.get(cacheKey); + let compiledQueryFn: CompiledQuery['query'] | CompiledQuery['subscribe'] = lruCache.get(cacheKey); if (!compiledQueryFn) { logger.debug(() => `Compiling ${documentStr}`); const compiledQuery = compileQuery(schema, document, operationName); @@ -25,7 +30,7 @@ export function jitExecutorFactory(schema: GraphQLSchema, prefix: string, logger } else { compiledQueryFn = () => compiledQuery; } - globalLruCache.set(cacheKey, compiledQueryFn); + lruCache.set(cacheKey, compiledQueryFn); } else { logger.debug(() => `Compiled version found for ${documentStr}`); } diff --git a/packages/utils/src/parseAndPrintWithCache.ts b/packages/utils/src/parseAndPrintWithCache.ts index 9e7dcd503e710..776fe3cafb5ed 100644 --- a/packages/utils/src/parseAndPrintWithCache.ts +++ b/packages/utils/src/parseAndPrintWithCache.ts @@ -1,33 +1,31 @@ +import { memoize1 } from '@graphql-tools/utils'; import { DocumentNode, parse, print } from 'graphql'; -import { globalLruCache } from './global-lru-cache'; +import { createLruCache } from './global-lru-cache'; + +const parseCache = createLruCache(1000, 3600); +const printCache = createLruCache(1000, 3600); export function parseWithCache(sdl: string): DocumentNode { - const sdlKey = `sdl_${sdl.trim()}`; - let document: DocumentNode = globalLruCache.get(sdlKey); + const trimmedSdl = sdl.trim(); + let document: DocumentNode = parseCache.get(trimmedSdl); if (!document) { - document = parse(sdl, { noLocation: true }); - globalLruCache.set(sdlKey, document); - const stringifedDocumentJson = JSON.stringify(document); - const documentJsonKey = `documentJson_${stringifedDocumentJson}`; - globalLruCache.set(documentJsonKey, sdl); + document = parse(trimmedSdl, { noLocation: true }); + parseCache.set(trimmedSdl, document); + printCache.set(JSON.stringify(document), trimmedSdl); } return document; } -export function printWithCache(document: DocumentNode): string { +export const printWithCache = memoize1(function printWithCache(document: DocumentNode): string { const stringifedDocumentJson = JSON.stringify(document); - let sdl: string = globalLruCache.get(stringifedDocumentJson); + let sdl: string = printCache.get(stringifedDocumentJson); if (!sdl) { sdl = print(document).trim(); - const documentJsonKey = `documentJson_${stringifedDocumentJson}`; - globalLruCache.set(documentJsonKey, sdl); - const sdlKey = `sdl_${sdl}`; - if (!globalLruCache.has(sdlKey)) { - globalLruCache.set(sdlKey, document); - } + printCache.set(stringifedDocumentJson, sdl); + parseCache.set(sdl, document); } return sdl; -} +}); export function gql([sdl]: [string]) { return parseWithCache(sdl); diff --git a/website/docs/handlers/graphql.mdx b/website/docs/handlers/graphql.mdx index 297c90dbb7fd6..9410d3cf7b9d4 100644 --- a/website/docs/handlers/graphql.mdx +++ b/website/docs/handlers/graphql.mdx @@ -65,6 +65,6 @@ sources: {@import ../generated-markdown/GraphQLHandlerHTTPConfiguration.generated.md} or -{@import ../generated-markdown/GraphQLHandlerCodeFirstConfiguration.generated} +{@import ../generated-markdown/GraphQLHandlerCodeFirstConfiguration.generated.md} or {@import ../generated-markdown/GraphQLHandlerMultipleHTTPConfiguration.generated.md} diff --git a/yarn.lock b/yarn.lock index fecb740609c96..e84089ab46a8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2777,13 +2777,13 @@ object-inspect "1.10.3" tslib "^2.0.0" -"@graphql-tools/batch-delegate@8.2.4": - version "8.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-delegate/-/batch-delegate-8.2.4.tgz#ac4b87445df5f4ebd987876cbaf876c99c932945" - integrity sha512-MjoUlgfqXgbe5CtGo5uUkx6uwI1qXWEyd4WEi2G4bJ8RkJdrI1eodJxhWX3tVNR+LhjO1jlqf9f/9eJm38sXjQ== +"@graphql-tools/batch-delegate@8.2.6": + version "8.2.6" + resolved "https://registry.yarnpkg.com/@graphql-tools/batch-delegate/-/batch-delegate-8.2.6.tgz#9c1c31537e5169ebf0a6f67a9a763b8a67d9d235" + integrity sha512-DYIt31SEfFAEYxVYIAVHdmiDZ9MSWRVx2mzCmyakBaFFWraqgDX4TseOsmyjQWpHyAu4LhVSRnY218vBS0R9+A== dependencies: - "@graphql-tools/delegate" "^8.5.1" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/delegate" "8.5.4" + "@graphql-tools/utils" "8.6.3" dataloader "2.0.0" tslib "~2.3.0" @@ -2796,6 +2796,16 @@ dataloader "2.0.0" tslib "~2.1.0" +"@graphql-tools/batch-execute@8.3.3": + version "8.3.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.3.3.tgz#71088500d5d4865d3530cc15921cc106c41602b1" + integrity sha512-22q/uCMUf+z3EWoM3ZM6DopDBGkni2TsfUb/mJIysunh5u8btAuXeju++De7RFwwUw+awdJXfunFQJG+OoH5Dg== + dependencies: + "@graphql-tools/utils" "8.6.3" + dataloader "2.0.0" + tslib "~2.3.0" + value-or-promise "1.0.11" + "@graphql-tools/batch-execute@^7.0.0", "@graphql-tools/batch-execute@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-7.1.2.tgz#35ba09a1e0f80f34f1ce111d23c40f039d4403a0" @@ -2806,23 +2816,13 @@ tslib "~2.2.0" value-or-promise "1.0.6" -"@graphql-tools/batch-execute@^8.3.2": - version "8.3.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/batch-execute/-/batch-execute-8.3.2.tgz#8b5a731d5343f0147734f12d480aafde2a1b6eba" - integrity sha512-ICWqM+MvEkIPHm18Q0cmkvm134zeQMomBKmTRxyxMNhL/ouz6Nqld52/brSlaHnzA3fczupeRJzZ0YatruGBcQ== +"@graphql-tools/code-file-loader@7.2.5": + version "7.2.5" + resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-7.2.5.tgz#47b4c1a688dca1b31eef6bc4e9c41f91e8e0a3c4" + integrity sha512-3pj10/qyQxjfkweOVUEYYhTRfpMxj/cAgJScurTwRiPPBl/t+9rhSCAmr9f0LYljXP+Qo+k8btW/ru0vyyeLHg== dependencies: - "@graphql-tools/utils" "^8.6.2" - dataloader "2.0.0" - tslib "~2.3.0" - value-or-promise "1.0.11" - -"@graphql-tools/code-file-loader@7.2.4": - version "7.2.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/code-file-loader/-/code-file-loader-7.2.4.tgz#f35bf3050b4375ee5c2da0c34a896392cc7bea3f" - integrity sha512-KjIxYKDIbrtRGzeboYC98OnRnCvDVDC3E+suH48J4/KxweSjrG+ZpD++T/A11FdIcFb1Y5OceCw+OwjHI5OoyQ== - dependencies: - "@graphql-tools/graphql-tag-pluck" "^7.1.6" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/graphql-tag-pluck" "7.1.7" + "@graphql-tools/utils" "8.6.3" globby "^11.0.3" tslib "~2.3.0" unixify "^1.0.0" @@ -2847,16 +2847,16 @@ is-promise "4.0.0" tslib "~2.0.1" -"@graphql-tools/delegate@8.5.3", "@graphql-tools/delegate@^8.5.1", "@graphql-tools/delegate@^8.5.3": - version "8.5.3" - resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-8.5.3.tgz#3d870ef531ce60e656d996828e8909f0c45e6f20" - integrity sha512-e65cEmAccodc3tlVskU0JgEbHgJUGB4sbd/dk2v15nOFzjj9izBTsTdvebI1Bm28Mip10vBJj9G0jJcTeOIyhg== +"@graphql-tools/delegate@8.5.4": + version "8.5.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/delegate/-/delegate-8.5.4.tgz#9af9bac0111e90129d963dd1c999ca540b366fcd" + integrity sha512-+3BCgSPCp/HoeOBjhz6X7RY7HMCNBanz/wkxo0/e4rk8TqJ3sjZCH470SHvsxCsBIlMwx4FYwkmxePgX/V+0Cg== dependencies: - "@graphql-tools/batch-execute" "^8.3.2" - "@graphql-tools/schema" "^8.3.2" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/batch-execute" "8.3.3" + "@graphql-tools/schema" "8.3.3" + "@graphql-tools/utils" "8.6.3" dataloader "2.0.0" - graphql-executor "0.0.18" + graphql-executor "0.0.19" tslib "~2.3.0" value-or-promise "1.0.11" @@ -2902,13 +2902,13 @@ fs-extra "9.0.1" tslib "~2.0.1" -"@graphql-tools/graphql-file-loader@7.3.4": - version "7.3.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.3.4.tgz#61e3e7e6223a21fbdd987f2abaa6f14104ab7b4a" - integrity sha512-Q0/YtDq0APR6syRclsQMNguWKRlchd8nFTOpLhfc7Xeiy21VhEEi4Ik+quRySfb7ubDfJGhiUq4MQW43FhWJvg== +"@graphql-tools/graphql-file-loader@7.3.5": + version "7.3.5" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-file-loader/-/graphql-file-loader-7.3.5.tgz#bf3408c5abf4c86d62df8c90c6d71d0454a48187" + integrity sha512-TBWDA7EV/cmFFUlN2eT9JqYIkiOGEtwwOgzzPcjM9HlPrbKjQkPIJ9Jaxp7aKWbSGhJ+PnbZ7vFLFLGKsCYOjg== dependencies: - "@graphql-tools/import" "^6.6.6" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/import" "6.6.7" + "@graphql-tools/utils" "8.6.3" globby "^11.0.3" tslib "~2.3.0" unixify "^1.0.0" @@ -2922,6 +2922,17 @@ "@graphql-tools/utils" "^7.0.0" tslib "~2.1.0" +"@graphql-tools/graphql-tag-pluck@7.1.7": + version "7.1.7" + resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.1.7.tgz#af758fb3e82cf06f9f88187f159e6d1feb22d6bb" + integrity sha512-942yDEEJK2qMV9L5fLTZSa/XPTjjOBsNZyYPJD07oca7Cx08b5uajFPu53y+TJeOD/YD+sExGiUw8tUiogdmjg== + dependencies: + "@babel/parser" "^7.16.8" + "@babel/traverse" "^7.16.8" + "@babel/types" "^7.16.8" + "@graphql-tools/utils" "8.6.3" + tslib "~2.3.0" + "@graphql-tools/graphql-tag-pluck@^6.2.6", "@graphql-tools/graphql-tag-pluck@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-6.5.1.tgz#5fb227dbb1e19f4b037792b50f646f16a2d4c686" @@ -2933,17 +2944,6 @@ "@graphql-tools/utils" "^7.0.0" tslib "~2.1.0" -"@graphql-tools/graphql-tag-pluck@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-7.1.6.tgz#c78a3f416e06194069609fac6d44c09dd40f6bda" - integrity sha512-VdubvdS8pIrAPVDq6hV7ARXz2Yh8/2153+RO6i+RJOMgyFw8wOW3jRCKE93eN+Hk2pZBC2x3kzdNeUAyVpuslg== - dependencies: - "@babel/parser" "^7.16.8" - "@babel/traverse" "^7.16.8" - "@babel/types" "^7.16.8" - "@graphql-tools/utils" "^8.6.2" - tslib "~2.3.0" - "@graphql-tools/import@6.1.0": version "6.1.0" resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.1.0.tgz#82994007a99ba93db3ad95a5c51a59d9c9e84439" @@ -2952,7 +2952,16 @@ fs-extra "9.0.1" resolve-from "5.0.0" -"@graphql-tools/import@^6.2.4", "@graphql-tools/import@^6.2.6", "@graphql-tools/import@^6.6.6": +"@graphql-tools/import@6.6.7": + version "6.6.7" + resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.6.7.tgz#10be66af927c9293c5720c6a7a5de952bedd4c46" + integrity sha512-zzpnVtmdel3mKz6i46GUib4wn0K5dosq4OTBl4avKV6ElvgZTkvsvfSv2aRhbRGIT4VnZPXLfzSnmYd8e+SRLQ== + dependencies: + "@graphql-tools/utils" "8.6.3" + resolve-from "5.0.0" + tslib "~2.3.0" + +"@graphql-tools/import@^6.2.4", "@graphql-tools/import@^6.2.6": version "6.6.6" resolved "https://registry.yarnpkg.com/@graphql-tools/import/-/import-6.6.6.tgz#a4ff216e6b8a49c392bb8a4378d4e9caf2b303d7" integrity sha512-a0aVajxqu1MsL8EwavA44Osw20lBOIhq8IM2ZIHFPP62cPAcOB26P+Sq57DHMsSyX5YQ0ab9XPM2o4e1dQhs0w== @@ -3015,13 +3024,13 @@ unixify "1.0.0" valid-url "1.0.9" -"@graphql-tools/load@7.5.2": - version "7.5.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-7.5.2.tgz#0e46129f412bd038ac56996083458c1b8828526f" - integrity sha512-URPqVP77mYxdZxT895DzrWf2C23S3yC/oAmXD4D4YlxR5eVVH/fxu0aZR78WcEKF331fWSiFwWy9j7BZWvkj7g== +"@graphql-tools/load@7.5.3": + version "7.5.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/load/-/load-7.5.3.tgz#e7414d11e53ad8b78d5a74a0bd7ae958fa717a5c" + integrity sha512-GYwLyGfX1nKUxg6rnTIdryv9d+ugFRTm2q11+IqNsajwNhxJExkx+e/h81AQR5382sAmPEIT+E1J1VS3xNfjyg== dependencies: - "@graphql-tools/schema" "8.3.2" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/schema" "8.3.3" + "@graphql-tools/utils" "8.6.3" p-limit "3.1.0" tslib "~2.3.0" @@ -3049,12 +3058,12 @@ "@graphql-tools/utils" "6.1.0" tslib "~2.0.1" -"@graphql-tools/merge@8.2.3", "@graphql-tools/merge@^8.2.3": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.2.3.tgz#a2861fec230ee7be9dc42d72fed2ac075c31669f" - integrity sha512-XCSmL6/Xg8259OTWNp69B57CPWiVL69kB7pposFrufG/zaAlI9BS68dgzrxmmSqZV5ZHU4r/6Tbf6fwnEJGiSw== +"@graphql-tools/merge@8.2.4": + version "8.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.2.4.tgz#f903545e5693c75418f95671bca1be6bc51bfa53" + integrity sha512-hiNRTsS948F+BB4Q7CZXLaGFOIHQzmimVq3EEI/+PQZsPb7kYDzg0Ow0GyV4conDdEiooLqHf7I1dWzTYwvs0A== dependencies: - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/utils" "8.6.3" tslib "~2.3.0" "@graphql-tools/merge@^6.2.11", "@graphql-tools/merge@^6.2.12", "@graphql-tools/merge@^6.2.14": @@ -3066,6 +3075,14 @@ "@graphql-tools/utils" "8.0.2" tslib "~2.3.0" +"@graphql-tools/merge@^8.2.3": + version "8.2.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.2.3.tgz#a2861fec230ee7be9dc42d72fed2ac075c31669f" + integrity sha512-XCSmL6/Xg8259OTWNp69B57CPWiVL69kB7pposFrufG/zaAlI9BS68dgzrxmmSqZV5ZHU4r/6Tbf6fwnEJGiSw== + dependencies: + "@graphql-tools/utils" "^8.6.2" + tslib "~2.3.0" + "@graphql-tools/mock@8.6.0": version "8.6.0" resolved "https://registry.yarnpkg.com/@graphql-tools/mock/-/mock-8.6.0.tgz#c74c4fc7b51e007fbbdbc4c29e3e84ce7e259ed1" @@ -3109,7 +3126,17 @@ relay-compiler "11.0.2" tslib "~2.3.0" -"@graphql-tools/resolvers-composition@6.4.2", "@graphql-tools/resolvers-composition@^6.2.5": +"@graphql-tools/resolvers-composition@6.4.3": + version "6.4.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/resolvers-composition/-/resolvers-composition-6.4.3.tgz#71c552e5d57aca83635a0e008bb8ee71857e4755" + integrity sha512-nHAACTfVd/OQRk2zdx151xtwdSug0z5RCj/yfz9CDoS+h2ytqQ7uxRZQByUIEFWhr3i2lotliQiZ9jQ/v3n3Xg== + dependencies: + "@graphql-tools/utils" "8.6.3" + lodash "4.17.21" + micromatch "^4.0.4" + tslib "~2.3.0" + +"@graphql-tools/resolvers-composition@^6.2.5": version "6.4.2" resolved "https://registry.yarnpkg.com/@graphql-tools/resolvers-composition/-/resolvers-composition-6.4.2.tgz#43a8d7fe921ff1b7c3e5ec15a907145c8fb33e92" integrity sha512-1HZnT0nZTBOsxMvDld0rs4JDL1MY+OQscoaPl+DhHIzGjhC+aHA1DxfJE7rRkhes5ER7p1tGVfqM7ilxY1yIEA== @@ -3127,13 +3154,13 @@ "@graphql-tools/utils" "6.1.0" tslib "~2.0.1" -"@graphql-tools/schema@8.3.2", "@graphql-tools/schema@^8.0.2", "@graphql-tools/schema@^8.1.2", "@graphql-tools/schema@^8.3.1", "@graphql-tools/schema@^8.3.2": - version "8.3.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-8.3.2.tgz#5b949d7a2cc3936f73507d91cc609996f1266d11" - integrity sha512-77feSmIuHdoxMXRbRyxE8rEziKesd/AcqKV6fmxe7Zt+PgIQITxNDew2XJJg7qFTMNM43W77Ia6njUSBxNOkwg== +"@graphql-tools/schema@8.3.3": + version "8.3.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-8.3.3.tgz#b69ea495026976f16e697253f08aa7905e7f6265" + integrity sha512-OrRLU9/7UmkDemeyNUy62uH+FofgV3bpVVZJprc9bhe3gZsY7kQNIdY7H1unINlepjLvGOgk7u7iLo2+EhjyWw== dependencies: - "@graphql-tools/merge" "^8.2.3" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/merge" "8.2.4" + "@graphql-tools/utils" "8.6.3" tslib "~2.3.0" value-or-promise "1.0.11" @@ -3146,17 +3173,27 @@ tslib "~2.2.0" value-or-promise "1.0.6" -"@graphql-tools/stitch@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@graphql-tools/stitch/-/stitch-8.5.0.tgz#11a0ed2a62fad1be80dc056a4b8c5977824488d2" - integrity sha512-7Vf0TEEwfduinmyeILr5fDXE4+7zlBKDGIL4ZDGehMmJ2kuaM+dAah9S99PkBMEG2WwdU2V66BPgTRNqwGp7tg== +"@graphql-tools/schema@^8.0.2", "@graphql-tools/schema@^8.1.2", "@graphql-tools/schema@^8.3.1", "@graphql-tools/schema@^8.3.2": + version "8.3.2" + resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-8.3.2.tgz#5b949d7a2cc3936f73507d91cc609996f1266d11" + integrity sha512-77feSmIuHdoxMXRbRyxE8rEziKesd/AcqKV6fmxe7Zt+PgIQITxNDew2XJJg7qFTMNM43W77Ia6njUSBxNOkwg== dependencies: - "@graphql-tools/batch-delegate" "8.2.4" - "@graphql-tools/delegate" "^8.5.3" "@graphql-tools/merge" "^8.2.3" - "@graphql-tools/schema" "^8.3.2" "@graphql-tools/utils" "^8.6.2" - "@graphql-tools/wrap" "^8.4.2" + tslib "~2.3.0" + value-or-promise "1.0.11" + +"@graphql-tools/stitch@8.5.2": + version "8.5.2" + resolved "https://registry.yarnpkg.com/@graphql-tools/stitch/-/stitch-8.5.2.tgz#fd9d0d2fa6dc7bc967c4c5ce3232b3aa1fd14cf4" + integrity sha512-gZOqwfERK1upC8R6MuR1Tao7B2RSJxjqOXO6k/vGfM8Oje2wkvkQ7dP+XO1EELqoSgEiTQjYc3TrXh1Q5MTUwg== + dependencies: + "@graphql-tools/batch-delegate" "8.2.6" + "@graphql-tools/delegate" "8.5.4" + "@graphql-tools/merge" "8.2.4" + "@graphql-tools/schema" "8.3.3" + "@graphql-tools/utils" "8.6.3" + "@graphql-tools/wrap" "8.4.6" tslib "~2.3.0" value-or-promise "^1.0.11" @@ -3173,13 +3210,13 @@ "@graphql-tools/wrap" "^7.0.6" tslib "~2.2.0" -"@graphql-tools/stitching-directives@2.2.2": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/stitching-directives/-/stitching-directives-2.2.2.tgz#e02630d3b8d6eb8e200e0387f65493286faca4b5" - integrity sha512-J/+4Jvq4MoLeY6n4vOm/qhrE8NvCXPUdPmoxscdem4bmwCS+Pb4hg7DBxtP3c6Oz+e11PvAQpq0EMKE9scXC1Q== +"@graphql-tools/stitching-directives@2.2.4": + version "2.2.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/stitching-directives/-/stitching-directives-2.2.4.tgz#846b091a0eb037200cec8bcb7e563987ec0569b5" + integrity sha512-ydUiWwl091toTf1a5Uey5JJHaNUQ30w+OA0CMe/VMmB5zYZ5UMBz0fNuIUDVbX0xse9UqH+qT4VstULceZqh3g== dependencies: - "@graphql-tools/delegate" "^8.5.1" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/delegate" "8.5.4" + "@graphql-tools/utils" "8.6.3" tslib "~2.3.0" "@graphql-tools/url-loader@6.1.0": @@ -3197,14 +3234,14 @@ valid-url "1.0.9" websocket "1.0.31" -"@graphql-tools/url-loader@7.9.2": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.9.2.tgz#ba67f0e210e7b377a05a4c873b457b8d38b974f5" - integrity sha512-CmRKGg9iao8AW1p3BgZLPwzGZoVeIiIwUfCoaxgTTOqFfJceIaIee362mbJyQD1zD0R74yCnj4CQnLbs3bd30A== +"@graphql-tools/url-loader@7.9.4": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@graphql-tools/url-loader/-/url-loader-7.9.4.tgz#443a0953b3e18d22d484eb235bc8ca4c6f087597" + integrity sha512-M38H/z1KfG+oBHwVXCce3DyhFEspEn9olNkoW1VLgG1sEBbhWJ9Con44dwcZzkatlKH36mz8hxMDPvFWmAb8sg== dependencies: - "@graphql-tools/delegate" "^8.5.1" - "@graphql-tools/utils" "^8.6.2" - "@graphql-tools/wrap" "^8.4.4" + "@graphql-tools/delegate" "8.5.4" + "@graphql-tools/utils" "8.6.3" + "@graphql-tools/wrap" "8.4.6" "@n1ru4l/graphql-live-query" "^0.9.0" "@types/websocket" "^1.0.4" "@types/ws" "^8.0.0" @@ -3268,6 +3305,13 @@ dependencies: tslib "~2.3.0" +"@graphql-tools/utils@8.6.3": + version "8.6.3" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.6.3.tgz#ce9fc9adce4d45b229e314a2261290a88a252aed" + integrity sha512-CNyP7Uu7dlVMQ32IpHWOxz4yic9BYXXVkDhG0UdTKSszvzHdgMilemE9MpUrGzzBPsTe3aYTtNGyPUkyh9yTXA== + dependencies: + tslib "~2.3.0" + "@graphql-tools/utils@^7.0.0", "@graphql-tools/utils@^7.0.1", "@graphql-tools/utils@^7.1.2", "@graphql-tools/utils@^7.5.0", "@graphql-tools/utils@^7.7.0", "@graphql-tools/utils@^7.7.1", "@graphql-tools/utils@^7.8.1", "@graphql-tools/utils@^7.9.0": version "7.10.0" resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-7.10.0.tgz#07a4cb5d1bec1ff1dc1d47a935919ee6abd38699" @@ -3289,14 +3333,14 @@ is-promise "4.0.0" tslib "~2.0.1" -"@graphql-tools/wrap@8.4.4", "@graphql-tools/wrap@^8.4.2", "@graphql-tools/wrap@^8.4.4": - version "8.4.4" - resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-8.4.4.tgz#fc0aa1e6fe2ab76fcb40beab9f106cf5488edb16" - integrity sha512-roBa4FC65QLlpFCtLtmip3SibGRoLnlLUXyQgOSzW5V+lcDpbGu2GIx9A0VerKC8Cf0iqWaYgI7mhGn+mharkg== +"@graphql-tools/wrap@8.4.6": + version "8.4.6" + resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-8.4.6.tgz#25b5e1e917f539b5ada11dc349302b0d380c86bb" + integrity sha512-tU+8QCoe8lLXduzEIDVVPX8iY3hT+Jz+SapIcxqLqv/MAdaxtGx2HpLl+vMn8Ba1IPcqAXtomLmDMSXI0mG0jw== dependencies: - "@graphql-tools/delegate" "^8.5.1" - "@graphql-tools/schema" "^8.3.2" - "@graphql-tools/utils" "^8.6.2" + "@graphql-tools/delegate" "8.5.4" + "@graphql-tools/schema" "8.3.3" + "@graphql-tools/utils" "8.6.3" tslib "~2.3.0" value-or-promise "1.0.11" @@ -3316,10 +3360,10 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052" integrity sha512-NQ17ii0rK1b34VZonlmT2QMJFI70m0TRwbknO/ihlbatXyaktDhN/98vBiUU6kNBPljqGqyIrl2T4nY2RpFANg== -"@graphql-yoga/common@0.1.0-beta.4": - version "0.1.0-beta.4" - resolved "https://registry.yarnpkg.com/@graphql-yoga/common/-/common-0.1.0-beta.4.tgz#2916095946126ca3e3e276c8c68c62393b6b398b" - integrity sha512-3PWCH39wZwjUjlFl2SpZS7/EXJAZuddNPSneI+NKvciWHHPI7lXjfEPcMxunbET5J84Nm8vJlA1mXo+I/BXsVQ== +"@graphql-yoga/common@0.2.0-canary-cabb320.0": + version "0.2.0-canary-cabb320.0" + resolved "https://registry.yarnpkg.com/@graphql-yoga/common/-/common-0.2.0-canary-cabb320.0.tgz#e1f7943fc83f31fa68f92c7f9b20fe9bd39ea0d7" + integrity sha512-F4f7imE6zxDVEjHbaiRTDmshCfuT5ThEIwQmeeFYYfBhgCnWrpsSkCWee2/qQ04Bu1QP2xtegUBqyqCZAziiMw== dependencies: "@envelop/core" "^2.0.0" "@envelop/disable-introspection" "^3.0.0" @@ -3334,14 +3378,14 @@ dset "^3.1.1" tslib "^2.3.1" -"@graphql-yoga/node@0.1.0-beta.4": - version "0.1.0-beta.4" - resolved "https://registry.yarnpkg.com/@graphql-yoga/node/-/node-0.1.0-beta.4.tgz#59bc11c356a07276f50ee52870edb05c510e53de" - integrity sha512-jZYx6P5n9OW4aYS0ilGpnYNFtU3aRMps+TDbu149+boKhCx8e4GqitEN9nZBBY+oktpb5XK1bdZNOq9H1W4fEA== +"@graphql-yoga/node@0.1.1-canary-cabb320.0": + version "0.1.1-canary-cabb320.0" + resolved "https://registry.yarnpkg.com/@graphql-yoga/node/-/node-0.1.1-canary-cabb320.0.tgz#cca687951e49759b933d9f8d5ad8e65ea6c63989" + integrity sha512-FylYsKRSUT4wLNrsDz88ijq1+TDzcAM5qeC8/QUZWXxnw4IhkWBKY9KJvKyQnm6tUBpPmYTeJ15z6NKhlywrdQ== dependencies: "@envelop/core" "^2.0.0" "@graphql-tools/utils" "^8.6.0" - "@graphql-yoga/common" "0.1.0-beta.4" + "@graphql-yoga/common" "0.2.0-canary-cabb320.0" "@graphql-yoga/subscription" "0.0.1-beta.1" cross-undici-fetch "^0.1.25" pino "^7.2.0" @@ -12100,10 +12144,10 @@ graphql-compose@9.0.7: dependencies: graphql-type-json "0.3.2" -graphql-executor@0.0.18: - version "0.0.18" - resolved "https://registry.yarnpkg.com/graphql-executor/-/graphql-executor-0.0.18.tgz#6aa4b39e1ca773e159c2a602621e90606df0109a" - integrity sha512-upUSl7tfZCZ5dWG1XkOvpG70Yk3duZKcCoi/uJso4WxJVT6KIrcK4nZ4+2X/hzx46pL8wAukgYHY6iNmocRN+g== +graphql-executor@0.0.19: + version "0.0.19" + resolved "https://registry.yarnpkg.com/graphql-executor/-/graphql-executor-0.0.19.tgz#cab902c91444181944a6bbb3e6cab7107b933f33" + integrity sha512-AFOcsk/yMtl9jcO/f/0Our7unWxJ5m3FS5HjWfsXRHCyjjaubXpSHiOZO/hSYv6brayIrupDoVAzCuJpBc3elg== graphql-extensions@^0.15.0: version "0.15.0"