[FR] setting to remove toplevel data
attribute (and meta
attribute)
#38
Replies: 2 comments
-
The reason I left I believe meta is currently empty for all cases aside from pagination. It will be utilized in the future for other features such as content versioning. So not something we just want to remove. We can add a setting to remove the data key and shift everything top level but it will leave meta. We can add it as an additional setting and leave it up to the user with a warning of the repercussions of removing it. Alternatively instead of removing the Let me know what you think! |
Beta Was this translation helpful? Give feedback.
-
I see. Thanks for the explanation. Since I am new to Strapi maybe just move this to Discussions and see if there is some interest by other folks for such a setting. I might just remove the strapi-plugin-transformer again (to have an dependency less) and use https://redux-toolkit.js.org/rtk-query/usage/customizing-queries#customizing-query-responses-with-transformresponse to transform the response on the frontend instead of on the strapi backend. |
Beta Was this translation helpful? Give feedback.
-
I am new to strapi. I use it with next.js. I already added you plugin (thanks!). However, I noticed that the toplevel
data
is still there, even withremoveDataKey: true
. So responses come asIn my opinion it would be nice if the top level
data
and also themeta
could also be removed.In my next.js app with the redux-toolkit I always have to write an extra
data
:So the typing of the response also has an unneeded
data
.Now it is:
But it should imho rather be:
Beta Was this translation helpful? Give feedback.
All reactions