github apollographql/federation @apollo/gateway@2.8.0

latest releases: @apollo/query-graphs@2.9.0-connectors.7, @apollo/subgraph@2.9.0-connectors.7, @apollo/federation-internals@2.9.0-connectors.7...
one month ago

Minor Changes

  • Implement new directives to allow getting and setting context. This allows resolvers to reference and access data referenced by entities that exist in the GraphPath that was used to access the field. The following example demonstrates the ability to access the prop field within the Child resolver. (#2988)

    type Query {
      p: Parent!
    }
    type Parent @key(fields: "id") @context(name: "context") {
      id: ID!
      child: Child!
      prop: String!
    }
    type Child @key(fields: "id") {
      id: ID!
      b: String!
      field(a: String @fromContext(field: "$context { prop }")): Int!
    }

Patch Changes

Don't miss a new federation release

NewReleases is sending notifications on new releases.