-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: enisdenjo <[email protected]>
- Loading branch information
1 parent
bb5a756
commit 73c621d
Showing
309 changed files
with
64,191 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@graphql-hive/gateway': patch | ||
--- | ||
|
||
dependencies updates: | ||
|
||
- Updated dependency [`@graphql-mesh/plugin-jit@^0.0.7` ↗︎](https://www.npmjs.com/package/@graphql-mesh/plugin-jit/v/0.0.7) (from `^0.0.6`, in `dependencies`) |
12 changes: 12 additions & 0 deletions
12
.changeset/@graphql-hive_gateway-runtime-118-dependencies.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'@graphql-hive/gateway-runtime': patch | ||
--- | ||
|
||
dependencies updates: | ||
|
||
- Updated dependency [`@graphql-tools/batch-delegate@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/batch-delegate/v/workspace:^) (from `^9.0.13`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/delegate@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/workspace:^) (from `^10.1.1`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/executor-http@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor-http/v/workspace:^) (from `^1.1.5`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/federation@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/federation/v/workspace:^) (from `^2.2.25`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/stitch@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitch/v/workspace:^) (from `^9.3.3`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/wrap@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/workspace:^) (from `^10.0.15`, in `dependencies`) |
11 changes: 11 additions & 0 deletions
11
.changeset/@graphql-mesh_fusion-runtime-118-dependencies.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@graphql-mesh/fusion-runtime': patch | ||
--- | ||
|
||
dependencies updates: | ||
|
||
- Updated dependency [`@graphql-tools/delegate@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/workspace:^) (from `^10.0.28`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/federation@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/federation/v/workspace:^) (from `^2.2.21`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/stitch@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitch/v/workspace:^) (from `^9.2.17`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/stitching-directives@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/stitching-directives/v/workspace:^) (from `^3.1.9`, in `dependencies`) | ||
- Updated dependency [`@graphql-tools/wrap@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/wrap/v/workspace:^) (from `^10.0.12`, in `dependencies`) |
7 changes: 7 additions & 0 deletions
7
.changeset/@graphql-mesh_transport-common-118-dependencies.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@graphql-mesh/transport-common': patch | ||
--- | ||
|
||
dependencies updates: | ||
|
||
- Updated dependency [`@graphql-tools/delegate@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/delegate/v/workspace:^) (from `^10.0.28`, in `dependencies`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@graphql-mesh/transport-http': patch | ||
--- | ||
|
||
dependencies updates: | ||
|
||
- Updated dependency [`@graphql-tools/executor-http@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor-http/v/workspace:^) (from `^1.1.8`, in `dependencies`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@graphql-mesh/transport-ws': patch | ||
--- | ||
|
||
dependencies updates: | ||
|
||
- Updated dependency [`@graphql-tools/executor-graphql-ws@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-tools/executor-graphql-ws/v/workspace:^) (from `^1.3.0`, in `dependencies`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
'@graphql-tools/delegate': patch | ||
--- | ||
|
||
Do not ignore request selection set when overriding the fields | ||
|
||
```ts | ||
import { buildSchema, graphql } from 'graphql'; | ||
import { addResolversToSchema } from '@graphql-tools/schema'; | ||
import { stitchSchemas } from '@graphql-tools/stitch'; | ||
import { delegateToSchema } from '@graphql-tools/delegate'; | ||
|
||
const sub_schema = addResolversToSchema({ | ||
schema: buildSchema(` | ||
type Query { | ||
current_user: User | ||
} | ||
type User { | ||
id: ID! | ||
name: String! | ||
age: Int! | ||
} | ||
`), | ||
resolvers: { | ||
Query: { | ||
current_user: () => ({ id: '5', name: 'John Doe', age: 10 }), | ||
}, | ||
}, | ||
}); | ||
|
||
const stitched_schema = stitchSchemas({ | ||
subschemas: [ | ||
{ | ||
schema: sub_schema, | ||
createProxyingResolver: (options) => { | ||
return (_parent, _args, context, info) => { | ||
const operationName = info.operation.name ? info.operation.name.value : undefined; | ||
return delegateToSchema({ | ||
schema: options.subschemaConfig, | ||
operation: options.operation, | ||
context, | ||
info, | ||
operationName, | ||
}); | ||
}; | ||
}, | ||
}, | ||
], | ||
resolvers: { | ||
User: { | ||
name: { | ||
selectionSet: '{ age }', | ||
resolve: (parent) => `${parent.name}(${parent.age})`, // Age should be here | ||
}, | ||
}, | ||
}, | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Bench | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
bench: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
products_size: | ||
- 3 | ||
- 10 | ||
- 50 | ||
- 100 | ||
- 1000 | ||
name: Federation Benchmark with ${{matrix.products_size}} Products | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up env | ||
uses: the-guild-org/shared-config/setup@v1 | ||
with: | ||
node-version: 22 | ||
- name: Bench | ||
run: yarn bench | ||
env: | ||
PRODUCTS_SIZE: ${{matrix.products_size}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ on: | |
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
.yarn/patches/vite-tsconfig-paths-npm-5.1.2-40407aa097.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/dist/index.js b/dist/index.js | ||
index 272aa3b7abc2f889e8feddd1ae4b11f81594472d..16fdcc182f32d04809440d2ec390e7e146888711 100644 | ||
--- a/dist/index.js | ||
+++ b/dist/index.js | ||
@@ -48,6 +48,7 @@ var debug = _debug("vite-tsconfig-paths"); | ||
var noMatch = [void 0, false]; | ||
var src_default = (opts = {}) => { | ||
let resolversByDir; | ||
+ let inlinedModules; | ||
return { | ||
name: "vite-tsconfig-paths", | ||
enforce: "pre", | ||
@@ -60,9 +61,11 @@ var src_default = (opts = {}) => { | ||
} else { | ||
workspaceRoot = searchForWorkspaceRoot(projectRoot); | ||
} | ||
+ inlinedModules = config.test?.server?.deps?.inline || []; | ||
debug("options.root ==", root); | ||
debug("project root ==", projectRoot); | ||
debug("workspace root ==", workspaceRoot); | ||
+ debug("inlined modules ==", inlinedModules); | ||
if (root) { | ||
projectRoot = root; | ||
workspaceRoot = root; | ||
@@ -257,12 +260,17 @@ var src_default = (opts = {}) => { | ||
} | ||
importer = normalizePath2(importer); | ||
const importerFile = importer.replace(/[#?].+$/, ""); | ||
- if (!importerExtRE.test(importerFile)) { | ||
- return noMatch; | ||
- } | ||
- const relativeImporterFile = relative(configDir, importerFile); | ||
- if (!isIncludedRelative(relativeImporterFile)) { | ||
- return noMatch; | ||
+ const inlined = inlinedModules.some((m) => m.test(importerFile)); | ||
+ if (inlined) { | ||
+ debug(`module inlined:`, importer); | ||
+ } else { | ||
+ if (!importerExtRE.test(importerFile)) { | ||
+ return noMatch; | ||
+ } | ||
+ const relativeImporterFile = relative(configDir, importerFile); | ||
+ if (!isIncludedRelative(relativeImporterFile)) { | ||
+ return noMatch; | ||
+ } | ||
} | ||
const suffix = (_a2 = /\?.+$/.exec(id)) == null ? void 0 : _a2[0]; | ||
if (suffix) { |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ApolloGateway, LocalGraphQLDataSource } from '@apollo/gateway'; | ||
import * as accounts from './services/accounts'; | ||
import * as inventory from './services/inventory'; | ||
import * as products from './services/products'; | ||
import * as reviews from './services/reviews'; | ||
|
||
const serviceMap = { | ||
accounts, | ||
inventory, | ||
products, | ||
reviews, | ||
}; | ||
|
||
export default new ApolloGateway({ | ||
localServiceList: Object.entries(serviceMap).map(([name, { typeDefs }]) => ({ | ||
name, | ||
typeDefs, | ||
})), | ||
buildService: ({ name }) => { | ||
const serviceName = name as keyof typeof serviceMap; | ||
return new LocalGraphQLDataSource(serviceMap[serviceName].schema); | ||
}, | ||
}); |
Oops, something went wrong.