Skip to content
Console(opens in a new tab)

@lower

Converts a string or each string in an array to lowercase.

Directives. This directive runs after the query has its answer. It changes what you see, not what the query reads.

Converts a string or each string in an array to lowercase. Example: _fn @lower(ref: “name”) returns the lowercased value of ‘name’.

Argument Type Description
ref String A dot path to one value in the response, relative to the object that holds _fn. Each segment is a field name or alias, a list index, or * for every item of a list. Write ref or refs as the first argument of the directive.
refs [String!] A list of dot paths, written as for ref. The directive takes the list of their values as its input. In a chain of directives, only the first directive reads ref or refs, and each later directive takes the output of the one before it.

FIELD.

query {
search(searchInput: {
entityType: BRAND
name: "Safeway"
conditions: { limit: 1 }
}) {
... on Brand {
id
name: _fn @lower(refs: ["names.edges.0.node.name"])
names(first: 1) { edges { node { name } } }
}
}
}

Response, as returned:

{
"data": {
"search": [
{
"id": "0f26fbef-3436-4f85-8bcd-31fe12a4f99a",
"name": [
"safeway"
],
"names": {
"edges": [
{
"node": {
"name": "SAFEWAY"
}
}
]
}
}
]
}
}