understand how works cache with same types(fragment) for different Queries

hi, a try to understand how works cache with same types(fragment) for different Queries:
i have 2 queries like:
1:

 query CompanyBrand($companyId: String!) {
    data: companiesGetById(companyId: $companyId) {
      ...CompanyBrandSchema
    }
  }
  fragment CompanyBrandSchema on Company {
    id
    brand
  }

2:

  query ProjectsDeepGetById($projectId: String!) {
    data: projectsGetById(projectId: $projectId) {
      id
      name
      company: {
        logo
        ... CompanyBrandSchema
      }
    }
  }
 fragment CompanyBrandSchema on Company {
    id
    brand
  }

I call first query by useQuery with ‘cache-only’ and it return undefined
then i call second by useQuery with ‘cache-and-network’. Data loaded. Cache updated - Company:123 has brand value. But first use useQuery not updated and still contain empty value

The problem here is that apollo client has no way of knowing that the companiesGetById(companyId: $companyId) query will return a Company with the id $companyId. It might seem obvious to you and me that this is what you want, but apollo client can’t assume things like this because technically the server could return a completely different Company than the one you asked for. Take a look at the Cache Redirects section in the docs and see if that helps: Advanced topics on caching in Apollo Client - Client (React) - Apollo GraphQL Docs