remove-graphql-typename

JSON →
library 1.0.2 ·javascript
verified Jun 7, 2026

A utility that recursively removes all __typename properties from GraphQL responses. Version 1.0.2 provides a single pure function that walks through objects and arrays and deletes any key named __typename. It ships with TypeScript types and is released as a stable package. Compared to alternatives like apollo's removeTypenameFromVariables, this package focuses solely on responses and does not modify the original object. It is a zero-dependency, lightweight solution for cleaning up Apollo Client or Relay responses before caching or serializing. The package is maintained with weekly downloads in the low thousands and an MIT license.