Skip to content

Commit b6a2fa0

Browse files
committed
ctxからはpayloadで受け取ることになっていた
1 parent a4fe88b commit b6a2fa0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subscribeservice_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ subscription mySubscribe($commentId: ID!) {
210210
})
211211

212212
for _, user := range []*testUser{user1, user2, user3, user4, user5} {
213-
if len(user.Payloads) != 1 {
214-
t.Error("user.Payloads count should be 1")
213+
if len(user.Payloads) != 0 {
214+
t.Error("user.Payloads count should be 0. no one received")
215215
}
216216
}
217217

@@ -246,7 +246,7 @@ func buildSchema() *graphql.Schema {
246246
},
247247
},
248248
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
249-
return p.Context.Value(GraphQLContextKey("newComment")), nil
249+
return p.Context.Value(GraphQLContextKey("payload")), nil
250250
},
251251
},
252252
"notification": &graphql.Field{
@@ -257,7 +257,7 @@ func buildSchema() *graphql.Schema {
257257
},
258258
}),
259259
Resolve: func(p graphql.ResolveParams) (interface{}, error) {
260-
return p.Context.Value(GraphQLContextKey("notification")), nil
260+
return p.Context.Value(GraphQLContextKey("payload")), nil
261261
},
262262
},
263263
},

0 commit comments

Comments
 (0)