Version 8 (WIP, canary)
Upgrade to version 8.0.0
Learn how to upgrade from version 7.x to 8.0.0.
New Features
basehub/events
: a new package used to interact with the Event Block.basehub
and<Pump />
now automatically inferdraftMode
from Next.js.<Toolbar />
now includes a Branch Switcher!
SDK Breaking Changes
basehub/analytics
has been deprecated in favour ofbasehub/events
. They are slightly different things, but Events should be able to cover analytics use cases, and more.<CodeBlock />:
lang
was renamed tolanguage
to better match the props of thepre
handler in <RichText /><RichText />: The
code
handler before received a prop namedisInline
, but now, it won’t receive that and it will just be used for inline code. Thepre
handler will be used for full code blocks.
API Breaking Changes
Now, if a Reference Block has just one “allowed type”, we won't type it as a GraphQL Union, but rather, just return the end-type directly. this might break queries that did the
... on SomeType
thing.
# before
{
someReference {
... on AuthorComponent {
name
}
}
}
# after
{
someReference {
name
}
}
In our Mutation API, we renamed the following:
transaction
is nowtransactionAsync
transactionAwaitable
is nowtransaction
A bit confusing, yes, but we found that transactionAwaitable
(which executed the transaction and responded with the result) was much more useful than the old transaction
, which fired off a job and then it was up to the developer to poll for the transactionStatus
. The name "transactionAwaitable" was a poorly thought out name, and we've taken the opportunity of a breaking version to fix this.
That should be all!