File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,15 @@ __Schema = types.object({
44
44
resolve = function (schema )
45
45
return schema .directives
46
46
end
47
- }
47
+ },
48
+
49
+ subscriptionType = {
50
+ description = ' If this server supports subscriptions, the type that subscription operations will be rooted at' ,
51
+ kind = __Type ,
52
+ resolve = function (schema )
53
+ return schema :getSubscriptionType ()
54
+ end
55
+ }
48
56
}
49
57
end
50
58
})
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ function schema.create(config)
26
26
27
27
self :generateTypeMap (self .query )
28
28
self :generateTypeMap (self .mutation )
29
+ self :generateTypeMap (self .subscription )
29
30
self :generateTypeMap (introspection .__Schema )
30
31
self :generateDirectiveMap ()
31
32
@@ -99,6 +100,10 @@ function schema:getMutationType()
99
100
return self .mutation
100
101
end
101
102
103
+ function schema :getSubscriptionType ()
104
+ return self .subscription
105
+ end
106
+
102
107
function schema :getTypeMap ()
103
108
return self .typeMap
104
109
end
You can’t perform that action at this time.
0 commit comments