File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
"github.com/graphql-go/graphql"
7
7
"github.com/graphql-go/graphql/gqlerrors"
8
+ "github.com/graphql-go/graphql/language/ast"
8
9
"github.com/graphql-go/graphql/language/parser"
9
10
log "github.com/sirupsen/logrus"
10
11
)
@@ -31,6 +32,7 @@ type Subscription struct {
31
32
Variables map [string ]interface {}
32
33
OperationName string
33
34
SendData SubscriptionSendDataFunc
35
+ Document * ast.Document
34
36
}
35
37
36
38
// ConnectionSubscriptions defines a map of all subscriptions of
@@ -108,6 +110,9 @@ func (m *subscriptionManager) AddSubscription(
108
110
return ErrorsFromGraphQLErrors (validation .Errors )
109
111
}
110
112
113
+ // Remember the query document for later
114
+ subscription .Document = document
115
+
111
116
// Allocate the connection's map of subscription IDs to
112
117
// subscriptions on demand
113
118
if m .subscriptions [conn ] == nil {
You can’t perform that action at this time.
0 commit comments