# Apollo client - field policies - field policy for READ at type level not field level

**URL:** <https://community.apollographql.com/t/apollo-client-field-policies-field-policy-for-read-at-type-level-not-field-level/3725>\
**Category:** Client SDKs\
**Tags:** client, web\
**Created:** [June 12, 2022, 2:54pm UTC](https://community.apollographql.com/t/apollo-client-field-policies-field-policy-for-read-at-type-level-not-field-level/3725 "2022-06-12T14:54:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelvin2212](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/kelvin2212/32/2505_2.png) [@kelvin2212](https://community.apollographql.com/u/kelvin2212)\
**Post date:** [June 12, 2022, 2:54pm UTC](https://community.apollographql.com/t/apollo-client-field-policies-field-policy-for-read-at-type-level-not-field-level/3725/1 "2022-06-12T14:54:55Z")

</div>

Hello everybody,

I can’t seem to find a way to read an entire type without having to resort to individual fieldPolicies for every field in that type.

```javascript
const cache = new InMemoryCache({
    typePolicies: {
        SomeType: {
            fields:{
                // defining individual field (READ) policies would be insane (at least for my case)
                // is there at least something like a wildcard mechanism?
            },
            merge, // yeah... possible at type level
            // read ??? not possible, so... Is there any other way to do this? I want to be able to return a different ref based on some condition
        }
    }
})

```

---

<div class="post-metadata">

**Author:** ![hwillson](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/hwillson/32/9_2.png) [@hwillson](https://community.apollographql.com/u/hwillson)\
**Post date:** [June 13, 2022, 2:11pm UTC](https://community.apollographql.com/t/apollo-client-field-policies-field-policy-for-read-at-type-level-not-field-level/3725/2 "2022-06-13T14:11:41Z")

</div>

@kelvin2212 can you share an example of your query?

---

<div class="post-metadata">

**Author:** ![kelvin2212](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/kelvin2212/32/2505_2.png) [@kelvin2212](https://community.apollographql.com/u/kelvin2212)\
**Post date:** [June 13, 2022, 4:26pm UTC](https://community.apollographql.com/t/apollo-client-field-policies-field-policy-for-read-at-type-level-not-field-level/3725/3 "2022-06-13T16:26:17Z")

</div>

```javascript
query GetUser($id: String!){
    user(where: $id){
        firstName 
        lastName
        organization{
            id
            // someType is of type SomeType as in the question
            // nested explicitly to avoid an answer where one would say
            // "you can add a field policy on Query"
            // that solution won't work given that
            // SomeType is part of more than one query and always nested
            someType{
                id
            }
        }
    }
}

```

Need to intercept the read at a type level

---

<div class="post-metadata">

**Author:** ![kelvin2212](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/kelvin2212/32/2505_2.png) [@kelvin2212](https://community.apollographql.com/u/kelvin2212)\
**Post date:** [July 11, 2022, 7:50am UTC](https://community.apollographql.com/t/apollo-client-field-policies-field-policy-for-read-at-type-level-not-field-level/3725/4 "2022-07-11T07:50:52Z")

</div>

Can you please share your thoughts?

---

<div class="post-metadata">

**Author:** ![JeffAuriemma](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/jeffauriemma/32/2845_2.png) [@JeffAuriemma](https://community.apollographql.com/u/JeffAuriemma)\
**Post date:** [April 25, 2024, 4:49pm UTC](https://community.apollographql.com/t/apollo-client-field-policies-field-policy-for-read-at-type-level-not-field-level/3725/5 "2024-04-25T16:49:07Z")

</div>

Can you tell me more about the use case here? I’m not aware of a specific API to achieve this but it feels like a bit of a code smell. If you could provide more info as to why you need to intercept a read, I think I can help you out with more precision.
