# How to use entites to map one field name with another field name in graphql?

**URL:** <https://community.apollographql.com/t/how-to-use-entites-to-map-one-field-name-with-another-field-name-in-graphql/5543>\
**Category:** Schema Design\
**Tags:** federation, entities\
**Created:** [January 23, 2023, 10:58am UTC](https://community.apollographql.com/t/how-to-use-entites-to-map-one-field-name-with-another-field-name-in-graphql/5543 "2023-01-23T10:58:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lokesh\_reddy](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/lokesh_reddy/32/3762_2.png) [@Lokesh\_reddy](https://community.apollographql.com/u/Lokesh_reddy)\
**Post date:** [January 23, 2023, 10:58am UTC](https://community.apollographql.com/t/how-to-use-entites-to-map-one-field-name-with-another-field-name-in-graphql/5543/1 "2023-01-23T10:58:18Z")

</div>

suppose consider,  
i’m having two services named bats and balls, in that used entites of balls to fetch the data of balls in bats using the sharable, the real problem i’m facing is i need to have two more fields in the bat so that they can be mapped to the “customerid” which is a field in balls, how to map this thing???

---

<div class="post-metadata">

**Author:** ![dylan](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/dylan/32/6009_2.png) [@dylan](https://community.apollographql.com/u/dylan)\
**Post date:** [January 23, 2023, 5:52pm UTC](https://community.apollographql.com/t/how-to-use-entites-to-map-one-field-name-with-another-field-name-in-graphql/5543/2 "2023-01-23T17:52:45Z")

</div>

I’m not sure I follow, can you provide the current schemas of the subgraphs as well as the desired ones? For instance you might say:

## I have this

### Balls Service

```graphql
type Ball @shareable {
  id: ID!
}

```

### Bats Service

```graphql
type Bat @key(fields: "id") {
  id: ID!
  balls: [Ball!]!
}

type Ball @shareable {
  id: ID!
}

```

## What I want is this

### Balls Service

```graphql
type Ball @key(fields: "id") {
  id: ID!
  customerid: ID!
}

```

### Bats Service

```graphql
type Bat @key(fields: "id") {
  id: ID!
  balls: [Ball!]!
}

type Ball @key(fields: "id") {
  id: ID!
}

```

For a faster response, you can also join our [Discord](https://discord.gg/graphos), which I check much more frequently 😁
