Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update apollo graphql packages #2704

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 10, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@apollo/gateway (source) 2.3.3 -> 2.8.0 age adoption passing confidence
@apollo/server (source) 4.9.3 -> 4.10.4 age adoption passing confidence
@apollo/server-plugin-landing-page-graphql-playground (source) 4.0.0 -> 4.0.1 age adoption passing confidence
@apollo/server-plugin-response-cache (source) 4.1.0 -> 4.1.3 age adoption passing confidence
@apollo/subgraph (source) 2.2.3 -> 2.8.0 age adoption passing confidence

Release Notes

apollographql/federation (@​apollo/gateway)

v2.8.0

Compare Source

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

v2.7.8

Compare Source

Patch Changes

v2.7.7

Compare Source

Patch Changes

v2.7.6

Compare Source

Patch Changes

v2.7.5

Compare Source

Patch Changes

v2.7.4

Compare Source

Patch Changes

v2.7.3

Compare Source

Patch Changes

v2.7.2

Compare Source

Patch Changes

v2.7.1

Compare Source

Patch Changes

v2.7.0

Compare Source

Minor Changes
  • Implement progressive @override functionality (#​2911)

    The progressive @override feature brings a new argument to the @override directive: label: String. When a label is added to an @override application, the override becomes conditional, depending on parameters provided to the query planner (a set of which labels should be overridden). Note that this feature will be supported in router for enterprise users only.

    Out-of-the-box, the router will support a percentage-based use case for progressive @override. For example:

    type Query {
      hello: String @​override(from: "original", label: "percent(5)")
    }

    The above example will override the root hello field from the "original" subgraph 5% of the time.

    More complex use cases will be supported by the router via the use of coprocessors/rhai to resolve arbitrary labels to true/false values (i.e. via a feature flag service).

Patch Changes

v2.6.3

Compare Source

Patch Changes

v2.6.2

Compare Source

Patch Changes

v2.6.1

Compare Source

Patch Changes

v2.6.0

Compare Source

Minor Changes
  • Add more information to OpenTelemetry spans. (#​2700)

    Rename operationName to graphql.operation.name and add a
    graphql.operation.type attribute, in conformance with the OpenTelemetry
    Semantic Conventions for GraphQL. The operationName attribute is now
    deprecated, but it is still emitted alongside graphql.operation.name.

    Add a graphql.document span attribute to the gateway.request span,
    containing the entire GraphQL source sent in the request. This feature
    is disable by default.

    When one or more GraphQL or internal errors occur, report them in the
    OpenTelemetry span in which they took place, as an exception event. This
    feature is disabled by default.

    To enable the graphql.document span attribute and the exception event
    reporting, add the following entries to your ApolloGateway instance
    configuration:

    const gateway = new ApolloGateway({
      // ...
      telemetry: {
        // Set to `true` to include the `graphql.document` attribute
        includeDocument: true,
        // Set to `true` to report all exception events, or set to a number
        // to report at most that number of exception events per span
        reportExceptions: true,
        // or: reportExceptions: 1
      },
    });
  • Update license field in package.json to use Elastic-2.0 SPDX identifier (#​2741)

  • Introduce the new @policy scope for composition (#​2818)

    Note that this directive will only be fully supported by the Apollo Router as a GraphOS Enterprise feature at runtime. Also note that composition of valid @policy directive applications will succeed, but the resulting supergraph will not be executable by the Gateway or an Apollo Router which doesn't have the GraphOS Enterprise entitlement.

    Users may now compose @policy applications from their subgraphs into a supergraph.

    The directive is defined as follows:

    scalar federation__Policy
    
    directive @​policy(
      policies: [[federation__Policy!]!]!
    ) on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM

    The Policy scalar is effectively a String, similar to the FieldSet type.

    In order to compose your @policy usages, you must update your subgraph's federation spec version to v2.6 and add the @policy import to your existing imports like so:

    @​link(url: "https://specs.apollo.dev/federation/v2.6", import: [..., "@​policy"])
  • Add graphql.operation.name attribute on gateway.plan span (#​2807)

Patch Changes

v2.5.7

Compare Source

Patch Changes

v2.5.6

Compare Source

Patch Changes

v2.5.5

Compare Source

Patch Changes
  • Fix specific case for requesting __typename on interface entity type (#​2775)

    In certain cases, when resolving a __typename on an interface entity (due to it actual being requested in the operation), that fetch group could previously be trimmed / treated as useless. At a glance, it appears to be a redundant step, i.e.:

    { ... on Product { __typename id }} => { ... on Product { __typename} }
    

    It's actually necessary to preserve this in the case that we're coming from an interface object to an (entity) interface so that we can resolve the concrete __typename correctly.

  • Don't preserve useless fetches which downgrade __typename from a concrete type back to its interface type. (#​2778)

    In certain cases, the query planner was preserving some fetches which were "useless" that would rewrite __typename from its already-resolved concrete type back to its interface type. This could result in (at least) requested fields being "filtered" from the final result due to the interface's __typename in the data where the concrete type's __typename was expected.

    Specifically, the solution was compute the path between newly created groups and their parents when we know that it's trivial ([]). Further along in the planning process, this allows to actually remove the known-useless group.

  • Propagate type information when renaming entity fields (#​2776)

    Aliased entity fields might have been incorrectly overwritten if multiple fields/aliases shared the same name. Query planner automatically renames conflicting fields to ensure we can always generate a valid GraphQL query. The underlying issue was that this key rewriting logic was assuming the same type of an object. In case of entity queries asking for those aliased fields, we ended up always attempting to apply field renaming logic regardless, whether or not a given entity was of the correct type. This fix ensures that the query planner logic correctly accounts for the object type when applying field renaming logic.

  • Updated dependencies [66d7e4ce, a37bbbf6]:

v2.5.4

Compare Source

Patch Changes
  • Adds header to change the format of exposed query plans, and allows formatting it as json. (#​2724)

    When the gateway is configured to allow it, adding the Apollo-Query-Plan-Experimental header to a request already allowed a "prettified" text version of the query plan used for the query is returned in the response extension. This changes adds support for a new (optional) accompanying header, Apollo-Query-Plan-Experimental-Format, which can be set to the value "internal" to have the query plan returned as a json object (that correspond to the internal representation of that query plan) instead of the text version otherwise sent. Note that if that new header is not provided, then the query plan continues to be send in the previous prettified text version.

  • Fix some potentially incorrect query plans with @requires when some dependencies are involved. (#​2726)

    In some rare case of @requires, an over-eager optimisation was incorrectly considering that
    a dependency between 2 subgraph fetches was unnecessary, leading to doing 2 subgraphs queries
    in parallel when those should be done sequentially (because the 2nd query rely on results
    from the 1st one). This effectively resulted in the required fields not being provided (the
    consequence of which depends a bit on the resolver detail, but if the resolver expected
    the required fields to be populated (as they should), then this could typically result
    in a message of the form GraphQLError: Cannot read properties of null).

  • Updated dependencies [203b0a44]:

v2.5.3

Compare Source

Patch Changes

v2.5.2

Compare Source

Patch Changes
  • Remove extraneous call to span.setStatus() on a span which has already ended. (#​2697)

    In cases where a subgraph responded with an error, we would sometimes try to set
    the status of a span which had already ended. This resulted in a warning log to
    the console (but no effect otherwise). This warning should no longer happen.

  • Fix fallbackPollIntervalInMs behavior. (#​2709)

    The fallbackPollIntervalInMs serves 2 purposes:

    • it allows users to provide an Uplink poll interval if Uplink doesn't provide one
    • it allows users to use a longer poll interval that what's prescribed by Uplink

    The second bullet is how the configuration option is documented, but not how it was previously implemented. This change corrects the behavior to respect this configuration if it's provided AND is longer than the Uplink interval.

  • Updated dependencies [35179f08]:

v2.5.1

Compare Source

Patch Changes
  • Reapply #​2639: (#​2687)

    Try reusing named fragments in subgraph fetches even if those fragment only apply partially to the subgraph. Before this change, only named fragments that were applying entirely to a subgraph were tried, leading to less reuse that expected. Concretely, this change can sometimes allow the generation of smaller subgraph fetches.

    Additionally, resolve a bug which surfaced in the fragment optimization logic which could result in invalid/incorrect optimizations / fragment reuse.

  • Updated dependencies [b9052fdd]:

v2.5.0

Compare Source

Minor Changes
  • Do not run the full suite of graphQL validations on supergraphs and their extracted subgraphs by default in production environment. (#​2657)

    Running those validations on every updates of the schema takes a non-negligible amount of time (especially on large
    schema) and mainly only serves in catching bugs early in the supergraph handling code, and in some limited cases,
    provide slightly better messages when a corrupted supergraph is received, neither of which is worth the cost in
    production environment.

    A new validateSupergraph option is also introduced in the gateway configuration to force this behaviour.

  • Support responses from subgraphs which use the application/graphql-response+json content-type header. (#​2162)

    See graphql-over-http spec for more details:
    https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json

  • Introduce the new @authenticated directive for composition (#​2644)

    Note that this directive will only be fully supported by the Apollo Router as a GraphOS Enterprise feature at runtime. Also note that composition of valid @authenticated directive applications will succeed, but the resulting supergraph will not be executable by the Gateway or an Apollo Router which doesn't have the GraphOS Enterprise entitlement.

    Users may now compose @authenticated applications from their subgraphs into a supergraph. This addition will support a future version of Apollo Router that enables authenticated access to specific types and fields via directive applications.

    The directive is defined as follows:

    directive @​authenticated on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM

    In order to compose your @authenticated usages, you must update your subgraph's federation spec version to v2.5 and add the @authenticated import to your existing imports like so:

    @​link(url: "https://specs.apollo.dev/federation/v2.5", import: [..., "@​authenticated"])
  • Introduce the new @requiresScopes directive for composition (#​2649)

    Note that this directive will only be fully supported by the Apollo Router as a GraphOS Enterprise feature at runtime. Also note that composition of valid @requiresScopes directive applications will succeed, but the resulting supergraph will not be executable by the Gateway or an Apollo Router which doesn't have the GraphOS Enterprise entitlement.

    Users may now compose @requiresScopes applications from their subgraphs into a supergraph. This addition will support a future version of Apollo Router that enables scoped access to specific types and fields via directive applications.

    The directive is defined as follows:

    scalar federation__Scope
    
    directive @​requiresScopes(
      scopes: [federation__Scope!]!
    ) on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM

    The Scope scalar is effectively a String, similar to the FieldSet type.

    In order to compose your @requiresScopes usages, you must update your subgraph's federation spec version to v2.5 and add the @requiresScopes import to your existing imports like so:

    @​link(url: "https://specs.apollo.dev/federation/v2.5", import: [..., "@​requiresScopes"])
Patch Changes

v2.4.13

Compare Source

Patch Changes

v2.4.12

Compare Source

Patch Changes
  • Remove extraneous call to span.setStatus() on a span which has already ended. (#​2717)

    In cases where a subgraph responded with an error, we would sometimes try to set
    the status of a span which had already ended. This resulted in a warning log to
    the console (but no effect otherwise). This warning should no longer happen.

  • Fix fallbackPollIntervalInMs behavior. (#​2717)

    The fallbackPollIntervalInMs serves 2 purposes:

    • it allows users to provide an Uplink poll interval if Uplink doesn't provide one
    • it allows users to use a longer poll interval that what's prescribed by Uplink

    The second bullet is how the configuration option is documented, but not how it was previously implemented. This change corrects the behavior to respect this configuration if it's provided AND is longer than the Uplink interval.

  • Updated dependencies [693c2433]:

v2.4.11

Compare Source

Patch Changes
  • Reapply #​2639: (#​2684)

    Try reusing named fragments in subgraph fetches even if those fragment only apply partially to the subgraph. Before this change, only named fragments that were applying entirely to a subgraph were tried, leading to less reuse that expected. Concretely, this change can sometimes allow the generation of smaller subgraph fetches.

    Additionally, resolve a bug which surfaced in the fragment optimization logic which could result in invalid/incorrect optimizations / fragment reuse.

  • Updated dependencies [a740e071]:

v2.4.10

Compare Source

Patch Changes

v2.4.9

Compare Source

Patch Changes

v2.4.8

Compare Source

Patch Changes

v2.4.7

Compare Source

Patch Changes

v2.4.6

Compare Source

Patch Changes

v2.4.5

Compare Source

Patch Changes

v2.4.4

Compare Source

Patch Changes

v2.4.3

Compare Source

Patch Changes

v2.4.2

Compare Source

Patch Changes
  • Fix potential bug when an @interfaceObject type has a @requires. When an @interfaceObject type has a field with a (#​2524)
    @requires and the query requests that field only for some specific implementations of the corresponding interface,
    then the generated query plan was sometimes invalid and could result in an invalid query to a subgraph (against a
    subgraph that rely on @apollo/subgraph, this lead the subgraph to produce an error message looking like "The _entities resolver tried to load an entity for type X, but no object or interface type of that name was found in the schema").
  • Updated dependencies [2c370508, 179b4602]:

v2.4.1

Compare Source

Patch Changes

v2.4.0

Compare Source

Minor Changes
  • This change introduces a configurable query plan cache. This option allows (#​2385)
    developers to provide their own query plan cache like so:

    new ApolloGateway({
      queryPlannerConfig: {
        cache: new MyCustomQueryPlanCache(),
      },
    });
    

    The current default implementation is effectively as follows:

    import { InMemoryLRUCache } from "@​apollo/utils.keyvaluecache";
    
    const cache = new InMemoryLRUCache<string>({
      maxSize: Math.pow(2, 20) * 30,
      sizeCalculation<T>(obj: T): number {
        return Buffer.byteLength(JSON.stringify(obj), "utf8");
      },
    });
    

    TypeScript users should implement the QueryPlanCache type which is now
    exported by @apollo/query-planner:

    import { QueryPlanCache } from '@&#8203;apollo/query-planner';
    
    class MyCustomQueryPlanCache implements QueryPlanCache {
      // ...
    }
    
  • Adds debug/testing query planner options (debug.bypassPlannerForSingleSubgraph) to bypass the query planning (#​2441)
    process for federated supergraph having only a single subgraph. The option is disabled by default, is not recommended
    for production, and is not supported (it may be removed later). It is meant for debugging/testing purposes.

Patch Changes

v2.3.6

[Compare Source](https://togithub.com/apollographql/federati


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Mar 10, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 0b1e8d2 to 5e7c46c Compare March 10, 2023 12:18
@kamilmysliwiec
Copy link
Member

@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 3 times, most recently from 4251eb8 to 3fe8a8a Compare March 10, 2023 19:05
@renovate renovate bot changed the title chore(deps): update dependency @apollo/subgraph to v2.3.3 chore(deps): update apollo graphql packages Mar 10, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 15 times, most recently from 155b213 to c868a7c Compare March 17, 2023 17:14
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 8 times, most recently from b3e30ed to 2c8cf77 Compare March 21, 2023 16:14
@erikwrede
Copy link

erikwrede commented Nov 8, 2023

@kamilmysliwiec this PR is not a full depdendency upgrade as it still uses the old deprecated & replaced apollo-link-ws lib and deprecated test classes. Please reconsider using my PR (#2916) or merging it into this instead. I made sure to include the new libraries recommended by apollo.

@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 245824a to 9e969e1 Compare November 9, 2023 00:46
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 3 times, most recently from 42413ff to 390cabf Compare November 20, 2023 12:55
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 2 times, most recently from 146ce27 to 1caccf6 Compare November 28, 2023 00:54
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 1caccf6 to 7888032 Compare December 12, 2023 00:33
@MrChrisRodriguez
Copy link

@kamilmysliwiec is there anything anyone can do to help get this across the finish line?

@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 7888032 to b8e658b Compare January 2, 2024 20:01
@sutt0n
Copy link

sutt0n commented Jan 8, 2024

@kamilmysliwiec apollographql/federation#2375 (comment)

It seems there can be some kind of workaround here... Although, I would suspect this may introduce a breaking change to this repo. 🤔

@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from b8e658b to e53c934 Compare January 11, 2024 16:28
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 2 times, most recently from e82d5e6 to 241337f Compare January 24, 2024 18:48
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 241337f to a0d08cd Compare February 8, 2024 18:24
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from a0d08cd to 0feb580 Compare March 5, 2024 22:32
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 2 times, most recently from 54785c8 to 2738f15 Compare March 22, 2024 21:03
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 4 times, most recently from 6e97f27 to 80d62cf Compare April 22, 2024 11:31
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 2 times, most recently from a30c97f to 1c1a371 Compare May 7, 2024 22:55
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 2 times, most recently from 429ccbc to b8c67ee Compare May 17, 2024 01:47
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from b8c67ee to 03475e2 Compare May 29, 2024 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants