# Should we return all resolver fields for an extended entity?

**URL:** <https://community.apollographql.com/t/should-we-return-all-resolver-fields-for-an-extended-entity/1541>\
**Category:** Schema Design\
**Tags:** federation\
**Created:** [October 1, 2021, 8:38am UTC](https://community.apollographql.com/t/should-we-return-all-resolver-fields-for-an-extended-entity/1541 "2021-10-01T08:38:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicoowr](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/nicoowr/32/170_2.png) [@Nicoowr](https://community.apollographql.com/u/Nicoowr)\
**Post date:** [October 1, 2021, 8:38am UTC](https://community.apollographql.com/t/should-we-return-all-resolver-fields-for-an-extended-entity/1541/1 "2021-10-01T08:38:58Z")

</div>

Let’s say I have this schema:

```auto
# Service A
type Product @key(fields: "id") {
  id: ID!
}

# Service B
extend type Product @key(fields: "id") {
  id: ID! @external
  foo: Int
  bar: String!
}

type Review {
  product: Product!
}

```

If Service B did not add any field to `Product`, I’d just return a representation for `Product` resolver in `Review` like this:

```auto
(productId) => ({
  type: "Product",
  id: productId
})

```

However, here there are 2 additional fields `foo` and `bar`. These fields are resolved like this:

```auto
const resolvers = {
  Product: {
    foo: fooResolver,
    bar: barResolver,
  },
  Review: {
    product: (review) => ({ type: "Product", id: review.productId}) // do I need to add foo & bar resolvers?
  }
}

```

The question is: **do I need to add `foo` & `bar` resolvers when I’m returning the representation of Product?**

In any case, I’m using `graphql-codegen` to generate my resolvers types, and it compels me to do so. But I find very laborious to add all the fields resolvers anytime I’m returning a representation…

Any thought about this?
