@bdunogier bdunogier released this Nov 19, 2018 · 4 commits to master since this release

Assets 2

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 _repository on the default schema (#3)
  • Implemented support for date metadata and field criteria in Query input (5b8f9e3)
  • the ContentInfo of domain content items is available as _info (previously _content, now deprecated)
  • the _location and _allLocations content fields have been fixed (d9fafa4)
  • scalar fields types will now be mapped to scalar GraphQL types (ezinteger to Int, ezstring to String, 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 _types field. 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 relatedArticles field returning ArticleContent items. If not, they'll yield DomainContent items (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 singular variation(identifier: ImageVariationIdentifier) field to image fields values (#38)
  • Implemented sorting on type collections. Limited to metadata sort clauses: articles( sortBy: _name ). Add _desc after a sort clause to reverse it: articles( sortBy: [_name, _desc] )
  • Added _url field to content items. Returns the most prioritized Url Alias for the content's main location.
  • Added _name field to content items (content name)
  • Added missing FieldDefinition.isSearchable field

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-run option to the schema generator, as well as an in --include option 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 SchemaBuilder can be implemented to iterate over new types of resources
    • the SchemaWorkder interface can be implemented to perform extra actions on content types groups, content types or fields definitions
    • the FieldValueBuilder interface can be implemented to add support for a custom / complex field type