[SOLVED] Arrays with nested references convert null values to "null"

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

GIVEN

The following schema:

{
    "properties": {},
    "scripts": {},
    "fieldsInLists": [],
    "fieldsInReferences": [],
    "fields": [
        {
            "name": "array",
            "properties": {
                "fieldType": "Array"
            },
            "partitioning": "invariant",
            "nested": [
                {
                    "name": "nullableProp",
                    "properties": {
                        "fieldType": "String",
                        "editor": "Input",
                        "contentType": "Unspecified"
                    }
                },
                {
                    "name": "ref",
                    "properties": {
                        "fieldType": "References",
                        "editor": "List"
                    }
                }
            ]
        }
    ],
    "isPublished": true
}

Current behavior

When run the following GraphQL query, I get an unexpected result, where null values are converted to string, as so:

Expected behavior

The expected result would be for null strings to be returned as null. Not as a string

Minimal reproduction of the problem

See GIVEN section

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x] Cloud version

Version: [VERSION]

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge
1 Like

Thank you, I have fixed it and will deploy it on Monday.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.