# ApolloQueryResult returning partial data in @apollo/client@^3.6.9 with nextFetchPolicy: 'cache-only'

**URL:** <https://community.apollographql.com/t/apolloqueryresult-returning-partial-data-in-apollo-client-3-6-9-with-nextfetchpolicy-cache-only/5416>\
**Category:** Client SDKs\
**Tags:** client, web\
**Created:** [January 6, 2023, 1:14pm UTC](https://community.apollographql.com/t/apolloqueryresult-returning-partial-data-in-apollo-client-3-6-9-with-nextfetchpolicy-cache-only/5416 "2023-01-06T13:14:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KeithGillette](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/keithgillette/32/2415_2.png) [@KeithGillette](https://community.apollographql.com/u/KeithGillette)\
**Post date:** [January 6, 2023, 1:14pm UTC](https://community.apollographql.com/t/apolloqueryresult-returning-partial-data-in-apollo-client-3-6-9-with-nextfetchpolicy-cache-only/5416/1 "2023-01-06T13:14:06Z")

</div>

As detailed in `@apollo/client` [GitHub issue #9923](https://github.com/apollographql/apollo-client/issues/9923), the behavior of `ApolloQueryResult` and `nextFetchPolicy: 'cache-only'` changed in `@apollo/client@3.6.9` such that some queries in our project are returning results with `partial: true` with `nextFetchPolicy: 'cache-only'` (which we have set in our project to prevent refetching queries on `cache.evict()` while still getting cache updates from other requests/explicit refetches). Partial data is incorrectly returned in both `ObservableQuery` (Apollo Angular `QueryRef.valueChanges` Observable `ApolloQueryResult`) emissions and in `ObservableQuery.result()` subscriptions.

The problem seems to be restricted to queries on custom types which have field parameters on multiple array fields similar to the simplified example below. Our application has multiple queries on the same parent document, some of which return only the non-Array properties, some only the `_id` and one array property (“ParentReadList1’”), some only the `_id` and another array property (“ParentListRead2”). We observer these queries being sent over the network and the data returned includes all the correct fields but the local ObservableQueries are sometimes emitting partial results to their respective consumers, specifically just objects with `_id` and `__typename` fields, not the requested `childListN` arrays. Perhaps we have multiple queries in flight simultaneously with requests for the same Parent but different fields and the local ObservableQueries are being fulfilled from the result of a differently shaped query on the same Parent `_id`? I’m not sure why that would happen with the default `partial: false` setting but that’s as close as I’ve been able to narrow the problematic new behavior in 3.6.9 (persisting through the latest 3.7.3 release) down to so far.

```graphql
type Parent {
  _id: ID!
  name: String!
  childList1 (someParameter: String!: [Child!]
  childList2 (someParameter: String!): [Child!]
}

query ParentRead($id: ID!, $list1Filter: String) {
  Parent(id: $id) {
    id
    name
  }
} 

query ParentReadList1($id: ID!, $list1Filter: String) {
  Parent(id: $id) {
    id
    name
    childList1(filter: $list1Filter) {
      id
      name
    }
  }
}

query ParentReadList2($id: ID!, $list1Filter: String) {
  Parent(id: $id) {
    id
    name
    childList2(filter: $list1Filter) {
      id
      name
    }
  }
}

```

Unfortunately, I have not yet been able to reproduce this behavior in [a simplified reproduction](https://stackblitz.com/edit/simple-apollo-angular-example-1oqcjj?file=src/app/list.component.ts) of this type of query using local resolvers. Any pointers on further troubleshooting and diagnosis are greatly appreciated!
