Skip to main content

lookup

Specific fields

Allows to pick which link to record fields to lookup.

const { data, error } = await kontenbase.service('posts').find({
lookup: ['categories'],
})

All fields

Lookup to all link to record fields.

const { data, error } = await kontenbase.service('posts').find({
lookup: '*',
})

Show only id

Only show id in the lookup result.

const { data, error } = await kontenbase.service('posts').find({
lookup: { _id: '*' },
})