tbrannam
02/14/2018, 4:27 PMwithFilter in conjunction with ctx.db.subscription ?tbrannam
02/14/2018, 7:11 PMctx.db.subscription.link returns a Promise to AsyncIterator - so await for that gets me closer, but using the result in withFilter yields and error stilltbrannam
02/14/2018, 7:48 PMsubscribe: (parent, args, ctx, info) => withFilter(() => ctx.db.subscription.link(
{ },
info,
), (payload, variables) => {
return true
})
but subscribed playgrounds aren't receiving anythingtbrannam
02/14/2018, 8:24 PMsubscribe: async (parent, args, ctx, info) => {
const subscription = await ctx.db.subscription.link(
{ },
info,
)
filteredSubscription = withFilter( () => subscription , (payload, variables) => {
return true
})
return filteredSubscription()
}wallslide
02/14/2018, 11:18 PMwithFilter coming from?wallslide
02/14/2018, 11:21 PM.query worked:
subscribe: async (parent, args, ctx, info) => {
const fullAuth0Id = await getAuth0Id(ctx, true)
return ctx.db.subscription.user({
where: {
node: {
fullAuth0Id
}
}
}, info);
},tbrannam
02/15/2018, 7:07 PMconst {withFilter} = require('graphql-yoga')tbrannam
02/15/2018, 7:08 PMwallslide
02/16/2018, 2:45 AMctx.db.exists call, and use the `every`/`some`/`none` conditional queries to verify friendship requirementstbrannam
02/16/2018, 4:42 PM