Details
-
Bug
-
Resolution: Fixed
-
High
-
3.0.x-dev
-
None
Description
Ater we’ve started using GraphQL in AdminUI (to display subitems) there is an unwanted consequence - adding a new Content Type and creating a Content Item of that type breaks AdminUI (subitems do not load) until the GraphQL schema & cache are regenerated.
That means that adding a new Content Type can no longer be performed by a site admin, but needs to be performed by a server admin (best during maintenence, to avoid clearing the cache in production when server is live).
Steps to reproduce:
- Login as admin
- Go to Admin -> Content Types
- Create a new Content Type in "Content" group, with "ezstring" fieldtype
- Go to Content -> Content Structure
- Create a new item of created Content Type under root
- Go to root node
Expected:
Subitems are loaded correctly, including the new item
Actual:
Subitems do not load, instead the error notification is shown: " Cannot load location ".
Error from logs:
[2019-09-20 08:40:21] app.CRITICAL: [GraphQL] GraphQL\Error\InvariantViolation: Type loader is expected to return valid type "Folder3Content", but it returned null[0] (caught throwable) at /Users/mareknocon/Desktop/Sites/v3/vendor/webonyx/graphql-php/src/Type/Schema.php line 338. {"throwable":"[object] (GraphQL\\Error\\InvariantViolation(code: 0): Type loader is expected to return valid type \"Folder3Content\", but it returned null at /Users/mareknocon/Desktop/Sites/v3/vendor/webonyx/graphql-php/src/Type/Schema.php:338)"} []
Note
Subitems work correctly after GraphQL schema and cache are regenerated.
Attachments
Issue Links
- relates to
-
EZP-30736 Rewrite Sub-items to use GraphQL endpoint
- Closed