A

Apollo Client

A
Apollo Client Dev Tools v4.3.0

@apollo/client@4.3.0

Minor Changes #13447 24133fe Thanks @jerelmiller! - Field policies and inputObjects can now tell the cache whether a field is a list of scalars or a scalar whose value is an array. Previously all arrays were iterated and only the inner type was provided to the scalar parse/serialize functions. This required some breaking changes from previous prerelease versions: The field policy scalar option and…

A
Apollo Client Dev Tools v2.2.0

@apollo/client-graphql-codegen@2.2.0

Add support for generating configuration objects for custom scalars in Apollo Client. // codegen.ts import type { CustomScalarsPluginConfig } from "@apollo/client-graphql-codegen/custom-scalars"; const config: CodegenConfig = { // ... generates: { "./path/to/custom-scalars.ts": { plugins: ["@apollo/client-graphql-codegen/custom-scalars"], config: { // ... } satisfies CustomScalarsPluginConfig, },…

A
Apollo Client Dev Tools v4.3.0-rc

@apollo/client@4.3.0-rc.2

Patch Changes #13448 77e1e35 Thanks @jerelmiller! - Mark skip as deprecated in useQuery and useSubscription now that both of these hooks support skipToken.

A
Apollo Client Dev Tools v2.2.0-rc

@apollo/client-graphql-codegen@2.2.0-rc.1

Minor Changes #13447 24133fe Thanks @jerelmiller! - The @apollo/client-graphql-codegen/custom-scalars plugin now emits GraphQL list syntax in inputObjects and scalarTypePolicies (for example "[DateTime]").

A
Apollo Client Dev Tools v4.3.0-rc

@apollo/client@4.3.0-rc.1

Minor Changes #13447 24133fe Thanks @jerelmiller! - Field policies and inputObjects can now tell the cache whether a field is a list of scalars or a scalar whose value is an array. Previously all arrays were iterated and only the inner type was provided to the scalar parse/serialize functions. This required some breaking changes from previous prerelease versions: The field policy scalar option and…

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.11

Minor Changes #13386 0be8fd8 Thanks @atharv-sys32! - Support skipToken with useSubscription to provide a more type-safe way to skip subscription execution with required variables. import { skipToken, useSubscription } from "@apollo/client/react"; // Use `skipToken` in place of `skip: true` for better type safety // for required variables const { data } = useSubscription( SUBSCRIPTION, id ? { varia…

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.10

Minor Changes #13421 d6197a4 Thanks @jerelmiller! - The minimum supported TypeScript version is now 5.9.x. #13337 2df711f Thanks @jcostello-atlassian! - Allow overriding the from input of useFragment, useSuspenseFragment, readFragment, writeFragment and related fragment APIs via a new FromOptionValue key on the TypeOverrides interface. By default, from continues to accept StoreObject | Reference |…

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.9

Minor Changes #13416 f2d5d5a Thanks @jerelmiller! - Add GraphQLCodegenIncremental type overrides that assemble GraphQL Codegen @defer operation types when dataState is "complete".

A
Apollo Client Dev Tools v4.2.12

@apollo/client@4.2.12

Patch Changes #13400 56ca81b Thanks @QiRaining! - Preserve multi-byte UTF-8 characters split across multipart response chunks.

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.7

Minor Changes #13406 bd74ccb Thanks @jerelmiller! - Emit a development-only warning when a feud is detected between queries that overwrite each other's data. This should make it easier to detect when you need to select a key field or add a merge function to a field policy. #13406 bd74ccb Thanks @jerelmiller! - Fixes an issue where cache feuds between queries selecting incompatible non-normalized d…

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.6

Minor Changes #13405 f923ab4 Thanks @jerelmiller! - Field policy read and merge functions are now ignored when the field policy configures the scalar option. If a read or merge function is provided alongside scalar, a development-only warning is emitted. Patch Changes #13408 7a5164d Thanks @jerelmiller! - Fix dataState to report "streaming" instead of "partial" when returnPartialData is true and t…

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.5

Minor Changes #13390 90e338c Thanks @jerelmiller! - Fix issue where sibling @defer fragments were pruned incorrectly when at least one of the @defer fragments wasn't delivered. As a result of this change, a label argument is now added to all outgoing @defer directives when using the GraphQL17Alpha9Handler in order to disambiguate the @defer fragments from each other. #13393 434d25f Thanks @jerelmi…

A
Apollo Client Dev Tools v4.2.11

@apollo/client@4.2.11

Patch Changes #13398 3dd3e9a Thanks @phryneas! - Fix type signature of some DocumentationTypes to fix their display in our documentation. #13392 d4f0771 Thanks @jerelmiller! - Add a development-only warning when a network result is written to the cache but reading the query back from the cache returns a partial result. This usually points at a merge or read function that did not repair missing fie…

A
Apollo Client Dev Tools v4.2.10

@apollo/client@4.2.10

Patch Changes #13385 bfb674e Thanks @jerelmiller! - Fix accidental widening of the client.mutate return type when optimisticResponse was present. #13382 365373e Thanks @jerelmiller! - Fix result types widened when a query's variables had constant types (e.g. TypedDocumentNode<Data, { type: "main" }>). This caused options such as returnPartialData or errorPolicy to be reported as their widened type…

A
Apollo Client Dev Tools v4.2.9

@apollo/client@4.2.9

Patch Changes #13364 2f383e7 Thanks @atharv-sys32! - Fix a bug where GraphQL variable default values were not applied during cache reads when variables with defaults were explicitly set to undefined. This caused @include/@skip directives to throw "Invalid variable referenced" errors when the variable was passed as undefined instead of being omitted entirely. #13367 2b39cc8 Thanks @jerelmiller! - F…

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.4

Patch Changes #13347 7d543d6 Thanks @jerelmiller! - Fix an issue where network-only incremental queries could cause cache data to leak into the emitted result when a @defer or @stream boundary already had complete data in the cache. Cache data inside pending @defer objects and @stream arrays are now pruned so that only completed @defer or @stream boundaries are returned. NOTE: This change only app…

A
Apollo Client Dev Tools v4.2.8

@apollo/client@4.2.8

Patch Changes #13349 501a33b Thanks @jerelmiller! - Prevent the setTimeout in connectToDevtools that shows the devtools suggestion from firing when the user agent does not match Chrome or Firefox. This check was previously done inside the setTimeout which meant the timer was scheduled for environments where we'd never show the message anyways. For test environments, this could cause flaky tests wh…

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.3

Minor Changes #13324 0abd8de Thanks @jerelmiller! - Fix the accuracy of dataState in complex incremental streaming scenarios, especially when combined with returnPartialData: true. Prior to this change, all intermediate chunks used for both @defer and @stream directives returned a dataState of streaming, regardless of whether the actual data shape fit the definition of the streaming data state. Th…

A
Apollo Client Dev Tools v4.2.7

@apollo/client@4.2.7

Patch Changes #13320 538c906 Thanks @jerelmiller! - Cleanup some unused internals. Please file an issue if you notice anything change.

A
Apollo Client Dev Tools v2.2.0-alpha

@apollo/client-graphql-codegen@2.2.0-alpha.0

Minor Changes #13310 8ab63fc Thanks @jerelmiller! - Introduce a new GraphQL Codegen plugin to generate the input object configuration needed to configure custom scalars for each field. // codegen.ts import type { CustomScalarsPluginConfig } from "@apollo/client-graphql-codegen/custom-scalars"; const config: CodegenConfig = { // ... generates: { "./path/to/custom-scalars.ts": { plugins: ["@apollo/c…

A
Apollo Client Dev Tools v4.2.6

@apollo/client@4.2.6

Patch Changes #13315 a406cc9 Thanks @fallintoplace! - Prevent relay multipart subscriptions from issuing a fetch request after serializing the request body fails. #13307 abd0781 Thanks @wolfie! - Speed up cache writes by avoiding a full AST visit of every written field to detect @stream. The check now runs only when the result carries stream info, and only inspects the field node's own directives.…

A
Apollo Client Dev Tools v4.2.5

@apollo/client@4.2.5

Patch Changes #13302 bb75dd3 Thanks @tpict! - Export KeyArgsFunction and RelayFieldPolicy types from public entrypoints.

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.2

Minor Changes #13274 7b10078 Thanks @jerelmiller! - Adds Scalar.fromGraphQLScalarType helper to create a Scalar instance from an existing graphql.js GraphQLScalarType. import { GraphQLScalarType } from "graphql"; import { Scalar } from "@apollo/client"; const dateTimeScalarType = new GraphQLScalarType<Date, string>({ // ... }); const dateTimeScalar = Scalar.fromGraphQLScalarType(dateTimeScalarType…

A
Apollo Client Dev Tools v4.2.4

@apollo/client@4.2.4

Patch Changes #13281 e4df809 Thanks @jerelmiller! - Fixes an issue where client.readFragment and client.readQuery ignored the optimistic option when passed in the options object.

A
Apollo Client Dev Tools v4.3.0-alpha

@apollo/client@4.3.0-alpha.1

Patch Changes #13268 419e2b5 Thanks @DaleSeo! - Align the remaining cache generic constraints with Cache.Implementation. The deprecated React mutation types (MutationHookOptions, MutationFunctionOptions, MutationTuple) and the internal InternalRefetchQueriesOptions and QueryInfo types still constrained their cache type parameter to ApolloCache, so they now match the rest of the overridable cache A…