Skip to content

fix(deps): update apollo graphql packages - #12

Open
ghost wants to merge 1 commit into
masterfrom
whitesource-remediate/apollo-graphql-packages
Open

fix(deps): update apollo graphql packages#12
ghost wants to merge 1 commit into
masterfrom
whitesource-remediate/apollo-graphql-packages

Conversation

@ghost

@ghost ghost commented Apr 1, 2025

Copy link
Copy Markdown

Note: This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
apollo-cache-inmemory 1.3.12 -> 1.6.6 age adoption passing confidence
apollo-client 2.4.6 -> 2.6.10 age adoption passing confidence
apollo-client 2.x -> 2.6.10 age adoption passing confidence
apollo-link 1.2.3 -> 1.2.14 age adoption passing confidence
apollo-link ^1.2.3 -> ^1.2.14 age adoption passing confidence
apollo-link-context 1.0.9 -> 1.0.20 age adoption passing confidence
apollo-link-context ^1.0.9 -> ^1.0.20 age adoption passing confidence
apollo-link-http 1.3.1 -> 1.5.17 age adoption passing confidence
apollo-link-http ^1.3.1 -> ^1.5.17 age adoption passing confidence
apollo-link-retry 2.2.5 -> 2.2.16 age adoption passing confidence
apollo-link-retry ^2.2.5 -> ^2.2.16 age adoption passing confidence
graphql-tag ^2.9.2 -> ^2.12.6 age adoption passing confidence
graphql-tag ^2.9.2 -> ^2.12.6 age adoption passing confidence
react-apollo ^2.1.9 -> ^2.5.8 age adoption passing confidence
react-apollo 2.x -> 2.5.8 age adoption passing confidence
react-apollo ^2.1.9 -> ^2.5.8 age adoption passing confidence

Release Notes

apollographql/apollo-client (apollo-cache-inmemory)

v1.6.6

Compare Source

v1.6.5

Compare Source

v1.6.3

Compare Source

v1.6.2

Compare Source

v1.6.1

Compare Source

  • Pretend that __typename exists on the root Query when matching fragments.

    @​benjamn in #​4853

v1.6.0

Compare Source

  • Support new InMemoryCache({ freezeResults: true }) to help enforce immutability.

    @​benjamn in #​4514

  • Allow IntrospectionFragmentMatcher to match fragments against the root Query, as HeuristicFragmentMatcher does.

    @​rynobax in #​4620

  • Rerential identity (===) of arrays in cache results will now be preserved for unchanged data.

    @​benjamn in commit f3091d6a

  • Avoid adding __typename field to @client selection sets that have been @exported as input variables.

    @​benjamn in #​4784

v1.5.1

Compare Source

v1.5.0

Compare Source

v1.4.3

Compare Source

v1.4.2

Compare Source

v1.4.1

Compare Source

  • The optimism npm package has been updated to a version (0.6.9) that
    provides its own TypeScript declarations, which should fix problems like
    Issue #​4327.

    PR #​4331

  • Error messages involving GraphQL queries now print the queries using
    JSON.stringify instead of the print function exported by the
    graphql package, to avoid pulling unnecessary printing logic into your
    JavaScript bundle.

    PR #​4234

  • The QueryKeyMaker abstraction has been removed, meaning that cache
    results for non-identical queries (or sub-queries) with equivalent
    structure will no longer be cached together. This feature was a nice
    optimization in certain specific use cases, but it was not worth the
    additional complexity or bundle size.

    PR #​4245

v1.4.0

Compare Source

  • The speed and memory usage of optimistic reads and writes has been
    improved dramatically using a new layering technique that does not
    require copying the non-optimistic contents of the cache.

    PR #​4319

  • The RecordingCache abstraction has been removed, and thus is no longer
    exported from apollo-cache-inmemory.

    PR #​4319

  • Export the optimism wrap function using ES2015 export syntax, instead of
    CommonJS.

    @​ardatan in #​4158

apollographql/apollo-link (apollo-link)

v1.2.14

Compare Source

v1.2.13

Compare Source

v1.2.12

Compare Source

apollo-link 1.2.12

v1.2.11

Compare Source

v1.2.10

Compare Source

v1.2.9

Compare Source

General
docs
apollo-link 1.2.9
apollo-link-error 1.1.8
apollo-link-batch-http 1.2.9
apollo-link-http 1.5.12
apollo-link-schema 1.2.0
  • Avoid bundling graphql/execution/execute into apollo-link-schema.

    @​benjamn in #​968

v1.2.8

Compare Source

General
apollo-link 1.2.8

v1.2.7

Compare Source

v1.2.6

Compare Source

v1.2.5

Compare Source

apollo-link 1.2.5
apollo-link-batch 1.1.6
  • Move the setting of the raw response in the context to
    apollo-link-batch-http.

    @​03eltond in #​814
apollo-link-batch-http 1.2.5
apollo-link-error 1.1.3
  • Changed networkError type to union type
    Error | ServerError | ServerParseError.

    @​ikhoon in #​530
apollo-link-http-common 0.2.7
Docs

v1.2.4

Compare Source

apollographql/graphql-tag (graphql-tag)

v2.12.6

Compare Source

v2.12.5

Compare Source

v2.12.4

Compare Source

  • Allow fragments to be imported by name when using the webpack loader.

    @​dobesv in #​257

v2.12.3

Compare Source

v2.12.2

Compare Source

v2.12.1

Compare Source

  • To accommodate older versions of TypeScript, usage of the import type ... syntax (introduced by #​325) has been removed, fixing issue #​345.

    @​benjamn in #​352

v2.12.0

Compare Source

  • The graphql-tag repository has been converted to TypeScript, adding type safety and enabling both ECMAScript and CommonJS module exports. While these changes are intended to be as backwards-compatible as possible, we decided to bump the minor version to reflect the significant refactoring.

    @​PowerKiKi and @​benjamn in #​325

v2.11.0

Compare Source

  • package.json sideEffects changes to clearly identify that graphql-tag doesn't have side effects.

    @​hwillson in #​313

v2.10.4

Compare Source

v2.10.3

Compare Source

v2.10.2

Compare Source

v2.10.1

Compare Source

  • Fix failures in IE11 by avoiding unsupported (by IE11) constructor arguments to Set by rocwang in #​190

v2.10.0

Compare Source

apollographql/react-apollo (react-apollo)

v2.5.8

Compare Source

2.5.8 (2019-06-21)
Bug Fixes
  • Makes the use of apollo-client 2.6.3's ObservableQuery.resetQueryStoreErrors
    method optional, for people who can't update to react-apollo's new
    apollo-client peer dep of 2.6.3.
    @​hwillson in #​3151

v2.5.7

Compare Source

Improvements
  • Make sure MockedProvider is using the proper CJS/ESM bundle, when
    referencing ApolloProvider.

    @​jure in #​3029.
  • Adjust the ApolloContext definition to play a bit more nicely with
    React.createContext types.

    @​JoviDeCroock in #​3018
  • The result of a mutation is now made available to the wrapped component,
    when using the graphql HOC.

    @​andycarrell in #​3008
  • Check equality of stringified variables in the MockLink to improve
    debugging experience used by MockedProvider.

    @​evans in #​3078
Bug Fixes
  • Removed leftover apollo-client@beta peer dep.

    @​brentertz in #​3064
  • Stop setting optional input to null, when using the graphql HOC.

    @​ZhengYuTay in #​3056
  • Fix typescript error caused by query being mandatory in the fetchMore signature.

    @​HsuTing in #​3065
  • Fixes an issue that caused the Query component to get stuck in an always
    loading state, caused by receiving an error (meaning subsequent valid
    responses couldn't be handled). The Query component can now handle an
    error in a response, then continue to handle a valid response afterwards.

    @​hwillson in #​3107
  • Reorder Subscription component code to avoid setting state on unmounted
    component.

    @​jasonpaulos in #​3139
  • Fix component stuck in loading state for network-only fetch policy.

    @​jasonpaulos in #​3126

v2.5.6

Compare Source

Improvements
  • Both the Query component and graphql HOC now accept a
    returnPartialData prop. This is an important new feature, that should
    help address a lot of open Apollo Client / React Apollo issues, so we'll
    explain it here with an example. Before this release, if you run a query
    that looks like:

    const GET_MEMBER = gql`
      query GetMember($id: ID!) {
        member(id: $id) {
          id
          name
        }
      }
    `;

    in one component, the results are cached, then you run a superset query like
    the following in another component:

    const GET_MEMBER_WITH_PLANS = gql`
      query GetMemberWithPlans($id: ID!) {
        member(id: $id) {
          id
          name
          plans {
            id
            title
            duration
          }
        }
      }
    `;

    Apollo Client will not re-use the partial data that was cached from the first
    query, when it preps and displays the second component. It can't find a
    cache hit for the full second query, so it fires the full query over the
    network.

    With this release, if you set a returnPartialData prop to true on the
    second component, the data available to that component will be
    automatically pre-loaded with the parts of the query that can be found in the
    cache, before the full query is fired over the network. This means you can
    do things like showing partial data in your components, while the rest of the
    data is being loaded over the network.

v2.5.5

Compare Source

Improvements

v2.5.4

Compare Source

Bug Fixes
  • Fixes Could not find "client" in the context of ApolloConsumer errors when
    using MockedProvider.

    @​hwillson in #​2907
  • Ensure Query components using a fetchPolicy of no-cache have their
    data preserved when the components tree is re-rendered.

    @​hwillson in #​2914
Improvements

v2.5.3

Compare Source

Bug Fixes
  • Fixed an infinite loop caused by using setState in the
    onError / onCompleted callbacks of the Query component.

    @​chenesan in #​2751
  • Fixed an issue that prevented good results from showing up in a Query
    component, after an error was received, variables were adjusted, and then
    the good data was fetched.

    @​MerzDaniel in #​2718
  • Fixed an issue that prevented Query component updates from firing (under
    certain circumstances) due to the internal lastResult value (that's used
    to help prevent unnecessary re-renders) not being updated.

    @​Glennrs in #​2840
Improvements
  • MockedProvider now accepts a childProps prop that can be used to pass
    props down to a child component.

    @​miachenmtl in #​2482

  • onCompleted callbacks now use a destructuring-friendly type definition.

    @​jozanza in #​2496

  • @connection directives are now properly stripped from MockedResponse's,
    when using MockedProvider.

    @​ajmath in #​2523

  • MockedProvider has been updated to stop setting a default resolvers
    value of {}, which means by default Apollo Client 2.5 local resolver
    functionality is not enabled when mocking with MockedProvider. This allows
    @client fields to be passed through the mocked link chain, like people
    were used to before AC 2.5. When using this default mode you will see a
    dev only warning message about this like:

    Found @​client directives in query but no client resolvers were specified.
    You can now pass apollo-link-state resolvers to the ApolloClient
    constructor.

    This message can be safely ignored. If you want to use MockedProvider
    with AC 2.5's new local resolver functionality, you can pass your local
    resolver map into the MockedProvider resolvers prop.

    @​ajmath in #​2524

  • Improvements to the graphql HOC generics for fetchMore and refetch.

    @​EricMcRay in #​2525

  • The ApolloProvider / ApolloConsumer implementations have been refactored
    to use React 16.3's new context API.

    @​wzrdzl in #​2540

  • All dependencies and devDependencies have been updated to their latest
    versions, and related Typescript changes have been applied.

    @​hwillson in #​2873

v2.5.2

Compare Source

Bug Fixes
  • Export Context type from types.ts instead of walkTree.ts,
    to reenable import { Context } from 'react-apollo' (which has been
    broken since 2.4.0).

    @​benjamn in #​2825
Improvements

v2.5.1

Compare Source

Bug Fixes
  • Make sure MockedProvider enables Apollo Client 2.5's local state handling,
    and allow custom / mocked resolvers to be passed in as props, and used with
    the created test ApolloClient instance.

    @​hwillson in #​2825

v2.5.0

Compare Source

Improvements
  • Ready to be used with Apollo Client 2.5 and its new local state management
    features, as well as many overall code improvements to help reduce the React
    Apollo bundle size.

    #​2758
  • A function can now be set as a MockedResponse result when using
    MockedProvider, such that every time the mocked result is returned,
    the function is run to calculate the result. This opens up new testing
    possibilities, like being able to verify if a mocked result was actually
    requested and received by a test.

    @​hwillson in #​2788

v2.4.1

Compare Source

Improvements
  • Adds a onSubscriptionComplete prop to the Subscription component, that
    can be passed a callback to be called when the subscription observable
    is completed.

    @​sujeetsr in #​2716

  • During server-side rendering, ObservableQuery objects created in
    previous rendering passes will now be preserved in later passes (within
    the same getDataFromTree or getMarkupFromTree call), so that errors
    can be handled properly when using the errorPolicy: "all" option.

    PR #​2753

v2.4.0

Compare Source

Bug Fixes
  • Invoke onCompleted/onError even if Mutation unmounts.

    PR #​2710
Improvements
  • The walkTree function has been deprecated, since there's no way to
    make its behavior consistent with the latest versions of React. To save
    bundle size, walkTree is no longer exported from react-apollo,
    though you can still access it as follows:
    import { walkTree } from 'react-apollo/walkTree';

v2.3.3

Compare Source

Bug Fixes
  • Add react-dom as a peer dependency (since it's used by getDataFromTree
    and renderToStringWithData).

    @​hwillson in #​2660
Improvements
  • Drop react 14.x support, since the 14.x release line is 2 years old now,
    and react-apollo is no longer tested against it.

    @​hwillson in #​2660

v2.3.2

Compare Source

Improvements
Bug Fixes
  • This package no longer imports react-dom/server unconditionally at the
    top level, making react-apollo safer to use in environments like React
    Native that are neither browser-like nor Node-like, and thus struggle to
    import react-dom/server and its dependencies. Additionally, the React
    Native bundler has been instructed to ignore all react-dom/server
    dependencies within react-apollo, so react-dom will not be bundled
    in React Native apps simply because they import react-apollo.
    PR #​2627

v2.3.1

Compare Source

Improvements
  • Restore original getDataFromTree(tree, context) API, and introduce a
    new alternative called getMarkupFromTree to enable custom rendering
    functions:

    export default function getDataFromTree(
      tree: React.ReactNode,
      context: { [key: string]: any } = {},
    ) {
      return getMarkupFromTree({
        tree,
        context,
        renderFunction: renderToStaticMarkup,
      });
    }
    
    export type GetMarkupFromTreeOptions = {
      tree: React.ReactNode;
      context?: { [key: string]: any };
      renderFunction?: typeof renderToStaticMarkup;
    };
    
    export function getMarkupFromTree({
      tree,
      context = {},
      renderFunction = renderToStaticMarkup,
    }: GetMarkupFromTreeOptions): Promise<string> {...}

    PR #​2586

Bug Fixes
  • Version 2.3.0 was published incorrectly, breaking nested
    react-apollo/... imports. This problem was fixed in version 2.3.1 by
    running npm publish from the lib/ directory, as intended.
    Issue #​2591

v2.3.0

Compare Source

Bug Fixes
Improvements
  • Reimplement getDataFromTree using ReactDOM.renderToStaticMarkup to
    make asynchronous server-side rendering compatible with
    React hooks.
    Although the rendering function used by getDataFromTree defaults to
    renderToStaticMarkup, any suitable rendering function can be passed as
    the optional second argument to getDataFromTree, which now returns a
    Promise<string> that resolves to The HTML rendered in the final pass,
    which means calling renderToString after getDataFromTree may not be
    necessary anymore.
    PR #​2533

v2.2.4

Compare Source

Bug Fixes
  • lodash.isequal was improperly set as a dev dependency for
    MockLink / MockedProvider. It is now a dependency.

    @​danilobuerger in #​2449
Improvements
Typescript

v2.2.3

Compare Source

Bug Fixes
  • Mutation errors are now properly returned as a render prop, when using
    a default errorPolicy of all.

    @​amacleay in #​2374
  • <Mutation /> refetchQueries triggered by name (string) will now use the correct variables.

    @​fracmal in #​2422
Improvements
  • Replace the lodash dependency with lodash.flowright (since that's the
    only non-dev lodash function we're dependent on). Dev lodash
    dependencies have also been updated to use their individual module
    equivalent.

    @​hwillson in #​2435
  • Removed rollup-plugin-babel-minify as it's no longer being used.

    @​hwillson in #​2436
  • Small getDataFromTree.ts logic adjustment to avoid unnecessary calls
    when a falsy element is encountered.

    @​HOUCe in #​2429
  • graphql 14 updates.

    @​hwillson in #​2437
  • All example apps (included in the repo) have been updated to work with the
    latest version of React Apollo.

    @​hwillson in #​2439
Typescript
  • Fix lodash typings.

    @​williamboman in #​2430
  • Typings: added context to MutationOptions.

    @​danilobuerger in #​2354
  • Typings: more MutationOptions changes/fixes.

    @​danilobuerger in #​2340
  • Remove allowSyntheticDefaultImports use. Typescript's
    allowSyntheticDefaultImports compiler option is something we'd like to
    start using, but we jumped the gun a bit by introducing it in
    9a96519.
    Including it means that anyone who wants to use Typescript with React
    Apollo would have to also include it in their own local tsconfig.json, to
    be able to handle default imports properly. This is because we're also using
    Typescript's es2015 module option, which means
    allowSyntheticDefaultImports has to be enabled explicitly. We've
    switched back to using a combination of import * as X and require
    syntax, to work with default imports. We'll re-introduce
    allowSyntheticDefaultImports use in React Apollo 3.

    @​hwillson in #​2438

v2.2.2

Compare Source

  • When using React.createContext and SSR, we now make sure the context
    provider value is reset to the previous value it had after its children are
    walked.

    @​mitchellhamilton in #​2304
  • Revert:

    When a query failed on the first result, the query result data was being
    returned as undefined. This behavior has been changed so that data is
    returned as an empty object. This makes checking for data (e.g.
    instead of data && data.user you can just check data.user) and
    destructring (e.g. { data: { user } }) easier. Note: this could
    potentially hurt applications that are relying on a falsey check of data
    to see if any query errors have occurred. A better (and supported) way to
    check for errors is to use the result errors property.

    #​1983

v2.2.1

Compare Source

  • Revert: "Typescript: use Partial<TData> instead of TData | {}, for the
    QueryResult data property."

v2.2.0

  • Improved TypeScript Typings:
    Deprecated MutationFunc in favor of MutationFn.
    Added missing onCompleted and onError callbacks to MutationOpts.

    @​danilobuerger in #​2322
  • Added an example app that shows how to test mutations.

    @​excitement-engineer in #​1998
  • The <Subscription /> component now allows the registration of a callback
    function, that will be triggered each time the component receives data. The
    callback options object param consists of the current Apollo Client
    instance in `clien

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

@ghost
ghost force-pushed the whitesource-remediate/apollo-graphql-packages branch from fa81490 to fb2306e Compare April 4, 2025 12:55
@ghost ghost changed the title fix(deps): update dependency graphql-tag to ^2.12.6 fix(deps): update apollo graphql packages Apr 4, 2025
@ghost
ghost force-pushed the whitesource-remediate/apollo-graphql-packages branch from fb2306e to 3f5612f Compare September 2, 2025 01:14
@ghost
ghost force-pushed the whitesource-remediate/apollo-graphql-packages branch from 3f5612f to f5b546d Compare September 20, 2025 01:25
@ghost
ghost force-pushed the whitesource-remediate/apollo-graphql-packages branch from f5b546d to 4022ea7 Compare January 29, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants