Efficiently removes all the unnecessary data/attributes tags.
@strapi/* ^4.6.0
Efficiently removes all the unnecessary data/attributes tags.
1yarn add strapi-plugin-untransform-response
2
3or
4
5npm install strapi-plugin-untransform-response
1// DON'T FORGET
2yarn strapi build
1{
2 "data": {
3 "id": 1,
4 "attributes": {
5 "title": "Some title",
6 "relations": {
7 "data": [
8 {
9 "id": 2,
10 "attributes": {
11 "title": "Some other title"
12 }
13 }
14 ]
15 }
16 }
17 },
18 "meta": { ... }
19}
1{
2 "data": {
3 "id": 1,
4 "title": "Some title",
5 "relations": [
6 {
7 "id": 2,
8 "title": "Some other title"
9 }
10 ]
11 },
12 "meta": { ... }
13}
Settings are unnecessary, unless you want to disable plugin.
/config/plugins.ts
1export default ({ env }) => ({
2 ...,
3 'strapi-plugin-untransform-response': {
4 enabled: false, // TO DISABLE
5 },
6 ...,
7});
gql
is not supported.
Currently overrides all transformResonse functions, in all controllers, so be advised.
npm install strapi-plugin-untransform-response
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.