Skip to content

Conversation

@yookoala
Copy link
Contributor

@yookoala yookoala commented Aug 17, 2017

To better interoperate with middleware frameworks, it makes more sense to pass the http.Request's context instead of a context.Background(). That way user may better control the query with deadline, or inject dataloader from outside the Handler.

Also bumped the travis test versions and include go1.8.

* Instead of using context.Background(), Handler.ServeHTTP provide
  r.Context() to Handler.ContextHandler(). This will allow users
  to pass context with idomatic middleware framework like
  [interpose](https://github.com/carbocation/interpose) and
  [chi](https://github.com/go-chi/chi).
@yookoala
Copy link
Contributor Author

Seems like a duplicate of #24. Close now.

@yookoala yookoala closed this Aug 17, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 94.393% when pulling 8368e40 on yookoala:context into 37fc9f5 on graphql-go:master.

1 similar comment
@coveralls
Copy link

coveralls commented Aug 17, 2017

Coverage Status

Coverage decreased (-0.05%) to 94.393% when pulling 8368e40 on yookoala:context into 37fc9f5 on graphql-go:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants