-
#299
c417891Thanks @n1ru4l! - FixREQUIRED_INACCESSIBLEcomposition rule reporting a composition error if@inaccessibleis applied on a non-nullable field with a default value.In the following example schema the
Query.ping(message:)argument no longer raisesREQUIRED_INACCESSIBLE, as a default value for the argument is provided. The same behaviour applies for input type fields.extend schema @link( url: "https://specs.apollo.dev/federation/v2.9" import: ["@inaccessible"] ) type Query { ping(message: String! = "pong" @inaccessible): String! }
-
#295
fffe987Thanks @n1ru4l! - Fix schema contract composition applying@inaccessibleon the federation typesContextArgumentandFieldValueon the supergraph SDL.This mitigates the following error in apollo-router upon processing the supergraph:
could not create router: Api error(s): The supergraph schema failed to produce a valid API schema: The following errors occurred: - Core feature type `join__ContextArgument` cannot use @inaccessible. - Core feature type `join__FieldValue` cannot use @inaccessible.
-
#291
ec0ef84Thanks @jdolle! - Support "file:" protocol and non-RFC 3986 in imported "link" url argument -
#282
e507fddThanks @kamilkisiela! - Fix supergraph@join__fieldemission for Federation v1@externalfields and improve override/requires edge-case handling.- Drop Federation v1
@join__field(external: true)fields based on key usage in the subgraph instead of aggregated field key usage across subgraphs. - Avoid emitting redundant
@join__field(external: true)metadata when a field is only required through overridden paths. - Tighten
@join__fieldemission around@overrideand interface type fields.
- Drop Federation v1
-
#267
3e232faThanks @kamilkisiela! - Fix supergraph@join__fieldgeneration for@override+@requiresmigrations and add a progressive override restriction.When a field with
@requiresis overridden, composition now ignores@requiresusage coming only from the overridden source field when deciding whether to keep@join__field(..., external: true). This prevents stale external annotations in the supergraph.Also, progressive override (
@override(..., label: ...)) is now rejected when the overridden source field uses@requires(error code:OVERRIDE_COLLISION_WITH_ANOTHER_DIRECTIVE). Non-progressive override behavior is unchanged.
-
#248
9535d50Thanks @kamilkisiela! - Fix access validation on union members when selecting__typenamein@requiresdirectives.The
@requiresdirective validation rule (AuthOnRequiresRule) was not checking authorization requirements for__typenameselections on and types. When__typenameon a union type was selected, code would throw an unexpected error.
- #241
c6e26edThanks @kamilkisiela! - Fixes a bug in@keydirective validation where an error was incorrectly reported for interfaces implementing another interface with a@key. The validation now correctly applies only to object types implementing the interface.
- #230
2b34f17Thanks @n1ru4l! - Prevent subgraph-specific federation types and scalars being re-declared within the subgraph leaking into the supergraph.
-
#215
5edf421Thanks @kamilkisiela! - Enforce correct placement of auth directives. A new validation rule (AUTH_REQUIREMENTS_APPLIED_ON_INTERFACE) rejects any attempt to put these directives on interfaces, interface fields or interface objects.Add transitive-auth requirements checking. A new rule verifies that any field using
@requiresspecifies at least the auth requirements of the fields it selects. If a field doesn't carry forward the@authenticated,@requiresScopesor@policyrequirements of its dependencies, composition fails with aMISSING_TRANSITIVE_AUTH_REQUIREMENTSerror.Propagate auth requirements through interface hierarchies. Interface types and fields now inherit
@authenticated,@requiresScopesand@policyfrom the object types that implement them. -
#215
5edf421Thanks @kamilkisiela! - Disallowed using@coston interfaces - you can no longer place@coston an interface type, its fields, or field arguments. Composition now fails with a clear error instead of accepting it silently.The
@listSizedirective now validates thatsizedFieldspoint to list fields, not integer counters (e.g., useedgesinstead ofcount).Added validation for
slicingArgumentsin@listSize. Only arguments that exist in all subgraphs are kept, invalid ones trigger an error.
- #215
5edf421Thanks @kamilkisiela! - TheEXTERNAL_MISSING_ON_BASErule has been updated to handle@interfaceObjectcorner‑cases, like@externalfields on object types, but provided by interface objects, were triggering false positives.
-
#198
1b98c17Thanks @User!, @User!! - Fix public schema SDL in case a object type implements an inaccessible interface.Composing the following subgraph:
schema @link( url: "https://specs.apollo.dev/federation/v2.3" import: ["@inaccessible"] ) { query: Query } type Query { } interface Node @inaccessible { id: ID! } type User implements Node { id: ID! }
now result in the following valid public SDL:
type Query { } - type User implements Node { + type User { id: ID! }
-
#185
5e3cb1aThanks @jdolle! - tag extraction respects @external on parent -
#186
2a1475fThanks @n1ru4l! - Fix failing satisfiability check for interface types. -
#167
3e224c8Thanks @jdolle! - Respect @external on parent type
-
#180
a208f1cThanks @n1ru4l! - AddcomposeSchemaContractfunction for composing schema contracts.Running the following script:
import { composeSchemaContract } from "@theguild/federation-composition"; import { parse } from "graphql"; const result = composeSchemaContract( [ { name: "a", typeDefs: parse(/* GraphQL */ ` type Query { a: String @tag(name: "public") } `), url: "a.localhost", }, { name: "b", typeDefs: parse(/* GraphQL */ ` type Query { b: String } `), url: "b.localhost", }, ], /** Tags to include and exclude */ { include: new Set(["public"]), exclude: new Set(), }, /** Exclude unreachable types */ true, ); console.log(result.publicSdl);
Will result in the output containing only the fields tagged with
public:type Query { a: String! }
- #149
9ae49e3Thanks @n1ru4l! - Fix external key fields on extended object types raising composition errors.
- #156
46cb6bcThanks @n1ru4l! - Support composing executable directive definitions within subgraphs into the supergraph.
-
#151
f9b9908Thanks @n1ru4l! - Fix issue where the satisfiability check raised an exception for fields that share different object type and interface definitions across subgraphs. -
#152
e4440a1Thanks @n1ru4l! - Fix issue where scalar type marked with@inaccessibledoes not fail the composition if all usages are not marked with@inaccessible.Composing the following subgraphs resulted in an invalid supergraph instead of failing the composition.
# Subgraph A extend schema @link( url: "https://specs.apollo.dev/federation/v2.9" import: ["@inaccessible"] ) type Query { a: Foo } scalar Foo
# Subgraph B extend schema @link( url: "https://specs.apollo.dev/federation/v2.9" import: ["@inaccessible"] ) type Query { b: String } scalar Foo @inaccessible
Now it correctly raises a composition error with the message
Type "Foo" is @inaccessible but is referenced by "Query.a", which is in the API schema..
-
#146
55b48e9Thanks @n1ru4l! - Resolve usage of@requiresFieldSetwith a union field selection to raise anEXTERNAL_UNUSEDerror. -
#150
9bd8016Thanks @n1ru4l! - Fix incorrectly raisedIMPLEMENTED_BY_INACCESSIBLEerror for inaccessible object fields where the object type is inaccessible.For example the following subgraph, will no longer result in the error
Field B.id is @inaccessible but implements the interface field Node.id, which is in the API schema..schema @link(url: "https://specs.apollo.dev/federation/v2.9", import: ["@tag"]) { query: Query } type Query { b(id: ID! @federation__inaccessible): B @federation__inaccessible a(id: ID!): A } type B implements Node @federation__inaccessible { id: ID! @federation__inaccessible } type A implements Node { id: ID! } interface Node { id: ID! }
-
#147
8c5bc0cThanks @n1ru4l! - Add support for@providesfragment selection sets on union type fields.type Query { media: [Media] @shareable @provides(fields: "... on Book { title }") } union Media = Book | Movie
- #143
bcea968Thanks @n1ru4l! - Do not throw an error when encountering invalid usage of@tagdirective within subgraphs.
-
#141
fdb491fThanks @ardatan! - Fixes the issue where the composition gives errors in case of the following:extend schema @link( url: "https://specs.apollo.dev/federation/v2.7" import: ["@key", "@composeDirective"] ) @link(url: "https://myspecs.dev/myDirective/v1.0", import: ["@myDirective"]) @composeDirective(name: "@myDirective") directive @myDirective(myarg: [MyEnum!]!) on OBJECT # A directive with a non-nullable list argument of non-nullable enums enum MyEnum { MY_ENUM_VALUE } type Query { myRootField: MyObject } type MyObject @myDirective(myarg: []) { myField: String }
-
#129
9382277Thanks @kamilkisiela! - Ensure nested key fields are marked as@shareable -
#132
ae3152cThanks @kamilkisiela! - Stop collecting paths when a leaf field was reached -
#132
ae3152cThanks @kamilkisiela! - Avoid infinite loop when entity field returns itself
- Support progressive overrides (
@override(label: "<value>"))
- Performance improvements (lazy compute of errors), especially noticeable in large schemas (2s -> 600ms)
- Allow to use
@composeDirectiveon a built-in scalar (like@oneOf)
- Allow to use v2.7, but not progressive
@overridelabels - Allow to use v2.8, but not
@contextand@fromContextdirectives - Support
@costand@listSizedirectives - Add
extractLinkImplementationsfunction to extract information about applied specs (@link)
- Reuse type and direcive definitions from the composition logic to detect a supergraph spec in an SDL or transform a supergraph to a public schema
- Implement rule for
IMPLEMENTED_BY_INACCESSIBLEerror code.
- #87
9c26af9Thanks @n1ru4l! - Do not raiseDEFAULT_VALUE_USES_INACCESSIBLEfor inaccessible default value on inaccessible field.
-
#82
7d640bfThanks @kamilkisiela! - Fix a child data type field not being accessible via interfaceObject -
#81
ded4b47Thanks @ardatan! - Respect inaccessible enum values while creating the public schema from the supergraph AST
- #78
4e25e6dThanks @kamilkisiela! -transformSupergraphToPublicSchemaremoves now@policy,@requiresScopesand@authenticated
- #76
a3cb724Thanks @kamilkisiela! - Fix a missing@join__fieldon a query field where@overrideis used, but not in all subgraphs.
- #74
7456d14Thanks @kamilkisiela! - Show TYPE_KIND_MISMATCH and ignore INTERFACE_FIELD_NO_IMPLEM when there is a type kind mismatch
- #72
780892dThanks @kamilkisiela! - Support directives on enum values and unions
- #70
627dea9Thanks @kamilkisiela! - Support directives on enum type definitions and extensions
- #68
51dd57aThanks @kamilkisiela! - Unknown types are now always reported as GraphQLError (previously in some logic paths, it was an exception).
- #66
7603a4eThanks @kamilkisiela! - Support INTERFACE_FIELD_NO_IMPLEM
- #64
9ec8078Thanks @kamilkisiela! - fix: detect incorrect subtypes of interface fields across subgraphs
- #62
e50bc90Thanks @kamilkisiela! - Fix: do not exposefederation__Scopeandfederation__Policyscalar definitions to a supergraph
- #60
2f7fef1Thanks @kamilkisiela! - Normalize enum values to be printed as enum values in Supergraph SDL, even if the user's subgraph schema has them as strings
- #58
ab707b9Thanks @kamilkisiela! - Support directives on Input Object types
- #52
589effdThanks @kamilkisiela! - Support @interfaceObject directive
- #52
589effdThanks @kamilkisiela! - Improve INTERFACE_KEY_MISSING_IMPLEMENTATION_TYPE
- #51
8cd5287Thanks @kamilkisiela! - Proper implementation of SATISFIABILITY_ERROR
-
#51
8cd5287Thanks @kamilkisiela! - Fix REQUIRES_FIELDS_MISSING_EXTERNAL in Fed v1 -
#51
8cd5287Thanks @kamilkisiela! - Fix FIELD_TYPE_MISMATCH for unions and union members -
#51
8cd5287Thanks @kamilkisiela! - Fix PROVIDES_FIELDS_MISSING_EXTERNAL in Fed v1 -
#51
8cd5287Thanks @kamilkisiela! - Fix REQUIRES_INVALID_FIELDS_TYPE for enum value
- #49
d6da339Thanks @kamilkisiela! - Adds CompositionSuccess.publicSdl - SDL with only the queryable fields
-
#46
cfa9950Thanks @kamilkisiela! - AddrequiresScopes__Scopeandpolicy__PolicytotransformSupergraphToPublicSchema -
#44
de983b0Thanks @kamilkisiela! - Add containsSupergraphSpec to detect if Supergraph related scalars, enums or directives are used
- #42
f858c3fThanks @n1ru4l! - Fix REQUIRED_INACCESSIBLE occurring on inaccessible fields/input types
- #40
4cba351Thanks @n1ru4l! - Implement validation rules forREQUIRED_INACCESSIBLEfor input types and field arguments.
-
#36
fdba937Thanks @kamilkisiela! - Visit every field in provides and requires directives -
#36
fdba937Thanks @kamilkisiela! - Fix unnecessary join__field(override:) on Query fields when it points to non-existing subgraph -
#36
fdba937Thanks @kamilkisiela! - Deduplicate composed directives -
#39
e77eb2cThanks @n1ru4l! - Ignore inaccessible field arguments within theDEFAULT_VALUE_USES_INACCESSIBLErule.Fixes an issue where an inaccessible field argument uses a default value that is inaccessible would cause a false error.
type User @key(fields: "id") { id: ID friends(type: FriendType = FAMILY @inaccessible): [User!]! } enum FriendType { FAMILY @inaccessible FRIEND }
-
#36
fdba937Thanks @kamilkisiela! - Remove duplicated link spec definitions -
#36
fdba937Thanks @kamilkisiela! - Drop unused fields marked with @external only in a single type in Fed v1 -
220dfc0Thanks @kamilkisiela! - Fix missing usedOverridden on non-external key field
88a3fd0Thanks @kamilkisiela! - Validate directive definitions
-
a578a92Thanks @kamilkisiela! - Fix missing @join__field on non-external, but shareable fields, with @override in some graphs -
56b6c95Thanks @kamilkisiela! - Fix FIELD_TYPE_MISMATCH - support [User!] vs [User] in output types -
a578a92Thanks @kamilkisiela! - Support @join__field(usedOverridden:) -
ee34815Thanks @kamilkisiela! - Fix ProvidedArgumentsOnDirectivesRule and allow to use "[]" when "[String]" is expected -
a578a92Thanks @kamilkisiela! - delete subgraph spec according to schema definition/extension object -
88a3fd0Thanks @kamilkisiela! - fix: allow to overwrite specified directives -
a578a92Thanks @kamilkisiela! - Ignore inaccessible enum values in ENUM_VALUE_MISMATCH rule -
56b6c95Thanks @kamilkisiela! - Improve SATISFIABILITY_ERROR - resolve query path step by step -
a578a92Thanks @kamilkisiela! - Fix description of fields with @override -
a578a92Thanks @kamilkisiela! - Allow @key(fields: ["a", "b"]) in Federation v1 -
56b6c95Thanks @kamilkisiela! - Fix unnecessary join__field(external) for extension type where field is not needed by the query planner -
56b6c95Thanks @kamilkisiela! - Fix unnecessary join__field(external: true) on key fields -
a8a253dThanks @kamilkisiela! - SATISFIABILITY_ERROR improvements -
a578a92Thanks @kamilkisiela! - Fix @join__field(external: true) missing when field is overridden -
56b6c95Thanks @kamilkisiela! - Improve SATISFIABILITY_ERROR - check satisfiability of non-entity types
-
1ddf34eThanks @kamilkisiela! - Fix EXTERNAL_ARGUMENT_MISSING - include nullable arguments as well -
1ddf34eThanks @kamilkisiela! - Merge type definitions and type extensions when validating fields used in @requires, @provides and @key -
2525a24Thanks @kamilkisiela! - Support [T!]! type in @key(fields), @provides(fields) and @requires(fields)
-
55343baThanks @kamilkisiela! - Fix missing join__field -
55343baThanks @kamilkisiela! - Fix default values -
55343baThanks @kamilkisiela! - fix: cannot move subgraphs without @key and common query path -
55343baThanks @kamilkisiela! - Ignore specified directives and scalars when printing supergraph
9195942Thanks @kamilkisiela! - Detect composed directives without spec
-
3196317Thanks @kamilkisiela! - Fix field sharing logic for Federation v1 -
af15843Thanks @kamilkisiela! - Fix OVERRIDE_SOURCE_HAS_OVERRIDE rule to find circular refs -
c182a8aThanks @kamilkisiela! - Fix discoverability of directive definitions -
c182a8aThanks @kamilkisiela! - Fix descriptions on arguments of object type fields -
cab3b49Thanks @kamilkisiela! - Fix adding unnecessary@join__type(extension:true) -
af15843Thanks @kamilkisiela! - Prevent shareable fields on root level subscription object
- #28
21fa482Thanks @kamilkisiela! - Support v2.4, v2.5 and v2.6
- #25
c17a037Thanks @kamilkisiela! - PROVIDES_INVALID_FIELDS: empty selection set
- #26
3c45c20Thanks @kamilkisiela! - INVALID_FIELD_SHARING: adjust the check to detect valid override directive
- #23
2d72e03Thanks @kamilkisiela! - Add sortSDL function to sort DocumentNode (type system definitions and extensions)
-
#21
443283eThanks @n1ru4l! - RemovestripFederationFromSupergraphin favor oftransformSupergraphToPublicSchema.Instead of stripping only federation specific types,
transformSupergraphToPublicSchemayields the public api schema as served by the gateway.
- #19
e0ef0bbThanks @kamilkisiela! - MakestripFederationFromSupergraphless strict and remove only Federation directives
- #17
a508ad2Thanks @kamilkisiela! - SATISFIABILITY_ERROR - allow to resolve a field via entity type's child
- #15
37e164cThanks @kamilkisiela! - Add joinFieldSet, linkImport, link__Purpose to stripFederationFromSupergraph
- #12
75d2117Thanks @kamilkisiela! - Add repository to package.json
8574d45Thanks @kamilkisiela! - Release v0.1.0
- #9
b37a82dThanks @kamilkisiela! - Initial version
-
1196bdeThanks @kamilkisiela! - Report error when interfaceObject directive is detected -
1196bdeThanks @kamilkisiela! - Fix a case when all fields are marked as external and are only used by key directive -
1196bdeThanks @kamilkisiela! - Init -
1196bdeThanks @kamilkisiela! - Add validateSubgraph function