{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/apollo-server/issues/1217","repository_url":"https://api.github.com/repos/apollographql/apollo-server","labels_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1217/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1217/comments","events_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1217/events","html_url":"https://github.com/apollographql/apollo-server/issues/1217","id":334515550,"node_id":"MDU6SXNzdWUzMzQ1MTU1NTA=","number":1217,"title":"Server 2.0: Data Sources","user":{"login":"xersist","id":4137997,"node_id":"MDQ6VXNlcjQxMzc5OTc=","avatar_url":"https://avatars0.githubusercontent.com/u/4137997?v=4","gravatar_id":"","url":"https://api.github.com/users/xersist","html_url":"https://github.com/xersist","followers_url":"https://api.github.com/users/xersist/followers","following_url":"https://api.github.com/users/xersist/following{/other_user}","gists_url":"https://api.github.com/users/xersist/gists{/gist_id}","starred_url":"https://api.github.com/users/xersist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xersist/subscriptions","organizations_url":"https://api.github.com/users/xersist/orgs","repos_url":"https://api.github.com/users/xersist/repos","events_url":"https://api.github.com/users/xersist/events{/privacy}","received_events_url":"https://api.github.com/users/xersist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-06-21T14:18:16Z","updated_at":"2018-06-22T18:57:48Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\nI’m trying to use the new `dataSources `option passed to ApolloServer 2.0.0-rc.0 using the `RESTDataSource`, though I currently do not see that option in the API reference.\r\n\r\nWhen I do pass it to `new ApolloServer ` as the documentation says, \r\n`dataSources: () => {  return {moviesAPI: new MoviesAPI()};}`\r\nthe `dataSources` does get added to the context, but ONLY if I return an empty `{}`, `[]`, `true`/`false`, any number or `null`. If I return anything other than \"empty\", like an object containing `{theAPI: new SomeRESTDataSource()}` the `dataSources `function runs but dies there. The resolver that was called never runs and only receive a 400 response.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/apollographql/apollo-server/issues/comments/399546920","html_url":"https://github.com/apollographql/apollo-server/issues/1217#issuecomment-399546920","issue_url":"https://api.github.com/repos/apollographql/apollo-server/issues/1217","id":399546920,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTU0NjkyMA==","user":{"login":"martijnwalraven","id":54485,"node_id":"MDQ6VXNlcjU0NDg1","avatar_url":"https://avatars1.githubusercontent.com/u/54485?v=4","gravatar_id":"","url":"https://api.github.com/users/martijnwalraven","html_url":"https://github.com/martijnwalraven","followers_url":"https://api.github.com/users/martijnwalraven/followers","following_url":"https://api.github.com/users/martijnwalraven/following{/other_user}","gists_url":"https://api.github.com/users/martijnwalraven/gists{/gist_id}","starred_url":"https://api.github.com/users/martijnwalraven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martijnwalraven/subscriptions","organizations_url":"https://api.github.com/users/martijnwalraven/orgs","repos_url":"https://api.github.com/users/martijnwalraven/repos","events_url":"https://api.github.com/users/martijnwalraven/events{/privacy}","received_events_url":"https://api.github.com/users/martijnwalraven/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T18:57:48Z","updated_at":"2018-06-22T18:57:48Z","author_association":"CONTRIBUTOR","body":"@jkdowdle Yeah, the path you pass to `get` is treated as a relative URL, so that means `baseURL` should be `http://localhost:5001/api/` (note the trailing slash). Maybe we should add that slash automatically if it isn't there, because this will be a common gotcha."}}
{"actor":{"display_login":"martijnwalraven"}}