Problem/Motivation
I need to create a view which one of the fields is multiple. It is an entity reference field which references multiple images. I need to display this field as a list of urls. Example:
images: [
"https://example.com/example-img.jpg",
"https://example.com/example-img-2.jpg"
]
I am already able to show the image as a string with a formatter, but currently it is not possible converting the urls to an array, instead of a plain text.
It would be nice to have the possibility to return multiple fields as arrays.
Steps to reproduce
- Create a content type with a multiple field.
- Install GraphQL compose views
- Create a view of that content type, with a GraphQL display that shows fields.
- Add the multiple field, and configure the 'Multiple fields settings' section with "Simple separator".
At this point, the field appears like this:
images: [
"https://example.com/example-img.jpg, https://example.com/example-img-2.jpg"
]
Proposed resolution
Allow selecting a new type at the fields settings, named 'List (String)' that would return the field value as an array, separated by the delimiter configured at 'Multiple field settings' section.