diff --git a/.changesets/fix_renee_limit_errors.md b/.changesets/fix_renee_limit_errors.md new file mode 100644 index 00000000000..60a3404cccb --- /dev/null +++ b/.changesets/fix_renee_limit_errors.md @@ -0,0 +1,6 @@ +### Limit the amount of GraphQL validation errors returned in the response ([PR #6187](https://github.com/apollographql/router/pull/6187)) + +When an invalid query is submitted, the router now returns at most 100 GraphQL parsing and validation errors in the response. +This prevents generating a very large response for nonsense documents. + +By [@goto-bus-stop](https://github.com/goto-bus-stop) in https://github.com/apollographql/router/pull/6187 \ No newline at end of file diff --git a/.changesets/helm_host_configuration.md b/.changesets/helm_host_configuration.md new file mode 100644 index 00000000000..f64334803db --- /dev/null +++ b/.changesets/helm_host_configuration.md @@ -0,0 +1,6 @@ +### Allow for configuration of the host via the helm template for virtual service ([PR #5545](https://github.com/apollographql/router/pull/5795)) + +Using the virtual service template change allows the configuration of the host from a variable when doing helm deploy. +The default of any host causes issues for those that use different hosts for a single AKS cluster + +By [@nicksephora](https://github.com/nicksephora) in https://github.com/apollographql/router/pull/5545 diff --git a/apollo-federation/src/error/mod.rs b/apollo-federation/src/error/mod.rs index 97b7d2757d9..cd163ecdabf 100644 --- a/apollo-federation/src/error/mod.rs +++ b/apollo-federation/src/error/mod.rs @@ -13,11 +13,44 @@ use lazy_static::lazy_static; use crate::subgraph::spec::FederationSpecError; -/// Break out of the current function, returning an internal error. +/// Create an internal error. +/// +/// # Example +/// ```rust +/// use apollo_federation::internal_error; +/// use apollo_federation::error::FederationError; +/// # fn may_be_none() -> Option<()> { None } +/// +/// const NAME: &str = "the thing"; +/// let result: Result<(), FederationError> = may_be_none() +/// .ok_or_else(|| internal_error!("Expected {NAME} to be Some")); +/// ``` #[macro_export] macro_rules! internal_error { ( $( $arg:tt )+ ) => { - return Err($crate::error::FederationError::internal(format!( $( $arg )+ )).into()); + $crate::error::FederationError::internal(format!( $( $arg )+ )) + } +} + +/// Break out of the current function, returning an internal error. +/// +/// # Example +/// ```rust +/// use apollo_federation::bail; +/// use apollo_federation::error::FederationError; +/// # fn may_be_none() -> Option<()> { None } +/// +/// fn example() -> Result<(), FederationError> { +/// bail!("Something went horribly wrong"); +/// unreachable!() +/// } +/// # +/// # _ = example(); +/// ``` +#[macro_export] +macro_rules! bail { + ( $( $arg:tt )+ ) => { + return Err($crate::internal_error!( $( $arg )+ ).into()); } } @@ -26,6 +59,18 @@ macro_rules! internal_error { /// /// Treat this as an assertion. It must only be used for conditions that *should never happen* /// in normal operation. +/// +/// # Example +/// ```rust,no_run +/// use apollo_federation::ensure; +/// use apollo_federation::error::FederationError; +/// # fn may_be_none() -> Option<()> { None } +/// +/// fn example() -> Result<(), FederationError> { +/// ensure!(1 == 0, "Something went horribly wrong"); +/// unreachable!() +/// } +/// ``` #[macro_export] macro_rules! ensure { ( $expr:expr, $( $arg:tt )+ ) => { diff --git a/apollo-federation/src/operation/merging.rs b/apollo-federation/src/operation/merging.rs index c56ff5e66e3..e7ebb8b63b6 100644 --- a/apollo-federation/src/operation/merging.rs +++ b/apollo-federation/src/operation/merging.rs @@ -15,9 +15,9 @@ use super::NamedFragments; use super::Selection; use super::SelectionSet; use super::SelectionValue; +use crate::bail; use crate::ensure; use crate::error::FederationError; -use crate::internal_error; impl<'a> FieldSelectionValue<'a> { /// Merges the given field selections into this one. @@ -50,14 +50,14 @@ impl<'a> FieldSelectionValue<'a> { ); if self.get().selection_set.is_some() { let Some(other_selection_set) = &other.selection_set else { - internal_error!( + bail!( "Field \"{}\" has composite type but not a selection set", other_field.field_position, ); }; selection_sets.push(other_selection_set); } else if other.selection_set.is_some() { - internal_error!( + bail!( "Field \"{}\" has non-composite type but also has a selection set", other_field.field_position, ); @@ -187,7 +187,7 @@ impl SelectionSet { selection_map::Entry::Occupied(existing) => match existing.get() { Selection::Field(self_field_selection) => { let Selection::Field(other_field_selection) = other_selection else { - internal_error!( + bail!( "Field selection key for field \"{}\" references non-field selection", self_field_selection.field.field_position, ); @@ -201,7 +201,7 @@ impl SelectionSet { let Selection::FragmentSpread(other_fragment_spread_selection) = other_selection else { - internal_error!( + bail!( "Fragment spread selection key for fragment \"{}\" references non-field selection", self_fragment_spread_selection.spread.fragment_name, ); @@ -215,7 +215,7 @@ impl SelectionSet { let Selection::InlineFragment(other_inline_fragment_selection) = other_selection else { - internal_error!( + bail!( "Inline fragment selection key under parent type \"{}\" {}references non-field selection", self_inline_fragment_selection.inline_fragment.parent_type_position, self_inline_fragment_selection.inline_fragment.type_condition_position.clone() @@ -368,7 +368,7 @@ pub(crate) fn merge_selection_sets( mut selection_sets: Vec, ) -> Result { let Some((first, remainder)) = selection_sets.split_first_mut() else { - internal_error!("merge_selection_sets(): must have at least one selection set"); + bail!("merge_selection_sets(): must have at least one selection set"); }; first.merge_into(remainder.iter())?; diff --git a/apollo-federation/src/operation/simplify.rs b/apollo-federation/src/operation/simplify.rs index f7c339d2103..a436c9f3803 100644 --- a/apollo-federation/src/operation/simplify.rs +++ b/apollo-federation/src/operation/simplify.rs @@ -348,15 +348,29 @@ impl InlineFragmentSelection { } else { let rebased_inline_fragment = self.inline_fragment.rebase_on(parent_type, schema)?; let rebased_casted_type = rebased_inline_fragment.casted_type(); - let rebased_selection_set = - selection_set.rebase_on(&rebased_casted_type, named_fragments, schema)?; - Ok(Some( - Selection::InlineFragment(Arc::new(InlineFragmentSelection::new( - rebased_inline_fragment, - rebased_selection_set, - ))) - .into(), - )) + // Re-flatten with the rebased casted type, which could further flatten away. + let selection_set = selection_set.flatten_unnecessary_fragments( + &rebased_casted_type, + named_fragments, + schema, + )?; + if selection_set.is_empty() { + Ok(None) + } else { + // We need to rebase since the parent type for the selection set could be + // changed. + // Note: Rebasing after flattening, since rebasing before that can error out. + // Or, `flatten_unnecessary_fragments` could `rebase` at the same time. + let rebased_selection_set = + selection_set.rebase_on(&rebased_casted_type, named_fragments, schema)?; + Ok(Some( + Selection::InlineFragment(Arc::new(InlineFragmentSelection::new( + rebased_inline_fragment, + rebased_selection_set, + ))) + .into(), + )) + } } } } diff --git a/apollo-federation/src/query_graph/mod.rs b/apollo-federation/src/query_graph/mod.rs index 344d9dc01d2..736f7af567d 100644 --- a/apollo-federation/src/query_graph/mod.rs +++ b/apollo-federation/src/query_graph/mod.rs @@ -16,6 +16,7 @@ use petgraph::Direction; use crate::error::FederationError; use crate::error::SingleFederationError; +use crate::internal_error; use crate::operation::Field; use crate::operation::InlineFragment; use crate::operation::SelectionSet; @@ -368,39 +369,27 @@ impl QueryGraph { } pub(crate) fn node_weight(&self, node: NodeIndex) -> Result<&QueryGraphNode, FederationError> { - self.graph.node_weight(node).ok_or_else(|| { - SingleFederationError::Internal { - message: "Node unexpectedly missing".to_owned(), - } - .into() - }) + self.graph + .node_weight(node) + .ok_or_else(|| internal_error!("Node unexpectedly missing")) } fn node_weight_mut(&mut self, node: NodeIndex) -> Result<&mut QueryGraphNode, FederationError> { - self.graph.node_weight_mut(node).ok_or_else(|| { - SingleFederationError::Internal { - message: "Node unexpectedly missing".to_owned(), - } - .into() - }) + self.graph + .node_weight_mut(node) + .ok_or_else(|| internal_error!("Node unexpectedly missing")) } pub(crate) fn edge_weight(&self, edge: EdgeIndex) -> Result<&QueryGraphEdge, FederationError> { - self.graph.edge_weight(edge).ok_or_else(|| { - SingleFederationError::Internal { - message: "Edge unexpectedly missing".to_owned(), - } - .into() - }) + self.graph + .edge_weight(edge) + .ok_or_else(|| internal_error!("Edge unexpectedly missing")) } fn edge_weight_mut(&mut self, edge: EdgeIndex) -> Result<&mut QueryGraphEdge, FederationError> { - self.graph.edge_weight_mut(edge).ok_or_else(|| { - SingleFederationError::Internal { - message: "Edge unexpectedly missing".to_owned(), - } - .into() - }) + self.graph + .edge_weight_mut(edge) + .ok_or_else(|| internal_error!("Edge unexpectedly missing")) } pub(crate) fn edge_head_weight( @@ -415,12 +404,9 @@ impl QueryGraph { &self, edge: EdgeIndex, ) -> Result<(NodeIndex, NodeIndex), FederationError> { - self.graph.edge_endpoints(edge).ok_or_else(|| { - SingleFederationError::Internal { - message: "Edge unexpectedly missing".to_owned(), - } - .into() - }) + self.graph + .edge_endpoints(edge) + .ok_or_else(|| internal_error!("Edge unexpectedly missing")) } fn schema(&self) -> Result<&ValidFederationSchema, FederationError> { @@ -431,12 +417,9 @@ impl QueryGraph { &self, source: &str, ) -> Result<&ValidFederationSchema, FederationError> { - self.sources.get(source).ok_or_else(|| { - SingleFederationError::Internal { - message: "Schema unexpectedly missing".to_owned(), - } - .into() - }) + self.sources + .get(source) + .ok_or_else(|| internal_error!(r#"Schema for "{source}" unexpectedly missing"#)) } pub(crate) fn subgraph_schemas(&self) -> &IndexMap, ValidFederationSchema> { @@ -454,7 +437,7 @@ impl QueryGraph { ) -> Result<&IndexSet, FederationError> { self.types_to_nodes()? .get(name) - .ok_or_else(|| FederationError::internal("No nodes unexpectedly found for type")) + .ok_or_else(|| internal_error!("No nodes unexpectedly found for type")) } pub(crate) fn types_to_nodes( diff --git a/apollo-federation/src/query_plan/conditions.rs b/apollo-federation/src/query_plan/conditions.rs index cf248c8b617..f202fd40587 100644 --- a/apollo-federation/src/query_plan/conditions.rs +++ b/apollo-federation/src/query_plan/conditions.rs @@ -8,8 +8,8 @@ use apollo_compiler::Node; use indexmap::map::Entry; use serde::Serialize; +use crate::bail; use crate::error::FederationError; -use crate::internal_error; use crate::operation::DirectiveList; use crate::operation::NamedFragments; use crate::operation::Selection; @@ -122,7 +122,7 @@ impl Conditions { if let Some(skip) = directives.get("skip") { let Some(value) = skip.specified_argument_by_name("if") else { - internal_error!("missing @skip(if:) argument"); + bail!("missing @skip(if:) argument"); }; match value.as_ref() { @@ -134,14 +134,14 @@ impl Conditions { variables.insert(name.clone(), ConditionKind::Skip); } _ => { - internal_error!("expected boolean or variable `if` argument, got {value}"); + bail!("expected boolean or variable `if` argument, got {value}"); } } } if let Some(include) = directives.get("include") { let Some(value) = include.specified_argument_by_name("if") else { - internal_error!("missing @include(if:) argument"); + bail!("missing @include(if:) argument"); }; match value.as_ref() { @@ -159,7 +159,7 @@ impl Conditions { } } _ => { - internal_error!("expected boolean or variable `if` argument, got {value}"); + bail!("expected boolean or variable `if` argument, got {value}"); } } } diff --git a/apollo-federation/tests/query_plan/build_query_plan_support.rs b/apollo-federation/tests/query_plan/build_query_plan_support.rs index b73596590b5..b7e02865c6f 100644 --- a/apollo-federation/tests/query_plan/build_query_plan_support.rs +++ b/apollo-federation/tests/query_plan/build_query_plan_support.rs @@ -12,9 +12,9 @@ use apollo_federation::query_plan::TopLevelPlanNode; use apollo_federation::schema::ValidFederationSchema; use sha1::Digest; -const ROVER_FEDERATION_VERSION: &str = "2.7.4"; +const ROVER_FEDERATION_VERSION: &str = "2.9.0"; -const DEFAULT_LINK_DIRECTIVE: &str = r#"@link(url: "https://specs.apollo.dev/federation/v2.7", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject"])"#; +const DEFAULT_LINK_DIRECTIVE: &str = r#"@link(url: "https://specs.apollo.dev/federation/v2.9", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject", "@context", "@fromContext", "@cost", "@listSize"])"#; /// Runs composition on the given subgraph schemas and return `(api_schema, query_planner)` /// diff --git a/apollo-federation/tests/query_plan/build_query_plan_tests.rs b/apollo-federation/tests/query_plan/build_query_plan_tests.rs index 0e93f5a229e..13ca9e52bd6 100644 --- a/apollo-federation/tests/query_plan/build_query_plan_tests.rs +++ b/apollo-federation/tests/query_plan/build_query_plan_tests.rs @@ -1361,3 +1361,53 @@ fn condition_order_router799() { "### ); } + +#[test] +fn rebase_non_intersecting_without_dropping_inline_fragment_due_to_directive() { + let planner = planner!( + Subgraph1: r#" + type Query { + test: X + } + + interface I { + i: Int + } + + type X implements I { + i: Int + } + + type Y implements I { + i: Int + } + "#, + ); + assert_plan!( + &planner, + r#" + { + test { # type X + ... on I { # upcast to I + ... @skip(if: false) { # This fragment can't be dropped due to its directive. + ... on Y { # downcast to Y (non-intersecting) + i + } + } + } + } + } + "#, + @r###" + QueryPlan { + Fetch(service: "Subgraph1") { + { + test { + __typename @include(if: false) + } + } + }, + } + "### + ); +} diff --git a/apollo-federation/tests/query_plan/supergraphs/add_back_sibling_typename_to_interface_object.graphql b/apollo-federation/tests/query_plan/supergraphs/add_back_sibling_typename_to_interface_object.graphql index 08d3c44ea21..fcf86133d8a 100644 --- a/apollo-federation/tests/query_plan/supergraphs/add_back_sibling_typename_to_interface_object.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/add_back_sibling_typename_to_interface_object.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 9c69e32dbbd50fb46ea218c3581b08f4f084b9b9 +# Composed from subgraphs with hash: 36b8aac0fd3b63ab6a2e4d913ce66381d9c97df2 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -46,10 +46,19 @@ interface Item name: String! @join__field(graph: SUBGRAPH1) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/adjacent_mutations_get_merged.graphql b/apollo-federation/tests/query_plan/supergraphs/adjacent_mutations_get_merged.graphql index ae84cc8ed80..6764677f0c3 100644 --- a/apollo-federation/tests/query_plan/supergraphs/adjacent_mutations_get_merged.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/adjacent_mutations_get_merged.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 54adb76945715a2ce0e068d2635d71ca4166b289 +# Composed from subgraphs with hash: e7bdd5a089836a642476b6cb289e21dfe867b4ab schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -32,10 +32,19 @@ type Foo baz: Int @join__field(graph: SUBGRAPHB) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHA @join__graph(name: "SubgraphA", url: "none") SUBGRAPHB @join__graph(name: "SubgraphB", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/allows_setting_down_to_1.graphql b/apollo-federation/tests/query_plan/supergraphs/allows_setting_down_to_1.graphql index 42f3b4b1251..a1f388ed619 100644 --- a/apollo-federation/tests/query_plan/supergraphs/allows_setting_down_to_1.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/allows_setting_down_to_1.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 91d4d0661d413b60ae2ed463c074c4180d7b849e +# Composed from subgraphs with hash: a9236eee956ed7fc219b2212696478159ced7eea schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/another_mix_of_fragments_indirection_and_unions.graphql b/apollo-federation/tests/query_plan/supergraphs/another_mix_of_fragments_indirection_and_unions.graphql index 9b6bb51265f..d92ae75216f 100644 --- a/apollo-federation/tests/query_plan/supergraphs/another_mix_of_fragments_indirection_and_unions.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/another_mix_of_fragments_indirection_and_unions.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: b0bcf31c6c8c64e53e4286dbf397738e41ecbda7 +# Composed from subgraphs with hash: 7e1730cfe16f02de891d008c1310a8355a4b90ab schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ interface I id2: ID! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/avoid_considering_indirect_paths_from_the_root_when_a_more_direct_one_exists.graphql b/apollo-federation/tests/query_plan/supergraphs/avoid_considering_indirect_paths_from_the_root_when_a_more_direct_one_exists.graphql index b5d2335e2c1..7adf9f6c3b7 100644 --- a/apollo-federation/tests/query_plan/supergraphs/avoid_considering_indirect_paths_from_the_root_when_a_more_direct_one_exists.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/avoid_considering_indirect_paths_from_the_root_when_a_more_direct_one_exists.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 9df3e1f539626e2d33ad1aeab8fa51e27fd1f441 +# Composed from subgraphs with hash: 5fba714136085371e4c18ce29483c028c1bcb461 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/avoids_unnecessary_fetches.graphql b/apollo-federation/tests/query_plan/supergraphs/avoids_unnecessary_fetches.graphql index 7ea5c3595d1..d9a20ac1093 100644 --- a/apollo-federation/tests/query_plan/supergraphs/avoids_unnecessary_fetches.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/avoids_unnecessary_fetches.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 8ba19e06c01ab40b92eda93ac77de08c57856299 +# Composed from subgraphs with hash: f7159b1ede74b4019a8e8f7dfb58369fb4890797 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -32,10 +32,19 @@ type A idA1: ID! @join__field(graph: SUBGRAPH3) @join__field(graph: SUBGRAPH4) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/basic_subscription_query_plan.graphql b/apollo-federation/tests/query_plan/supergraphs/basic_subscription_query_plan.graphql index 8b559e67277..075d5bd9785 100644 --- a/apollo-federation/tests/query_plan/supergraphs/basic_subscription_query_plan.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/basic_subscription_query_plan.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f7613316e8b925d2e1fb7f78b351920adfa4a595 +# Composed from subgraphs with hash: c8a41e00d374bc7c77184e0ffa9fae7d65868f14 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query subscription: Subscription @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -23,10 +23,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHA @join__graph(name: "SubgraphA", url: "none") SUBGRAPHB @join__graph(name: "SubgraphB", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/basic_subscription_with_single_subgraph.graphql b/apollo-federation/tests/query_plan/supergraphs/basic_subscription_with_single_subgraph.graphql index e9172529723..221faf8ee56 100644 --- a/apollo-federation/tests/query_plan/supergraphs/basic_subscription_with_single_subgraph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/basic_subscription_with_single_subgraph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 409fcb3d17fb926642cf9483b5c1db292c219eb1 +# Composed from subgraphs with hash: 8588d7e3fac21b6a30d96678baaf1b49eda0fc99 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query subscription: Subscription @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -23,10 +23,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHA @join__graph(name: "SubgraphA", url: "none") SUBGRAPHB @join__graph(name: "SubgraphB", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/can_be_set_to_an_arbitrary_number.graphql b/apollo-federation/tests/query_plan/supergraphs/can_be_set_to_an_arbitrary_number.graphql index 42f3b4b1251..a1f388ed619 100644 --- a/apollo-federation/tests/query_plan/supergraphs/can_be_set_to_an_arbitrary_number.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/can_be_set_to_an_arbitrary_number.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 91d4d0661d413b60ae2ed463c074c4180d7b849e +# Composed from subgraphs with hash: a9236eee956ed7fc219b2212696478159ced7eea schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_entity_fetch.graphql b/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_entity_fetch.graphql index 077541aced6..fc5780d2547 100644 --- a/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_entity_fetch.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_entity_fetch.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 24f37faeded16eb10b0ffc6c3c2a0e936f406801 +# Composed from subgraphs with hash: f8053ffafe0a672063ce2538526e3eccba5c20dc schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_root_fetch.graphql b/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_root_fetch.graphql index 4d21c8ec707..a90f6900c45 100644 --- a/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_root_fetch.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/can_reuse_fragments_in_subgraph_where_they_only_partially_apply_in_root_fetch.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: d4c3168300df54a934d76deb9884e98ba647a676 +# Composed from subgraphs with hash: fe011bd445bfbe40ce53510ba9799480136421c3 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_from_an_interface_object_type.graphql b/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_from_an_interface_object_type.graphql index 97189f93653..1226b3f64e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_from_an_interface_object_type.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_from_an_interface_object_type.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: da551e74f6885542cefc64ed31d2b00579dce2cd +# Composed from subgraphs with hash: 2d8573a4a560444417df271ed0a39b18c366dbc0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I y: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type.graphql b/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type.graphql index 97189f93653..1226b3f64e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: da551e74f6885542cefc64ed31d2b00579dce2cd +# Composed from subgraphs with hash: 2d8573a4a560444417df271ed0a39b18c366dbc0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I y: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type_even_for_a_concrete_implementation.graphql b/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type_even_for_a_concrete_implementation.graphql index 97189f93653..1226b3f64e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type_even_for_a_concrete_implementation.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/can_use_a_key_on_an_interface_object_type_even_for_a_concrete_implementation.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: da551e74f6885542cefc64ed31d2b00579dce2cd +# Composed from subgraphs with hash: 2d8573a4a560444417df271ed0a39b18c366dbc0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I y: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/can_use_same_root_operation_from_multiple_subgraphs_in_parallel.graphql b/apollo-federation/tests/query_plan/supergraphs/can_use_same_root_operation_from_multiple_subgraphs_in_parallel.graphql index 843563aa3fc..d7d10a5dcc3 100644 --- a/apollo-federation/tests/query_plan/supergraphs/can_use_same_root_operation_from_multiple_subgraphs_in_parallel.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/can_use_same_root_operation_from_multiple_subgraphs_in_parallel.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 34751a1a79473dcec3aad139f107e5b73a855e0d +# Composed from subgraphs with hash: 40f5afa1d1f5960b7758506956c002b7f3bb3f96 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/condition_order_router799.graphql b/apollo-federation/tests/query_plan/supergraphs/condition_order_router799.graphql index 69ef1b485a0..91f7154b373 100644 --- a/apollo-federation/tests/query_plan/supergraphs/condition_order_router799.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/condition_order_router799.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 3ebe0e8c55ad21763879da6341617f14953e80d7 +# Composed from subgraphs with hash: 315fa785fb98377a538827892fc251e5278411df schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -23,10 +23,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { BOOKS @join__graph(name: "books", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/correctly_generate_plan_built_from_some_non_individually_optimal_branch_options.graphql b/apollo-federation/tests/query_plan/supergraphs/correctly_generate_plan_built_from_some_non_individually_optimal_branch_options.graphql index 56e9fef51e9..86f3657ed3c 100644 --- a/apollo-federation/tests/query_plan/supergraphs/correctly_generate_plan_built_from_some_non_individually_optimal_branch_options.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/correctly_generate_plan_built_from_some_non_individually_optimal_branch_options.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 6ca9a3e7d089605b227c291630c3f089dde1f38d +# Composed from subgraphs with hash: 2a54a92bba655ef6aba52073886d8834898e3f9e schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/correctly_handle_case_where_there_is_too_many_plans_to_consider.graphql b/apollo-federation/tests/query_plan/supergraphs/correctly_handle_case_where_there_is_too_many_plans_to_consider.graphql index 80f221ab6f0..7ca7c24f4b1 100644 --- a/apollo-federation/tests/query_plan/supergraphs/correctly_handle_case_where_there_is_too_many_plans_to_consider.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/correctly_handle_case_where_there_is_too_many_plans_to_consider.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 8a8e74cff42f95e71955aa96d62ef9f9589739d5 +# Composed from subgraphs with hash: 50c5a3e3aada2517a4ded58b107fb6c1f368a9e2 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_gets_stripped_out.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_gets_stripped_out.graphql index ec6c89f59b2..e77c1b39e83 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_gets_stripped_out.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_gets_stripped_out.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 3e20191edc9bb3ef7d687ce811c347718e6e4100 +# Composed from subgraphs with hash: 71f5545b94f1467afa42deb9d802e13d0d6af30f schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_can_request_typename_in_fragment.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_can_request_typename_in_fragment.graphql index 20cd0d93cd8..c7177ab1895 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_can_request_typename_in_fragment.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_can_request_typename_in_fragment.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e2543fc649c80a566b573ebfad36fc0f7458a3a4 +# Composed from subgraphs with hash: 4650b586dd619bfef02a467d67602c065d4b0ed2 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_everything_within_entity.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_everything_within_entity.graphql index 3fb06aff107..b2bdd666594 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_everything_within_entity.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_everything_within_entity.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 428d657ed6389527be73c6ad949cd2fc4da01b20 +# Composed from subgraphs with hash: 22e24356e106228bb20c17c7dabbf476fde27e22 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_multiple_fields_in_different_subgraphs.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_multiple_fields_in_different_subgraphs.graphql index a03862f6104..3f2ce693457 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_multiple_fields_in_different_subgraphs.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_multiple_fields_in_different_subgraphs.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 6de814e8aeb455e136ac8627284d67ef4806de57 +# Composed from subgraphs with hash: 15876cef8879238c8dad83fa7976f2925553a806 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_enity_but_with_unuseful_key.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_enity_but_with_unuseful_key.graphql index 3467b225d6b..7e45fb82554 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_enity_but_with_unuseful_key.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_enity_but_with_unuseful_key.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e9d8806fbdfd92a23a7dd2af1e343ff3b6de4a7c +# Composed from subgraphs with hash: a8cdce83720ad36769df084cc55e8b418099bca5 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_everything_queried.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_everything_queried.graphql index 3fb06aff107..b2bdd666594 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_everything_queried.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_everything_queried.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 428d657ed6389527be73c6ad949cd2fc4da01b20 +# Composed from subgraphs with hash: 22e24356e106228bb20c17c7dabbf476fde27e22 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_multi_dependency_deferred_section.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_multi_dependency_deferred_section.graphql index 987e5b30e39..eb886f2ec98 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_multi_dependency_deferred_section.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_multi_dependency_deferred_section.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: cb3bc5e47277ef2c4a364fa62067cfc2426974ec +# Composed from subgraphs with hash: cf4534a5c50af23995f1e5aa82b79e9a858b92bf schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_in_same_subgraph.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_in_same_subgraph.graphql index e2f04839653..d3740197e4f 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_in_same_subgraph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_in_same_subgraph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e33e3ea89ff4340ccd53321764ac7f1a2684eb3f +# Composed from subgraphs with hash: 078a72747c6fbfb51e60cd9f7959b3b158495800 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -23,10 +23,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_on_different_subgraphs.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_on_different_subgraphs.graphql index b2e03a0693e..950283032cc 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_on_different_subgraphs.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_mutation_on_different_subgraphs.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 557c634741b7e9f2f4288edb43724e47f1983d19 +# Composed from subgraphs with hash: d44e187a9a459bd70767ee503e7a1dc4c783d0bf schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -23,10 +23,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_query_root_type.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_query_root_type.graphql index 74e78631def..415d4823195 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_query_root_type.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_query_root_type.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 0a1dc62b0c2282030c10f0e0f777f635d6abd3ba +# Composed from subgraphs with hash: 02b05d7c673780361314e10cefea62f6d79d8e3b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -30,10 +30,19 @@ type A next: Query } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_value_types.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_value_types.graphql index 6167ec55b4c..45a3a334ffa 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_value_types.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_on_value_types.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 01170823ab6c07812976d0983a101d49a319af5c +# Composed from subgraphs with hash: 5cea36a97a40394811ab9ccf97df46c40dcd8ebc schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_only_the_key_of_an_entity.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_only_the_key_of_an_entity.graphql index f41a6d91984..d4a1f509010 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_only_the_key_of_an_entity.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_only_the_key_of_an_entity.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 176bb27a622184464209652e70141da92aeef370 +# Composed from subgraphs with hash: 6b693215fbaac31a45aba14a606333aad808ef8e schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_resuming_in_the_same_subgraph.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_resuming_in_the_same_subgraph.graphql index 33e9d9c2d93..ba3655a4f0d 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_resuming_in_the_same_subgraph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_resuming_in_the_same_subgraph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 0e99f2e41acb0f707744e78845a55271589146e6 +# Composed from subgraphs with hash: ead6b9a76f52b7caba51acba21fdd37fa52e369a schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_condition_on_single_subgraph.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_condition_on_single_subgraph.graphql index b185de90bad..56685d5da57 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_condition_on_single_subgraph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_condition_on_single_subgraph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 59e305d633b6e337422f6431c32cc58defa07302 +# Composed from subgraphs with hash: 6da68bcd4562ba2b8aea44307e29b2b409da8920 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_conditions_and_labels.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_conditions_and_labels.graphql index 20cd0d93cd8..c7177ab1895 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_conditions_and_labels.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_conditions_and_labels.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e2543fc649c80a566b573ebfad36fc0f7458a3a4 +# Composed from subgraphs with hash: 4650b586dd619bfef02a467d67602c065d4b0ed2 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_mutliple_conditions_and_labels.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_mutliple_conditions_and_labels.graphql index 1b7e7bdb709..81e36df9a35 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_mutliple_conditions_and_labels.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_defer_with_mutliple_conditions_and_labels.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 2135cbed03439b8658c0113e4663849c991e244b +# Composed from subgraphs with hash: 21f2df1c19b833341b4f9643d34ea0b9cef55ab4 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_entity.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_entity.graphql index 004ed2cf9c2..2148644c499 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_entity.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_entity.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 355f15f0f2699fd21731b0403286c513357860d3 +# Composed from subgraphs with hash: 929471dddc80c1a51b87f346eb2f416084d542eb schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_value_type.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_value_type.graphql index 992f860b3ad..b73e20a4e42 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_value_type.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_direct_nesting_on_value_type.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f507628640adf8891453e78dbd4280a132706b11 +# Composed from subgraphs with hash: e99d2671927f9c6a1ee42f44d3c386ade3094009 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_do_not_merge_query_branches_with_defer.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_do_not_merge_query_branches_with_defer.graphql index 6beeae8fd02..6e7383b221c 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_do_not_merge_query_branches_with_defer.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_do_not_merge_query_branches_with_defer.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 6af2331e8c3844fbee6c3888b80b44f51cd5bd3d +# Composed from subgraphs with hash: e3be845f74566fd4e434d5d8bf76f6bc7ea62166 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_fragments_expand_into_same_field_regardless_of_defer.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_fragments_expand_into_same_field_regardless_of_defer.graphql index c952a4d9984..af0171dca5d 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_fragments_expand_into_same_field_regardless_of_defer.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_fragments_expand_into_same_field_regardless_of_defer.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5382aae137e16d1dfb9955e2a5118b49c75320ea +# Composed from subgraphs with hash: 98071a61d2822a625067b9d1f84c36ca368801d9 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_with_defer_enabled.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_with_defer_enabled.graphql index 385d1b45666..a8a5a9ecfdb 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_with_defer_enabled.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_with_defer_enabled.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f7c59d88291d4be94f4c484dc849118a08361e69 +# Composed from subgraphs with hash: 6f4f2bbb16236373f2eba847b503d19498249c01 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_without_defer_enabled.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_without_defer_enabled.graphql index 385d1b45666..a8a5a9ecfdb 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_without_defer_enabled.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_handles_simple_defer_without_defer_enabled.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f7c59d88291d4be94f4c484dc849118a08361e69 +# Composed from subgraphs with hash: 6f4f2bbb16236373f2eba847b503d19498249c01 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_interface_has_different_definitions_between_subgraphs.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_interface_has_different_definitions_between_subgraphs.graphql index 3fc0c2ca0ce..b51cecf205e 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_interface_has_different_definitions_between_subgraphs.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_interface_has_different_definitions_between_subgraphs.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: d280d3aae78ad7080c8df8b5a8982d70a4000a78 +# Composed from subgraphs with hash: f2201cf706257dc01dcf09fb0ae827af3b9fa88e schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -31,10 +31,19 @@ interface I b: Int @join__field(graph: SUBGRAPH2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_multiple_non_nested_defer_plus_label_handling.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_multiple_non_nested_defer_plus_label_handling.graphql index e35ec302418..63b929b5223 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_multiple_non_nested_defer_plus_label_handling.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_multiple_non_nested_defer_plus_label_handling.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 09643fc5e0d3abcab8a0f25c0c1e4e16da4169a4 +# Composed from subgraphs with hash: 4c287523c033f1b01e358623f51eb8b9ac3dcd85 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_named_fragments_simple.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_named_fragments_simple.graphql index e8552cbd814..bbb73f12e9b 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_named_fragments_simple.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_named_fragments_simple.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 395eb0d8e844d7a54e82eec772f007fafcc37a8e +# Composed from subgraphs with hash: 5f3018ae7e7b98a497ce4fbe8dcd5180c065da06 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_nested_defer_on_entities.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_nested_defer_on_entities.graphql index 10c0f0e1cde..88352b373a1 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_nested_defer_on_entities.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_nested_defer_on_entities.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 1ddb9374f772bf962933f20e08543315e8df2b01 +# Composed from subgraphs with hash: b5d17f8a99a3b6c92c1c3f78456e46fadc515cf5 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_one.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_one.graphql index 6f00c992a63..2e67927893e 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_one.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_one.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 3bee990c996344aa1eb3a7211e3f497fcbe5e1a6 +# Composed from subgraphs with hash: 3c1a8e679e219bea6bc85b846327ff42bdfac701 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_three.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_three.graphql index b5cdcdd6820..0a77a773ea5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_three.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_three.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: c6019a1bd80338506615bb1b60a44fc384586a47 +# Composed from subgraphs with hash: 29206c46cff52b5aadce1935a0f3175d5aacb8dd schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_two.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_two.graphql index a132722729b..095d8d42b76 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_two.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_non_router_based_defer_case_two.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: fc9fa92848d4ab0e200dcfd09762db2e4281efae +# Composed from subgraphs with hash: a985245292473d8c3e90fc33a9c69754285492cc schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_false.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_false.graphql index 385d1b45666..a8a5a9ecfdb 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_false.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_false.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f7c59d88291d4be94f4c484dc849118a08361e69 +# Composed from subgraphs with hash: 6f4f2bbb16236373f2eba847b503d19498249c01 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_true.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_true.graphql index 385d1b45666..a8a5a9ecfdb 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_true.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_normalizes_if_true.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f7c59d88291d4be94f4c484dc849118a08361e69 +# Composed from subgraphs with hash: 6f4f2bbb16236373f2eba847b503d19498249c01 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_provides_are_ignored_for_deferred_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_provides_are_ignored_for_deferred_fields.graphql index a18f8f7682b..7e689776994 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_provides_are_ignored_for_deferred_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_provides_are_ignored_for_deferred_fields.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 39be4a27050623ad7a03d8ae9fed684d1e0f3088 +# Composed from subgraphs with hash: d4bf20edb94edf0cfe2d81956633e26905b36c4e schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_requirements_of_deferred_fields_are_deferred.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_requirements_of_deferred_fields_are_deferred.graphql index 0e2903ca92b..6cfc2792cc1 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_requirements_of_deferred_fields_are_deferred.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_requirements_of_deferred_fields_are_deferred.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: b3f138a89fd35476e9e36002ae4c8c1ab51c4530 +# Composed from subgraphs with hash: b8bd40a365081d5870913002ff2d4bf0dba0af58 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/defer_test_the_path_in_defer_includes_traversed_fragments.graphql b/apollo-federation/tests/query_plan/supergraphs/defer_test_the_path_in_defer_includes_traversed_fragments.graphql index 82c2cfae786..0075f29bc4f 100644 --- a/apollo-federation/tests/query_plan/supergraphs/defer_test_the_path_in_defer_includes_traversed_fragments.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/defer_test_the_path_in_defer_includes_traversed_fragments.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: eea1ddd3f3e944aaeb5f39f8f9018fd32bcdaaf6 +# Composed from subgraphs with hash: 195dbb671585fe1c25717d53d9d35239abd2e09f schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -36,10 +36,19 @@ interface I x: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/does_not_error_on_some_complex_fetch_group_dependencies.graphql b/apollo-federation/tests/query_plan/supergraphs/does_not_error_on_some_complex_fetch_group_dependencies.graphql index 950263d878e..3c79268f770 100644 --- a/apollo-federation/tests/query_plan/supergraphs/does_not_error_on_some_complex_fetch_group_dependencies.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/does_not_error_on_some_complex_fetch_group_dependencies.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 604dead6fd018b16380a1abf51ba199acbdb82f2 +# Composed from subgraphs with hash: c32793dd157c67a6637ceabda719536fc3c703d3 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/does_not_error_out_handling_fragments_when_interface_subtyping_is_involved.graphql b/apollo-federation/tests/query_plan/supergraphs/does_not_error_out_handling_fragments_when_interface_subtyping_is_involved.graphql index 5137fdf7357..5e7fdd28483 100644 --- a/apollo-federation/tests/query_plan/supergraphs/does_not_error_out_handling_fragments_when_interface_subtyping_is_involved.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/does_not_error_out_handling_fragments_when_interface_subtyping_is_involved.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 85a2b796ad6f1553ddbc0bf5f4722e602f475090 +# Composed from subgraphs with hash: 7a5c84b7ae6162a788aa569091fcd5a8fe8c4771 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -49,10 +49,19 @@ interface IB v1: Int! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/does_not_evaluate_plans_relying_on_a_key_field_to_fetch_that_same_field.graphql b/apollo-federation/tests/query_plan/supergraphs/does_not_evaluate_plans_relying_on_a_key_field_to_fetch_that_same_field.graphql index 674a08c9f2d..0aebde659cc 100644 --- a/apollo-federation/tests/query_plan/supergraphs/does_not_evaluate_plans_relying_on_a_key_field_to_fetch_that_same_field.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/does_not_evaluate_plans_relying_on_a_key_field_to_fetch_that_same_field.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e4cc087ad60a261439df7beadccbe9b4a31eaa8d +# Composed from subgraphs with hash: 408f5bf6c20bc49fa52320c529af66fbb36287dd schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_for_typename.graphql b/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_for_typename.graphql index 97189f93653..1226b3f64e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_for_typename.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_for_typename.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: da551e74f6885542cefc64ed31d2b00579dce2cd +# Composed from subgraphs with hash: 2d8573a4a560444417df271ed0a39b18c366dbc0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I y: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_if_a_specific_implementation_is_requested.graphql b/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_if_a_specific_implementation_is_requested.graphql index 97189f93653..1226b3f64e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_if_a_specific_implementation_is_requested.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/does_not_rely_on_an_interface_object_directly_if_a_specific_implementation_is_requested.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: da551e74f6885542cefc64ed31d2b00579dce2cd +# Composed from subgraphs with hash: 2d8573a4a560444417df271ed0a39b18c366dbc0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I y: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/ensures_sanitization_applies_repeatedly.graphql b/apollo-federation/tests/query_plan/supergraphs/ensures_sanitization_applies_repeatedly.graphql index f62dcb21b5e..35a2de8da7b 100644 --- a/apollo-federation/tests/query_plan/supergraphs/ensures_sanitization_applies_repeatedly.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/ensures_sanitization_applies_repeatedly.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5a37dc86c56cab4caab8bb5d9606eb4c7df0d804 +# Composed from subgraphs with hash: bb70b30ff3918c2d33483331b733c724cbd8631d schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") A_NA_ME_WITH_PLEN_TY_REPLACE_MENTS @join__graph(name: "a-na&me-with-plen&ty-replace*ments", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/field_covariance_and_type_explosion.graphql b/apollo-federation/tests/query_plan/supergraphs/field_covariance_and_type_explosion.graphql index 923bde8335a..693e39ab512 100644 --- a/apollo-federation/tests/query_plan/supergraphs/field_covariance_and_type_explosion.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/field_covariance_and_type_explosion.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 2254345d779de0a2850b6c7a5db722f1989a774c +# Composed from subgraphs with hash: 184d4f82c7a51478107e30ce8aee3d1862c804c2 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -28,10 +28,19 @@ interface Interface field: Interface } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/fields_are_not_overwritten_when_directives_are_removed.graphql b/apollo-federation/tests/query_plan/supergraphs/fields_are_not_overwritten_when_directives_are_removed.graphql index 1b369c434a7..2b0526beb05 100644 --- a/apollo-federation/tests/query_plan/supergraphs/fields_are_not_overwritten_when_directives_are_removed.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/fields_are_not_overwritten_when_directives_are_removed.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 654c7bcba86c6f5845a7cb520710cfa37b678e3d +# Composed from subgraphs with hash: 8afd32067575aaae505bac05752941b0314b3cf0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -35,10 +35,19 @@ type Foo bar: Bar } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHSKIP @join__graph(name: "SubgraphSkip", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/fragment_with_intersecting_parent_type_and_directive_condition.graphql b/apollo-federation/tests/query_plan/supergraphs/fragment_with_intersecting_parent_type_and_directive_condition.graphql index 1e2a3734951..6c5379daffe 100644 --- a/apollo-federation/tests/query_plan/supergraphs/fragment_with_intersecting_parent_type_and_directive_condition.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/fragment_with_intersecting_parent_type_and_directive_condition.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e2393609250b71261acc4089006bc8a14627d488 +# Composed from subgraphs with hash: 60b6f32feef51579a2b534cc06e803a7fd2aa5d8 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -37,10 +37,19 @@ interface I2 title: String } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { A @join__graph(name: "A", url: "none") B @join__graph(name: "B", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/fragments_that_share_a_hash_but_are_not_identical_generate_their_own_fragment_definitions.graphql b/apollo-federation/tests/query_plan/supergraphs/fragments_that_share_a_hash_but_are_not_identical_generate_their_own_fragment_definitions.graphql index a745ed62634..3e995ed7bb5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/fragments_that_share_a_hash_but_are_not_identical_generate_their_own_fragment_definitions.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/fragments_that_share_a_hash_but_are_not_identical_generate_their_own_fragment_definitions.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 62d7e50e5ef7c204246ba7c0cefcef3e9e5bef0c +# Composed from subgraphs with hash: d87fc8c7d88d7ddc316b4109f5c0f08a3319255b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -12,7 +12,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -39,10 +39,19 @@ type B z: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/handle_subgraph_with_hypen_in_the_name.graphql b/apollo-federation/tests/query_plan/supergraphs/handle_subgraph_with_hypen_in_the_name.graphql index 9b7600e8a4a..7206c021302 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handle_subgraph_with_hypen_in_the_name.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handle_subgraph_with_hypen_in_the_name.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: c2ea0958d4d930ae3bf3535692a966af9f3af063 +# Composed from subgraphs with hash: dceeff5b8cc9eef0d5d67d90dcad47c9d2bcdeee schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") NON_GRAPHQL_NAME @join__graph(name: "non-graphql-name", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handle_very_non_graph_subgraph_name.graphql b/apollo-federation/tests/query_plan/supergraphs/handle_very_non_graph_subgraph_name.graphql index 3a1ae9fab27..effff2b9591 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handle_very_non_graph_subgraph_name.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handle_very_non_graph_subgraph_name.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 2ad000b79369f5b833cec8d6e5e62e99db89585c +# Composed from subgraphs with hash: 008d1087d7fbef647f430c6050718ba5fd3247db schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { _42_ @join__graph(name: "42!", url: "none") S1 @join__graph(name: "S1", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_case_of_key_chains_in_parallel_requires.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_case_of_key_chains_in_parallel_requires.graphql index fd7953bfd38..bfbe5565228 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_case_of_key_chains_in_parallel_requires.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_case_of_key_chains_in_parallel_requires.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 6f7dd1a877d5de533c98948e91197cb3526ed446 +# Composed from subgraphs with hash: 657939f9f9642f8874ed6a99f6d8f0b724c29d6b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_fragments_with_interface_field_subtyping.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_fragments_with_interface_field_subtyping.graphql index 98032aadc85..06e121a504f 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_fragments_with_interface_field_subtyping.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_fragments_with_interface_field_subtyping.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: cd5671782860ad7353fd02dfb07664cdc89a5809 +# Composed from subgraphs with hash: 631090cf03bf148115fe36abae4e705737e27a73 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ interface I other: I! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_mix_of_fragments_indirection_and_unions.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_mix_of_fragments_indirection_and_unions.graphql index 2ff8417e3b3..766e1618ad5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_mix_of_fragments_indirection_and_unions.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_mix_of_fragments_indirection_and_unions.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 0b61d90468ba75e031fdc3c1abe0ac8e87674cc7 +# Composed from subgraphs with hash: 2bc15991aebf8f895f3eb5d24040154b20447182 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -41,10 +41,19 @@ type Child id: ID! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_multiple_conditions_on_abstract_types.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_multiple_conditions_on_abstract_types.graphql index 76280a249e6..998237f160c 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_multiple_conditions_on_abstract_types.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_multiple_conditions_on_abstract_types.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 2bb5218456c710b3aeaf9c5a9a7d87eee258917f +# Composed from subgraphs with hash: ef4b999f84fcdb4baba65f1a44c84d1e4267d948 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -36,10 +36,19 @@ type Book implements Product reviews: [Review!]! @join__field(graph: REVIEWS) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { BOOKS @join__graph(name: "books", url: "none") MAGAZINES @join__graph(name: "magazines", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_multiple_requires_involving_different_nestedness.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_multiple_requires_involving_different_nestedness.graphql index 9a5c273ce0c..0a3f8546001 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_multiple_requires_involving_different_nestedness.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_multiple_requires_involving_different_nestedness.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 6120a9371b90c378d13d977d19bad9e17c6875cb +# Composed from subgraphs with hash: 6912a71c206209826d59e92decbc10df806b4164 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -33,10 +33,19 @@ type Item computed2: String @join__field(graph: SUBGRAPH2, requires: "user { value }") } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_non_intersecting_fragment_conditions.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_non_intersecting_fragment_conditions.graphql index 4be5ebe264f..c1798df7793 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_non_intersecting_fragment_conditions.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_non_intersecting_fragment_conditions.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: cc0d8d93561b6e20d87ae1541b16037be17333ef +# Composed from subgraphs with hash: 3c577bdcdfd12b97d2b265e5ccd5ddf286addb71 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -44,10 +44,19 @@ interface Fruit edible: Boolean! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_non_matching_value_types_under_interface_field.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_non_matching_value_types_under_interface_field.graphql index 10cc68d0041..1f936b1a91d 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_non_matching_value_types_under_interface_field.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_non_matching_value_types_under_interface_field.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 9959b044b8b84e47c4559354eb1d87299be28495 +# Composed from subgraphs with hash: 2c44fca1dca09f3611b2c3d037001fdcb2bd607c schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -28,10 +28,19 @@ interface I s: S } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_query_of_an_interface_field_for_a_specific_implementation_when_query_starts_with_interface_object.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_query_of_an_interface_field_for_a_specific_implementation_when_query_starts_with_interface_object.graphql index 97189f93653..1226b3f64e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_query_of_an_interface_field_for_a_specific_implementation_when_query_starts_with_interface_object.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_query_of_an_interface_field_for_a_specific_implementation_when_query_starts_with_interface_object.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: da551e74f6885542cefc64ed31d2b00579dce2cd +# Composed from subgraphs with hash: 2d8573a4a560444417df271ed0a39b18c366dbc0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I y: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_requires_from_supergraph.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_requires_from_supergraph.graphql index 4afa0074ca8..0be24065e67 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_requires_from_supergraph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_requires_from_supergraph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: c980fbf8b4a77ab38f828719197c4878658aa92c +# Composed from subgraphs with hash: aa3ba9dce3c336c185aea3d559466b7d5a3d6602 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ interface I name: String } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_root_operation_shareable_in_many_subgraphs.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_root_operation_shareable_in_many_subgraphs.graphql index 9c2c5435dd8..3cca84dfcc0 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_root_operation_shareable_in_many_subgraphs.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_root_operation_shareable_in_many_subgraphs.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: dece71b67cd54bf5e3bf43988e99a638876d52e5 +# Composed from subgraphs with hash: f03aecdc91efa05b3b7a659e31c58bfcd905fb73 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_simple_requires.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_simple_requires.graphql index a7bbfe095a7..53d20c5d7eb 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_simple_requires.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_simple_requires.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: a2964ea427e664c7c007a258b54d68db9abae8f4 +# Composed from subgraphs with hash: d4af614c7debcf4bf2aa8a18f0f23f04412be82d schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_spread_unions_correctly.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_spread_unions_correctly.graphql index d0d026a6f3c..248bcff72ec 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_spread_unions_correctly.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_spread_unions_correctly.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 361121049969085d46eae818d8c9d8da18d3cf6c +# Composed from subgraphs with hash: cf0557ca376939819cf4d2f4f7e46d4b3d7836d7 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -47,10 +47,19 @@ type C c2: Int @join__field(graph: SUBGRAPH2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/handles_types_with_no_common_supertype_at_the_same_merge_at.graphql b/apollo-federation/tests/query_plan/supergraphs/handles_types_with_no_common_supertype_at_the_same_merge_at.graphql index 15ae958653c..4a14062e26d 100644 --- a/apollo-federation/tests/query_plan/supergraphs/handles_types_with_no_common_supertype_at_the_same_merge_at.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/handles_types_with_no_common_supertype_at_the_same_merge_at.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 98f941b67e6dc18205c3148808a6bce2b64c775f +# Composed from subgraphs with hash: 8a740dea36b9a39b79632385c08dd53e07af0cbb schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -40,10 +40,19 @@ type Foo y: Int @join__field(graph: SUBGRAPH2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction.graphql b/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction.graphql index 4c89d271df0..0a8c08838ea 100644 --- a/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 6ac1ca5a8c7d1596024e97bb378f1f829788fd71 +# Composed from subgraphs with hash: aad30ec98d465ca592dcfb7b6493a1721589fda7 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -60,10 +60,19 @@ interface I2 v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction_but_no_need_to_type_explode.graphql b/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction_but_no_need_to_type_explode.graphql index 5433f33dcf4..ff8399d64c4 100644 --- a/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction_but_no_need_to_type_explode.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/interface_interface_interaction_but_no_need_to_type_explode.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5073ac23b2d2f5657028261e837e26e4370a3cf4 +# Composed from subgraphs with hash: 6bcf7c1079cc0111e6fc2f4134333b73fc319248 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -60,10 +60,19 @@ interface I2 v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction.graphql b/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction.graphql index 11afc89b983..bbeaa7ec499 100644 --- a/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 43ca669a61b756dfac8bec5822d87393bc9f3544 +# Composed from subgraphs with hash: 92c4a98434a66db1d0a5cc563bea94c0faaa1a55 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -50,10 +50,19 @@ interface I v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction_but_no_need_to_type_explode.graphql b/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction_but_no_need_to_type_explode.graphql index 60c26dd5234..5d7c1c82c49 100644 --- a/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction_but_no_need_to_type_explode.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/interface_union_interaction_but_no_need_to_type_explode.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 2548adb14fdc2eacf229834ee87327873c15cb8d +# Composed from subgraphs with hash: e851cb374aa6dea60bffafd658bccd2e017af6f1 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_allow_providing_fields_for_only_some_subtype.graphql b/apollo-federation/tests/query_plan/supergraphs/it_allow_providing_fields_for_only_some_subtype.graphql index fcbc7f2aa3f..4f81762ce32 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_allow_providing_fields_for_only_some_subtype.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_allow_providing_fields_for_only_some_subtype.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 7225f76e0549cfa72d92ea3d954fbfa4f5325cff +# Composed from subgraphs with hash: 799c11349d958543e444e53c4ed186a8e7f820f6 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ interface I b: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_avoid_fragments_usable_only_once.graphql b/apollo-federation/tests/query_plan/supergraphs/it_avoid_fragments_usable_only_once.graphql index 629427d8e7c..48a62f633e1 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_avoid_fragments_usable_only_once.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_avoid_fragments_usable_only_once.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 57cf5fd9ee4bd6e69d9976aef7ff289a74c757c4 +# Composed from subgraphs with hash: 3ea57c667516dce90ad8a2331832f8be1f86f197 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_avoids_buffering_interface_object_results_that_may_have_to_be_filtered_with_lists.graphql b/apollo-federation/tests/query_plan/supergraphs/it_avoids_buffering_interface_object_results_that_may_have_to_be_filtered_with_lists.graphql index b989cee25c4..8a8283144b6 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_avoids_buffering_interface_object_results_that_may_have_to_be_filtered_with_lists.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_avoids_buffering_interface_object_results_that_may_have_to_be_filtered_with_lists.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 885b71f276ed574d24895695bddb2bd130640f65 +# Composed from subgraphs with hash: 803bcb0fbcd87892a96ce14b10f3c11256f2870b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -48,10 +48,19 @@ interface I expansiveField: String @join__field(graph: S1) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_can_require_at_inaccessible_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/it_can_require_at_inaccessible_fields.graphql index 45bca01a724..22e98bf368c 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_can_require_at_inaccessible_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_can_require_at_inaccessible_fields.graphql @@ -1,8 +1,8 @@ -# Composed from subgraphs with hash: 49f8443a5ff323a1ffed6b7122a1d61e6225d235 +# Composed from subgraphs with hash: 8d7a727bb1c4430ee3ee6df729a5c72ac0a7e181 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) - @link(url: "https://specs.apollo.dev/inaccessible/v0.2", for: SECURITY) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) + @link(url: "https://specs.apollo.dev/inaccessible/v0.2", import: ["@inaccessible"], for: SECURITY) { query: Query } @@ -13,7 +13,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -25,10 +25,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_does_not_needlessly_consider_options_for_typename.graphql b/apollo-federation/tests/query_plan/supergraphs/it_does_not_needlessly_consider_options_for_typename.graphql index 82876af15ed..e00fa476ebe 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_does_not_needlessly_consider_options_for_typename.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_does_not_needlessly_consider_options_for_typename.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ee7dda36e9dc663f9750f86da48822e8f6f6ea8f +# Composed from subgraphs with hash: 665427c4bfc0c14e12d92d34229628661820a58b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_entity_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_entity_fields.graphql index cda69fb9053..054bdac9a10 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_entity_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_entity_fields.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ea1fd23b849053c0b7cfbf9a192453c71e70f889 +# Composed from subgraphs with hash: 898d84a7356419fd51e15c565a45b3ba121f272f schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "s1", url: "none") S2 @join__graph(name: "s2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_nested_entity_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_nested_entity_fields.graphql index cda69fb9053..054bdac9a10 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_nested_entity_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_nested_entity_fields.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ea1fd23b849053c0b7cfbf9a192453c71e70f889 +# Composed from subgraphs with hash: 898d84a7356419fd51e15c565a45b3ba121f272f schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "s1", url: "none") S2 @join__graph(name: "s2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_root_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_root_fields.graphql index 206487ca494..b627614bd2e 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_root_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_does_not_override_unset_labels_on_root_fields.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: b409284c35003f62c7c83675734478b1970effb2 +# Composed from subgraphs with hash: 876e9aeacdff38ab69fae92ab4830e10f28b6fd3 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "s1", url: "none") S2 @join__graph(name: "s2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_does_not_try_to_apply_fragments_that_are_not_valid_for_the_subgraph.graphql b/apollo-federation/tests/query_plan/supergraphs/it_does_not_try_to_apply_fragments_that_are_not_valid_for_the_subgraph.graphql index d0358af17b5..2f15689f7af 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_does_not_try_to_apply_fragments_that_are_not_valid_for_the_subgraph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_does_not_try_to_apply_fragments_that_are_not_valid_for_the_subgraph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 11ffa462805ad28daecca693ed1a45d931d3cac8 +# Composed from subgraphs with hash: 48933e92f90d5670a9f24349a530c214cf89fbbc schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -30,10 +30,19 @@ interface I b: Int @join__field(graph: SUBGRAPH2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_executes_mutation_operations_in_sequence.graphql b/apollo-federation/tests/query_plan/supergraphs/it_executes_mutation_operations_in_sequence.graphql index c8a3b06e689..10ae0d54ceb 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_executes_mutation_operations_in_sequence.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_executes_mutation_operations_in_sequence.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ff6534336a58b9a72232e43fdb66c4769ac4ae66 +# Composed from subgraphs with hash: 167da40652f362ea1ee23360c16a7a706369148d schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -23,10 +23,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handes_diamond_shape_depedencies.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handes_diamond_shape_depedencies.graphql index b410e60027a..27fd59a7873 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handes_diamond_shape_depedencies.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handes_diamond_shape_depedencies.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 2a90ec602bc41c24462757dc66b2e37e1d96dbf4 +# Composed from subgraphs with hash: a7228e28b556a2f72545f7993f3b68d25944b04d schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { A @join__graph(name: "A", url: "none") B @join__graph(name: "B", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_a_simple_at_requires_triggered_within_a_conditional.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_a_simple_at_requires_triggered_within_a_conditional.graphql index 7cd49ac90f2..4d30aa4ed6f 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_a_simple_at_requires_triggered_within_a_conditional.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_a_simple_at_requires_triggered_within_a_conditional.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 88de1465b4ef08a76a910cff26136f931b69eca4 +# Composed from subgraphs with hash: a5459e4976ee54fb002ab54de666b70cd01c9805 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_triggered_conditionally.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_triggered_conditionally.graphql index 7cd49ac90f2..4d30aa4ed6f 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_triggered_conditionally.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_triggered_conditionally.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 88de1465b4ef08a76a910cff26136f931b69eca4 +# Composed from subgraphs with hash: a5459e4976ee54fb002ab54de666b70cd01c9805 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_where_multiple_conditional_are_involved.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_where_multiple_conditional_are_involved.graphql index 9442a08abfd..91e32419cdc 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_where_multiple_conditional_are_involved.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_an_at_requires_where_multiple_conditional_are_involved.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 213ee593775b6e4a22a852a35da688bc2e85d710 +# Composed from subgraphs with hash: 8d562727336acf24ddefa337d51f03c88d6634de schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -39,10 +39,19 @@ type B c: Int @join__field(graph: SUBGRAPH3, requires: "required") } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_complex_require_chain.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_complex_require_chain.graphql index 8fbe10543ad..8070b8da377 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_complex_require_chain.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_complex_require_chain.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: eeb0b0963b210e2f82e6f40f535037882afb96db +# Composed from subgraphs with hash: f82048b558e108214a7bd9b888b7cd19868588b4 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -40,10 +40,19 @@ type Inner4Type inner4_nested: Int! @join__field(graph: SUBGRAPH5, requires: "inner4_required") } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_subtyping_relation_differs.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_subtyping_relation_differs.graphql index 39f730f7023..8aaa3f274f6 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_subtyping_relation_differs.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_subtyping_relation_differs.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 0545139260d6549f4e32906bce43c37742fdff80 +# Composed from subgraphs with hash: b2221050efb89f6e4df71823675d2ea1fbe66a31 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -38,10 +38,19 @@ type Inner implements I w: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_union_membership_relation_differs.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_union_membership_relation_differs.graphql index 8706c2af1e6..3ffdb5403ea 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_union_membership_relation_differs.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_fragment_rebasing_in_a_subgraph_where_some_union_membership_relation_differs.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 2be5cb3476eaeac718ff9d77f717b70fe9f344a2 +# Composed from subgraphs with hash: 94b7e94d03865ae730e8e7b6165d4deeed218c72 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type Inner w: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_fragments_with_one_non_leaf_field.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_fragments_with_one_non_leaf_field.graphql index a745ed62634..3e995ed7bb5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_fragments_with_one_non_leaf_field.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_fragments_with_one_non_leaf_field.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 62d7e50e5ef7c204246ba7c0cefcef3e9e5bef0c +# Composed from subgraphs with hash: d87fc8c7d88d7ddc316b4109f5c0f08a3319255b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -12,7 +12,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -39,10 +39,19 @@ type B z: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_in_nested_entity.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_in_nested_entity.graphql index fe5bef73a14..15bb01ded8f 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_in_nested_entity.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_in_nested_entity.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 3881ebaea69bd73941780a88cffefd7f909c77d1 +# Composed from subgraphs with hash: 2dd159285f3b564dab13310cf19c753575fbf1d6 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -49,10 +49,19 @@ interface I a: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_input_rewrites_when_cloning_dependency_graph.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_input_rewrites_when_cloning_dependency_graph.graphql index 41b8deead21..19a4cfd986b 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_input_rewrites_when_cloning_dependency_graph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_interface_object_input_rewrites_when_cloning_dependency_graph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 3799eb12e6387413ef90a73d8848b5c48e40cbca +# Composed from subgraphs with hash: 1b82052bbef41bea0b8cc6650bfd42149af666b5 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -31,10 +31,19 @@ interface I i3: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_longer_require_chain.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_longer_require_chain.graphql index 0d81bb4ee61..1da9d8d72aa 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_longer_require_chain.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_longer_require_chain.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 00470b1d89f783a11f9b05f82d8377c0d5e3f89d +# Composed from subgraphs with hash: 13b9f66e51175713b45f58b5c9cb1bf93123c731 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH10 @join__graph(name: "Subgraph10", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_with_multiple_fetches.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_with_multiple_fetches.graphql index 57e31110e1e..91bd2a3ab08 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_with_multiple_fetches.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_with_multiple_fetches.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 55b2cd6d674b743ae99fa918dce065759899f51d +# Composed from subgraphs with hash: d9d299269fc1b12c334504cd1ba44d173360c498 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -31,10 +31,19 @@ interface I name: String! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "s1", url: "none") S2 @join__graph(name: "s2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_within_the_same_entity_fetch.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_within_the_same_entity_fetch.graphql index 8beeb189bd1..48dfe2a1660 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_within_the_same_entity_fetch.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_multiple_requires_within_the_same_entity_fetch.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 151440cab35934f002ebab673ce5f8bd86966772 +# Composed from subgraphs with hash: 6670829507adac060bea0af75f139243611c4359 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -30,10 +30,19 @@ interface I g: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_nested_fragment_generation.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_nested_fragment_generation.graphql index a745ed62634..3e995ed7bb5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_nested_fragment_generation.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_nested_fragment_generation.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 62d7e50e5ef7c204246ba7c0cefcef3e9e5bef0c +# Composed from subgraphs with hash: d87fc8c7d88d7ddc316b4109f5c0f08a3319255b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -12,7 +12,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -39,10 +39,19 @@ type B z: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_entity_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_entity_fields.graphql index cda69fb9053..054bdac9a10 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_entity_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_entity_fields.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ea1fd23b849053c0b7cfbf9a192453c71e70f889 +# Composed from subgraphs with hash: 898d84a7356419fd51e15c565a45b3ba121f272f schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "s1", url: "none") S2 @join__graph(name: "s2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_nested_entity_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_nested_entity_fields.graphql index cda69fb9053..054bdac9a10 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_nested_entity_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_nested_entity_fields.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ea1fd23b849053c0b7cfbf9a192453c71e70f889 +# Composed from subgraphs with hash: 898d84a7356419fd51e15c565a45b3ba121f272f schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "s1", url: "none") S2 @join__graph(name: "s2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_root_fields.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_root_fields.graphql index 206487ca494..b627614bd2e 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_root_fields.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_progressive_override_on_root_fields.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: b409284c35003f62c7c83675734478b1970effb2 +# Composed from subgraphs with hash: 876e9aeacdff38ab69fae92ab4830e10f28b6fd3 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "s1", url: "none") S2 @join__graph(name: "s2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_require_chain_not_ending_in_original_group.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_require_chain_not_ending_in_original_group.graphql index 3d4964b7124..53ae96662b8 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_require_chain_not_ending_in_original_group.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_require_chain_not_ending_in_original_group.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ff92849ceafa9aaccab960b8b5ce0e98a13e6a00 +# Composed from subgraphs with hash: b700dc9de06af55918612c3c23975613c7625ab0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_requires_on_concrete_type_of_field_provided_by_interface_object.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_requires_on_concrete_type_of_field_provided_by_interface_object.graphql index aae7fd038a6..ac4b478cdfe 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_requires_on_concrete_type_of_field_provided_by_interface_object.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_requires_on_concrete_type_of_field_provided_by_interface_object.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 209a0436ca69cb640450ef4fc7c204a5b5fc6058 +# Composed from subgraphs with hash: 2a2bbbfde2d57ed4fb71a1b63682f2c3ea5f27e5 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -47,10 +47,19 @@ interface I x: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_handles_simple_require_chain.graphql b/apollo-federation/tests/query_plan/supergraphs/it_handles_simple_require_chain.graphql index b076bc92fe4..119e9a6802c 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_handles_simple_require_chain.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_handles_simple_require_chain.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 244af51d2d8ba7d87e4b9fec74bbb49dc7b00e4d +# Composed from subgraphs with hash: 457e28f8e650826536a34aec9a0d7e7f938609a2 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_identifies_and_reuses_equivalent_fragments_that_arent_identical.graphql b/apollo-federation/tests/query_plan/supergraphs/it_identifies_and_reuses_equivalent_fragments_that_arent_identical.graphql index a745ed62634..3e995ed7bb5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_identifies_and_reuses_equivalent_fragments_that_arent_identical.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_identifies_and_reuses_equivalent_fragments_that_arent_identical.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 62d7e50e5ef7c204246ba7c0cefcef3e9e5bef0c +# Composed from subgraphs with hash: d87fc8c7d88d7ddc316b4109f5c0f08a3319255b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -12,7 +12,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -39,10 +39,19 @@ type B z: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_migrates_skip_include.graphql b/apollo-federation/tests/query_plan/supergraphs/it_migrates_skip_include.graphql index a745ed62634..3e995ed7bb5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_migrates_skip_include.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_migrates_skip_include.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 62d7e50e5ef7c204246ba7c0cefcef3e9e5bef0c +# Composed from subgraphs with hash: d87fc8c7d88d7ddc316b4109f5c0f08a3319255b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -12,7 +12,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -39,10 +39,19 @@ type B z: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_overrides_f1_to_s3_when_label_is_provided.graphql b/apollo-federation/tests/query_plan/supergraphs/it_overrides_f1_to_s3_when_label_is_provided.graphql index 8ee0521f3bf..e8b4cd762b0 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_overrides_f1_to_s3_when_label_is_provided.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_overrides_f1_to_s3_when_label_is_provided.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5f73656f77e5320839ceba43507ea13060eea5e1 +# Composed from subgraphs with hash: 58136a8ddfdf60b78598ff5b86f5b4ae3193a41c schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_overrides_to_s2_when_label_is_provided.graphql b/apollo-federation/tests/query_plan/supergraphs/it_overrides_to_s2_when_label_is_provided.graphql index 8ee0521f3bf..e8b4cd762b0 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_overrides_to_s2_when_label_is_provided.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_overrides_to_s2_when_label_is_provided.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5f73656f77e5320839ceba43507ea13060eea5e1 +# Composed from subgraphs with hash: 58136a8ddfdf60b78598ff5b86f5b4ae3193a41c schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_preservers_aliased_typename.graphql b/apollo-federation/tests/query_plan/supergraphs/it_preservers_aliased_typename.graphql index adc483ebe79..c9885e4c8e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_preservers_aliased_typename.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_preservers_aliased_typename.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: d7fe5a716fee436faefb289f7ba4a8bd05bd7d34 +# Composed from subgraphs with hash: ce2557f5278c94808d1e49ad488bf60d0355e98d schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_is_reused.graphql b/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_is_reused.graphql index 9aa130fc7ff..95316d43532 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_is_reused.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_is_reused.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 75955b009750aae84f92b194eddcb553f0e44656 +# Composed from subgraphs with hash: 136ac120ab3c0a9b8ea4cb22cb440886a1b4a961 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_not_used.graphql b/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_not_used.graphql index 9aa130fc7ff..95316d43532 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_not_used.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_preserves_directives_when_fragment_not_used.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 75955b009750aae84f92b194eddcb553f0e44656 +# Composed from subgraphs with hash: 136ac120ab3c0a9b8ea4cb22cb440886a1b4a961 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_preserves_nested_fragments_when_outer_one_has_directives_and_is_eliminated.graphql b/apollo-federation/tests/query_plan/supergraphs/it_preserves_nested_fragments_when_outer_one_has_directives_and_is_eliminated.graphql index a12329a27d8..7b9af267132 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_preserves_nested_fragments_when_outer_one_has_directives_and_is_eliminated.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_preserves_nested_fragments_when_outer_one_has_directives_and_is_eliminated.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f580fdce2d5df285d6e12633d4355b51e2fd52fd +# Composed from subgraphs with hash: fd162a5fc982fc2cd0a8d33e271831822b681137 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_preserves_typename_with_directives.graphql b/apollo-federation/tests/query_plan/supergraphs/it_preserves_typename_with_directives.graphql index 79dbbde767c..b812bb841ac 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_preserves_typename_with_directives.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_preserves_typename_with_directives.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5781ed69d05761a7c894a8aac04728581a2475d9 +# Composed from subgraphs with hash: feb9a6756ae190fe90dc2297767c2b4b08fb56a9 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_require_of_multiple_field_when_one_is_also_a_key_to_reach_another.graphql b/apollo-federation/tests/query_plan/supergraphs/it_require_of_multiple_field_when_one_is_also_a_key_to_reach_another.graphql index 66be42e56a5..a291d321a89 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_require_of_multiple_field_when_one_is_also_a_key_to_reach_another.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_require_of_multiple_field_when_one_is_also_a_key_to_reach_another.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 3766e23446d1f1881fb155fefa8036726c6f34c4 +# Composed from subgraphs with hash: 01a8e1dfb199705050c7be5bc0f6efb3da20e92e schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { A @join__graph(name: "A", url: "none") B @join__graph(name: "B", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_resolves_f1_in_s1_when_label_is_not_provided.graphql b/apollo-federation/tests/query_plan/supergraphs/it_resolves_f1_in_s1_when_label_is_not_provided.graphql index 8ee0521f3bf..e8b4cd762b0 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_resolves_f1_in_s1_when_label_is_not_provided.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_resolves_f1_in_s1_when_label_is_not_provided.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5f73656f77e5320839ceba43507ea13060eea5e1 +# Composed from subgraphs with hash: 58136a8ddfdf60b78598ff5b86f5b4ae3193a41c schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_resolves_in_s1_when_label_is_not_provided.graphql b/apollo-federation/tests/query_plan/supergraphs/it_resolves_in_s1_when_label_is_not_provided.graphql index 8ee0521f3bf..e8b4cd762b0 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_resolves_in_s1_when_label_is_not_provided.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_resolves_in_s1_when_label_is_not_provided.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5f73656f77e5320839ceba43507ea13060eea5e1 +# Composed from subgraphs with hash: 58136a8ddfdf60b78598ff5b86f5b4ae3193a41c schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_respects_generate_query_fragments_option.graphql b/apollo-federation/tests/query_plan/supergraphs/it_respects_generate_query_fragments_option.graphql index a745ed62634..3e995ed7bb5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_respects_generate_query_fragments_option.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_respects_generate_query_fragments_option.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 62d7e50e5ef7c204246ba7c0cefcef3e9e5bef0c +# Composed from subgraphs with hash: d87fc8c7d88d7ddc316b4109f5c0f08a3319255b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -12,7 +12,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -39,10 +39,19 @@ type B z: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_works_on_interfaces.graphql b/apollo-federation/tests/query_plan/supergraphs/it_works_on_interfaces.graphql index a7d3b590255..9e11724dcd3 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_works_on_interfaces.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_works_on_interfaces.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: d654244e34da1e73ea47f5325e371614408d38ae +# Composed from subgraphs with hash: d2db7329336a011305d153d60031e5fe634adedb schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -28,10 +28,19 @@ interface I v: Value } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_works_on_unions.graphql b/apollo-federation/tests/query_plan/supergraphs/it_works_on_unions.graphql index bb44229f8de..51f7ac8d5f4 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_works_on_unions.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_works_on_unions.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 87210bff4bf720ff0fe68c22dae1d3e5520d7980 +# Composed from subgraphs with hash: aa33c34a78654942627b836a960f9da314ca826e schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_1.graphql b/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_1.graphql index 3b5fe2a129d..19aedf23581 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_1.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_1.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 18fc379a3170731963d1ec9f54f8b002b0f5d874 +# Composed from subgraphs with hash: 0b52a1cc2cdc06e7b2bb3c438672662d0f80de68 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -64,10 +64,19 @@ interface Foo child2: Foo } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_when_only_the_nested_fragment_gets_preserved.graphql b/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_when_only_the_nested_fragment_gets_preserved.graphql index ef1c2756323..0d1594dccae 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_when_only_the_nested_fragment_gets_preserved.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_fragments_when_only_the_nested_fragment_gets_preserved.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 197c4ea5c04d17ec60cb084c49efe2f9d662079b +# Composed from subgraphs with hash: af8642bd2cc335a2823e7c95f48ce005d3c809f0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_provides.graphql b/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_provides.graphql index 581e7c764b4..9217e787f0b 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_provides.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_works_with_nested_provides.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: fb1513832764f051dd663a966309809fb58e4519 +# Composed from subgraphs with hash: d2ea3c5c49010cc58bc83d22cf064d8e307ad23e schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/it_works_with_type_condition_even_for_types_only_reachable_by_the_at_provides.graphql b/apollo-federation/tests/query_plan/supergraphs/it_works_with_type_condition_even_for_types_only_reachable_by_the_at_provides.graphql index 1b20db25a40..ec708018032 100644 --- a/apollo-federation/tests/query_plan/supergraphs/it_works_with_type_condition_even_for_types_only_reachable_by_the_at_provides.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/it_works_with_type_condition_even_for_types_only_reachable_by_the_at_provides.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 0556f39f18edcd446ffee2af4cec39d408bf7b7d +# Composed from subgraphs with hash: bb2856a3e0e2f066120553ce903effcc593c7907 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -37,10 +37,19 @@ interface I a: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/key_where_at_external_is_not_at_top_level_of_selection_of_requires.graphql b/apollo-federation/tests/query_plan/supergraphs/key_where_at_external_is_not_at_top_level_of_selection_of_requires.graphql index c5c7c136a3b..827ec19db00 100644 --- a/apollo-federation/tests/query_plan/supergraphs/key_where_at_external_is_not_at_top_level_of_selection_of_requires.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/key_where_at_external_is_not_at_top_level_of_selection_of_requires.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 3035e486a3ec94c91ff841c2eb464b287fead177 +# Composed from subgraphs with hash: 3517f40ed88e4d3fad368bc9dc78a52173c3f827 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { A @join__graph(name: "A", url: "none") B @join__graph(name: "B", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_order.graphql b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_order.graphql index 80f6562f184..8971d93a091 100644 --- a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_order.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_order.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: fbbe470b5e40af130de42043f74772ec30ee60ff +# Composed from subgraphs with hash: 00f8a26b066b234394aed3ca1e140a534b0364a8 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type Hello goodbye: String! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHSKIP @join__graph(name: "SubgraphSkip", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_quantity.graphql b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_quantity.graphql index 80f6562f184..8971d93a091 100644 --- a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_quantity.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_differing_quantity.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: fbbe470b5e40af130de42043f74772ec30ee60ff +# Composed from subgraphs with hash: 00f8a26b066b234394aed3ca1e140a534b0364a8 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type Hello goodbye: String! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHSKIP @join__graph(name: "SubgraphSkip", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_identical.graphql b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_identical.graphql index 80f6562f184..8971d93a091 100644 --- a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_identical.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_multiple_applications_identical.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: fbbe470b5e40af130de42043f74772ec30ee60ff +# Composed from subgraphs with hash: 00f8a26b066b234394aed3ca1e140a534b0364a8 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type Hello goodbye: String! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHSKIP @join__graph(name: "SubgraphSkip", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_with_fragment.graphql b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_with_fragment.graphql index 80f6562f184..8971d93a091 100644 --- a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_with_fragment.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_with_fragment.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: fbbe470b5e40af130de42043f74772ec30ee60ff +# Composed from subgraphs with hash: 00f8a26b066b234394aed3ca1e140a534b0364a8 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type Hello goodbye: String! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHSKIP @join__graph(name: "SubgraphSkip", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_without_fragment.graphql b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_without_fragment.graphql index 80f6562f184..8971d93a091 100644 --- a/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_without_fragment.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/merging_skip_and_include_directives_without_fragment.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: fbbe470b5e40af130de42043f74772ec30ee60ff +# Composed from subgraphs with hash: 00f8a26b066b234394aed3ca1e140a534b0364a8 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type Hello goodbye: String! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHSKIP @join__graph(name: "SubgraphSkip", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/multiplication_overflow_in_reduce_options_if_needed.graphql b/apollo-federation/tests/query_plan/supergraphs/multiplication_overflow_in_reduce_options_if_needed.graphql index 42f3b4b1251..a1f388ed619 100644 --- a/apollo-federation/tests/query_plan/supergraphs/multiplication_overflow_in_reduce_options_if_needed.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/multiplication_overflow_in_reduce_options_if_needed.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 91d4d0661d413b60ae2ed463c074c4180d7b849e +# Composed from subgraphs with hash: a9236eee956ed7fc219b2212696478159ced7eea schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/nested_fragment_with_intersecting_parent_type_and_directive_condition.graphql b/apollo-federation/tests/query_plan/supergraphs/nested_fragment_with_intersecting_parent_type_and_directive_condition.graphql index 1e2a3734951..6c5379daffe 100644 --- a/apollo-federation/tests/query_plan/supergraphs/nested_fragment_with_intersecting_parent_type_and_directive_condition.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/nested_fragment_with_intersecting_parent_type_and_directive_condition.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e2393609250b71261acc4089006bc8a14627d488 +# Composed from subgraphs with hash: 60b6f32feef51579a2b534cc06e803a7fd2aa5d8 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -37,10 +37,19 @@ interface I2 title: String } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { A @join__graph(name: "A", url: "none") B @join__graph(name: "B", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/non_adjacent_mutations_do_not_get_merged.graphql b/apollo-federation/tests/query_plan/supergraphs/non_adjacent_mutations_do_not_get_merged.graphql index ae84cc8ed80..6764677f0c3 100644 --- a/apollo-federation/tests/query_plan/supergraphs/non_adjacent_mutations_do_not_get_merged.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/non_adjacent_mutations_do_not_get_merged.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 54adb76945715a2ce0e068d2635d71ca4166b289 +# Composed from subgraphs with hash: e7bdd5a089836a642476b6cb289e21dfe867b4ab schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -32,10 +32,19 @@ type Foo baz: Int @join__field(graph: SUBGRAPHB) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHA @join__graph(name: "SubgraphA", url: "none") SUBGRAPHB @join__graph(name: "SubgraphB", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/only_uses_an_interface_object_if_it_can.graphql b/apollo-federation/tests/query_plan/supergraphs/only_uses_an_interface_object_if_it_can.graphql index 97189f93653..1226b3f64e2 100644 --- a/apollo-federation/tests/query_plan/supergraphs/only_uses_an_interface_object_if_it_can.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/only_uses_an_interface_object_if_it_can.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: da551e74f6885542cefc64ed31d2b00579dce2cd +# Composed from subgraphs with hash: 2d8573a4a560444417df271ed0a39b18c366dbc0 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I y: Int @join__field(graph: S2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/pick_keys_that_minimize_fetches.graphql b/apollo-federation/tests/query_plan/supergraphs/pick_keys_that_minimize_fetches.graphql index dc51cbcdccf..6020cd5b7f9 100644 --- a/apollo-federation/tests/query_plan/supergraphs/pick_keys_that_minimize_fetches.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/pick_keys_that_minimize_fetches.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 454b3fc41adce04fc670f06030743d521d09096d +# Composed from subgraphs with hash: 477d072dba9eac87f14e07f061eef2003d803291 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -37,10 +37,19 @@ type Currency sign: String! } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/rebase_non_intersecting_without_dropping_inline_fragment_due_to_directive.graphql b/apollo-federation/tests/query_plan/supergraphs/rebase_non_intersecting_without_dropping_inline_fragment_due_to_directive.graphql new file mode 100644 index 00000000000..55fea881e23 --- /dev/null +++ b/apollo-federation/tests/query_plan/supergraphs/rebase_non_intersecting_without_dropping_inline_fragment_due_to_directive.graphql @@ -0,0 +1,80 @@ +# Composed from subgraphs with hash: 9f65288304601b6cf28091f55f98c58ca3c82972 +schema + @link(url: "https://specs.apollo.dev/link/v1.0") + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) +{ + query: Query +} + +directive @join__directive(graphs: [join__Graph!], name: String!, args: join__DirectiveArguments) repeatable on SCHEMA | OBJECT | INTERFACE | FIELD_DEFINITION + +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, overrideLabel: String, contextArguments: [join__ContextArgument!]) 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 OBJECT | INTERFACE + +directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR + +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 + +interface I + @join__type(graph: SUBGRAPH1) +{ + i: Int +} + +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + +scalar join__DirectiveArguments + +scalar join__FieldSet + +scalar join__FieldValue + +enum join__Graph { + SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") +} + +scalar link__Import + +enum link__Purpose { + """ + `SECURITY` features provide metadata necessary to securely resolve fields. + """ + SECURITY + + """ + `EXECUTION` features provide metadata necessary for operation execution. + """ + EXECUTION +} + +type Query + @join__type(graph: SUBGRAPH1) +{ + test: X +} + +type X implements I + @join__implements(graph: SUBGRAPH1, interface: "I") + @join__type(graph: SUBGRAPH1) +{ + i: Int +} + +type Y implements I + @join__implements(graph: SUBGRAPH1, interface: "I") + @join__type(graph: SUBGRAPH1) +{ + i: Int +} diff --git a/apollo-federation/tests/query_plan/supergraphs/redundant_typename_for_inline_fragments_without_type_condition.graphql b/apollo-federation/tests/query_plan/supergraphs/redundant_typename_for_inline_fragments_without_type_condition.graphql index 923d8501871..eb0a2e0d5d5 100644 --- a/apollo-federation/tests/query_plan/supergraphs/redundant_typename_for_inline_fragments_without_type_condition.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/redundant_typename_for_inline_fragments_without_type_condition.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f02b27ab5f92e1e70c07bf7d5ce65e620637ef35 +# Composed from subgraphs with hash: 926811cf9f8aa69f79e2143ad129969648ca0b75 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_false.graphql b/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_false.graphql index 003c7fc0ec8..000490dd415 100644 --- a/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_false.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_false.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 4fc759c1b39c54d520a6868db43813e4a38bbaf3 +# Composed from subgraphs with hash: d072d5c57a6c4387ebe527d2ad00a30cbceac34b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type A y: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_true.graphql b/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_true.graphql index 003c7fc0ec8..000490dd415 100644 --- a/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_true.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/respects_query_planner_option_reuse_query_fragments_true.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 4fc759c1b39c54d520a6868db43813e4a38bbaf3 +# Composed from subgraphs with hash: d072d5c57a6c4387ebe527d2ad00a30cbceac34b schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -29,10 +29,19 @@ type A y: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/same_as_js_router798.graphql b/apollo-federation/tests/query_plan/supergraphs/same_as_js_router798.graphql index 6895c4bf96f..ff31b706b20 100644 --- a/apollo-federation/tests/query_plan/supergraphs/same_as_js_router798.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/same_as_js_router798.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: ee7fce9eb672edf9b036a25bcae0b056ccf5f451 +# Composed from subgraphs with hash: 3606ac3a1b1064419fe78425582e73b5ce3b5369 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -28,10 +28,19 @@ interface Interface a: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") } diff --git a/apollo-federation/tests/query_plan/supergraphs/selections_are_not_overwritten_after_removing_directives.graphql b/apollo-federation/tests/query_plan/supergraphs/selections_are_not_overwritten_after_removing_directives.graphql index 6d2137b561e..fc9e5cad10e 100644 --- a/apollo-federation/tests/query_plan/supergraphs/selections_are_not_overwritten_after_removing_directives.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/selections_are_not_overwritten_after_removing_directives.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 56ab651bf30bcb3ac7a9fb826fa6b03a57288859 +# Composed from subgraphs with hash: 0d8bac977a97888c29d1c90cff65ea818522aeec schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -38,10 +38,19 @@ type Foo bar: Bar } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/skip_type_explosion_early_if_unnecessary.graphql b/apollo-federation/tests/query_plan/supergraphs/skip_type_explosion_early_if_unnecessary.graphql index c0db4184d4f..4802078dadb 100644 --- a/apollo-federation/tests/query_plan/supergraphs/skip_type_explosion_early_if_unnecessary.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/skip_type_explosion_early_if_unnecessary.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 63eb1eb88aa472162170c24e74ca47c7c4ac1866 +# Composed from subgraphs with hash: 22a84f887ef58f251ff2c8f6439dcdfbdc1395fd schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -28,10 +28,19 @@ interface I s: S } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/subgraph_query_retains_the_query_variables_used_in_the_directives_applied_to_the_query.graphql b/apollo-federation/tests/query_plan/supergraphs/subgraph_query_retains_the_query_variables_used_in_the_directives_applied_to_the_query.graphql index 67fa096ee14..000717825ce 100644 --- a/apollo-federation/tests/query_plan/supergraphs/subgraph_query_retains_the_query_variables_used_in_the_directives_applied_to_the_query.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/subgraph_query_retains_the_query_variables_used_in_the_directives_applied_to_the_query.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 64759e825a65c99c54fedcbf511cc7bf0735d4e2 +# Composed from subgraphs with hash: b577e09c4cb52223182c48413d146f984b798808 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -24,10 +24,19 @@ directive @link(url: String, as: String, for: link__Purpose, import: [link__Impo directive @withArgs(arg1: String) on QUERY +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_if_directives_at_the_operation_level_are_passed_down_to_subgraph_queries.graphql b/apollo-federation/tests/query_plan/supergraphs/test_if_directives_at_the_operation_level_are_passed_down_to_subgraph_queries.graphql index f2012f3f042..b7cd3853f8a 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_if_directives_at_the_operation_level_are_passed_down_to_subgraph_queries.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_if_directives_at_the_operation_level_are_passed_down_to_subgraph_queries.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: a0524dbe1bbd3a7450a2e15f5c25c5cf2eed4242 +# Composed from subgraphs with hash: cc7760ea5772ca757685d5802613391331d0bb89 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -13,7 +13,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -37,10 +37,19 @@ type Foo baz: Int @join__field(graph: SUBGRAPHB) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHA @join__graph(name: "subgraphA", url: "none") SUBGRAPHB @join__graph(name: "subgraphB", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_if_directives_on_mutations_are_passed_down_to_subgraph_queries.graphql b/apollo-federation/tests/query_plan/supergraphs/test_if_directives_on_mutations_are_passed_down_to_subgraph_queries.graphql index f2012f3f042..b7cd3853f8a 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_if_directives_on_mutations_are_passed_down_to_subgraph_queries.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_if_directives_on_mutations_are_passed_down_to_subgraph_queries.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: a0524dbe1bbd3a7450a2e15f5c25c5cf2eed4242 +# Composed from subgraphs with hash: cc7760ea5772ca757685d5802613391331d0bb89 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query mutation: Mutation @@ -13,7 +13,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -37,10 +37,19 @@ type Foo baz: Int @join__field(graph: SUBGRAPHB) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHA @join__graph(name: "subgraphA", url: "none") SUBGRAPHB @join__graph(name: "subgraphB", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_if_directives_with_arguments_applied_on_queries_are_ok.graphql b/apollo-federation/tests/query_plan/supergraphs/test_if_directives_with_arguments_applied_on_queries_are_ok.graphql index 5eb84bed66f..088d93fd2e6 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_if_directives_with_arguments_applied_on_queries_are_ok.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_if_directives_with_arguments_applied_on_queries_are_ok.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 5338f8c604ab7c2103bdf58ee6752a40d4b62ed8 +# Composed from subgraphs with hash: 835b813ecafe8b6b6bbffd9b802895d83cacac08 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -26,10 +26,19 @@ directive @noArgs on QUERY directive @withArgs(arg1: String) on QUERY +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_indirect_branch_merging_with_typename_sibling.graphql b/apollo-federation/tests/query_plan/supergraphs/test_indirect_branch_merging_with_typename_sibling.graphql index 462629b77ae..2f2ab91aa62 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_indirect_branch_merging_with_typename_sibling.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_indirect_branch_merging_with_typename_sibling.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 9be0826e3b911556466c2c410f7df8b53c241774 +# Composed from subgraphs with hash: efc8cbf9c39df8acdc21d7cb3fb9e23700650a82 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -42,10 +42,19 @@ type B implements T f: Int! @join__field(graph: SUBGRAPH2) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_interface_object_advance_with_non_collecting_and_type_preserving_transitions_ordering.graphql b/apollo-federation/tests/query_plan/supergraphs/test_interface_object_advance_with_non_collecting_and_type_preserving_transitions_ordering.graphql index da082207023..eb112a8850b 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_interface_object_advance_with_non_collecting_and_type_preserving_transitions_ordering.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_interface_object_advance_with_non_collecting_and_type_preserving_transitions_ordering.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 415e22ad50245441330e67dc6637cf09714a4831 +# Composed from subgraphs with hash: 7c59bdaefc39d7e88a603f0560376a398e5b7e93 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -57,10 +57,19 @@ interface I data: String! @join__field(graph: Z) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { S1 @join__graph(name: "S1", url: "none") S2 @join__graph(name: "S2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_do_not_create_cycle_in_fetch_dependency_graph.graphql b/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_do_not_create_cycle_in_fetch_dependency_graph.graphql index 82e69229f17..c92362b1c74 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_do_not_create_cycle_in_fetch_dependency_graph.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_do_not_create_cycle_in_fetch_dependency_graph.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 0b567f1d7e0089a146e8499a2c5e412b78a98498 +# Composed from subgraphs with hash: 806d47884a3b16cd6552156d332df34cb74e0ffc schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { A @join__graph(name: "A", url: "none") B @join__graph(name: "B", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_reset_cached_costs.graphql b/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_reset_cached_costs.graphql index 6b66fcbf6e4..6f34ea9a772 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_reset_cached_costs.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_merging_fetches_reset_cached_costs.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 7c07647747a84fd6c839bb603948dddcadf654fd +# Composed from subgraphs with hash: 0cd24ae6074a39994c982e5fa519acabfe2dcdac schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { A @join__graph(name: "A", url: "none") B @join__graph(name: "B", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/test_provides_edge_ordering.graphql b/apollo-federation/tests/query_plan/supergraphs/test_provides_edge_ordering.graphql index 6e2401f7d4c..002b35a3088 100644 --- a/apollo-federation/tests/query_plan/supergraphs/test_provides_edge_ordering.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/test_provides_edge_ordering.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: f5cb1210587d45fee11b9c57247d6c570d0ae7fd +# Composed from subgraphs with hash: 44564f95d87b3306e4c708b71f30f050c48d3a2d schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -31,10 +31,19 @@ type A data: String! @join__field(graph: SUBGRAPHX) @join__field(graph: SUBGRAPHY) } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHQ @join__graph(name: "SubgraphQ", url: "none") SUBGRAPHX @join__graph(name: "SubgraphX", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/trying_to_use_defer_with_a_subcription_results_in_an_error.graphql b/apollo-federation/tests/query_plan/supergraphs/trying_to_use_defer_with_a_subcription_results_in_an_error.graphql index 1d901c0ee10..5958431c2c9 100644 --- a/apollo-federation/tests/query_plan/supergraphs/trying_to_use_defer_with_a_subcription_results_in_an_error.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/trying_to_use_defer_with_a_subcription_results_in_an_error.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 4c8b155cb8183b493b5c2862a2bd4ce0261642f9 +# Composed from subgraphs with hash: ebc3c557daba5b588e6f31c98db4dea0296b99e7 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query subscription: Subscription @@ -11,7 +11,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -23,10 +23,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPHA @join__graph(name: "SubgraphA", url: "none") SUBGRAPHB @join__graph(name: "SubgraphB", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction.graphql b/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction.graphql index 347f1bcfb85..d8b17e29b57 100644 --- a/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 336400b353f835910c178a10eb77371f8700396b +# Composed from subgraphs with hash: a36c94877a2b170f973a35c58634ef4ee999c103 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -51,10 +51,19 @@ interface I v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction_but_no_need_to_type_explode.graphql b/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction_but_no_need_to_type_explode.graphql index 3dfc5d39b8f..292658a75ea 100644 --- a/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction_but_no_need_to_type_explode.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/union_interface_interaction_but_no_need_to_type_explode.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 0457b8e67ae0ea99ead4c13318c4ac89e821aac3 +# Composed from subgraphs with hash: 82e74064026e626dde5798a7eaa1e6426c2c51d9 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -50,10 +50,19 @@ interface I v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/union_union_interaction.graphql b/apollo-federation/tests/query_plan/supergraphs/union_union_interaction.graphql index bb7bf23e984..3e41a51d06c 100644 --- a/apollo-federation/tests/query_plan/supergraphs/union_union_interaction.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/union_union_interaction.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 997336a5c7996069d8c10d0b9be46a72b46459c1 +# Composed from subgraphs with hash: 02b257e0662ad5b58d0147cb3c34c295418df23c schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -41,10 +41,19 @@ type C v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/union_union_interaction_but_no_need_to_type_explode.graphql b/apollo-federation/tests/query_plan/supergraphs/union_union_interaction_but_no_need_to_type_explode.graphql index 3dd79adf662..aed475b293d 100644 --- a/apollo-federation/tests/query_plan/supergraphs/union_union_interaction_but_no_need_to_type_explode.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/union_union_interaction_but_no_need_to_type_explode.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 241b1f7314833f7c2a97da8176e258c40322b0d7 +# Composed from subgraphs with hash: affd505df6fdd709ffe38651ddc517c8f33ec727 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -41,10 +41,19 @@ type C v: Int } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/unnecessary_include_is_stripped_from_fragments.graphql b/apollo-federation/tests/query_plan/supergraphs/unnecessary_include_is_stripped_from_fragments.graphql index 33f5dd6f052..3c2493c9c85 100644 --- a/apollo-federation/tests/query_plan/supergraphs/unnecessary_include_is_stripped_from_fragments.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/unnecessary_include_is_stripped_from_fragments.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: e6c72fb53e93abe8f8aed4982aca6f6109fe1171 +# Composed from subgraphs with hash: 7267ff8701477b9b37e32de3063a369f4a7e2af3 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -37,10 +37,19 @@ type Foo bar: Bar } +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/works_when_unset.graphql b/apollo-federation/tests/query_plan/supergraphs/works_when_unset.graphql index 42f3b4b1251..a1f388ed619 100644 --- a/apollo-federation/tests/query_plan/supergraphs/works_when_unset.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/works_when_unset.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 91d4d0661d413b60ae2ed463c074c4180d7b849e +# Composed from subgraphs with hash: a9236eee956ed7fc219b2212696478159ced7eea schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-federation/tests/query_plan/supergraphs/works_with_key_chains.graphql b/apollo-federation/tests/query_plan/supergraphs/works_with_key_chains.graphql index 48816b3a72a..3b8b99fd6db 100644 --- a/apollo-federation/tests/query_plan/supergraphs/works_with_key_chains.graphql +++ b/apollo-federation/tests/query_plan/supergraphs/works_with_key_chains.graphql @@ -1,7 +1,7 @@ -# Composed from subgraphs with hash: 4387e2f917c7748296b92799227648747e453bec +# Composed from subgraphs with hash: 2a34e202493c546249d10e9e361038512dd0e213 schema @link(url: "https://specs.apollo.dev/link/v1.0") - @link(url: "https://specs.apollo.dev/join/v0.4", for: EXECUTION) + @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) { query: Query } @@ -10,7 +10,7 @@ directive @join__directive(graphs: [join__Graph!], name: String!, args: join__Di 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, overrideLabel: String) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION +directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION directive @join__graph(name: String!, url: String!) on ENUM_VALUE @@ -22,10 +22,19 @@ directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA +input join__ContextArgument { + name: String! + type: String! + context: String! + selection: join__FieldValue! +} + scalar join__DirectiveArguments scalar join__FieldSet +scalar join__FieldValue + enum join__Graph { SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") SUBGRAPH2 @join__graph(name: "Subgraph2", url: "none") diff --git a/apollo-router/src/error.rs b/apollo-router/src/error.rs index 80b075a915d..b6281a58d64 100644 --- a/apollo-router/src/error.rs +++ b/apollo-router/src/error.rs @@ -26,6 +26,11 @@ use crate::json_ext::Value; use crate::spec::operation_limits::OperationLimits; use crate::spec::SpecError; +/// Return up to this many GraphQL parsing or validation errors. +/// +/// Any remaining errors get silently dropped. +const MAX_VALIDATION_ERRORS: usize = 100; + /// Error types for execution. /// /// Note that these are not actually returned to the client, but are instead converted to JSON for @@ -333,6 +338,7 @@ impl IntoGraphQLErrors for Vec { .extension_code("GRAPHQL_VALIDATION_FAILED") .build() }) + .take(MAX_VALIDATION_ERRORS) .collect()) } } @@ -605,6 +611,7 @@ impl IntoGraphQLErrors for ParseErrors { .extension_code("GRAPHQL_PARSING_FAILED") .build() }) + .take(MAX_VALIDATION_ERRORS) .collect()) } } @@ -635,6 +642,7 @@ impl ValidationErrors { .extension_code("GRAPHQL_VALIDATION_FAILED") .build() }) + .take(MAX_VALIDATION_ERRORS) .collect() } } @@ -647,7 +655,11 @@ impl IntoGraphQLErrors for ValidationErrors { impl From for ValidationErrors { fn from(errors: DiagnosticList) -> Self { Self { - errors: errors.iter().map(|e| e.unstable_to_json_compat()).collect(), + errors: errors + .iter() + .map(|e| e.unstable_to_json_compat()) + .take(MAX_VALIDATION_ERRORS) + .collect(), } } } diff --git a/apollo-router/src/plugins/telemetry/formatters/json.rs b/apollo-router/src/plugins/telemetry/formatters/json.rs index 8f6551ce148..7bb94bfebd7 100644 --- a/apollo-router/src/plugins/telemetry/formatters/json.rs +++ b/apollo-router/src/plugins/telemetry/formatters/json.rs @@ -500,7 +500,7 @@ mod test { .or_else(|| ctx.lookup_current()) .expect("current span expected"); let extracted = extract_dd_trace_id(¤t_span); - assert_eq!(extracted, Some("1234".to_string())); + assert_eq!(extracted, Some("1234".to_string()), "should have trace id"); } } @@ -535,7 +535,7 @@ mod test { } #[test] - #[should_panic] + #[should_panic(expected = "should have trace id")] fn test_missing_dd_attribute() { subscriber::with_default( Registry::default() diff --git a/apollo-router/tests/integration/validation.rs b/apollo-router/tests/integration/validation.rs index b5b0f6682d4..fa5ed5cdcf9 100644 --- a/apollo-router/tests/integration/validation.rs +++ b/apollo-router/tests/integration/validation.rs @@ -167,3 +167,41 @@ async fn test_validation_error() { } "###); } + +#[tokio::test] +async fn test_lots_of_validation_errors() { + let query = format!( + "{{ __typename {} }}", + "@a".repeat(4_000), // Stay under the token limit: "@a" is two tokens every time + ); + + let request = serde_json::json!({ "query": query }); + let request = apollo_router::services::router::Request::fake_builder() + .body(request.to_string()) + .method(hyper::Method::POST) + .header("content-type", "application/json") + .build() + .unwrap(); + let response = apollo_router::TestHarness::builder() + .schema(include_str!("../fixtures/supergraph.graphql")) + .build_router() + .await + .unwrap() + .oneshot(request) + .await + .unwrap() + .next_response() + .await + .unwrap() + .unwrap(); + + let v: serde_json::Value = serde_json::from_slice(&response).unwrap(); + let errors = v["errors"].as_array().unwrap(); + assert!(!errors.is_empty(), "should have errors"); + // Make sure we're actually testing the validation errors, and we're not hitting some other limit + assert_eq!( + errors.first().unwrap()["extensions"]["code"], + serde_json::Value::from("GRAPHQL_VALIDATION_FAILED") + ); + assert!(errors.len() <= 100, "should return limited error count"); +} diff --git a/helm/chart/router/templates/virtualservice.yaml b/helm/chart/router/templates/virtualservice.yaml index 1112750a3c7..3d273583d75 100644 --- a/helm/chart/router/templates/virtualservice.yaml +++ b/helm/chart/router/templates/virtualservice.yaml @@ -20,7 +20,13 @@ metadata: {{- end }} spec: hosts: + { { if .Values.virtualservice.Hosts } } + { { - range .Values.virtualservice.Hosts } } + - { { . | quote } } + { { - end } } + { { - else } } - "*" + { { - end } } {{- if .Values.virtualservice.gatewayName }} gateways: - {{ .Values.virtualservice.gatewayName }} diff --git a/helm/chart/router/values.yaml b/helm/chart/router/values.yaml index 8540dd2f566..35f45618a79 100644 --- a/helm/chart/router/values.yaml +++ b/helm/chart/router/values.yaml @@ -167,6 +167,8 @@ virtualservice: # gatewayNames: [] # - "gateway-1" # - "gateway-2" + # Hosts: "" # configurable but will default to '*' + # - somehost.domain.com # http: # main: # # set enabled to true to add