apollographql / meteor-integration

🚀 meteor add apollo
http://dev.apollodata.com/core/meteor.html
108 stars 45 forks source link

add support for passing options.context as an async function #105

Closed zvictor closed 7 years ago

zvictor commented 7 years ago

I am working in a project where, in order to overcome the Meteor's "don't use profile" issue, the equivalent of the profile field was moved to an independent collection.

While using Apollo I miss having the ability to load this profile into context as context.profile. Being able to define context in the options as a sync function is not enough because I need to load the profile from the database, performing an async call.

This PR: