@@ -28,7 +28,7 @@ import {
2828import { GraphQL17Alpha9Handler } from "@apollo/client/incremental" ;
2929import {
3030 markAsStreaming ,
31- mockDefer20220824 ,
31+ mockDeferStreamGraphQL17Alpha9 ,
3232 ObservableStream ,
3333 wait ,
3434} from "@apollo/client/testing/internal" ;
@@ -2379,9 +2379,8 @@ test("GraphQL17Alpha9Handler can be used with `ApolloClient`", async () => {
23792379 } ) ;
23802380} ) ;
23812381
2382- // TODO: Add test helpers for new format
2383- test . failing ( "merges cache updates that happen concurrently" , async ( ) => {
2384- const stream = mockDefer20220824 ( ) ;
2382+ test ( "merges cache updates that happen concurrently" , async ( ) => {
2383+ const stream = mockDeferStreamGraphQL17Alpha9 ( ) ;
23852384 const client = new ApolloClient ( {
23862385 link : stream . httpLink ,
23872386 cache : new InMemoryCache ( ) ,
@@ -2418,6 +2417,7 @@ test.failing("merges cache updates that happen concurrently", async () => {
24182417 job : "Farmer" ,
24192418 } ,
24202419 } ,
2420+ pending : [ { id : "0" , path : [ "hero" ] } ] ,
24212421 hasNext : true ,
24222422 } ) ;
24232423
@@ -2453,9 +2453,10 @@ test.failing("merges cache updates that happen concurrently", async () => {
24532453 data : {
24542454 name : "Luke" ,
24552455 } ,
2456- path : [ "hero" ] ,
2456+ id : "0" ,
24572457 } ,
24582458 ] ,
2459+ completed : [ { id : "0" } ] ,
24592460 hasNext : false ,
24602461 } ) ;
24612462
@@ -2650,9 +2651,8 @@ test("stream that returns an error but continues to stream", async () => {
26502651 } ) ;
26512652} ) ;
26522653
2653- // TODO: Update to use test utils with updated types
2654- test . skip ( "handles final chunk of { hasNext: false } correctly in usage with Apollo Client" , async ( ) => {
2655- const stream = mockDefer20220824 ( ) ;
2654+ test ( "handles final chunk of { hasNext: false } correctly in usage with Apollo Client" , async ( ) => {
2655+ const stream = mockDeferStreamGraphQL17Alpha9 ( ) ;
26562656 const client = new ApolloClient ( {
26572657 link : stream . httpLink ,
26582658 cache : new InMemoryCache ( ) ,
@@ -2675,6 +2675,7 @@ test.skip("handles final chunk of { hasNext: false } correctly in usage with Apo
26752675 data : {
26762676 allProducts : [ null , null , null ] ,
26772677 } ,
2678+ pending : [ ] ,
26782679 errors : [
26792680 {
26802681 message :
0 commit comments