Vulcan 1.4: Sendy, EmbedAPI, Dataloader, and more
Sacha Greif
234

Nice! How did you get dataloader to run within Meteor? I keep getting GraphQLError: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment.

The problem is that writing this:

new DataLoader(Meteor.bindEnvironment(ids => findByIds(collection, ids)), {
 cache: true,
 })

Breaks dataloader, because data loader has no idea what Meteor.bindEnvironment is!

Like what you read? Give Jon Cursi a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.