Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-8006

Querying matrix field in content using GraphQL fails with an exception

    XMLWordPrintable

Details

    • Ibexa Content
    • Yes

    Description

      Steps to reproduce:

      1. Create new Content Type (identifier "matrix") with ezmatrix fieldtype (identifier "matrix") - add one row with "one" as the name and "one" as the identifier.
      2. Regenerate GraphQL schema with the ibexa:graphql:generate-schema command.
      3. Create new content out of the Content Type.
      4. Query it in GraphQL:
        {
          content {
            matrixes(first: 1) {
              edges {
                node {
                  matrix {
                    one
                  }
                }
              }
            }
          }
        }
        

      Result:
      One is presented with an exception:

      Fatal Error in GraphQL, caused by incorrect type definition in ProductCatalog bundle:
      Ibexa\\ProductCatalog\\GraphQL\\Resolver\\MatrixFieldType
      FieldValueResolver::resolveMatrixFieldValue(): Argument #1 ($product) must be of type Ibexa\\Contracts\\ProductCatalog\\Values
      ProductInterface, Ibexa\\GraphQL\\Value
      Item given, called in /app/vendor/overblog/graphql-bundle/src/Resolver/AbstractProxyResolver.php on line 36

      Expected result:
      Query should be completed without any issue.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              bartlomiej.wajda@ibexa.co Bartłomiej Wajda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: