We'd like Graphql equivalent of #2626924: Include processed text in normalizations: "text" field type's "processed" computed property should be non-internal and carry cacheability metadata because we can't expect calling system to recreate Drupal filter pipeline.

Comments

moshe weitzman created an issue. See original summary.

fubhy’s picture

I've re-added the "renderedOutput" field for entities also with the option to use a view mode. Are you suggesting we should process every text field and run it through the filter or do you want to do that for all string properties in general?

wim leers’s picture

Are you suggesting we should process every text field and run it through the filter

Yes. Well, not filter, but text format. (And I'm assuming you mean \Drupal\text\Plugin\Field\FieldType\TextItem.)

or do you want to do that for all string properties in general?

No, that wouldn't make any sense. The whole reason we need this, is because text formats. You can't let JS run text formats. Or you'd have to have JS reimplement all text format logic.

So: yes for \Drupal\text\Plugin\Field\FieldType\TextItem, no for \Drupal\Core\Field\Plugin\Field\FieldType\StringItem.

fubhy’s picture

Right, after checking the patch from the other issue that makes sense. I was thinkin in terms of string sanitization and couldn't check the patch because I was on the train. Yes, text formats make sense indeed.

wim leers’s picture

The patch at #2626924: Include processed text in normalizations: "text" field type's "processed" computed property should be non-internal and carry cacheability metadata is tantalizingly close to RTBC atm. Just needs dawehner's +1. So hopefully you'll soon have a reference implementation.

wim leers’s picture

Title: Expose rendered text fields (text+format) » [PP-1] Expose rendered text fields (text+format)
Status: Active » Postponed

Let's just block this on #262924: which order to install modules? — that patch is very close at this point too :)

fubhy’s picture

Status: Postponed » Fixed

We just added a bunch of submodules that bring back automatic schema generation. Also includes rendered fields and is configurable.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.