Skip to content

Releases: graphql-hive/federation-composition

v0.19.1

30 Jun 07:34
3c993be
Compare
Choose a tag to compare

Patch Changes

  • #149 9ae49e3 Thanks @n1ru4l! - Fix external key fields on extended object types raising composition errors.

v0.19.0

27 Jun 09:37
36e3501
Compare
Choose a tag to compare

Minor Changes

  • #156 46cb6bc Thanks @n1ru4l! - Support composing executable directive definitions within subgraphs into the supergraph.

v0.18.5

23 Jun 09:15
182c86f
Compare
Choose a tag to compare

Patch Changes

  • #151 f9b9908 Thanks @n1ru4l! - Fix issue where the satisfiability check raised an exception for fields that share different object type and interface definitions across subgraphs.

  • #152 e4440a1 Thanks @n1ru4l! - Fix issue where scalar type marked with @inaccessible does 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..

v0.18.4

17 Jun 11:06
f19de76
Compare
Choose a tag to compare

Patch Changes

  • #146 55b48e9 Thanks @n1ru4l! - Resolve usage of @requires FieldSet with a union field selection to raise an EXTERNAL_UNUSED error.

  • #150 9bd8016 Thanks @n1ru4l! - Fix incorrectly raised IMPLEMENTED_BY_INACCESSIBLE error 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 8c5bc0c Thanks @n1ru4l! - Add support for @provides fragment selection sets on union type fields.

    type Query {
      media: [Media] @shareable @provides(fields: "... on Book { title }")
    }
    union Media = Book | Movie

v0.18.3

13 May 15:23
fca2eb8
Compare
Choose a tag to compare

Patch Changes

  • #143 bcea968 Thanks @n1ru4l! - Do not throw an error when encountering invalid usage of @tag directive within subgraphs.

v0.18.2

13 May 10:28
dae61c1
Compare
Choose a tag to compare

Patch Changes

  • #141 fdb491f Thanks @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
    }

v0.18.1

01 Apr 10:22
79403f5
Compare
Choose a tag to compare

Patch Changes

v0.18.0

30 Mar 15:05
b4c69f9
Compare
Choose a tag to compare

Minor Changes

  • Support progressive overrides (@override(label: "<value>"))

Patch Changes

  • Performance improvements (lazy compute of errors), especially noticeable in large schemas (2s -> 600ms)

v0.17.0

28 Mar 16:05
4fe54a1
Compare
Choose a tag to compare

Minor Changes

  • Allow to use @composeDirective on a built-in scalar (like @oneOf)

v0.16.0

28 Mar 09:57
d21aa38
Compare
Choose a tag to compare

Minor Changes

  • Allow to use v2.7, but not progressive @override labels
  • Allow to use v2.8, but not @context and @fromContext directives
  • Support @cost and @listSize directives
  • Add extractLinkImplementations function to extract information about applied specs (@link)

Patch Changes

  • 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