Skip to content
Draft
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
90 changes: 90 additions & 0 deletions __tests__/supergraph/base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,96 @@
`);
});

test("compose directive definition conflict (does the order matter? 1)", () => {
const result = api.composeServices([
{
name: "a",
url: "http://a.com",
typeDefs: graphql`
extend schema
@link(url: "https://specs.apollo.dev/federation/${version}", import: ["@composeDirective"])
@link(url: "https://a.dev/a/v1.0", import: ["@a"])
@composeDirective(name: "@a")

directive @a(name: String!) on QUERY | MUTATION

type Query {
a: Int
}
`,
},
{
name: "b",
url: "http://b.com",
typeDefs: graphql`
extend schema
@link(url: "https://specs.apollo.dev/federation/${version}", import: ["@composeDirective"])
@link(url: "https://a.dev/a/v1.0", import: ["@a"])
@composeDirective(name: "@a")


directive @a(name: ID!) on QUERY | MUTATION


type Query {
b: Int
}
`,
},
]);

expect(result.errors).toEqual(undefined);
assertCompositionSuccess(result);
Comment on lines +562 to +563
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These assertions validate that a conflict in directive argument types (String! vs ID!) results in a successful composition where one type is silently chosen based on subgraph sorting. However, the PR description suggests that this behavior is inconsistent with expectations ('The Guild composition raises an exception') and notes that Apollo's similar 'silent winner' approach is problematic (😓).

By using assertCompositionSuccess, these tests codify what appears to be a bug or a missing validation rule. If the intention is to ensure that such conflicts are caught (similar to the FIELD_ARGUMENT_TYPE_MISMATCH mentioned in the description), these tests should instead expect a validation error. Codifying the current inconsistent behavior as a success may make it harder to fix later.

expect(result.supergraphSdl).toContainGraphQL(graphql`

Check failure on line 564 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.5 > compose directive definition conflict (does the order matter? 1)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:564:36

Check failure on line 564 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.4 > compose directive definition conflict (does the order matter? 1)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:564:36

Check failure on line 564 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.3 > compose directive definition conflict (does the order matter? 1)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:564:36

Check failure on line 564 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.2 > compose directive definition conflict (does the order matter? 1)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:564:36

Check failure on line 564 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.1 > compose directive definition conflict (does the order matter? 1)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:564:36
directive @a(name: String!) on QUERY | MUTATION
`);
});

test("compose directive definition conflict (does the order matter? 2)", () => {
const result = api.composeServices([
{
name: "b",
url: "http://b.com",
typeDefs: graphql`
extend schema
@link(url: "https://specs.apollo.dev/federation/${version}", import: ["@composeDirective"])
@link(url: "https://a.dev/a/v1.0", import: ["@a"])
@composeDirective(name: "@a")


directive @a(name: ID!) on QUERY | MUTATION


type Query {
b: Int
}
`,
},
{
name: "a",
url: "http://a.com",
typeDefs: graphql`
extend schema
@link(url: "https://specs.apollo.dev/federation/${version}", import: ["@composeDirective"])
@link(url: "https://a.dev/a/v1.0", import: ["@a"])
@composeDirective(name: "@a")

directive @a(name: String!) on QUERY | MUTATION

type Query {
a: Int
}
`,
},
]);

expect(result.errors).toEqual(undefined);
assertCompositionSuccess(result);
expect(result.supergraphSdl).toContainGraphQL(graphql`

Check failure on line 609 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.5 > compose directive definition conflict (does the order matter? 2)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:609:36

Check failure on line 609 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.4 > compose directive definition conflict (does the order matter? 2)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:609:36

Check failure on line 609 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.3 > compose directive definition conflict (does the order matter? 2)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:609:36

Check failure on line 609 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.2 > compose directive definition conflict (does the order matter? 2)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:609:36

Check failure on line 609 in __tests__/supergraph/base.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/supergraph/base.spec.ts > 'apollo' > v2.1 > compose directive definition conflict (does the order matter? 2)

Error: expected to find - Expected + Received - directive @A(name: String!) on MUTATION | QUERY + directive @A(name: ID!) on MUTATION | QUERY + + directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE + + directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION + + directive @join__graph(name: String!, url: String!) on ENUM_VALUE + + directive @join__implements(graph: join__Graph!, interface: String!) repeatable on INTERFACE | OBJECT + + directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on ENUM | INPUT_OBJECT | INTERFACE | OBJECT | SCALAR | UNION + + directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION + + directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA + + enum join__Graph { + A @join__graph(name: "a", url: "http://a.com") + B @join__graph(name: "b", url: "http://b.com") + } + + enum link__Purpose { + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + } + + type Query @join__type(graph: A) @join__type(graph: B) { + a: Int @join__field(graph: A) + b: Int @join__field(graph: B) + } + + scalar join__FieldSet + + scalar link__Import + + schema @link(for: EXECUTION, url: "https://specs.apollo.dev/join/v0.3") @link(import: ["@A"], url: "https://a.dev/a/v1.0") @link(url: "https://specs.apollo.dev/link/v1.0") { + query: Query + } ❯ __tests__/supergraph/base.spec.ts:609:36
directive @a(name: String!) on QUERY | MUTATION
`);
});

test("composed directive with VARIABLE_DEFINITION and FIELD locations is preserved in supergraph", () => {
const result = api.composeServices([
{
Expand Down
Loading