Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0a88616
Add a new SubscribeResult type
jerelmiller Mar 24, 2025
7c6ae8f
Move getSerializableProperties helper to own file
jerelmiller Mar 24, 2025
5e7b23e
Add a toEmitStrictTyped matcher
jerelmiller Mar 24, 2025
fb6b575
Add deprecations for other matchers
jerelmiller Mar 24, 2025
d95b32d
Update subscription result to return SubscribeResult
jerelmiller Mar 24, 2025
c97a7b0
Use MockSubscriptionLink directly in graphqlSubscriptions tests
jerelmiller Mar 24, 2025
5f05a50
Update subscription type on ApolloClient
jerelmiller Mar 24, 2025
cac6e19
Use toEmitStrictTyped in graphqlSubscriptions tests
jerelmiller Mar 24, 2025
e9d7a12
Don't emit protocol errors symbol in extensions
jerelmiller Mar 24, 2025
1307585
Don't emit a subscription result if there is no data or errors
jerelmiller Mar 24, 2025
3d55a8d
Update error behavior in graphqlSubscriptions tests
jerelmiller Mar 24, 2025
4712c1d
Update dataMasking tests for new error handling
jerelmiller Mar 24, 2025
4edcea5
Move filter to end of chain
jerelmiller Mar 24, 2025
f855e84
Allow network errors emitted in subscriptions to adhere to errorPolicy
jerelmiller Mar 24, 2025
1747117
Handle network errors with errorPolicy none the same as GraphQL errors
jerelmiller Mar 24, 2025
37eb588
Handle errors in next for subscribeToMore
jerelmiller Mar 24, 2025
b656d3e
Use toEmitStrictTyped in some more tests
jerelmiller Mar 25, 2025
96d3e76
Update error wrapping tests with new error behavior for subscriptions
jerelmiller Mar 25, 2025
d3505ee
Update type of observable in useSubscription
jerelmiller Mar 25, 2025
48fe28a
Don't wrap errors in useSubscription
jerelmiller Mar 25, 2025
19bbc95
Use tick instead of waitFor
jerelmiller Mar 25, 2025
e168bb9
Update useSubscription tests to new error behavior
jerelmiller Mar 25, 2025
acc9e1e
Remove error callback in useSubscription
jerelmiller Mar 25, 2025
01683ff
Remove unused import
jerelmiller Mar 25, 2025
b73e026
Rerun api report
jerelmiller Mar 25, 2025
caa2f4b
Update size limits
jerelmiller Mar 25, 2025
40f509d
Add changesets
jerelmiller Mar 25, 2025
9061d6b
Add test that shows new results after error
jerelmiller Mar 25, 2025
1244fa7
Remove unused import
jerelmiller Mar 25, 2025
6dfe074
Add test that shows useMutation can get new results after error
jerelmiller Mar 25, 2025
5dda3db
Add restart to useSubscription.Result
jerelmiller Mar 25, 2025
10dae02
Create an OnDataResult type
jerelmiller Mar 25, 2025
b474106
Rerun api report
jerelmiller Mar 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .api-reports/api-report-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class ApolloClient implements DataProxy_2 {
setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void;
setResolvers(resolvers: Resolvers | Resolvers[]): void;
stop(): void;
subscribe<TData = unknown, TVariables extends OperationVariables = OperationVariables>(options: SubscriptionOptions<TVariables, TData>): Observable<FetchResult_2<MaybeMasked_2<TData>>>;
subscribe<TData = unknown, TVariables extends OperationVariables = OperationVariables>(options: SubscriptionOptions<TVariables, TData>): Observable<SubscribeResult<MaybeMasked_2<TData>>>;
// (undocumented)
readonly typeDefs: ApolloClientOptions["typeDefs"];
// (undocumented)
Expand Down Expand Up @@ -1823,7 +1823,7 @@ class QueryManager {
// (undocumented)
readonly ssrMode: boolean;
// (undocumented)
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<FetchResult_2<TData>>;
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<SubscribeResult<TData>>;
stop(): void;
// (undocumented)
stopQuery(queryId: string): void;
Expand Down Expand Up @@ -2109,6 +2109,13 @@ class Stump extends Layer {
removeLayer(): this;
}

// @public (undocumented)
export interface SubscribeResult<TData = unknown> {
data: TData | undefined;
error?: ErrorLike;
extensions?: Record<string, unknown>;
}

// @public (undocumented)
export interface SubscribeToMoreFunction<TData, TVariables extends OperationVariables = OperationVariables> {
// (undocumented)
Expand Down Expand Up @@ -2328,8 +2335,8 @@ interface WriteContext extends ReadMergeModifyContext {
// src/cache/inmemory/types.ts:133:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:128:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:129:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:185:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:456:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:458:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/link/http/selectHttpOptionsAndBody.ts:128:1 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)
Expand Down
32 changes: 19 additions & 13 deletions .api-reports/api-report-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ class ApolloClient_2 implements DataProxy {
setResolvers(resolvers: Resolvers | Resolvers[]): void;
stop(): void;
// Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts
subscribe<TData = unknown, TVariables extends OperationVariables_2 = OperationVariables_2>(options: SubscriptionOptions<TVariables, TData>): Observable<FetchResult<MaybeMasked<TData>>>;
// Warning: (ae-forgotten-export) The symbol "SubscribeResult" needs to be exported by the entry point index.d.ts
subscribe<TData = unknown, TVariables extends OperationVariables_2 = OperationVariables_2>(options: SubscriptionOptions<TVariables, TData>): Observable<SubscribeResult<MaybeMasked<TData>>>;
// Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -870,7 +871,7 @@ class QueryManager {
// (undocumented)
readonly ssrMode: boolean;
// (undocumented)
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<FetchResult<TData>>;
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<SubscribeResult<TData>>;
stop(): void;
// (undocumented)
stopQuery(queryId: string): void;
Expand Down Expand Up @@ -995,6 +996,13 @@ export type SkipToken = typeof skipToken;
// @public (undocumented)
export const skipToken: unique symbol;

// @public (undocumented)
interface SubscribeResult<TData = unknown> {
data: TData | undefined;
error?: ErrorLike;
extensions?: Record<string, unknown>;
}

// @public (undocumented)
interface SubscribeToMoreOptions<TData = unknown, TSubscriptionVariables extends OperationVariables_2 = OperationVariables_2, TSubscriptionData = TData, TVariables extends OperationVariables_2 = TSubscriptionVariables> {
// (undocumented)
Expand Down Expand Up @@ -1464,13 +1472,7 @@ export namespace useReadQuery {
export type UseReadQueryResult<TData = unknown> = useReadQuery_2.Result<TData>;

// @public
export function useSubscription<TData = unknown, TVariables extends OperationVariables = OperationVariables>(subscription: DocumentNode | TypedDocumentNode_2<TData, TVariables>, options?: useSubscription.Options<NoInfer_2<TData>, NoInfer_2<TVariables>>): {
restart: () => void;
loading: boolean;
data?: TData | undefined;
error?: ErrorLike_2;
variables?: TVariables | undefined;
};
export function useSubscription<TData = unknown, TVariables extends OperationVariables = OperationVariables>(subscription: DocumentNode | TypedDocumentNode_2<TData, TVariables>, options?: useSubscription.Options<NoInfer_2<TData>, NoInfer_2<TVariables>>): useSubscription.Result<TData, TVariables>;

// @public (undocumented)
export namespace useSubscription {
Expand All @@ -1479,14 +1481,16 @@ export namespace useSubscription {
// (undocumented)
client: ApolloClient;
// (undocumented)
data: Result<TData>;
data: OnDataResult<TData>;
}
// (undocumented)
export type OnDataResult<TData = unknown> = Omit<Result<TData>, "restart">;
// (undocumented)
export interface OnSubscriptionDataOptions<TData = unknown> {
// (undocumented)
client: ApolloClient;
// (undocumented)
subscriptionData: Result<TData>;
subscriptionData: OnDataResult<TData>;
}
// (undocumented)
export interface Options<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
Expand All @@ -1512,6 +1516,8 @@ export namespace useSubscription {
data?: MaybeMasked<TData>;
error?: ErrorLike_2;
loading: boolean;
// (undocumented)
restart: () => void;
// @internal (undocumented)
variables?: TVariables;
}
Expand Down Expand Up @@ -1655,8 +1661,8 @@ interface WatchQueryOptions_2<TVariables extends OperationVariables_2 = Operatio
// src/core/LocalState.ts:71:3 - (ae-forgotten-export) The symbol "ApolloClient_2" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:128:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:129:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:185:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:456:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:458:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:204:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
// src/core/types.ts:233:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:195:3 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts
Expand Down
32 changes: 19 additions & 13 deletions .api-reports/api-report-react_hooks.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ class ApolloClient_2 implements DataProxy {
setResolvers(resolvers: Resolvers | Resolvers[]): void;
stop(): void;
// Warning: (ae-forgotten-export) The symbol "SubscriptionOptions" needs to be exported by the entry point index.d.ts
subscribe<TData = unknown, TVariables extends OperationVariables_2 = OperationVariables_2>(options: SubscriptionOptions<TVariables, TData>): Observable<FetchResult<MaybeMasked<TData>>>;
// Warning: (ae-forgotten-export) The symbol "SubscribeResult" needs to be exported by the entry point index.d.ts
subscribe<TData = unknown, TVariables extends OperationVariables_2 = OperationVariables_2>(options: SubscriptionOptions<TVariables, TData>): Observable<SubscribeResult<MaybeMasked<TData>>>;
// Warning: (ae-forgotten-export) The symbol "ApolloClientOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -686,7 +687,7 @@ class QueryManager {
// (undocumented)
readonly ssrMode: boolean;
// (undocumented)
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<FetchResult<TData>>;
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<SubscribeResult<TData>>;
stop(): void;
// (undocumented)
stopQuery(queryId: string): void;
Expand Down Expand Up @@ -796,6 +797,13 @@ export type SkipToken = typeof skipToken;
// @public (undocumented)
export const skipToken: unique symbol;

// @public (undocumented)
interface SubscribeResult<TData = unknown> {
data: TData | undefined;
error?: ErrorLike;
extensions?: Record<string, unknown>;
}

// @public (undocumented)
interface SubscribeToMoreOptions<TData = unknown, TSubscriptionVariables extends OperationVariables_2 = OperationVariables_2, TSubscriptionData = TData, TVariables extends OperationVariables_2 = TSubscriptionVariables> {
// (undocumented)
Expand Down Expand Up @@ -1235,13 +1243,7 @@ export namespace useReadQuery {
}

// @public
export function useSubscription<TData = unknown, TVariables extends OperationVariables = OperationVariables>(subscription: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useSubscription.Options<NoInfer_2<TData>, NoInfer_2<TVariables>>): {
restart: () => void;
loading: boolean;
data?: TData | undefined;
error?: ErrorLike_2;
variables?: TVariables | undefined;
};
export function useSubscription<TData = unknown, TVariables extends OperationVariables = OperationVariables>(subscription: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: useSubscription.Options<NoInfer_2<TData>, NoInfer_2<TVariables>>): useSubscription.Result<TData, TVariables>;

// @public (undocumented)
export namespace useSubscription {
Expand All @@ -1250,14 +1252,16 @@ export namespace useSubscription {
// (undocumented)
client: ApolloClient;
// (undocumented)
data: Result<TData>;
data: OnDataResult<TData>;
}
// (undocumented)
export type OnDataResult<TData = unknown> = Omit<Result<TData>, "restart">;
// (undocumented)
export interface OnSubscriptionDataOptions<TData = unknown> {
// (undocumented)
client: ApolloClient;
// (undocumented)
subscriptionData: Result<TData>;
subscriptionData: OnDataResult<TData>;
}
// (undocumented)
export interface Options<TData = unknown, TVariables extends OperationVariables = OperationVariables> {
Expand All @@ -1283,6 +1287,8 @@ export namespace useSubscription {
data?: MaybeMasked<TData>;
error?: ErrorLike_2;
loading: boolean;
// (undocumented)
restart: () => void;
// @internal (undocumented)
variables?: TVariables;
}
Expand Down Expand Up @@ -1417,8 +1423,8 @@ interface WatchQueryOptions_2<TVariables extends OperationVariables_2 = Operatio
// src/core/LocalState.ts:71:3 - (ae-forgotten-export) The symbol "ApolloClient_2" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:128:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:129:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:185:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:456:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:458:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/types.ts:204:3 - (ae-forgotten-export) The symbol "MutationQueryReducer" needs to be exported by the entry point index.d.ts
// src/core/types.ts:233:5 - (ae-forgotten-export) The symbol "Resolver" needs to be exported by the entry point index.d.ts
// src/core/watchQueryOptions.ts:195:3 - (ae-forgotten-export) The symbol "UpdateQueryOptions" needs to be exported by the entry point index.d.ts
Expand Down
15 changes: 11 additions & 4 deletions .api-reports/api-report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class ApolloClient implements DataProxy {
setLocalStateFragmentMatcher(fragmentMatcher: FragmentMatcher): void;
setResolvers(resolvers: Resolvers | Resolvers[]): void;
stop(): void;
subscribe<TData = unknown, TVariables extends OperationVariables = OperationVariables>(options: SubscriptionOptions<TVariables, TData>): Observable<FetchResult<MaybeMasked<TData>>>;
subscribe<TData = unknown, TVariables extends OperationVariables = OperationVariables>(options: SubscriptionOptions<TVariables, TData>): Observable<SubscribeResult<MaybeMasked<TData>>>;
// (undocumented)
readonly typeDefs: ApolloClientOptions["typeDefs"];
// (undocumented)
Expand Down Expand Up @@ -1939,7 +1939,7 @@ class QueryManager {
// (undocumented)
readonly ssrMode: boolean;
// (undocumented)
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<FetchResult<TData>>;
startGraphQLSubscription<TData = unknown>(options: SubscriptionOptions): Observable<SubscribeResult<TData>>;
stop(): void;
// (undocumented)
stopQuery(queryId: string): void;
Expand Down Expand Up @@ -2233,6 +2233,13 @@ class Stump extends Layer {
removeLayer(): this;
}

// @public (undocumented)
export interface SubscribeResult<TData = unknown> {
data: TData | undefined;
error?: ErrorLike;
extensions?: Record<string, unknown>;
}

// @public (undocumented)
export interface SubscribeToMoreFunction<TData, TVariables extends OperationVariables = OperationVariables> {
// (undocumented)
Expand Down Expand Up @@ -2470,8 +2477,8 @@ interface WriteContext extends ReadMergeModifyContext {
// src/cache/inmemory/types.ts:133:3 - (ae-forgotten-export) The symbol "KeyFieldsFunction" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:128:5 - (ae-forgotten-export) The symbol "QueryManager" needs to be exported by the entry point index.d.ts
// src/core/ObservableQuery.ts:129:5 - (ae-forgotten-export) The symbol "QueryInfo" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:185:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:456:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:187:5 - (ae-forgotten-export) The symbol "MutationStoreValue" needs to be exported by the entry point index.d.ts
// src/core/QueryManager.ts:458:7 - (ae-forgotten-export) The symbol "UpdateQueries" needs to be exported by the entry point index.d.ts
// src/link/http/selectHttpOptionsAndBody.ts:128:1 - (ae-forgotten-export) The symbol "HttpQueryOptions" needs to be exported by the entry point index.d.ts

// (No @packageDocumentation comment for this package)
Expand Down
5 changes: 5 additions & 0 deletions .changeset/forty-shrimps-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": major
---

Subscriptions now emit a `SubscribeResult` instead of a `FetchResult`. As a result, the `errors` field has been removed in favor of `error`.
5 changes: 5 additions & 0 deletions .changeset/real-teachers-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": major
---

Unify error behavior on subscriptions for GraphQL errors and network errors by ensuring network errors are subject to the `errorPolicy`. Network errors that terminate the connection will now be emitted on the `error` property passed to the `next` callback followed by a call to the `complete` callback.
5 changes: 5 additions & 0 deletions .changeset/tricky-tables-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@apollo/client": major
---

GraphQL errors or network errors emitted while using an `errorPolicy` of `ignore` in subscriptions will no longer emit a result if there is no `data` emitted along with the error.
7 changes: 7 additions & 0 deletions .changeset/warm-ties-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@apollo/client": major
---

Subscriptions no longer emit errors in the `error` callback and instead provide errors on the `error` property on the result passed to the `next` callback. As a result, errors will no longer automatically terminate the connection allowing additional results to be emitted when the connection stays open.

When an error terminates the downstream connection, a `next` event will be emitted with an `error` property followed by a `complete` event instead.
8 changes: 4 additions & 4 deletions .size-limits.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 42184,
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 37665,
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 32637,
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27537
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (CJS)": 42313,
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production) (CJS)": 37697,
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\"": 32739,
"import { ApolloClient, InMemoryCache, HttpLink } from \"@apollo/client\" (production)": 27589
}
16 changes: 11 additions & 5 deletions src/__tests__/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6253,7 +6253,7 @@ describe("custom document transforms", () => {
});

describe("unconventional errors", () => {
test("wraps error mesage in Error type when erroring with a string", async () => {
test("wraps error message in Error type when erroring with a string", async () => {
const query = gql`
query {
hello
Expand All @@ -6277,7 +6277,7 @@ describe("unconventional errors", () => {

const stream = new ObservableStream(client.watchQuery({ query }));

await expect(stream).toEmitApolloQueryResult({
await expect(stream).toEmitStrictTyped({
data: undefined,
error: expectedError,
loading: false,
Expand All @@ -6304,7 +6304,10 @@ describe("unconventional errors", () => {
});
const subscriptionStream = new ObservableStream(subscription);

await expect(subscriptionStream).toEmitError(expectedError);
await expect(subscriptionStream).toEmitStrictTyped({
data: undefined,
error: expectedError,
});
});

test("wraps unconventional types in UnconventionalError", async () => {
Expand Down Expand Up @@ -6332,7 +6335,7 @@ describe("unconventional errors", () => {

const stream = new ObservableStream(client.watchQuery({ query }));

await expect(stream).toEmitApolloQueryResult({
await expect(stream).toEmitStrictTyped({
data: undefined,
error: expectedError,
loading: false,
Expand All @@ -6359,7 +6362,10 @@ describe("unconventional errors", () => {
});
const subscriptionStream = new ObservableStream(subscription);

await expect(subscriptionStream).toEmitError(expectedError);
await expect(subscriptionStream).toEmitStrictTyped({
data: undefined,
error: expectedError,
});
}
});
});
Expand Down
Loading