Skip to content

Swell.js doesnt return attributes with custom fields #179

Answered by logeshswell
BramGerrits asked this question in Help
Discussion options

You must be logged in to vote

@BramGerrits Another possible workaround would be to fetch and cache all attributes in your memory at once which would contain content fields as well if you enabled content permissions for attributes model as described below:
https://developers.swell.is/guides/opening-content-permissions

await swell.attributes.list({ limit: 100 });

Response:

{
  "count": 1,
  "page_count": 1,
  "page": 1,
  "results": [
    {
      "visible": true,
      "values": [
        "Technivorm",
        "Aerobie",
        "Huskee",
        "Brewista",
        "Porlex"
      ],
      "type": "select",
      "searchable": false,
      "name": "Brand",
      "filterable": true,
      "content": {
        "feature": …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@BramGerrits
Comment options

@mustafaswell
Comment options

@BramGerrits
Comment options

@logeshswell
Comment options

Answer selected by logeshswell
@logeshswell
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
3 participants