Non-Iterable Variable
Erroneous Code Example
This error occurs when you try to use a non-iterable variable in an iteration context. In this example, the parametername is not a collection, so it cannot be used in an iteration context.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
🚀 CLI v2 is now live! See Getting Started for details.
name is not a collection, so it cannot be used in an iteration context.
Query addUser(name: String) =>
FOR n IN name {
AddN<User>({name: n})
}
RETURN "User added"
Query addUser(names: [String]) =>
FOR n IN names {
AddN<User>({name: n})
}
RETURN "Users added"
Was this page helpful?