following up on question: Will 1.2 subscription logic be able to be customized based on a query.
I would like to be able to subscribe to a custom DQL query, something like:
type Query @withSubscription {
channels(ownerId: String!): CountResponse @withSubscription @custom(dql: """
query q($ownerId: string) {
channels(func: type(Channel)) @filter(eq(Channel.ownerId, $ownerId)) {
count(uid)
}
}
""")
}
My subscriptions for a Type work as expected but if I try to subscribe for the query type above I get {message: "input:2: Cannot query field "channels" on type "Subscription".↵"}
.
Of course for the example above I can figure out something different, but I have more complicated custom queries that I’d like to subscribe to.
Is it possible (what I’m missing?) / Will it be possible (when?)
Thanks!