Uploaded image for project: 'Magnolia GraphQL'
  1. Magnolia GraphQL
  2. MGNLGQL-60

GraphQL type not registered for a model that references another model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.0
    • None
    • None

      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.

        Acceptance criteria

              jsimak Jaroslav Simak
              mdrapela Martin DrĂ¡pela
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 3h
                    3h