Not included in JSON:API

Created on 17 September 2020, over 4 years ago
Updated 2 March 2023, over 2 years ago

Problem/Motivation

The pseudo field is not outputted through the JSON:API.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany fjen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇷Argentina anairamzap Buenos Aires

    Hey, thanks for adding the computed field to expose the Read Time in JsonAPI :)
    I've found a tiny bug in the MR: When setting the computed value, is not clearing the `words` property so the words are adding up!

    We've found this issue when using jsonapi/node endpoint to list a bunch of nodes with their node_read_time field.
    Example url: {domain}/jsonapi/node/{content_type}?filter[status]=1&fields[node--{content_type}]=node_read_time on a site using Varnish cache, so the wrong (added up minutes) values were being cached by Varnish showing crazy amount of minutes for anonymous users, while logged-in users (ie: non varnish cached) were getting the 'correct' times.

    I'm adding a commit with the clear words line that should hopefully fix this.

  • 🇵🇹Portugal joao.ramos.costa

    I came here to propose add a computed field to allow using a field formatter, for instance.
    So +1 !

    Thank you.

  • @joaoramos opened merge request.
  • 🇵🇹Portugal joao.ramos.costa

    Just opened MR9. The main difference from the previous one is the display configurable option and the field_name definition (hence the new branch, to avoid breaking some project that relies on the current MR.).
    Regards!

  • 🇧🇬Bulgaria yivanov

    Thank you all !

  • Status changed to Fixed over 2 years ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024