[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: |
|
||||||||||||||||
| 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 reproduce1. Install a webapp with GraphQL feature enabled. Start the webapp. 2. Add the following light module to the author instance: 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 resultsUpon registering a content type, a graphql type should be created even for the source model. WorkaroundEither 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 notesImplicationsMarking as critical as this means that feature is likely to (unpredicatably) fail when CT's with relationships are used. |