# startTransition with fetchMore (merge data) return incoming for a sec first then return merged data

**URL:** https://community.apollographql.com/t/starttransition-with-fetchmore-merge-data-return-incoming-for-a-sec-first-then-return-merged-data/7101
**Category:** Client SDKs
**Tags:** client, web
**Created:** [January 7, 2024, 3:18pm UTC](https://community.apollographql.com/t/starttransition-with-fetchmore-merge-data-return-incoming-for-a-sec-first-then-return-merged-data/7101 "2024-01-07T15:18:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![thasuohm](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/thasuohm/32/4845_2.png) [@thasuohm](https://community.apollographql.com/u/thasuohm)
#### Post date: [January 7, 2024, 3:18pm UTC](https://community.apollographql.com/t/starttransition-with-fetchmore-merge-data-return-incoming-for-a-sec-first-then-return-merged-data/7101/1 "2024-01-07T15:18:17Z")

</div>

I want to make a page with Infinite Scroll so I need to merge data when fetchMore()  
But when it calls function fetchMore() with startTransition

**AS**  
it doesn’t return merged data but it return incoming data first for a sec then it return merged data  
this not happen when I don’t wrap fetchMore() with startTransition  
or use fetchMore() from useQuery()

**EXPECT:**  
it should return merged data without return incoming data first

example console.log() result  
limit = 5  
here is a step of the log that I see

- first query = [10,9,8,7,6]
- call fetchMore() with startTransition
  - query = [5,4,3,2,1]
  - query = [10,9,8,7,6,5,4,3,2,1]

My dependency version  
Next.js: 14.0.2  
@apollo/client: 3.8.8  
@apollo/experimental-nextjs-app-support: 0.6.0

My Apollo client wrapper is the same as this  
[https://github.com/apollographql/apollo-client-nextjs?tab=readme-ov-file#in-ssr](https://github.com/apollographql/apollo-client-nextjs?tab=readme-ov-file#in-ssr)

here is my type policy

```auto
const typePolicies: TypePolicies = {
  MyQuery: {
    fields: {
      range: {
        merge: (existing, incoming) => {
          return deepmerge(existing, incoming)
        },
        keyArgs: false,
      },
    },
  },
}

```

here is my query code

```auto
  const {data, fetchMore} = useSuspenseQuery(Query)
  const {query} = data

  const loadMore = () => {
    startTransition(() => {
      fetchMore({
        variables: {
          before: query.range.data[query.range.data.length - 1].id,
        },
      })
    })
  }

```

---

<div class="post-metadata">

### Author: ![jerelmiller](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jerelmiller/32/3314_2.png) [@jerelmiller](https://community.apollographql.com/u/jerelmiller)
#### Post date: [January 11, 2024, 3:31pm UTC](https://community.apollographql.com/t/starttransition-with-fetchmore-merge-data-return-incoming-for-a-sec-first-then-return-merged-data/7101/2 "2024-01-11T15:31:53Z")

</div>

Hey @thasuohm 👋

This looks an awful lot like [this outstanding issue](https://github.com/apollographql/apollo-client/issues/11315) in our repo. Is the behavior described in that issue similar to what you’re seeing? If so, apologies, we haven’t prioritized this fix yet (though based on the number of reactions, we probably should soon).
