Apollo Angular HTTP Link Common Logic (Internal)

raw JSON →
1.10.0 verified Wed Apr 22 auth: no javascript maintenance

This package, `apollo-angular-link-http-common` at version 1.10.0, provides shared, internal logic specifically for HTTP links within the broader `apollo-angular` ecosystem. It is explicitly marked as "for internal use only" in its README and documentation, advising developers "DO NOT USE DIRECTLY" in their applications. As such, it does not offer a public API intended for direct consumption. Its primary role is to encapsulate common functionalities leveraged by other `apollo-angular` link implementations, ensuring consistency and reducing code duplication across the library. The `apollo-angular` library, which this package supports, generally follows Angular's major release cycle, implying that this internal package's stability and compatibility are tied to `apollo-angular`'s roadmap and its underlying `@apollo/client` dependencies. It ships with TypeScript types to facilitate its internal integration within the `apollo-angular` monorepo.

error Module '[...]/apollo-angular-link-http-common' has no exported member 'X'.
cause Attempting to import a specific symbol 'X' directly from this internal package, which may not export it publicly or might have removed it in a minor update.
fix
This package is not meant for direct consumption. Refactor your code to use the public APIs provided by apollo-angular or @apollo/client for GraphQL operations and HTTP link setup. Do not import directly from apollo-angular-link-http-common.
error Peer dependency 'graphql@...' must be installed.
cause Your project's `graphql` version does not fall within the specific peer dependency range required by `apollo-angular-link-http-common`.
fix
Update your project's graphql dependency to satisfy the range >=0.11.0 <0.14.0 || ^14.0.0 || ^15.0.0. Run npm install or yarn install after modifying package.json.
breaking Direct use of `apollo-angular-link-http-common` is strongly discouraged. This package is an internal utility, not intended for public consumption. Its API is unstable and subject to change without notice in any release, including patch versions, making direct usage fragile and prone to breakage.
fix Always use the public API of `apollo-angular` or `@apollo/client` for GraphQL operations and link configuration. Do not import anything directly from this package.
gotcha Peer dependency mismatches, particularly with `graphql` versions, can cause issues. The package declares a peer dependency on `graphql` with a complex range (`>=0.11.0 <0.14.0 || ^14.0.0 || ^15.0.0`). Ensure your project's `graphql` version strictly adheres to this range to avoid runtime errors and unexpected behavior.
fix Review your project's `package.json` and ensure your `graphql` dependency satisfies the required range. Use `npm install` or `yarn install` to resolve dependencies correctly after updating.
breaking Angular version support for this package is implicitly tied to `apollo-angular` major releases. As an internal dependency, it inherits the compatibility matrix of `apollo-angular`. `apollo-angular` regularly drops support for older Angular versions with its major releases (e.g., `apollo-angular@13.0.0` dropped Angular 18, `apollo-angular@11.0.0` dropped Angular 17).
fix If indirectly affected, ensure your Angular project version is compatible with the `apollo-angular` version you are using. Refer to the `apollo-angular` release notes for specific Angular compatibility information.
breaking Consumers of `apollo-angular` (and thus indirectly this package) must be aware of breaking changes from `@apollo/client` v4. `apollo-angular` v12.0.0 introduced a significant breaking change requiring understanding all changes from `@apollo/client` v4, which also applies to the underlying link mechanisms.
fix Before upgrading `apollo-angular` to v12 or higher, consult the `@apollo/client` v4 migration guide for all relevant breaking changes, as they can affect how HTTP links are configured and behave.
npm install apollo-angular-link-http-common
yarn add apollo-angular-link-http-common
pnpm add apollo-angular-link-http-common