Skip to main content

map

Extracts a nested field from each element in an array. The 'field' argument is a dot-separated path. Returns null for elements where the path does not exist. Example: _fn @map(refs: ["items"], field: "a.b.c") extracts 'a.b.c' from each item. If field is omitted, returns the entire array.

directive @map(
ref: String
refs: [String!]
field: String
) on FIELD

Arguments

map.ref ● String scalar

map.refs ● [String!] list scalar

map.field ● String scalar