[MGNLGQL-60] GraphQL type not registered for a model that references another model Created: 19/Nov/20  Updated: 09/Feb/21  Resolved: 19/Jan/21

Status: Closed
Project: Magnolia GraphQL
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Bug Priority: Critical
Reporter: Martin Drápela Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 3h
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by MGNLGQL-56 DOC: Support for asset renditions in ... Closed
supersession
supersedes MGNLGQL-36 Moving whole light module directory w... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: GraphQL Phase 1
Sprint: HL & LD 20
Story Points: 5

 Description   

Steps to reproduce

1. Install a webapp with GraphQL feature enabled. Start the webapp.

2. Add the following light module to the author instance:
git clone -b withAuthorCatalog --single-branch https://git.magnolia-cms.com/scm/documentation/bookshelf.git

The bookshelf references the authors using the following property:

model:
  nodeType: lib:book
  properties:
    - name: authors
      type: reference:authors

3. Open the Definitions app. While the contentTypes node will contain authors and bookshelf types, in the graphqlTypes the bookshelf type will be missing initially. 

Expected results

Upon registering a content type, a graphql type should be created even for the source model.

Workaround

Either restart the instance or save-edit a modification in the light module.

I did not test this, but it should work to put the CT files in different light modules and have the light module with the depending CT depend on the other module - this should force the CT and the GraphQL to be created properly.

Development notes

Implications

Marking as critical as this means that feature is likely to (unpredicatably) fail when CT's with relationships are used.


Generated at Mon Feb 12 05:52:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.