# Alternative to ts-transformer-keys

**URL:** <https://community.apollographql.com/t/alternative-to-ts-transformer-keys/6505>\
**Category:** Server\
**Tags:** server\
**Created:** [July 19, 2023, 11:21pm UTC](https://community.apollographql.com/t/alternative-to-ts-transformer-keys/6505 "2023-07-19T23:21:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![himabindugit](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/himabindugit/32/4448_2.png) [@himabindugit](https://community.apollographql.com/u/himabindugit)\
**Post date:** [July 19, 2023, 11:21pm UTC](https://community.apollographql.com/t/alternative-to-ts-transformer-keys/6505/1 "2023-07-19T23:21:38Z")

</div>

Hi Team,

We have a Typescript project, currently we are using ts-transformer-keys to support mutation keys for the graphql models.

for example, below is the usage

export const getResponseModelKeys = (query: string): Array =\> {  
const modelKeys: Keys = {  
# trimmed for readability  
[graphQlQueries.TEST]: keys(),  
# trimmed for readability  
}  
}

keys is from ts-transformer-keys package, do we need this package or is there any better one to use? we are also using ttypescript for build from js to ts- just fyi

The `ts-transformer-keys` library is specifically designed to extract keys from TypeScript types at compile-time, which allows you to use these keys at runtime without requiring manual maintenance. This is useful in scenarios where you want to perform operations like serialization, validation, or data transformation based on the keys of an interface without hardcoding them

---

<div class="post-metadata">

**Author:** ![Justin\_Gonzalez](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/justin_gonzalez/32/5359_2.png) [@Justin\_Gonzalez](https://community.apollographql.com/u/Justin_Gonzalez)\
**Post date:** [February 6, 2025, 8:48pm UTC](https://community.apollographql.com/t/alternative-to-ts-transformer-keys/6505/2 "2025-02-06T20:48:33Z")

</div>


