Strapi plugin logo for Untransform Response

Untransform Response

Efficiently removes all the unnecessary data/attributes tags.

strapi-plugin-untransform-response

@strapi/* ^4.6.0

What it does:

Efficiently removes all the unnecessary data/attributes tags.

Installation

1
2
3
4
5
yarn add strapi-plugin-untransform-response

or

npm install strapi-plugin-untransform-response
1
2
// DON'T FORGET
yarn strapi build

Before

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
  "data": {
    "id": 1,
    "attributes": {
      "title": "Some title",
      "relations": {
        "data": [
          {
            "id": 2,
            "attributes": {
              "title": "Some other title"
            }
          }
        ]
      }
    }
  },
  "meta": { ... }
}

After

1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "data": {
    "id": 1,
    "title": "Some title",
    "relations": [
      {
        "id": 2,
        "title": "Some other title"
      }
    ]
  },
  "meta": { ... }
}

Settings

Settings are unnecessary, unless you want to disable plugin.

/config/plugins.ts

1
2
3
4
5
6
7
export default ({ env }) => ({
  ...,
  'strapi-plugin-untransform-response': {
    enabled: false,  // TO DISABLE
  },
  ...,
});

Known issues

gql is not supported.

Currently overrides all transformResonse functions, in all controllers, so be advised.

Install now

npm install strapi-plugin-untransform-response

STATS

6 GitHub stars86 weekly downloads

Last updated

357 days ago

Strapi Version

4.4.0 and above

Author

github profile image for antokhio
antokhio

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.