[MGNLGQL-99] Multivalues cannot be retrieved due to wrongly configured jcr multivalue data fetcher Created: 09/Jun/21  Updated: 19/Oct/21  Resolved: 08/Oct/21

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

Type: Bug Priority: Neutral
Reporter: Martin Drápela Assignee: Jaromir Sarf
Resolution: Fixed Votes: 0
Labels: VN-Testing
Remaining Estimate: Not Specified
Time Spent: 0.75d
Original Estimate: Not Specified

Attachments: PNG File image-2021-06-09-12-29-03-429.png     PNG File image.png    
Issue Links:
causality
caused by MGNLGQL-98 DOC: How to filter for a multivalue p... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Sprint: HL & LD 39
Story Points: 1

 Description   

Steps to reproduce:

  1. clone git clone https://git.magnolia-cms.com/scm/documentation/bookcase.git
  2. modify the author.yaml content type.  Add
     - name: alias
       multiple: true
  3. Which creates:

    Then, an attempt to get:
{
  book(id: "c234e8ed-33e3-4265-aeae-3eefc09debc3") {
    title
    authors {
      name
      isni
      alias
    }
  }
}

Returns:

{
  "status": 500,
  "errors": [
    {
      "message": "Exception while fetching data (/alias): property /My-Good-Authors/H.-G.-Wells/alias is a multi-valued property, so it's values can only be retrieved as an array",
      "locations": [
        {
          "line": 7,
          "column": 7,
          "sourceName": null
        }
      ],
      "errorType": "DataFetchingException",
      "path": [
        "book",
        "authors",
        0,
        "alias"
      ],
      "extensions": null
    }
  ]
}

{}


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