Skip to main content

Unknown Type for Parameter

Erroneous Code Example

This error occurs when you specify an unknown type for a query parameter that is not a primitive type or a type defined in your schema.
QUERY getItem(data: UnknownType) =>
    RETURN data

Solution

Use a primitive type (String, I32, U32, F64, Bool, ID, etc.) or declare the type in your schema.
QUERY getUser(id: ID) =>
    user <- N<User>(id)
    RETURN user