{"action":"created","issue":{"url":"https://api.github.com/repos/apollostack/apollo-server/issues/159","repository_url":"https://api.github.com/repos/apollostack/apollo-server","labels_url":"https://api.github.com/repos/apollostack/apollo-server/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/apollo-server/issues/159/comments","events_url":"https://api.github.com/repos/apollostack/apollo-server/issues/159/events","html_url":"https://github.com/apollostack/apollo-server/issues/159","id":179154709,"number":159,"title":"Optional context should return request by default","user":{"login":"katopz","id":97060,"avatar_url":"https://avatars.githubusercontent.com/u/97060?v=3","gravatar_id":"","url":"https://api.github.com/users/katopz","html_url":"https://github.com/katopz","followers_url":"https://api.github.com/users/katopz/followers","following_url":"https://api.github.com/users/katopz/following{/other_user}","gists_url":"https://api.github.com/users/katopz/gists{/gist_id}","starred_url":"https://api.github.com/users/katopz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katopz/subscriptions","organizations_url":"https://api.github.com/users/katopz/orgs","repos_url":"https://api.github.com/users/katopz/repos","events_url":"https://api.github.com/users/katopz/events{/privacy}","received_events_url":"https://api.github.com/users/katopz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-26T07:13:50Z","updated_at":"2016-09-28T04:56:49Z","closed_at":null,"body":"Hi guys,\r\n\r\nI currently use both  `express-graphql` and `apollo-server` by sharing executable schema, so far so good but suddenly hit some different here.\r\n\r\nRefer to `express-graphql` : https://github.com/graphql/express-graphql/blob/bdd7a954aff7621bb338d722b44371f7643c2258/src/index.js#L133\r\n```js\r\ncontext = optionsData.context || request;\r\n```\r\n\r\nBut `apollo-server` : https://github.com/apollostack/apollo-server/blob/f4546e7654a2b12bb77ef5af407d89d1a62e8d6d/src/integrations/expressApollo.ts#L94\r\n```js\r\ncontext: optionsObject.context,\r\n```\r\n\r\nSo propose solution should be...\r\n```js\r\ncontext: optionsObject.context || req,\r\n```\r\n\r\nWhich maybe somehow related to https://github.com/apollostack/apollo-server/issues/144\r\n\r\nAny thought?"},"comment":{"url":"https://api.github.com/repos/apollostack/apollo-server/issues/comments/250071662","html_url":"https://github.com/apollostack/apollo-server/issues/159#issuecomment-250071662","issue_url":"https://api.github.com/repos/apollostack/apollo-server/issues/159","id":250071662,"user":{"login":"stubailo","id":448783,"avatar_url":"https://avatars.githubusercontent.com/u/448783?v=3","gravatar_id":"","url":"https://api.github.com/users/stubailo","html_url":"https://github.com/stubailo","followers_url":"https://api.github.com/users/stubailo/followers","following_url":"https://api.github.com/users/stubailo/following{/other_user}","gists_url":"https://api.github.com/users/stubailo/gists{/gist_id}","starred_url":"https://api.github.com/users/stubailo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stubailo/subscriptions","organizations_url":"https://api.github.com/users/stubailo/orgs","repos_url":"https://api.github.com/users/stubailo/repos","events_url":"https://api.github.com/users/stubailo/events{/privacy}","received_events_url":"https://api.github.com/users/stubailo/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T04:56:49Z","updated_at":"2016-09-28T04:56:49Z","body":"```\r\ngraphQLServer.use('/graphql', bodyParser.json(), apolloExpress((req) => ({\r\n  schema: executableSchema,\r\n  context: req // this shouldn't work? req is undefined?\r\n})));\r\n```\r\n\r\nDid we not document that you can pass options as a function? That's definitely something we should fix.\r\n\r\n@helfer do you know if that works for every server, or just for Express?"}}
{"actor":{"display_login":"stubailo"}}