Skip to main content

Item Type Not in Schema

Erroneous Code Example

This error occurs when you reference an item type in a query that is not defined in your schema.
QUERY getProduct(id: ID) =>
    product <- N<Product>(id)
    RETURN product

Solution

Define the item type in your schema before using it in queries.
N::User {
    name: String,
}

N::Product {
    name: String,
    price: F64,
}