github apollographql/federation @apollo/federation-internals@2.5.3

latest releases: @apollo/subgraph@2.10.0-alpha.3, @apollo/query-planner@2.10.0-alpha.3, @apollo/query-graphs@2.10.0-alpha.3...
14 months ago

Patch Changes

  • Modifies the type for the argument of the @requiresScopes from [federation__Scope!]! to [[federation__Scope!]!]!. (#2738)

    The @requiresScopes directives has been pre-emptively introduced in 2.5.0 to support an upcoming Apollo Router
    feature around scoped accesses. The argument for @requiresScopes in that upcoming feature is changed to accommodate a
    new semantic. Note that this technically a breaking change to the @requiresScopes directive definition, but as the
    full feature using that directive has been released yet, this directive cannot effectively be used and this should have
    no concrete impact.

  • Fix potential assertion error for named fragment on abstract types when the abstract type does not have the same (#2725)
    possible runtime types in all subgraphs.

    The error manifested itself during query planning with an error message of the form Cannot normalize X at Y ....

  • Expands over-eager merging of field fix to handle @defer consistently (#2720)

    The previously committed #2713 fixed an issue introduced by
    #2387, ensuring that querying the same field with different
    directives applications was not merged, similar to what was/is done for fragments. But the exact behaviour slightly
    differs between fields and fragments when it comes to @defer in that for fragments, we never merge 2 similar fragments
    where both have @defer, which we do merge for fields. Or to put it more concretely, in the following query:

    query Test($skipField: Boolean!) {
      x {
        ... on X @defer {
          a
        }
        ... on X @defer {
          b
        }
      }
    }
    

    the 2 ... on X @defer are not merged, resulting in 2 deferred sections that can run in parallel. But following
    #2713, query:

    query Test($skipField: Boolean!) {
      x @defer {
        a
      }
      x @defer {
        b
      }
    }
    

    will merge both x @defer, resulting in a single deferred section.

    This fix changes that later behaviour so that the 2 x @defer are not merged and result in 2 deferred sections,
    consistently with both 1) the case of fragments and 2) the behaviour prior to
    #2387.

Don't miss a new federation release

NewReleases is sending notifications on new releases.