{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/apollo-server/issues/2069","repository_url":"https://api.github.com/repos/apollographql/apollo-server","labels_url":"https://api.github.com/repos/apollographql/apollo-server/issues/2069/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-server/issues/2069/comments","events_url":"https://api.github.com/repos/apollographql/apollo-server/issues/2069/events","html_url":"https://github.com/apollographql/apollo-server/issues/2069","id":388379999,"node_id":"MDU6SXNzdWUzODgzNzk5OTk=","number":2069,"title":"Auto generated RESTDataSource from API Docs","user":{"login":"ChristianOezelt","id":20471999,"node_id":"MDQ6VXNlcjIwNDcxOTk5","avatar_url":"https://avatars0.githubusercontent.com/u/20471999?v=4","gravatar_id":"","url":"https://api.github.com/users/ChristianOezelt","html_url":"https://github.com/ChristianOezelt","followers_url":"https://api.github.com/users/ChristianOezelt/followers","following_url":"https://api.github.com/users/ChristianOezelt/following{/other_user}","gists_url":"https://api.github.com/users/ChristianOezelt/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristianOezelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristianOezelt/subscriptions","organizations_url":"https://api.github.com/users/ChristianOezelt/orgs","repos_url":"https://api.github.com/users/ChristianOezelt/repos","events_url":"https://api.github.com/users/ChristianOezelt/events{/privacy}","received_events_url":"https://api.github.com/users/ChristianOezelt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-12-06T20:14:30Z","updated_at":"2018-12-12T21:08:06Z","closed_at":null,"author_association":"NONE","body":"Hello there!\r\n\r\nLooking at the caching features of `RESTDataSource` I thought \"how amazing would it be if I could just generate these from my Swagger/OpenAPI spec files!\".\r\n\r\nSadly there is no such option yet and I am considering writing such a template for myself.\r\nI opened this issue to start a discussion about this topic and maybe find other alternatives I have not thought about yet. \r\nThis would obviously not be a feature of apollo-server, yet I opened the issue here because I believe that it is most relevant to apollo-server users.\r\n\r\nThere are a few points that came to my mind when thinking about a general solution:\r\n- the language to generate the Data Sources in (JS, TS, Flow, ...)\r\n- how should the generated RESTDataSource look like\r\n- how generic would it be (e.g. a generic type for the GraphQL Context)\r\n- how should the API look like for customization (e.g. generic headers that have to be forwarded, transformed or set)"},"comment":{"url":"https://api.github.com/repos/apollographql/apollo-server/issues/comments/446744352","html_url":"https://github.com/apollographql/apollo-server/issues/2069#issuecomment-446744352","issue_url":"https://api.github.com/repos/apollographql/apollo-server/issues/2069","id":446744352,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Njc0NDM1Mg==","user":{"login":"ChristianOezelt","id":20471999,"node_id":"MDQ6VXNlcjIwNDcxOTk5","avatar_url":"https://avatars0.githubusercontent.com/u/20471999?v=4","gravatar_id":"","url":"https://api.github.com/users/ChristianOezelt","html_url":"https://github.com/ChristianOezelt","followers_url":"https://api.github.com/users/ChristianOezelt/followers","following_url":"https://api.github.com/users/ChristianOezelt/following{/other_user}","gists_url":"https://api.github.com/users/ChristianOezelt/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristianOezelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristianOezelt/subscriptions","organizations_url":"https://api.github.com/users/ChristianOezelt/orgs","repos_url":"https://api.github.com/users/ChristianOezelt/repos","events_url":"https://api.github.com/users/ChristianOezelt/events{/privacy}","received_events_url":"https://api.github.com/users/ChristianOezelt/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T21:08:06Z","updated_at":"2018-12-12T21:08:06Z","author_association":"NONE","body":"I understand your point, for some use cases it might be interesting to generate the whole graphql schema.\r\n\r\nPersonally, I want to define the graphql schema myself, as it consolidates, omits, cherry picks, tranaforms, .. what my clients really require. Spending time on integration with other services is what I would like to reduce. \r\nAuto generated dataSources are going to allow me to take advantage of all benefits of the RESTDataSource, while spending minimal effort on integration with other services."}}
{"actor":{"display_login":"ChristianOezelt"}}