Git Product home page Git Product logo

Comments (2)

JeromeFitz avatar JeromeFitz commented on June 15, 2024

Breaking Change

ref: https://www.notion.so/releases/2022-05-03

Need to update @jeromefitz/notion in ./packages/notion/src/utils/getTypes/rollup.ts

For each Rollup/Relation, get its data by mocking its Notion Type one-by-one on the getTypes request instead of passing all at once.

Then return the newly created array by its zero index.

Sure there is a better way, however, this will get us the fix we need short-term:

Before

const rollup = (data: any) => {
  return _sortBy(_map(data?.rollup?.array, (item) => getTypes[item.type](item)))
}

After

const rollup = (data: any) =>
  _sortBy(
    _map(data?.rollup?.array, (item) =>
      _map(item[item?.type], (itemData) =>
        getTypes[item?.type]({
          type: item?.type,
          [item?.type]: [itemData],
        })
      )
    )
  )[0]

lulz types would probably help. but with Notion's revamp in their SDK that will not come back for a bit.

Will be updated in canary version and verified for @jeromefitz/notion after some ⚽

from websites.

JeromeFitz avatar JeromeFitz commented on June 15, 2024

Closing and moving this issue to the proper repo after further investigation: JeromeFitz/packages#631

from websites.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.