[wp-trac] [WordPress Trac] #42094: REST API: extend _fields parameter to selectively include nested fields in response JSON
WordPress Trac
noreply at wordpress.org
Thu Jan 24 19:01:50 UTC 2019
#42094: REST API: extend _fields parameter to selectively include nested fields in
response JSON
-------------------------+-----------------------------
Reporter: kadamwhite | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: REST API | Version: 4.9
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+-----------------------------
Comment (by kadamwhite):
Updates from REST API chat discussion: This has renewed relevance given
[https://github.com/WordPress/gutenberg/issues/11782#issuecomment-456133867
discussions within the Gutenberg repo] around how to signal that we can
skip the expensive generation of `content.rendered` when the filtered
value is not used. Implementing that in Gutenberg is non-trivial, but this
`_fields` improvement is a good first step and would yield immediate
performance gains for client-side consumers even without any special
handling within our controllers.
In Slack @danielbachhuber proposes `?_fields=content[raw]` as an
alternative to either of the syntaxes discussed above.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42094#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list