A utility library (version 0.1.0) that flattens nested Strapi v4 GraphQL responses, removing the 'attributes' wrapper and preserving 'id' at all levels. It includes TypeScript typings and is designed to work alongside graphql-codegen. Currently requires every level to request 'id'. This is an early-stage, single-contributor project with limited updates. Differentiators: focused solely on Strapi v4 GraphQL flattening with type safety, whereas alternatives like lodash/ramda require manual mapping.
npm install strapi-flatten-graphqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Flatten single entity, single response, and collection response from Strapi GraphQL.
Always request 'id' in your GraphQL queries at every level.
Pin exact version in dependencies.
Validate input structure before flattening.
Run 'npm install strapi-flatten-graphql'
Use import { flattenEntity } from 'strapi-flatten-graphql'Ensure each entity has 'id' and 'attributes' fields.
No dependency data recorded yet.