Download Latest Version apollo-angular@13.0.0 source code.tar.gz (2.7 MB)
Email in envelope

Get an email when there's a new version of Apollo Angular

Home / apollo-angular@12.0.0
Name Modified Size InfoDownloads / Week
Parent folder
apollo-angular@12.0.0 source code.tar.gz 2025-10-13 2.8 MB
apollo-angular@12.0.0 source code.zip 2025-10-13 2.8 MB
README.md 2025-10-13 6.7 kB
Totals: 3 Items   5.6 MB 0

[!CAUTION] Before upgrading apollo-angular to v12, be sure to read all the breaking changes from @apollo/client v4 that also applies to apollo-angular.

Major Changes

  • #2372 44ed9a5 Thanks @jerelmiller! - Namespaced types

    Before:

    ```ts import type { MutationOptionsAlone, QueryOptionsAlone, SubscriptionOptionsAlone, WatchQueryOptions, WatchQueryOptionsAlone, } from 'apollo-angular'; import type { BatchOptions, Options } from 'apollo-angular/http';

    type AllTypes = | Options | BatchOptions | MutationOptionsAlone | QueryOptionsAlone | SubscriptionOptionsAlone | WatchQueryOptions | WatchQueryOptionsAlone; ```

    After:

    ```ts import type { Apollo, Mutation, Query, Subscription } from 'apollo-angular'; import type { HttpBatchLink, HttpLink } from 'apollo-angular/http';

    type AllTypes = | HttpLink.Options | HttpBatchLink.Options | Mutation.MutateOptions | Query.FetchOptions | Subscription.SubscribeOptions | Apollo.WatchQueryOptions | Query.WatchOptions; ```

  • #2372 bdc93df Thanks @jerelmiller! - httpHeaders is a class

    Migrate your code like so:

    diff - const link = httpHeaders(); + const link = new HttpHeadersLink();

  • #2372 8c0b7f0 Thanks @jerelmiller! - Move useZone option into subscription options

    diff - const obs = apollo.subscribe(options, { useZone: false }); + const obs = apollo.subscribe({ ...options, useZone: false });

  • #2372 b9c62a5 Thanks @jerelmiller! - Combined parameters of Query, Mutation and Subscription classes generated via codegen

    Migrate your code like so:

    ```diff class MyComponent { myQuery = inject(MyQuery); myMutation = inject(MyMutation); mySubscription = inject(MySubscription);

    constructor() { - myQuery.watch({ myVariable: 'foo' }, { fetchPolicy: 'cache-and-network' }); + myQuery.watch({ variables: { myVariable: 'foo' }, fetchPolicy: 'cache-and-network' })

    • myMutation.mutate({ myVariable: 'foo' }, { errorPolicy: 'ignore' });
    • myMutation.mutate({ variables: { myVariable: 'foo' }, errorPolicy: 'ignore' });

    • mySubscription.subscribe({ myVariable: 'foo' }, { fetchPolicy: 'network-only' });

    • mySubscription.subscribe({ variables: { myVariable: 'foo' }, fetchPolicy: 'network-only' }); } } ```

Minor Changes

  • #2379 7e4a609 Thanks @PowerKiKi! - New onlyComplete() helper to filter only complete results

    If you use this, you should probably combine it with notifyOnNetworkStatusChange. This tells @apollo/client to not emit the first partial result, so apollo-angular does not need to filter it out. The overall behavior is identical, but it saves some CPU cycles.

    So something like this:

    ts apollo .watchQuery({ query: myQuery, notifyOnNetworkStatusChange: false, // Adding this will save CPU cycles }) .valueChanges.pipe(onlyComplete()) .subscribe(result => { // Do something with complete result });

Patch Changes

Source: README.md, updated 2025-10-13