Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions v2/pkg/engine/datasource/grpc_datasource/grpc_datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,16 @@ func (d *DataSource) marshalResponseJSON(arena *astjson.Arena, message *RPCMessa

if fd.IsList() {
list := data.Get(fd).List()
// We currently do not yet support to distingish between nullable and non-nullable lists.
// Therefore we always return an empty array for now.
// TODO: Add support for nullable lists.
arr := arena.NewArray()
root.Set(field.AliasOrPath(), arr)

if !list.IsValid() {
root.Set(field.AliasOrPath(), arena.NewNull())
continue
}

arr := arena.NewArray()
root.Set(field.AliasOrPath(), arr)
for i := 0; i < list.Len(); i++ {

switch fd.Kind() {
Expand Down
Loading