Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/launchdarkly-override/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@e2e/launchdarkly-override-example",
"private": true,
"dependencies": {
"@apollo/subgraph": "2.11.3",
"@apollo/subgraph": "2.12.1",
"@launchdarkly/node-server-sdk": "9.10.3",
"graphql": "16.12.0",
"graphql-yoga": "5.16.2",
Expand Down
2 changes: 1 addition & 1 deletion e2e/progressive-override/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@e2e/progressive-override-example",
"private": true,
"dependencies": {
"@apollo/subgraph": "2.11.3",
"@apollo/subgraph": "2.12.1",
"graphql": "16.12.0",
"graphql-yoga": "5.16.2",
"tslib": "^2.8.1"
Expand Down
Binary file modified examples/launchdarkly-override/example.tar.gz
Binary file not shown.
22 changes: 18 additions & 4 deletions examples/launchdarkly-override/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/launchdarkly-override/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@example/launchdarkly-override",
"private": true,
"dependencies": {
"@apollo/subgraph": "2.11.3",
"@apollo/subgraph": "2.12.1",
"@launchdarkly/node-server-sdk": "9.10.3",
"graphql": "16.12.0",
"graphql-yoga": "5.16.2",
Expand Down
68 changes: 35 additions & 33 deletions packages/plugins/jwt-auth/tests/auth-directives.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
useCustomFetch,
} from '@graphql-hive/gateway-runtime';
import { composeLocalSchemasWithApollo } from '@internal/testing';
import { composeServices } from '@theguild/federation-composition';
import { parse, type ExecutionResult } from 'graphql';
import { createYoga } from 'graphql-yoga';
import jwt from 'jsonwebtoken';
Expand Down Expand Up @@ -556,40 +557,41 @@ describe('Auth Directives', () => {
});
});
it('interfaces', async () => {
const subgraphSchema = buildSubgraphSchema({
typeDefs: parse(/* GraphQL */ `
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.5"
import: ["@authenticated"]
)
const subgraphTypeDefs = parse(/* GraphQL */ `
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.5"
import: ["@authenticated"]
)

type Query {
posts: [Post!]!
}
type Query {
posts: [Post!]!
}

type User {
id: ID!
username: String
posts: [Post!]!
}
type User {
id: ID!
username: String
posts: [Post!]!
}

interface Post {
id: ID!
author: User!
title: String!
content: String!
}
interface Post {
id: ID!
author: User!
title: String!
content: String!
}

type PrivateBlog implements Post @authenticated {
id: ID!
author: User!
title: String!
content: String!
publishAt: String
allowedViewers: [User!]!
}
`),
type PrivateBlog implements Post @authenticated {
id: ID!
author: User!
title: String!
content: String!
publishAt: String
allowedViewers: [User!]!
}
`);
const subgraphSchema = buildSubgraphSchema({
typeDefs: subgraphTypeDefs,
resolvers: {
Post: {
__resolveType: () => 'PrivateBlog',
Expand All @@ -608,13 +610,13 @@ describe('Auth Directives', () => {
const signingKey = 'secret';
await using serveRuntime = createGatewayRuntime<JWTAuthContextExtension>({
supergraph: () =>
composeLocalSchemasWithApollo([
composeServices([
{
name: 'subgraphA',
schema: subgraphSchema,
typeDefs: subgraphTypeDefs,
url: 'http://localhost:4001/graphql',
},
]),
]).supergraphSdl!,
genericAuth: {
mode: 'protect-granular',
resolveUserFn(context) {
Expand Down
86 changes: 69 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@ __metadata:
languageName: node
linkType: hard

"@apollo/composition@npm:2.12.1":
version: 2.12.1
resolution: "@apollo/composition@npm:2.12.1"
dependencies:
"@apollo/federation-internals": "npm:2.12.1"
"@apollo/query-graphs": "npm:2.12.1"
peerDependencies:
graphql: ^16.5.0
checksum: 10c0/b174b48fec654102500c2fe3f70a434403666e9f8886458f5e26279d49f92e29926ccc397d243066120d4b61ab5efd57ffb2e1adfe254478e4cd8e070b6e5876
languageName: node
linkType: hard

"@apollo/federation-internals@npm:2.11.3":
version: 2.11.3
resolution: "@apollo/federation-internals@npm:2.11.3"
Expand All @@ -191,13 +203,27 @@ __metadata:
languageName: node
linkType: hard

"@apollo/federation-internals@npm:2.12.1":
version: 2.12.1
resolution: "@apollo/federation-internals@npm:2.12.1"
dependencies:
"@types/uuid": "npm:^9.0.0"
chalk: "npm:^4.1.0"
js-levenshtein: "npm:^1.1.6"
uuid: "npm:^9.0.0"
peerDependencies:
graphql: ^16.5.0
checksum: 10c0/b8e26bc0a9cc28132651c63ffb91cc0fc6c62088bd81c2da389cb7666c33d8401dbc1bff21dd42a09d311bcbb4fb3a3a1aae19f198da775035ce91bcdd50cbe1
languageName: node
linkType: hard

"@apollo/gateway@npm:^2.11.3":
version: 2.11.3
resolution: "@apollo/gateway@npm:2.11.3"
version: 2.12.1
resolution: "@apollo/gateway@npm:2.12.1"
dependencies:
"@apollo/composition": "npm:2.11.3"
"@apollo/federation-internals": "npm:2.11.3"
"@apollo/query-planner": "npm:2.11.3"
"@apollo/composition": "npm:2.12.1"
"@apollo/federation-internals": "npm:2.12.1"
"@apollo/query-planner": "npm:2.12.1"
"@apollo/server-gateway-interface": "npm:^1.1.0"
"@apollo/usage-reporting-protobuf": "npm:^4.1.0"
"@apollo/utils.createhash": "npm:^2.0.0"
Expand All @@ -215,7 +241,7 @@ __metadata:
node-fetch: "npm:^2.6.7"
peerDependencies:
graphql: ^16.5.0
checksum: 10c0/df016dd5592d76e33a2929f178b83e8854007e782956abb834ce2f1698973516e43e2c42f055ed357d635012a468059aee4bbe763ce39bd4b360c95c39b9603c
checksum: 10c0/882460964800fac56dd97465ce2b57a79069db7b0142cc142b80dac6726152a3cf8536d04ff1eaf6ec3290e96878ed86360aec53bf05ea06022b3c4faa8c5a71
languageName: node
linkType: hard

Expand Down Expand Up @@ -256,19 +282,33 @@ __metadata:
languageName: node
linkType: hard

"@apollo/query-planner@npm:2.11.3":
version: 2.11.3
resolution: "@apollo/query-planner@npm:2.11.3"
"@apollo/query-graphs@npm:2.12.1":
version: 2.12.1
resolution: "@apollo/query-graphs@npm:2.12.1"
dependencies:
"@apollo/federation-internals": "npm:2.11.3"
"@apollo/query-graphs": "npm:2.11.3"
"@apollo/federation-internals": "npm:2.12.1"
deep-equal: "npm:^2.0.5"
ts-graphviz: "npm:^1.5.4"
uuid: "npm:^9.0.0"
peerDependencies:
graphql: ^16.5.0
checksum: 10c0/d9e1c8da185a884562a543586aee112be0ab2633c8b453c1b29e9e93f3bec9562424c5877c8e2e7ea89606fcec7ea404f8d727247fea6187809d196f8d3f2b23
languageName: node
linkType: hard

"@apollo/query-planner@npm:2.12.1":
version: 2.12.1
resolution: "@apollo/query-planner@npm:2.12.1"
dependencies:
"@apollo/federation-internals": "npm:2.12.1"
"@apollo/query-graphs": "npm:2.12.1"
"@apollo/utils.keyvaluecache": "npm:^2.1.0"
chalk: "npm:^4.1.0"
deep-equal: "npm:^2.0.5"
pretty-format: "npm:^29.0.0"
peerDependencies:
graphql: ^16.5.0
checksum: 10c0/d927cdd826a91bdd742d982332cae6ecaae60bb4e740169e64fb0f2a17b9f859eb0c06aa5fee26c54f4d1a5ae9bf4fb1f24fd54729c853b47b2979bda85f7ca4
checksum: 10c0/5281cb15924c6a2daa5da6948ea939c79a4eeca62b04f5c8bb7617d090d93339e235f9f2409865b26c3fa745c9514f4f7006e9a9cdf528480b3544c993562e3a
languageName: node
linkType: hard

Expand Down Expand Up @@ -316,8 +356,8 @@ __metadata:
linkType: hard

"@apollo/server@npm:^5.1.0":
version: 5.1.0
resolution: "@apollo/server@npm:5.1.0"
version: 5.2.0
resolution: "@apollo/server@npm:5.2.0"
dependencies:
"@apollo/cache-control-types": "npm:^1.0.3"
"@apollo/server-gateway-interface": "npm:^2.0.0"
Expand All @@ -341,7 +381,7 @@ __metadata:
whatwg-mimetype: "npm:^4.0.0"
peerDependencies:
graphql: ^16.11.0
checksum: 10c0/5ae3e6de4144a30107d5108f36603302e61591b730d259b695d9fa06b4b2007c1caa173cdc3d9ec319cf04417ec2e2e9f4163af64aa7be18a2c3545a7da702b6
checksum: 10c0/2500a8244bda60b65b11ba37711039e869c14d7cacae84ddc940b150e824ab684792be39424336c6aba0e8ca5332b945012cf9b05282fdad70ec2416333c484b
languageName: node
linkType: hard

Expand All @@ -357,6 +397,18 @@ __metadata:
languageName: node
linkType: hard

"@apollo/subgraph@npm:2.12.1":
version: 2.12.1
resolution: "@apollo/subgraph@npm:2.12.1"
dependencies:
"@apollo/cache-control-types": "npm:^1.0.2"
"@apollo/federation-internals": "npm:2.12.1"
peerDependencies:
graphql: ^16.5.0
checksum: 10c0/42b338161430181ff3e14343644f3371d5b493b10f841fb5dbab1d7e467d76d2be687df41322e79665813dc1b31525f8d5cce1ddbc2efa48ada2a8f523287864
languageName: node
linkType: hard

"@apollo/usage-reporting-protobuf@npm:^4.1.0, @apollo/usage-reporting-protobuf@npm:^4.1.1":
version: 4.1.1
resolution: "@apollo/usage-reporting-protobuf@npm:4.1.1"
Expand Down Expand Up @@ -3149,7 +3201,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@e2e/launchdarkly-override-example@workspace:e2e/launchdarkly-override"
dependencies:
"@apollo/subgraph": "npm:2.11.3"
"@apollo/subgraph": "npm:2.12.1"
"@launchdarkly/node-server-sdk": "npm:9.10.3"
graphql: "npm:16.12.0"
graphql-yoga: "npm:5.16.2"
Expand Down Expand Up @@ -3350,7 +3402,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@e2e/progressive-override-example@workspace:e2e/progressive-override"
dependencies:
"@apollo/subgraph": "npm:2.11.3"
"@apollo/subgraph": "npm:2.12.1"
graphql: "npm:16.12.0"
graphql-yoga: "npm:5.16.2"
tslib: "npm:^2.8.1"
Expand Down
Loading