v0.2.0
Rendering of fields values to HTML
Added an html
leaf to field values, that renders the field value to HTML using the same field templates than ez_render_field
.
It always accepts the following options:
template
: path to an alternative template used to render the fieldattributes
: html attributes to be used for renderinglang
: alternative language code to render with
Some FieldValues accept custom parameters, when they're supported by the built-in template. For instance, ImageFieldValue
supports an alias
argument.
Render Rich Text values to plain text
Rich Rext values can be rendered to plaintext
leaf to RichTextFieldValue
Date handling
Dates are now handled using DateType
, DateTimeType
and TimeType
.
They can be formatted using options passed to the format
leaf:
value {
... on DateFieldValue {
# Any constant from DateTime::
atomDate: format(constant: atom)
customDate: format(pattern: "d/m/Y")
}
}
This applies to date fields as well as metadata (modification or creation date).
Empty query to return all
searchContent
will accept an empty query, and return all items:
{
searchContent(query: {}) {
name
}
}
Fixes
- Fixed image variations resolution
- Added automatic registration of FieldValue types
- Updated GraphQL libraries to the maintained version (v0.11.x)