diff --git a/.changeset/five-ways-accept.md b/.changeset/five-ways-accept.md deleted file mode 100644 index c2de5aa46..000000000 --- a/.changeset/five-ways-accept.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"apollo-federation-integration-testsuite": minor -"@apollo/query-planner": minor -"@apollo/query-graphs": minor -"@apollo/composition": minor -"@apollo/federation-internals": minor -"@apollo/subgraph": minor -"@apollo/gateway": minor ---- - -Adds the ability to compose and serialize directives for [Apollo Connectors](https://go.apollo.dev/connectors). To use Apollo Connectors, compose your supergraphs using [GraphOS](https://www.apollographql.com/docs/graphos/platform/schema-management) or [rover](https://www.apollographql.com/docs/rover/commands/dev), and run your supergraph in [Apollo Router](https://www.apollographql.com/docs/graphos/routing) 2.0.0 or higher. diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index b2354019f..000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "mode": "exit", - "tag": "alpha", - "initialVersions": { - "@apollo/composition": "2.9.0", - "apollo-federation-integration-testsuite": "2.9.0", - "@apollo/gateway": "2.9.0", - "@apollo/federation-internals": "2.9.0", - "@apollo/query-graphs": "2.9.0", - "@apollo/query-planner": "2.9.0", - "@apollo/subgraph": "2.9.0" - }, - "changesets": [ - "twenty-parents-wait", - "warm-moles-jog", - "young-pigs-crash" - ] -} diff --git a/.changeset/twenty-parents-wait.md b/.changeset/twenty-parents-wait.md deleted file mode 100644 index 7ce545cba..000000000 --- a/.changeset/twenty-parents-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/federation-internals": patch ---- - -Incorporate changes from v2.9.3 diff --git a/.changeset/warm-moles-jog.md b/.changeset/warm-moles-jog.md deleted file mode 100644 index 785fbdcd5..000000000 --- a/.changeset/warm-moles-jog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/gateway": minor ---- - -Add request parameter to didEncounterError method diff --git a/.changeset/young-pigs-crash.md b/.changeset/young-pigs-crash.md deleted file mode 100644 index b7470632b..000000000 --- a/.changeset/young-pigs-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@apollo/subgraph": patch ---- - -When resolving references, skip type resolution if the reference resolves to null. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 74829e0c9..007f4a014 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ -* @apollographql/atlas +* @apollographql/fed-core /docs/ @apollographql/docs diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b7fe128e3..559150397 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,10 +1,5 @@ blank_issues_enabled: true contact_links: - - name: "GraphOS Discord Server" - url: https://discord.com/invite/graphos - about: >- - Come join us in our GraphOS Discord server; our community and DevRel team - are happy to answer any questions you might have. - name: "Apollo Discourse Community" url: https://community.apollographql.com/tag/federation about: >- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ca7fbfc5..19f5e71ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,21 +47,6 @@ jobs: run: sleep 20 shell: bash - - name: Kick off release in federation-rs - if: steps.changesets.outputs.published == 'true' - uses: actions/github-script@v6 - with: - github-token: ${{ secrets.ACTION_PAT }} - script: | - await github.rest.actions.createWorkflowDispatch({ - owner: 'apollographql', - repo: 'federation-rs', - workflow_id: '.github/workflows/release.yml', - ref: 'main', - inputs: { - version: "${{ env.FEDERATION_VERSION }}" - } - }) - name: Write token to the NPM rc file (login) if: steps.changesets.outputs.published == 'true' # write token to the NPM rc file (npm login) diff --git a/composition-js/CHANGELOG.md b/composition-js/CHANGELOG.md index 00dfbea1b..755b1e92d 100644 --- a/composition-js/CHANGELOG.md +++ b/composition-js/CHANGELOG.md @@ -1,5 +1,17 @@ # CHANGELOG for `@apollo/composition` +## 2.10.0 + +### Minor Changes + +- Adds the ability to compose and serialize directives for [Apollo Connectors](https://go.apollo.dev/connectors). To use Apollo Connectors, compose your supergraphs using [GraphOS](https://www.apollographql.com/docs/graphos/platform/schema-management) or [rover](https://www.apollographql.com/docs/rover/commands/dev), and run your supergraph in [Apollo Router](https://www.apollographql.com/docs/graphos/routing) 2.0.0 or higher. ([#3215](https://github.com/apollographql/federation/pull/3215)) + +### Patch Changes + +- Updated dependencies [[`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899), [`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899)]: + - @apollo/query-graphs@2.10.0 + - @apollo/federation-internals@2.10.0 + ## 2.9.3 ### Patch Changes diff --git a/composition-js/package.json b/composition-js/package.json index 297a8da86..ff2469f1e 100644 --- a/composition-js/package.json +++ b/composition-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/composition", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "description": "Apollo Federation composition utilities", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -27,8 +27,8 @@ "access": "public" }, "dependencies": { - "@apollo/federation-internals": "2.10.0-alpha.4", - "@apollo/query-graphs": "2.10.0-alpha.4" + "@apollo/federation-internals": "2.10.0", + "@apollo/query-graphs": "2.10.0" }, "peerDependencies": { "graphql": "^16.5.0" diff --git a/docs/source/images/federation-dark.svg b/docs/source/images/federation-dark.svg index 406982293..038365e6d 100644 --- a/docs/source/images/federation-dark.svg +++ b/docs/source/images/federation-dark.svg @@ -1,96 +1,77 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + - - - - - - - - + + - - + + diff --git a/docs/source/images/federation-diag-2-dark.svg b/docs/source/images/federation-diag-2-dark.svg index 3ca73f2d2..b138b7384 100644 --- a/docs/source/images/federation-diag-2-dark.svg +++ b/docs/source/images/federation-diag-2-dark.svg @@ -33,9 +33,9 @@ - + - + @@ -48,9 +48,9 @@ - + - + @@ -63,9 +63,9 @@ - + - + @@ -79,13 +79,13 @@ - + - + - + diff --git a/docs/source/images/federation-diag-2.svg b/docs/source/images/federation-diag-2.svg index fafe53edd..e607f05d4 100644 --- a/docs/source/images/federation-diag-2.svg +++ b/docs/source/images/federation-diag-2.svg @@ -33,9 +33,9 @@ - + - + @@ -48,9 +48,9 @@ - + - + @@ -62,8 +62,8 @@ - - + + @@ -77,10 +77,10 @@ - + - + diff --git a/docs/source/images/federation-diag-3-dark.svg b/docs/source/images/federation-diag-3-dark.svg index c76567285..c14dfa73f 100644 --- a/docs/source/images/federation-diag-3-dark.svg +++ b/docs/source/images/federation-diag-3-dark.svg @@ -32,9 +32,9 @@ - + - + @@ -45,9 +45,9 @@ - + - + @@ -58,9 +58,9 @@ - + - + @@ -83,13 +83,13 @@ - + - + - + diff --git a/docs/source/images/federation-diag-3.svg b/docs/source/images/federation-diag-3.svg index b4c6a9314..8caf4c496 100644 --- a/docs/source/images/federation-diag-3.svg +++ b/docs/source/images/federation-diag-3.svg @@ -32,9 +32,9 @@ - + - + @@ -45,9 +45,9 @@ - + - + @@ -57,8 +57,8 @@ - - + + @@ -81,10 +81,10 @@ - + - + diff --git a/docs/source/images/federation.svg b/docs/source/images/federation.svg index 64d1c3d58..1463a3d60 100644 --- a/docs/source/images/federation.svg +++ b/docs/source/images/federation.svg @@ -1,39 +1,30 @@ - + - + - + - - + + - - - - + + + - - - - - - - - - - - + + + - + - + @@ -51,46 +42,36 @@ - - - - - - + + + + - - - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - + - + - - - - - - - - + + diff --git a/docs/source/reference/federation/errors.mdx b/docs/source/reference/federation/errors.mdx index f92c1ca17..3a447e318 100644 --- a/docs/source/reference/federation/errors.mdx +++ b/docs/source/reference/federation/errors.mdx @@ -19,7 +19,7 @@ Composition may flag potential improvements or _hints_ on schemas which are tech To learn more, see the [composition hints doc](/federation/hints/). -### Errors +## Errors The following errors might be raised during composition: @@ -34,7 +34,91 @@ The following errors might be raised during composition: -##### `DEFAULT_VALUE_USES_INACCESSIBLE` +###### `ABSOLUTE_CONNECT_URL_WITH_SOURCE` + +Since v2.10.0\*\* + + + + +The `@connect` directive is using a `source`, but the URL is absolute. This is not allowed because the `@source` URL is joined with the `@connect` URL, so the `@connect` URL should only be a path. + + + + + + +###### `CIRCULAR_REFERENCE` + +Since v2.10.0\*\* + + + + +A [circular reference](graphos/schema-design/connectors/troubleshooting#circular-references) was detected in a `@connect`'s `selection` argument. + + + + + + +###### `CONNECTORS_FIELD_WITH_ARGUMENTS` + +Since v2.10.0\*\* + + + + +A field resolved by a connector has arguments defined. + + + + + + +###### `CONNECTORS_UNRESOLVED_FIELD` + +Since v2.10.0\*\* + + + + +The schema includes fields that aren't resolved by a connector. + + + + + + +###### `CONNECTORS_UNSUPPORTED_ABSTRACT_TYPE` + +Since v2.10.0\*\* + + + + +[Abstract types](/graphos/schema-design/connectors/limitations#abstract-schema-types-are-unsupported) are not allowed when using connectors. + + + + + + +###### `CONNECTORS_UNSUPPORTED_FEDERATION_DIRECTIVE` + +Since v2.10.0\*\* + + + + +[Certain directives](/graphos/schema-design/connectors/limitations) are not allowed when using connectors. + + + + + + +###### `DEFAULT_VALUE_USES_INACCESSIBLE` Since v2.0.0 @@ -48,7 +132,7 @@ An element is marked as `@inaccessible` but is used in the default value of an e -##### `DIRECTIVE_COMPOSITION_ERROR` +###### `DIRECTIVE_COMPOSITION_ERROR` Since v2.1.0 @@ -63,7 +147,7 @@ Error when composing custom directives. -##### `DIRECTIVE_DEFINITION_INVALID` +###### `DIRECTIVE_DEFINITION_INVALID` Since v2.0.0 @@ -79,7 +163,7 @@ Replaces [`TAG_DEFINITION_INVALID`](#tag-definition-invalid). -##### `DISALLOWED_INACCESSIBLE` +###### `DISALLOWED_INACCESSIBLE` Since v2.0.0 @@ -93,7 +177,7 @@ An element is marked as `@inaccessible` that is not allowed to be `@inaccessible -##### `DOWNSTREAM_SERVICE_ERROR` +###### `DOWNSTREAM_SERVICE_ERROR` Since v0.x @@ -102,12 +186,27 @@ Since v0.x Indicates an error in a subgraph service query during query execution in a federated service. + + + + + + +###### `DUPLICATE_SOURCE_NAME` + +Since v2.10.0\*\* + + + + +Indicates two connector sources with the same name were created. + -##### `EMPTY_MERGED_ENUM_TYPE` +###### `EMPTY_MERGED_ENUM_TYPE` Since v2.0.0 @@ -121,7 +220,7 @@ An enum type has no value common to all the subgraphs that define the type. Merg -##### `EMPTY_MERGED_INPUT_TYPE` +###### `EMPTY_MERGED_INPUT_TYPE` Since v2.0.0 @@ -130,12 +229,69 @@ Since v2.0.0 An input object type has no field common to all the subgraphs that define the type. Merging that type would result in an invalid empty input object type. + + + + + + +###### `EMPTY_SOURCE_NAME` + +Since v2.10.0\*\* + + + + +No `name` was provided when creating a connector source with `@source`. + + + + + + +###### `ENTITY_NOT_ON_ROOT_QUERY` + +Since v2.10.0\*\* + + + + +The `@connect` directive's `entity` argument should only be used on the root `Query` field. + -##### `ENUM_VALUE_MISMATCH` +###### `ENTITY_RESOLVER_ARGUMENT_MISMATCH` + +Since v2.10.0\*\* + + + + +The arguments for an entity reference resolver do not match the entity type. + + + + + + +###### `ENTITY_TYPE_INVALID` + +Since v2.10.0\*\* + + + + +The `@connect` directive's `entity` argument should only be used with non-list, nullable, object types. + + + + + + +###### `ENUM_VALUE_MISMATCH` Since v2.0.0 @@ -149,7 +305,7 @@ An enum type that is used as both an input and output type has a value that is n -##### `EXTENSION_WITH_NO_BASE` +###### `EXTENSION_WITH_NO_BASE` Since v0.x @@ -163,7 +319,7 @@ A subgraph is attempting to `extend` a type that is not originally defined in an -##### `EXTERNAL_ARGUMENT_DEFAULT_MISMATCH` +###### `EXTERNAL_ARGUMENT_DEFAULT_MISMATCH` Since v2.0.0 @@ -177,7 +333,7 @@ An `@external` field declares an argument with a default that is incompatible wi -##### `EXTERNAL_ARGUMENT_MISSING` +###### `EXTERNAL_ARGUMENT_MISSING` Since v2.0.0 @@ -191,7 +347,7 @@ An `@external` field is missing some arguments present in the declaration(s) of -##### `EXTERNAL_ARGUMENT_TYPE_MISMATCH` +###### `EXTERNAL_ARGUMENT_TYPE_MISMATCH` Since v2.0.0 @@ -205,7 +361,7 @@ An `@external` field declares an argument with a type that is incompatible with -##### `EXTERNAL_COLLISION_WITH_ANOTHER_DIRECTIVE` +###### `EXTERNAL_COLLISION_WITH_ANOTHER_DIRECTIVE` Since v2.1.0 @@ -219,7 +375,7 @@ The `@external` directive collides with other directives in some situations. -##### `EXTERNAL_MISSING_ON_BASE` +###### `EXTERNAL_MISSING_ON_BASE` Since v0.x @@ -233,7 +389,7 @@ A field is marked as `@external` in a subgraph but with no non-external declarat -##### `EXTERNAL_ON_INTERFACE` +###### `EXTERNAL_ON_INTERFACE` Since v2.0.0 @@ -247,7 +403,7 @@ The field of an interface type is marked with `@external`: as external is about -##### `EXTERNAL_TYPE_MISMATCH` +###### `EXTERNAL_TYPE_MISMATCH` Since v0.x @@ -261,7 +417,7 @@ An `@external` field has a type that is incompatible with the declaration(s) of -##### `EXTERNAL_UNUSED` +###### `EXTERNAL_UNUSED` Since v0.x @@ -275,7 +431,7 @@ An `@external` field is not being used by any instance of `@key`, `@requires`, ` -##### `FIELD_ARGUMENT_DEFAULT_MISMATCH` +###### `FIELD_ARGUMENT_DEFAULT_MISMATCH` Since v2.0.0 @@ -289,7 +445,7 @@ An argument (of a field/directive) has a default value that is incompatible with -##### `FIELD_ARGUMENT_TYPE_MISMATCH` +###### `FIELD_ARGUMENT_TYPE_MISMATCH` Since v2.0.0 @@ -305,7 +461,7 @@ Replaces [`VALUE_TYPE_INPUT_VALUE_MISMATCH`](#value-type-input-value-mismatch). -##### `FIELD_TYPE_MISMATCH` +###### `FIELD_TYPE_MISMATCH` Since v2.0.0 @@ -321,7 +477,63 @@ Replaces [`VALUE_TYPE_FIELD_TYPE_MISMATCH`](#value-type-field-type-mismatch). -##### `IMPLEMENTED_BY_INACCESSIBLE` +###### `GRAPHQL_ERROR` + +Since v2.10.0\*\* + + + + +A problem with GraphQL syntax or semantics was found. These will usually be caught before this validation process. + + + + + + +###### `GROUP_SELECTION_IS_NOT_OBJECT` + +Since v2.10.0\*\* + + + + +A group selection mapping (`a { b }`) was used, but the field is not an object. + + + + + + +###### `GROUP_SELECTION_REQUIRED_FOR_OBJECT` + +Since v2.10.0\*\* + + + + +Fields that return an object type must use a group selection mapping `{}`. + + + + + + +###### `HTTP_HEADER_NAME_COLLISION` + +Since v2.10.0\*\* + + + + +The `name` mapping must be unique for all headers. + + + + + + +###### `IMPLEMENTED_BY_INACCESSIBLE` Since v2.0.0 @@ -335,7 +547,7 @@ An element is marked as `@inaccessible` but implements an element visible in the -##### `INPUT_FIELD_DEFAULT_MISMATCH` +###### `INPUT_FIELD_DEFAULT_MISMATCH` Since v2.0.0 @@ -349,7 +561,91 @@ An input field has a default value that is incompatible with other declarations -##### `INTERFACE_FIELD_NO_IMPLEM` +###### `INVALID_BODY` + +Since v2.10.0\*\* + + + + +The `http.body` provided in `@connect` was not valid. + + + + + + +###### `INVALID_HEADER` + +Since v2.10.0\*\* + + + + +A provided header in `@source` or `@connect` was not valid. + + + + + + +###### `INVALID_SELECTION` + +Since v2.10.0\*\* + + + + +The provided selection mapping in a `@connect`s `selection` was not valid. + + + + + + +###### `INVALID_SOURCE_NAME` + +Since v2.10.0\*\* + + + + +The `name` provided for a `@source` was invalid. Source names must start with a letter, include only letters, numbers, underscores (`_`) and hyphens (`-`), and be less than 64 characters. + + + + + + +###### `INVALID_URL` + +Since v2.10.0\*\* + + + + +A URL provided to `@source` or `@connect` was not valid. + + + + + + +###### `INVALID_URL_SCHEME` + +Since v2.10.0\*\* + + + + +A URL scheme provided to `@source` or `@connect` was not `http` or `https`. + + + + + + +###### `INTERFACE_FIELD_NO_IMPLEM` Since v2.0.0 @@ -363,7 +659,7 @@ After subgraph merging, an implementation is missing a field of one of the inter -##### `INTERFACE_KEY_MISSING_IMPLEMENTATION_TYPE` +###### `INTERFACE_KEY_MISSING_IMPLEMENTATION_TYPE` Since v2.3.0 @@ -377,7 +673,7 @@ A subgraph has a `@key` on an interface type, but that subgraph does not define -##### `INTERFACE_KEY_NOT_ON_IMPLEMENTATION` +###### `INTERFACE_KEY_NOT_ON_IMPLEMENTATION` Since v2.3.0 @@ -391,7 +687,7 @@ A `@key` is defined on an interface type, but is not defined (or is not resolvab -##### `INTERFACE_OBJECT_USAGE_ERROR` +###### `INTERFACE_OBJECT_USAGE_ERROR` Since v2.3.0 @@ -405,7 +701,7 @@ Error in the usage of the `@interfaceObject` directive. -##### `INVALID_FEDERATION_SUPERGRAPH` +###### `INVALID_FEDERATION_SUPERGRAPH` Since v2.1.0 @@ -419,7 +715,7 @@ Indicates that a schema provided for an Apollo Federation supergraph is not a va -##### `INVALID_FIELD_SHARING` +###### `INVALID_FIELD_SHARING` Since v2.0.0 @@ -433,7 +729,7 @@ A field that is non-shareable in at least one subgraph is resolved by multiple s -##### `INVALID_GRAPHQL` +###### `INVALID_GRAPHQL` Since v2.0.0 @@ -447,7 +743,7 @@ A schema is invalid GraphQL: it violates one of the rules of the specification. -##### `INVALID_LINK_DIRECTIVE_USAGE` +###### `INVALID_LINK_DIRECTIVE_USAGE` Since v2.0.0 @@ -461,7 +757,7 @@ An application of the `@link` directive is invalid/does not respect the specific -##### `INVALID_LINK_IDENTIFIER` +###### `INVALID_LINK_IDENTIFIER` Since v2.1.0 @@ -475,7 +771,7 @@ A URL/version for a `@link` feature is invalid/does not respect the specificatio -##### `INVALID_SHAREABLE_USAGE` +###### `INVALID_SHAREABLE_USAGE` Since v2.1.2 @@ -489,7 +785,7 @@ The `@shareable` Federation directive is used in an invalid way. -##### `INVALID_SUBGRAPH_NAME` +###### `INVALID_SUBGRAPH_NAME` Since v2.0.0 @@ -503,7 +799,7 @@ A subgraph name is invalid. (Subgraph names cannot be a single underscore (`_`)) -##### `KEY_DIRECTIVE_IN_FIELDS_ARG` +###### `KEY_DIRECTIVE_IN_FIELDS_ARG` Since v2.1.0 @@ -517,7 +813,7 @@ The `fields` argument of a `@key` directive includes some directive applications -##### `KEY_FIELDS_HAS_ARGS` +###### `KEY_FIELDS_HAS_ARGS` Since v2.0.0 @@ -531,7 +827,7 @@ The `fields` argument of a `@key` directive includes a field defined with argume -##### `KEY_FIELDS_SELECT_INVALID_TYPE` +###### `KEY_FIELDS_SELECT_INVALID_TYPE` Since v0.x @@ -545,7 +841,7 @@ The `fields` argument of `@key` directive includes a field whose type is a list, -##### `KEY_INVALID_FIELDS_TYPE` +###### `KEY_INVALID_FIELDS_TYPE` Since v2.0.0 @@ -559,7 +855,7 @@ The value passed to the `fields` argument of a `@key` directive is not a string. -##### `KEY_INVALID_FIELDS` +###### `KEY_INVALID_FIELDS` Since v2.0.0 @@ -573,7 +869,7 @@ The `fields` argument of a `@key` directive is invalid (it has invalid syntax, i -##### `KEY_UNSUPPORTED_ON_INTERFACE` +###### `KEY_UNSUPPORTED_ON_INTERFACE` Since v2.0.0 @@ -587,7 +883,7 @@ A `@key` directive is used on an interface, which is only supported when `@link` -##### `LINK_IMPORT_NAME_MISMATCH` +###### `LINK_IMPORT_NAME_MISMATCH` Since v2.0.0 @@ -601,7 +897,7 @@ The import name for a merged directive (as declared by the relevant `@link(impor -##### `MERGED_DIRECTIVE_APPLICATION_ON_EXTERNAL` +###### `MERGED_DIRECTIVE_APPLICATION_ON_EXTERNAL` Since v2.0.0 @@ -615,7 +911,63 @@ In a subgraph, a field is both marked `@external` and has a merged directive app -##### `NO_QUERIES` +###### `MISSING_ENTITY_CONNECTOR` + +Since v2.10.0\*\* + + + + +A `@key` was defined without a corresponding entity connector. + + + + + + +###### `MISSING_HTTP_METHOD` + +Since v2.10.0\*\* + + + + +The `@connect` directive is missing an HTTP method. + + + + + + +###### `MULTIPLE_HTTP_METHODS` + +Since v2.10.0\*\* + + + + +The `@connect` directive has multiple HTTP methods when only one is allowed. + + + + + + +###### `MUTATION_FIELD_MISSING_CONNECT` + +Since v2.10.0\*\* + + + + +A mutation field is missing the `@connect` directive. + + + + + + +###### `NO_QUERIES` Since v2.0.0 @@ -629,7 +981,49 @@ None of the composed subgraphs expose any query. -##### `ONLY_INACCESSIBLE_CHILDREN` +###### `NO_SOURCE_IMPORT` + +Since v2.10.0\*\* + + + + +The subgraph doesn't import the `@source` directive. This isn't necessarily a problem, but is likely a mistake. + + + + + + +###### `NO_SOURCES_DEFINED` + +Since v2.10.0\*\* + + + + +This is a specialization of [`SOURCE_NAME_MISMATCH`](#source_name_mismatch) error that indicates no sources were defined. + + + + + + +###### `NULLABILITY_MISMATCH` + +Since v2.10.0\*\* + + + + +A variable is nullable in a location which requires non-null at runtime. + + + + + + +###### `ONLY_INACCESSIBLE_CHILDREN` Since v2.0.0 @@ -643,7 +1037,7 @@ A type visible in the API schema has only `@inaccessible` children. -##### `OVERRIDE_COLLISION_WITH_ANOTHER_DIRECTIVE` +###### `OVERRIDE_COLLISION_WITH_ANOTHER_DIRECTIVE` Since v2.0.0 @@ -657,7 +1051,7 @@ The `@override` directive cannot be used on external fields, nor to override fie -##### `OVERRIDE_FROM_SELF_ERROR` +###### `OVERRIDE_FROM_SELF_ERROR` Since v2.0.0 @@ -671,7 +1065,7 @@ Field with `@override` directive has "from" location that references its own sub -##### `OVERRIDE_LABEL_INVALID` +###### `OVERRIDE_LABEL_INVALID` Since v2.7.0 @@ -685,7 +1079,7 @@ The `@override` directive `label` argument must match the pattern `/^[a-zA-Z][a- -##### `OVERRIDE_ON_INTERFACE` +###### `OVERRIDE_ON_INTERFACE` Since v2.3.0 @@ -699,7 +1093,7 @@ The `@override` directive cannot be used on the fields of an interface type. -##### `OVERRIDE_SOURCE_HAS_OVERRIDE` +###### `OVERRIDE_SOURCE_HAS_OVERRIDE` Since v2.0.0 @@ -713,7 +1107,7 @@ Field which is overridden to another subgraph is also marked `@override`. -##### `PROVIDES_DIRECTIVE_IN_FIELDS_ARG` +###### `PROVIDES_DIRECTIVE_IN_FIELDS_ARG` Since v2.1.0 @@ -727,7 +1121,7 @@ The `fields` argument of a `@provides` directive includes some directive applica -##### `PROVIDES_FIELDS_HAS_ARGS` +###### `PROVIDES_FIELDS_HAS_ARGS` Since v2.0.0 @@ -741,7 +1135,7 @@ The `fields` argument of a `@provides` directive includes a field defined with a -##### `PROVIDES_FIELDS_MISSING_EXTERNAL` +###### `PROVIDES_FIELDS_MISSING_EXTERNAL` Since v0.x @@ -755,7 +1149,7 @@ The `fields` argument of a `@provides` directive includes a field that is not ma -##### `PROVIDES_INVALID_FIELDS_TYPE` +###### `PROVIDES_INVALID_FIELDS_TYPE` Since v2.0.0 @@ -769,7 +1163,7 @@ The value passed to the `fields` argument of a `@provides` directive is not a st -##### `PROVIDES_INVALID_FIELDS` +###### `PROVIDES_INVALID_FIELDS` Since v2.0.0 @@ -783,7 +1177,7 @@ The `fields` argument of a `@provides` directive is invalid (it has invalid synt -##### `PROVIDES_ON_NON_OBJECT_FIELD` +###### `PROVIDES_ON_NON_OBJECT_FIELD` Since v2.0.0 @@ -797,7 +1191,7 @@ A `@provides` directive is used to mark a field whose base type is not an object -##### `PROVIDES_UNSUPPORTED_ON_INTERFACE` +###### `PROVIDES_UNSUPPORTED_ON_INTERFACE` Since v2.0.0 @@ -811,7 +1205,21 @@ A `@provides` directive is used on an interface, which is not (yet) supported. -##### `QUERY_ROOT_TYPE_INACCESSIBLE` +###### `QUERY_FIELD_MISSING_CONNECT` + +Since v2.10.0\*\* + + + + +A query field is missing the `@connect` directive. + + + + + + +###### `QUERY_ROOT_TYPE_INACCESSIBLE` Since v2.0.0 @@ -825,7 +1233,7 @@ An element is marked as `@inaccessible` but is the query root type, which must b -##### `REFERENCED_INACCESSIBLE` +###### `REFERENCED_INACCESSIBLE` Since v2.0.0 @@ -839,7 +1247,21 @@ An element is marked as `@inaccessible` but is referenced by an element visible -##### `REQUIRED_ARGUMENT_MISSING_IN_SOME_SUBGRAPH` +###### `RELATIVE_CONNECT_URL_WITHOUT_SOURCE` + +Since v2.10.0\*\* + + + + +The `@connect` directive is using a relative URL (path only) but does not define a `source`. This is a a specialization of [`INVALID_URL`](#invalid-url). + + + + + + +###### `REQUIRED_ARGUMENT_MISSING_IN_SOME_SUBGRAPH` Since v2.0.0 @@ -853,7 +1275,7 @@ An argument of a field or directive definition is mandatory in some subgraphs, b -##### `REQUIRED_INACCESSIBLE` +###### `REQUIRED_INACCESSIBLE` Since v2.0.0 @@ -867,7 +1289,7 @@ An element is marked as `@inaccessible` but is required by an element visible in -##### `REQUIRED_INPUT_FIELD_MISSING_IN_SOME_SUBGRAPH` +###### `REQUIRED_INPUT_FIELD_MISSING_IN_SOME_SUBGRAPH` Since v2.0.0 @@ -881,7 +1303,7 @@ A field of an input object type is mandatory in some subgraphs, but the field is -##### `REQUIRES_DIRECTIVE_IN_FIELDS_ARG` +###### `REQUIRES_DIRECTIVE_IN_FIELDS_ARG` Since v2.1.0 @@ -895,7 +1317,7 @@ The `fields` argument of a `@requires` directive includes some directive applica -##### `REQUIRES_FIELDS_MISSING_EXTERNAL` +###### `REQUIRES_FIELDS_MISSING_EXTERNAL` Since v0.x @@ -909,7 +1331,7 @@ The `fields` argument of a `@requires` directive includes a field that is not ma -##### `REQUIRES_INVALID_FIELDS_TYPE` +###### `REQUIRES_INVALID_FIELDS_TYPE` Since v2.0.0 @@ -923,7 +1345,7 @@ The value passed to the `fields` argument of a `@requires` directive is not a st -##### `REQUIRES_INVALID_FIELDS` +###### `REQUIRES_INVALID_FIELDS` Since v2.0.0 @@ -937,7 +1359,7 @@ The `fields` argument of a `@requires` directive is invalid (it has invalid synt -##### `REQUIRES_UNSUPPORTED_ON_INTERFACE` +###### `REQUIRES_UNSUPPORTED_ON_INTERFACE` Since v2.0.0 @@ -951,7 +1373,7 @@ A `@requires` directive is used on an interface, which is not (yet) supported. -##### `ROOT_MUTATION_USED` +###### `ROOT_MUTATION_USED` Since v0.x @@ -965,7 +1387,7 @@ A subgraph's schema defines a type with the name `mutation`, while also specifyi -##### `ROOT_QUERY_USED` +###### `ROOT_QUERY_USED` Since v0.x @@ -979,7 +1401,7 @@ A subgraph's schema defines a type with the name `query`, while also specifying -##### `ROOT_SUBSCRIPTION_USED` +###### `ROOT_SUBSCRIPTION_USED` Since v0.x @@ -993,7 +1415,7 @@ A subgraph's schema defines a type with the name `subscription`, while also spec -##### `SATISFIABILITY_ERROR` +###### `SATISFIABILITY_ERROR` Since v2.0.0 @@ -1007,7 +1429,21 @@ Subgraphs can be merged, but the resulting supergraph API would have queries tha -##### `SHAREABLE_HAS_MISMATCHED_RUNTIME_TYPES` +###### `SELECTED_FIELD_NOT_FOUND` + +Since v2.10.0\*\* + + + + +A field included in a `@connect` directive's `selection` argument is not defined on the corresponding type. + + + + + + +###### `SHAREABLE_HAS_MISMATCHED_RUNTIME_TYPES` Since v2.0.0 @@ -1021,7 +1457,35 @@ A shareable field return type has mismatched possible runtime types in the subgr -##### `TYPE_DEFINITION_INVALID` +###### `SOURCE_NAME_MISMATCH` + +Since v2.10.0\*\* + + + + +The `source` argument used in a `@connect` directive doesn't match any named connecter sources created with `@source`. + + + + + + +###### `SUBSCRIPTION_IN_CONNECTORS` + +Since v2.10.0\*\* + + + + +Connectors currently [don't support subscription operations](/graphos/schema-design/connectors/limitations#subscriptions-are-unsupported). + + + + + + +###### `TYPE_DEFINITION_INVALID` Since v2.0.0 @@ -1035,7 +1499,7 @@ A built-in or Federation type has an invalid definition in the schema. -##### `TYPE_KIND_MISMATCH` +###### `TYPE_KIND_MISMATCH` Since v2.0.0 @@ -1051,7 +1515,7 @@ Replaces `VALUE_TYPE_KIND_MISMATCH`, `EXTENSION_OF_WRONG_KIND`, `ENUM_MISMATCH_T -##### `TYPE_WITH_ONLY_UNUSED_EXTERNAL` +###### `TYPE_WITH_ONLY_UNUSED_EXTERNAL` Since v2.0.0 @@ -1065,7 +1529,49 @@ A Federation 1 schema has a composite type comprised only of unused external fie -##### `UNKNOWN_FEDERATION_LINK_VERSION` +###### `UNDEFINED_ARGUMENT` + +Since v2.10.0\*\* + + + + +Part of the `@connect` refers to an `$args` which is not defined. + + + + + + +###### `UNDEFINED_FIELD` + +Since v2.10.0\*\* + + + + +Part of the `@connect` refers to an `$this` which is not defined. + + + + + + +###### `UNKNOWN_CONNECTORS_VERSION` + +Since v2.10.0\*\* + + + + +The version set in the connectors `@link` URL is not recognized. + + + + + + +###### `UNKNOWN_FEDERATION_LINK_VERSION` Since v2.0.0 @@ -1079,7 +1585,7 @@ The version of Federation in a `@link` directive on the schema is unknown. -##### `UNKNOWN_LINK_VERSION` +###### `UNKNOWN_LINK_VERSION` Since v2.1.0 @@ -1093,7 +1599,7 @@ The version of `@link` set on the schema is unknown. -##### `UNSUPPORTED_FEATURE` +###### `UNSUPPORTED_FEATURE` Since v2.1.0 @@ -1107,7 +1613,7 @@ Indicates an error due to feature currently unsupported by Federation. -##### `UNSUPPORTED_LINKED_FEATURE` +###### `UNSUPPORTED_LINKED_FEATURE` Since v2.0.0 @@ -1116,11 +1622,31 @@ Since v2.0.0 Indicates that a feature used in a `@link` is either unsupported or is used with unsupported options. + + + + + +###### `UNSUPPORTED_VARIABLE_TYPE` + +Since v2.10.0\*\* + + + + +A type used in a connector's variable is [not yet supported](/graphos/schema-design/connectors/limitations) (i.e., unions). + + + +\*\* Error codes introduced in v2.10.0 related to Apollo Connectors are subject to change. + + + ## Removed codes The following error codes have been removed and are no longer generated by the most recent version of the `@apollo/gateway` library: @@ -1136,7 +1662,7 @@ The following error codes have been removed and are no longer generated by the m -##### `DUPLICATE_ENUM_DEFINITION` +###### `DUPLICATE_ENUM_DEFINITION` @@ -1148,7 +1674,7 @@ As duplicate enum definitions is invalid GraphQL, this will now be an error with -##### `DUPLICATE_ENUM_VALUE` +###### `DUPLICATE_ENUM_VALUE` @@ -1160,7 +1686,7 @@ As duplicate enum values are invalid in GraphQL, this will now be an error with -##### `DUPLICATE_SCALAR_DEFINITION` +###### `DUPLICATE_SCALAR_DEFINITION` @@ -1172,7 +1698,7 @@ As duplicate scalar definitions are invalid in GraphQL, this will now be an erro -##### `ENUM_MISMATCH` +###### `ENUM_MISMATCH` @@ -1184,7 +1710,7 @@ Subgraph definitions for an enum are now merged by composition. -##### `EXTERNAL_USED_ON_BASE` +###### `EXTERNAL_USED_ON_BASE` @@ -1196,7 +1722,7 @@ As there is no type ownership anymore, there is also no particular limitation as -##### `INTERFACE_FIELD_IMPLEM_TYPE_MISMATCH` +###### `INTERFACE_FIELD_IMPLEM_TYPE_MISMATCH` @@ -1208,7 +1734,7 @@ This error was thrown by a validation introduced to avoid running into a known r -##### `KEY_FIELDS_MISSING_EXTERNAL` +###### `KEY_FIELDS_MISSING_EXTERNAL` @@ -1220,7 +1746,7 @@ Using `@external` for key fields is now discouraged, unless the field is truly m -##### `KEY_FIELDS_MISSING_ON_BASE` +###### `KEY_FIELDS_MISSING_ON_BASE` @@ -1232,7 +1758,7 @@ Keys can now use any field from any other subgraph. -##### `KEY_MISSING_ON_BASE` +###### `KEY_MISSING_ON_BASE` @@ -1244,7 +1770,7 @@ Each subgraph is now free to declare a key only if it needs it. -##### `KEY_NOT_SPECIFIED` +###### `KEY_NOT_SPECIFIED` @@ -1256,7 +1782,7 @@ Each subgraph can declare a key independently of any other subgraph. -##### `MULTIPLE_KEYS_ON_EXTENSION` +###### `MULTIPLE_KEYS_ON_EXTENSION` @@ -1268,7 +1794,7 @@ Every subgraph can have multiple keys, as necessary. -##### `NON_REPEATABLE_DIRECTIVE_ARGUMENTS_MISMATCH` +###### `NON_REPEATABLE_DIRECTIVE_ARGUMENTS_MISMATCH` @@ -1280,7 +1806,7 @@ Since Federation v2.1.0, the case this error used to cover is now a warning (wit -##### `PROVIDES_FIELDS_SELECT_INVALID_TYPE` +###### `PROVIDES_FIELDS_SELECT_INVALID_TYPE` @@ -1292,7 +1818,7 @@ Since Federation v2.1.0, the case this error used to cover is now a warning (wit -##### `PROVIDES_NOT_ON_ENTITY` +###### `PROVIDES_NOT_ON_ENTITY` @@ -1304,7 +1830,7 @@ Since Federation v2.1.0, the case this error used to cover is now a warning (wit -##### `REQUIRES_FIELDS_HAS_ARGS` +###### `REQUIRES_FIELDS_HAS_ARGS` @@ -1316,7 +1842,7 @@ Since Federation v2.1.1, using fields with arguments in a `@requires` is fully s -##### `REQUIRES_FIELDS_MISSING_ON_BASE` +###### `REQUIRES_FIELDS_MISSING_ON_BASE` @@ -1328,7 +1854,7 @@ Fields in `@requires` can now be from any subgraph. -##### `REQUIRES_USED_ON_BASE` +###### `REQUIRES_USED_ON_BASE` @@ -1340,7 +1866,7 @@ As there is no type ownership anymore, there is also no particular limitation as -##### `RESERVED_FIELD_USED` +###### `RESERVED_FIELD_USED` @@ -1352,7 +1878,7 @@ This error was previously not correctly enforced: the service and entities, if p -##### `VALUE_TYPE_NO_ENTITY` +###### `VALUE_TYPE_NO_ENTITY` @@ -1364,7 +1890,7 @@ There is no strong difference between entity and value types in the model (they -##### `VALUE_TYPE_UNION_TYPES_MISMATCH` +###### `VALUE_TYPE_UNION_TYPES_MISMATCH` diff --git a/docs/source/reference/federation/versions.mdx b/docs/source/reference/federation/versions.mdx index 615788713..168631d52 100644 --- a/docs/source/reference/federation/versions.mdx +++ b/docs/source/reference/federation/versions.mdx @@ -10,7 +10,7 @@ For a comprehensive changelog for Apollo Federation and its associated libraries - To use a feature introduced in a particular federation version, make sure your subgraph schema's `@link` directive targets that version (or higher): - ```graphql + ```graphql showLineNumbers=false disableCopy=true extend schema @link(url: "https://specs.apollo.dev/federation/v2.3", #highlight-line import: ["@key", "@shareable", "@interfaceObject"]) @@ -26,282 +26,141 @@ For a comprehensive changelog for Apollo Federation and its associated libraries - If you maintain a [subgraph-compatible library](/graphos/reference/federation/compatible-subgraphs), consult this article to stay current with recently added directives. All of these directive definitions are also listed in the [subgraph specification](/graphos/reference/federation/subgraph-spec/#subgraph-schema-additions). -## v2.9 +## v2.10
- - -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **February 2025** | **Yes** | **`2.0.0`** | -First release
-**August 2024** +#### Directive changes -
+#### `@connect` -
+Introduced. [Learn more](/graphos/schema-design/connectors/directives#connect). -Available in GraphOS?
-**Yes** +```graphql showLineNumbers=false disableCopy=true +directive @connect( + source: String + http: ConnectHTTP! + selection: JSONSelection! + entity: Boolean +) repeatable on FIELD_DEFINITION; -
+``` -
+#### `@source` -Minimum router version
-**`1.53.0`** +Introduced. [Learn more](/graphos/schema-design/connectors/directives#source). -
+```graphql showLineNumbers=false disableCopy=true +directive @source( + name: String! + http: SourceHTTP! +) repeatable on SCHEMA; +``` -
+## v2.9
-#### Directive changes - - - - - - - - +| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **August 2024** | **Yes** | **`1.53.0`** | - - - - - - - - - - - - -
TopicDescription
+#### Directive changes #### `@cost` - - Introduced. [Learn more](/federation/federated-schemas/federated-directives#cost). -```graphql -directive @cost(weight: Int!) on ARGUMENT_DEFINITION | ENUM | FIELD_DEFINITION | INPUT_FIELD_DEFINITION | OBJECT | SCALAR +```graphql showLineNumbers=false disableCopy=true +directive @cost(weight: Int!) on + | ARGUMENT_DEFINITION + | ENUM + | FIELD_DEFINITION + | INPUT_FIELD_DEFINITION + | OBJECT + | SCALAR; ``` -
- #### `@listSize` - - Introduced. [Learn more](/federation/federated-schemas/federated-directives#listsize). -```graphql -directive @listSize(assumedSize: Int, slicingArguments: [String!], sizedFields: [String!], requireOneSlicingArgument: Boolean = true) on FIELD_DEFINITION +```graphql showLineNumbers=false disableCopy=true +directive @listSize( + assumedSize: Int + slicingArguments: [String!] + sizedFields: [String!] + requireOneSlicingArgument: Boolean = true +) +on FIELD_DEFINITION; ``` -
- ## v2.8
- - -
- -First release
-**May 2024** - -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.48.0`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **May 2024** | **Yes** | **`1.48.0`** | #### Directive changes - - - - - - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@context` - - Introduced. [Learn more](/graphos/reference/federation/directives/#context). -```graphql +```graphql showLineNumbers=false disableCopy=true directive @context(name: String!) on OBJECT | INTERFACE | UNION; ``` -
- ##### `@fromContext` - - Introduced. [Learn more](/graphos/reference/federation/directives/#fromcontext). -```graphql +```graphql showLineNumbers=false disableCopy=true scalar ContextFieldValue; directive @fromContext(field: ContextFieldValue) on ARGUMENT_DEFINITION; ``` -
- ## v2.7
- - -
- -First release
-**February 2024** - -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.39.0`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **February 2024** | **Yes** | **`1.39.0`** | #### Directive changes - - - - - - - - - - - - - - - -
TopicDescription
- ##### Progressive `@override` - - Added progressive `@override`. [Learn more.](/graphos/reference/federation/directives/#progressive-override) -```graphql +```graphql showLineNumbers=false disableCopy=true directive @override(from: String!, label: String) on FIELD_DEFINITION ``` -
- ## v2.6
- - -
- -First release
-**November 2023** - -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.35.0`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **November 2023** | **Yes** | **`1.35.0`** | #### Directive changes - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@policy` - - Introduced. [Learn more.](/graphos/routing/security/authorization) -```graphql +```graphql showLineNumbers=false disableCopy=true directive @policy(policies: [[federation__Policy!]!]!) on | FIELD_DEFINITION | OBJECT @@ -309,14 +168,7 @@ directive @policy(policies: [[federation__Policy!]!]!) on | SCALAR | ENUM ``` - -
- -#### Subgraph changes +##### Subgraph changes @@ -346,56 +198,18 @@ Policy
- - -
- -First release
-**July 2023** - -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.29.1`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **July 2023** | **Yes** | **`1.29.1`** | #### Directive changes -
- - - - - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@authenticated` - - Introduced. [Learn more.](/graphos/routing/security/authorization) -```graphql +```graphql showLineNumbers=false disableCopy=true directive @authenticated on FIELD_DEFINITION | OBJECT @@ -404,21 +218,12 @@ directive @authenticated on | ENUM ``` -
- ##### `@requiresScopes` - - Introduced. [Learn more.](/graphos/routing/security/authorization) -```graphql +```graphql showLineNumbers=false disableCopy=true directive @requiresScopes(scopes: [[federation__Scope!]!]!) on FIELD_DEFINITION | OBJECT @@ -427,12 +232,6 @@ directive @requiresScopes(scopes: [[federation__Scope!]!]!) on | ENUM ``` -
- #### Subgraph changes @@ -463,32 +262,9 @@ Scope
- - -
- -First release
-**March 2023** - -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.13.1`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **March 2023** | **Yes** | **`1.13.1`** | #### Subgraph changes @@ -521,216 +297,72 @@ Subscriptions
- - -
- -First release
-**February 2023**
- -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.10.2`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **February 2023**| **Yes** | **`1.10.2`** | #### Directive changes -
- - - - - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@interfaceObject` - - Introduced. [Learn more.](/graphos/schema-design/federated-schemas/entities/interfaces) -```graphql +```graphql showLineNumbers=false disableCopy=true directive @interfaceObject on OBJECT ``` -
- ##### `@key` - - Can now be applied to interface definitions to support [entity interfaces](/graphos/schema-design/federated-schemas/entities/interfaces/). (Previous versions of composition threw an error if `@key` was applied to an interface definition.) -
- ## v2.2
- - -
- -First release

-**November 2022** - -
- -
- -Available in GraphOS?
-**No** - -
- -
- -Minimum router version
-**`1.6.0`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **November 2022** | **No**| **`1.6.0`** | #### Directive changes - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@shareable` - - Added `repeatable` to the directive definition. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @shareable repeatable on OBJECT | FIELD_DEFINITION ``` Additionally, composition now throws an error if `@shareable` is applied to fields of an `interface` definition. -
- ## v2.1
- - -
- -First release
-**August 2022** - -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.0.0`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **August 2022** | **Yes** | **`1.0.0`** | #### Directive changes - - - - - - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@composeDirective` - - Introduced. [Learn more.](/graphos/reference/federation/directives#composedirective) -```graphql +```graphql showLineNumbers=false disableCopy=true directive @composeDirective(name: String!) repeatable on SCHEMA ``` -
- ##### `@requires` - - The `fields` argument can now include fields that themselves take arguments. [Learn more.](/graphos/schema-design/federated-schemas/entities/contribute-fields#using-requires-with-fields-that-take-arguments) (Functionality added in v2.1.2) -```graphql +```graphql showLineNumbers=false disableCopy=true type Product @key(fields: "id") { id: ID! weight(units: String): Int! @external @@ -740,48 +372,19 @@ type Product @key(fields: "id") { } ``` -
- ## v2.0
- - -
- -First release
-**April 2022** - -
- -
- -Available in GraphOS?
-**Yes** - -
- -
- -Minimum router version
-**`1.0.0`** - -
- -
- -
+| First release | Available in GraphOS? | Minimum router version | +| ------------- | --------------------- | ---------------------- | +| **April 2022** | **Yes** | **`1.0.0`** | #### Directive changes Subgraph schemas "opt in" to Federation 2 features by applying the `@link` directive to the `schema` type, like so: -```graphql +```graphql showLineNumbers=false disableCopy=true extend schema @link(url: "https://specs.apollo.dev/federation/v2.0", import: ["@key", "@shareable"]) @@ -791,63 +394,30 @@ The `import` list of this definition must include each federation-specific direc For details on these directives as defined in Federation 2, see [Federation-specific GraphQL directives](/graphos/reference/federation/directives/). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@key` - - Added optional `resolvable` argument. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @key( fields: FieldSet!, resolvable: Boolean = true # highlight-line ) repeatable on OBJECT | INTERFACE ``` -
- ##### `@shareable` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @shareable on OBJECT | FIELD_DEFINITION ``` -
- ##### `@inaccessible` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @inaccessible on | FIELD_DEFINITION | OBJECT @@ -861,37 +431,19 @@ directive @inaccessible on | INPUT_FIELD_DEFINITION ``` -
- ##### `@override` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @override(from: String!) on FIELD_DEFINITION ``` -
- ##### `@link` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @link( url: String, as: String, @@ -900,25 +452,10 @@ directive @link( ) repeatable on SCHEMA ``` -
- ##### `@extends`, `@external`, `@provides`, `@requires`, `@tag` - - No changes. -
- #### Subgraph changes @@ -978,7 +515,6 @@ Value types
- ## v1.1 @@ -989,26 +525,11 @@ Apollo Router Core and GraphOS Router v1.60 and later don't support Federation v #### Directive changes - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@tag` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @tag(name: String!) repeatable on | FIELD_DEFINITION | INTERFACE @@ -1016,12 +537,6 @@ directive @tag(name: String!) repeatable on | UNION ``` -
- ## v1.0 @@ -1034,103 +549,46 @@ Apollo Router Core and GraphOS Router v1.60 and later don't support Federation v For details on these directives as defined in Federation 1, see the [Federation 1 subgraph spec](/federation/v1/federation-spec). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TopicDescription
- ##### `@key` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE ``` -
- ##### `@external` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @external on FIELD_DEFINITION ``` -
- ##### `@requires` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @requires(fields: _FieldSet!) on FIELD_DEFINITION ``` -
- ##### `@provides` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @provides(fields: _FieldSet!) on FIELD_DEFINITION ``` -
- ##### `@extends` - - Introduced. -```graphql +```graphql showLineNumbers=false disableCopy=true directive @extends on OBJECT | INTERFACE ``` -
- #### Subgraph changes diff --git a/docs/source/schema-design/federated-schemas/federation.mdx b/docs/source/schema-design/federated-schemas/federation.mdx index 2593b615f..e4f36077c 100644 --- a/docs/source/schema-design/federated-schemas/federation.mdx +++ b/docs/source/schema-design/federated-schemas/federation.mdx @@ -13,7 +13,7 @@ Clients makes requests to the federated GraphQL API's single entry point called -Your federated GraphQL API, or _graph_, can be made of GraphQL APIs, REST APIs, and other data sources. +Your federated GraphQL API, or _graph_, can be made of GraphQL APIs, REST APIs, and other data sources. The router connects to REST APIs via Apollo Connectors and can connect to other data sources via GraphQL APIs. diff --git a/docs/source/schema-design/federated-schemas/ide-support.mdx b/docs/source/schema-design/federated-schemas/ide-support.mdx deleted file mode 100644 index 777a50f36..000000000 --- a/docs/source/schema-design/federated-schemas/ide-support.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: IDE Support for Apollo Federation -subtitle: Streamline federated GraphQL development -description: Enhance your development workflow with federation-specific features in VSCode and IntelliJ-based IDEs. -redirectFrom: - - /graphos/reference/federation/jetbrains-ide-support - - /graphos/reference/federation/ide-support ---- - -Many IDEs provide features to streamline federated GraphQL development, such as federation-aware syntax highlighting, inline performance information, and autocomplete for fields, types, and federation directives. Learn how to enable federation-specific features in tools like VS Code and JetBrains IDEs. - -## Visual Studio Code - -Apollo's [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo) provides an all-in-one tooling experience for developing apps with Apollo. See the [dedicated documentation page](/vs-code-extension) for configuration details. - -## JetBrains - -Apollo's [JetBrains Plugin](https://plugins.jetbrains.com/plugin/20645-apollo-graphql) provides federation-specific development features, such as autocomplete for federation directives. This plugin supports all IntelliJ-based IDEs, including: - -- IntelliJ IDEA -- PyCharm -- PhpStorm -- WebStorm -- CLion -- RubyMine -- Rider -- GoLand - -You must enable the Rover integration after installing the plugin. Otherwise, your IDE might display unexpected errors while you're working with a subgraph schema. See this [the dedicated documentation page](/graphos/schema-design/connectors/jetbrains#configuration) for configuration details. - -## Additional resources - -If your graph uses the Apollo Router Core or GraphOS Router, make sure to enable [router configuration awareness](/graphos/reference/router/configuration#configuration-awareness-in-your-text-editor) in your editor. - -If you're developing with Apollo Connectors, refer to the connectors-specific [VS Code Extension](/graphos/schema-design/connectors/vs-code), [JetBrains IDEs](/graphos/schema-design/connectors/jetbrains), and [Vim/NeoVim](/graphos/schema-design/connectors/vim) pages. diff --git a/docs/source/schema-design/federated-schemas/sharing-types.mdx b/docs/source/schema-design/federated-schemas/sharing-types.mdx index 3a886fe35..05353d07d 100644 --- a/docs/source/schema-design/federated-schemas/sharing-types.mdx +++ b/docs/source/schema-design/federated-schemas/sharing-types.mdx @@ -523,7 +523,7 @@ This can be useful when different subgraphs are responsible for different subset -You can also use the `enum` type across multiple subgraphs. For details, see [Merging types from multiple subgraphs](composition#enums). +You can also use the `enum` type across multiple subgraphs. For details, see [Merging types from multiple subgraphs](/graphos/reference/federation/composition-rules#merging-types-from-multiple-subgraphs). diff --git a/federation-integration-testsuite-js/CHANGELOG.md b/federation-integration-testsuite-js/CHANGELOG.md index 8754771f2..7f89815ca 100644 --- a/federation-integration-testsuite-js/CHANGELOG.md +++ b/federation-integration-testsuite-js/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG for `federation-integration-testsuite-js` +## 2.10.0 + +### Minor Changes + +- Adds the ability to compose and serialize directives for [Apollo Connectors](https://go.apollo.dev/connectors). To use Apollo Connectors, compose your supergraphs using [GraphOS](https://www.apollographql.com/docs/graphos/platform/schema-management) or [rover](https://www.apollographql.com/docs/rover/commands/dev), and run your supergraph in [Apollo Router](https://www.apollographql.com/docs/graphos/routing) 2.0.0 or higher. ([#3215](https://github.com/apollographql/federation/pull/3215)) + ## 2.9.3 ## 2.9.2 diff --git a/federation-integration-testsuite-js/package.json b/federation-integration-testsuite-js/package.json index 44b7b6c9b..abd1a69d8 100644 --- a/federation-integration-testsuite-js/package.json +++ b/federation-integration-testsuite-js/package.json @@ -1,7 +1,7 @@ { "name": "apollo-federation-integration-testsuite", "private": true, - "version": "2.10.0-alpha.4", + "version": "2.10.0", "description": "Apollo Federation Integrations / Test Fixtures", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/gateway-js/CHANGELOG.md b/gateway-js/CHANGELOG.md index 9526447c5..2db6d8dc2 100644 --- a/gateway-js/CHANGELOG.md +++ b/gateway-js/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG for `@apollo/gateway` +## 2.10.0 + +### Patch Changes + +- Updated dependencies [[`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899), [`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899)]: + - @apollo/query-planner@2.10.0 + - @apollo/composition@2.10.0 + - @apollo/federation-internals@2.10.0 + ## 2.9.3 ### Patch Changes diff --git a/gateway-js/package.json b/gateway-js/package.json index 23848e502..696366124 100644 --- a/gateway-js/package.json +++ b/gateway-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/gateway", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "description": "Apollo Gateway", "author": "Apollo ", "main": "dist/index.js", @@ -25,9 +25,9 @@ "access": "public" }, "dependencies": { - "@apollo/composition": "2.10.0-alpha.4", - "@apollo/federation-internals": "2.10.0-alpha.4", - "@apollo/query-planner": "2.10.0-alpha.4", + "@apollo/composition": "2.10.0", + "@apollo/federation-internals": "2.10.0", + "@apollo/query-planner": "2.10.0", "@apollo/server-gateway-interface": "^1.1.0", "@apollo/usage-reporting-protobuf": "^4.1.0", "@apollo/utils.createhash": "^2.0.0", diff --git a/internals-js/CHANGELOG.md b/internals-js/CHANGELOG.md index fa5f84fbf..6b4963ea4 100644 --- a/internals-js/CHANGELOG.md +++ b/internals-js/CHANGELOG.md @@ -1,5 +1,15 @@ # CHANGELOG for `@apollo/federation-internals` +## 2.10.0 + +### Minor Changes + +- Adds the ability to compose and serialize directives for [Apollo Connectors](https://go.apollo.dev/connectors). To use Apollo Connectors, compose your supergraphs using [GraphOS](https://www.apollographql.com/docs/graphos/platform/schema-management) or [rover](https://www.apollographql.com/docs/rover/commands/dev), and run your supergraph in [Apollo Router](https://www.apollographql.com/docs/graphos/routing) 2.0.0 or higher. ([#3215](https://github.com/apollographql/federation/pull/3215)) + +### Patch Changes + +- Incorporate changes from v2.9.3 ([#3215](https://github.com/apollographql/federation/pull/3215)) + ## 2.9.3 ### Patch Changes diff --git a/internals-js/package.json b/internals-js/package.json index 20cff0326..837475c8a 100644 --- a/internals-js/package.json +++ b/internals-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/federation-internals", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "description": "Apollo Federation internal utilities", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/package-lock.json b/package-lock.json index cfcbedb18..d719d480e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,11 +70,11 @@ }, "composition-js": { "name": "@apollo/composition", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.10.0-alpha.4", - "@apollo/query-graphs": "2.10.0-alpha.4" + "@apollo/federation-internals": "2.10.0", + "@apollo/query-graphs": "2.10.0" }, "engines": { "node": ">=14.15.0" @@ -85,7 +85,7 @@ }, "federation-integration-testsuite-js": { "name": "apollo-federation-integration-testsuite", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "license": "Elastic-2.0", "dependencies": { "graphql-tag": "^2.12.6", @@ -94,12 +94,12 @@ }, "gateway-js": { "name": "@apollo/gateway", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "license": "Elastic-2.0", "dependencies": { - "@apollo/composition": "2.10.0-alpha.4", - "@apollo/federation-internals": "2.10.0-alpha.4", - "@apollo/query-planner": "2.10.0-alpha.4", + "@apollo/composition": "2.10.0", + "@apollo/federation-internals": "2.10.0", + "@apollo/query-planner": "2.10.0", "@apollo/server-gateway-interface": "^1.1.0", "@apollo/usage-reporting-protobuf": "^4.1.0", "@apollo/utils.createhash": "^2.0.0", @@ -125,7 +125,7 @@ }, "internals-js": { "name": "@apollo/federation-internals", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "license": "Elastic-2.0", "dependencies": { "@types/uuid": "^9.0.0", @@ -17841,10 +17841,10 @@ }, "query-graphs-js": { "name": "@apollo/query-graphs", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.10.0-alpha.4", + "@apollo/federation-internals": "2.10.0", "deep-equal": "^2.0.5", "ts-graphviz": "^1.5.4", "uuid": "^9.0.0" @@ -17858,11 +17858,11 @@ }, "query-planner-js": { "name": "@apollo/query-planner", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "license": "Elastic-2.0", "dependencies": { - "@apollo/federation-internals": "2.10.0-alpha.4", - "@apollo/query-graphs": "2.10.0-alpha.4", + "@apollo/federation-internals": "2.10.0", + "@apollo/query-graphs": "2.10.0", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", @@ -17891,11 +17891,11 @@ }, "subgraph-js": { "name": "@apollo/subgraph", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "license": "MIT", "dependencies": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.10.0-alpha.4" + "@apollo/federation-internals": "2.10.0" }, "engines": { "node": ">=14.15.0" diff --git a/query-graphs-js/CHANGELOG.md b/query-graphs-js/CHANGELOG.md index 1c868adfa..653482957 100644 --- a/query-graphs-js/CHANGELOG.md +++ b/query-graphs-js/CHANGELOG.md @@ -1,5 +1,16 @@ # CHANGELOG for `@apollo/query-graphs` +## 2.10.0 + +### Minor Changes + +- Adds the ability to compose and serialize directives for [Apollo Connectors](https://go.apollo.dev/connectors). To use Apollo Connectors, compose your supergraphs using [GraphOS](https://www.apollographql.com/docs/graphos/platform/schema-management) or [rover](https://www.apollographql.com/docs/rover/commands/dev), and run your supergraph in [Apollo Router](https://www.apollographql.com/docs/graphos/routing) 2.0.0 or higher. ([#3215](https://github.com/apollographql/federation/pull/3215)) + +### Patch Changes + +- Updated dependencies [[`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899), [`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899)]: + - @apollo/federation-internals@2.10.0 + ## 2.9.3 ### Patch Changes diff --git a/query-graphs-js/package.json b/query-graphs-js/package.json index 8ce2cc082..75fcb3fe8 100644 --- a/query-graphs-js/package.json +++ b/query-graphs-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-graphs", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "description": "Apollo Federation library to work with 'query graphs'", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -23,7 +23,7 @@ "node": ">=14.15.0" }, "dependencies": { - "@apollo/federation-internals": "2.10.0-alpha.4", + "@apollo/federation-internals": "2.10.0", "deep-equal": "^2.0.5", "ts-graphviz": "^1.5.4", "uuid": "^9.0.0" diff --git a/query-planner-js/CHANGELOG.md b/query-planner-js/CHANGELOG.md index a85c4c0d2..b90e43215 100644 --- a/query-planner-js/CHANGELOG.md +++ b/query-planner-js/CHANGELOG.md @@ -1,5 +1,17 @@ # CHANGELOG for `@apollo/query-planner` +## 2.10.0 + +### Minor Changes + +- Adds the ability to compose and serialize directives for [Apollo Connectors](https://go.apollo.dev/connectors). To use Apollo Connectors, compose your supergraphs using [GraphOS](https://www.apollographql.com/docs/graphos/platform/schema-management) or [rover](https://www.apollographql.com/docs/rover/commands/dev), and run your supergraph in [Apollo Router](https://www.apollographql.com/docs/graphos/routing) 2.0.0 or higher. ([#3215](https://github.com/apollographql/federation/pull/3215)) + +### Patch Changes + +- Updated dependencies [[`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899), [`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899)]: + - @apollo/query-graphs@2.10.0 + - @apollo/federation-internals@2.10.0 + ## 2.9.3 ### Patch Changes diff --git a/query-planner-js/package.json b/query-planner-js/package.json index b1b474ff5..bf0379bc5 100644 --- a/query-planner-js/package.json +++ b/query-planner-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/query-planner", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "description": "Apollo Query Planner", "author": "Apollo ", "main": "dist/index.js", @@ -25,8 +25,8 @@ "access": "public" }, "dependencies": { - "@apollo/federation-internals": "2.10.0-alpha.4", - "@apollo/query-graphs": "2.10.0-alpha.4", + "@apollo/federation-internals": "2.10.0", + "@apollo/query-graphs": "2.10.0", "@apollo/utils.keyvaluecache": "^2.1.0", "chalk": "^4.1.0", "deep-equal": "^2.0.5", diff --git a/subgraph-js/CHANGELOG.md b/subgraph-js/CHANGELOG.md index ca72065e0..f7d64e592 100644 --- a/subgraph-js/CHANGELOG.md +++ b/subgraph-js/CHANGELOG.md @@ -1,5 +1,14 @@ # CHANGELOG for `@apollo/subgraph` +## 2.10.0 + +### Patch Changes + +- When resolving references, skip type resolution if the reference resolves to null. ([#3215](https://github.com/apollographql/federation/pull/3215)) + +- Updated dependencies [[`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899), [`8927e315ab0e865ef3ff12320f265ee95588b899`](https://github.com/apollographql/federation/commit/8927e315ab0e865ef3ff12320f265ee95588b899)]: + - @apollo/federation-internals@2.10.0 + ## 2.9.3 ### Patch Changes diff --git a/subgraph-js/package.json b/subgraph-js/package.json index a91831c64..5394dfd3a 100644 --- a/subgraph-js/package.json +++ b/subgraph-js/package.json @@ -1,6 +1,6 @@ { "name": "@apollo/subgraph", - "version": "2.10.0-alpha.4", + "version": "2.10.0", "description": "Apollo Subgraph Utilities", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -25,7 +25,7 @@ }, "dependencies": { "@apollo/cache-control-types": "^1.0.2", - "@apollo/federation-internals": "2.10.0-alpha.4" + "@apollo/federation-internals": "2.10.0" }, "peerDependencies": { "graphql": "^16.5.0"