mirror of
https://github.com/datarhei/core.git
synced 2025-10-26 01:10:30 +08:00
Use own type as context key
This commit is contained in:
@@ -47,7 +47,7 @@ func (g *GraphHandler) Query(c echo.Context) error {
|
||||
user, _ := c.Get("user").(string)
|
||||
|
||||
r := c.Request()
|
||||
ctx := context.WithValue(r.Context(), "user", user)
|
||||
ctx := context.WithValue(r.Context(), resolver.GraphKey("user"), user)
|
||||
|
||||
g.queryHandler.ServeHTTP(c.Response(), r.WithContext(ctx))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user