Skip to content

Breaking: closing streams

Compare
Choose a tag to compare
@mesqueeb mesqueeb released this 22 Sep 12:52

highly improved the way streams can be closed. MUCH easier to use syntax now!!

breaking changes

stream

Before:

magnetar.collection('my-collection').stream()

// close stream:
const closeStream = magnetar.collection('my-collection').openStreams.get(undefined)
closeStream()

After:

magnetar.collection('my-collection').stream()

// close stream:
magnetar.collection('my-collection').closeStream()

See the new docs at: https://magnetar.cycraft.co/docs#stream-realtime-updates