question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Database query results are missing metadata from properties

See original GitHub issue

Report bugs here only for the Node JavaScript library.

If you’re having problems using Notion’s API, or have any other feedback about the API including feature requests for the JavaScript library, please email support at developers@makenotion.com.

Describe the bug Currently the SDK doesn’t give much outside of an id in the property. Equivalent request in Postman, has detailed JSON with id, type and content.

To Reproduce Node version: v16.14.2 Notion JS library version: v2.0.0

Steps to reproduce the behavior:

const { Client } = require("@notionhq/client");

const notion = new Client({
  auth: process.env.NOTION_API_KEY
});

(async () => {
  const databaseId = process.env.NOTION_DATABASE_ID;
  const response = await notion.databases.query({
    database_id: databaseId,
    filter: {
      property: "Tags",
      multi_select: {
        contains: "italian",
      },
    },
  });

  console.log(response.results[0].properties);
  console.log(response.results[1].properties);

  process.exit();
})();

Expected behavior Content inside database item properties

Screenshots image

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
lavgupcommented, Aug 2, 2022

Agreed, being able to get all the properties for a page in a single request is a far better compromise then sending a request for every property on the page.

3reactions
e-e-ecommented, Jul 31, 2022

Is there any way to fetch properties in bulk? If not then this change is not ideal for any use case that requires properties from multiple rows - it multiplies the number of requests that a consumer needs to make by the number of rows. For a database with 10 items, a consumer needs 11 api calls to fetch all properties that they require. Given the api is already heavily rate limited this seems really prohibitive - 3 requests per second.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A complete guide to T-SQL Metadata Functions in SQL Server
Metadata functions in SQL Server return information about the database, database objects, database files, file groups etc. in SQL Server.
Read more >
Understand the Metadata Model - Tableau Help
You can query description attributes of fields using the Metadata API. ... When workbook lineage query results are missing upstream databases.
Read more >
Metadata Visibility Configuration - SQL Server - Microsoft Learn
Learn how to configure metadata visibility for securables that a user owns or has been granted permission to in SQL Server.
Read more >
- Get query metadata without running it - Community
If I have a SQL (select type) query, how would I find out properties of the resultset columns without actually running it?
Read more >
MetadataException: Unable to load the specified metadata ...
You might have changed the MetadataArtifactProcessing property of the model to Copy to Output Directory. · The connection string could be wrong. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found