Skip to content

Using http.Request.Context instead of the Background context #20

@sAbakumoff

Description

@sAbakumoff

In https://github.com/graphql-go/handler/blob/master/handler.go#L148
how about modifying it to

h.ContextHandler(r.Context(), w, r)

The idea is in that the middleware can add something in the request's context and pass it further to the handler that passes it further to the GraphQL query. The example is a cookie value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions