Closed vtnorton closed 3 months ago
Describe the bug I'm trying to catch one property of type relation but the response comes with it empty.
relation
To Reproduce Node version: 18.18.2 Notion JS library version: 2.2.15
Steps to reproduce the behavior:
import { Client } from "@notionhq/client";
const notion = new Client({ auth: process.env.notionSecret, });
const response = await notion.databases.query({ database_id: DATABASE_ID, });
console.log("item with relation", results[0].properties.Relation);
The console log object is:
{ id: 'XRhw', type: 'relation', relation: [], has_more: false }
This implies that I'm selecting the correct property, but the content inside `relation` is empty, while the page does contain a relation to another database. **Expected behavior** Expected to return the content of the relation.
I needed to make sure the API had access to the database via connections. That fixed the issue for me
Describe the bug I'm trying to catch one property of type
relation
but the response comes with it empty.To Reproduce Node version: 18.18.2 Notion JS library version: 2.2.15
Steps to reproduce the behavior:
relation
with the name "Relation"const notion = new Client({ auth: process.env.notionSecret, });
const response = await notion.databases.query({ database_id: DATABASE_ID, });
console.log("item with relation", results[0].properties.Relation);
{ id: 'XRhw', type: 'relation', relation: [], has_more: false }