Releases: bdunogier/ezplatform-graphql-bundle
v0.3.0
This is the 3rd release of the eZ Platform GraphQL integration. It makes the repository based, generated schema the main one, and completes most of its features.
Read through the main changes below for an overview.
Installation
- The bundle is now automatically configured
 - Routing configuration has been improved
 
Schema changes
Domain schema
The default schema is now the domain one. It exposes content types groups at the root (content, media), and content types below them: content.blogPosts, media.image(id: 1234)).
See doc/domain_schema.md for more information.
Other
- renamed the schema generation command to 
ezplatform:graphql:generate-schema:php bin/console ez:graphql:gen(#56) - moved domain schema files to 
app/config/graphql(#60) - The former default "repository schema" is available on 
/repository, as well as below_repositoryon the default schema (#3) - Implemented support for date metadata and field criteria in Query input (5b8f9e3)
 - the 
ContentInfoof domain content items is available as_info(previously_content, now deprecated) - the 
_locationand_allLocationscontent fields have been fixed (d9fafa4) - scalar fields types will now be mapped to scalar GraphQL types (
ezintegertoInt,ezstringtoString, etc). Applies to ezstring, eztext, ezboolean, ezfloat and ezinteger, ezkeyword and ezselection (d9fafa4, #29, #42). - pluralization rules have been improved (#31)
 - content types can be accessed below each content type group, with the 
_typesfield. It has all the types from this group as fields. Constraints and settings will depend on each fieldtype (title.constraints.minLength) - single content items can be loaded using their id, remoteId or locationId (
{ content { article(id: 333) { title } } }) (#51) - a content item's type can be accessed with 
_type({ content { blogPost { _type } } }) - relation and relationlist fields will be typed according to their contents. If they are set to contain only one content type, they will yield that type directly. Example: a 
relatedArticlesfield returningArticleContentitems. If not, they'll yieldDomainContentitems (5e4811a) - Added support for Asset (
e50d761), Media, Binary file (#39), Date and DateTime (21f1b25) field types - Added the list of image variations as 
ImageVariationIdentifier, and a singularvariation(identifier: ImageVariationIdentifier)field to image fields values (#38) - Implemented sorting on type collections. Limited to metadata sort clauses: 
articles( sortBy: _name ). Add_descafter a sort clause to reverse it:articles( sortBy: [_name, _desc] ) - Added 
_urlfield to content items. Returns the most prioritized Url Alias for the content's main location. - Added 
_namefield to content items (content name) - Added missing 
FieldDefinition.isSearchablefield 
Other changes
- returned data will obey the prioritized languages list. The siteaccess can be changed using the usual tools (https://fr.example.com/graphiql, http://example.com/fr/graphiql)
 - added 
--dry-runoption to the schema generator, as well as an in--includeoption that can specify which types to output / generate - Moved generated schema files to 
app/config/graphql/ezplatform(#71) - Integrated overblog schema generation in the generation command (#59)
 - improved the extensibility of the schema generator.
- the 
SchemaBuildercan be implemented to iterate over new types of resources - the 
SchemaWorkderinterface can be implemented to perform extra actions on content types groups, content types or fields definitions - the 
FieldValueBuilderinterface can be implemented to add support for a custom / complex field type 
 - the 
 
v0.3.0-beta3
Changes since v0.3.0-beta1 and v0.3.0-beta2.
0.3.0 beta2
Changes since v0.3.0-beta1
Schema changes
- Implemented sorting on type collections. Limited to metadata sort clauses: 
articles( sortBy: _name ). Add_descafter a sort clause to reverse it:articles( sortBy: [_name, _desc] ) - Added 
_urlfield to content items. Returns the most prioritized Url Alias for the content's main location. - Added 
_namefield to content items (content name) - Added missing 
FieldDefinition.isSearchablefield 
Internal changes
- Removed default sf bundle files
 - Injected Repository into DomainContentResolver
 
0.3.0 beta1
Installation
- The bundle is now automatically configured
 - Routing configuration has been improved
 
Schema changes
Domain schema
The default schema is now the domain one. It exposes content types groups at the root (content, media), and content types below them: content.blogPosts, media.image(id: 1234)).
See doc/domain_schema.md for more information.
Other
- renamed the schema generation command to 
ezplatform:graphql:generate-schema:php bin/console ez:graphql:gen(#56) - moved domain schema files to 
app/config/graphql(#60) - The former default "repository schema" is available on 
/repository, as well as below_repositoryon the default schema (#3) - Implemented support for date metadata and field criteria in Query input (5b8f9e3)
 - the 
ContentInfoof domain content items is available as_info(previously_content, now deprecated) - the 
_locationand_allLocationscontent fields have been fixed (d9fafa4) - scalar fields types will now be mapped to scalar GraphQL types (
ezintegertoInt,ezstringtoString, etc). Applies to ezstring, eztext, ezboolean, ezfloat and ezinteger, ezkeyword and ezselection (d9fafa4, #29, #42). - pluralization rules have been improved (#31)
 - content types can be accessed below each content type group, with the 
_typesfield. It has all the types from this group as fields. Constraints and settings will depend on each fieldtype (title.constraints.minLength) - single content items can be loaded using their id, remoteId or locationId (
{ content { article(id: 333) { title } } }) (#51) - a content item's type can be accessed with 
_type({ content { blogPost { _type } } }) - relation and relationlist fields will be typed according to their contents. If they are set to contain only one content type, they will yield that type directly. Example: a 
relatedArticlesfield returningArticleContentitems. If not, they'll yieldDomainContentitems (5e4811a) - Added support for Asset (
e50d761), Media, Binary file (#39), Date and DateTime (21f1b25) field types - Added the list of image variations as 
ImageVariationIdentifier, and a singularvariation(identifier: ImageVariationIdentifier)field to image fields values (#38) 
Other changes
- returned data will obey the prioritized languages list. The siteaccess can be changed using the usual tools (https://fr.example.com/graphiql, http://example.com/fr/graphiql)
 - added 
--dry-runoption to the schema generator, as well as an in--includeoption that can specify which types to output / generate - improved the extensibility of the schema generator.
- the 
SchemaBuildercan be implemented to iterate over new types of resources - the 
SchemaWorkderinterface can be implemented to perform extra actions on content types groups, content types or fields definitions - the 
FieldValueBuilderinterface can be implemented to add support for a custom / complex field type 
 - the 
 
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)