{"action":"created","issue":{"url":"https://api.github.com/repos/google/rejoiner/issues/57","repository_url":"https://api.github.com/repos/google/rejoiner","labels_url":"https://api.github.com/repos/google/rejoiner/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/google/rejoiner/issues/57/comments","events_url":"https://api.github.com/repos/google/rejoiner/issues/57/events","html_url":"https://github.com/google/rejoiner/issues/57","id":372718572,"node_id":"MDU6SXNzdWUzNzI3MTg1NzI=","number":57,"title":"Support generating GraphQLOutputType from arbitrary method return types","user":{"login":"dhaffner","id":255214,"node_id":"MDQ6VXNlcjI1NTIxNA==","avatar_url":"https://avatars1.githubusercontent.com/u/255214?v=4","gravatar_id":"","url":"https://api.github.com/users/dhaffner","html_url":"https://github.com/dhaffner","followers_url":"https://api.github.com/users/dhaffner/followers","following_url":"https://api.github.com/users/dhaffner/following{/other_user}","gists_url":"https://api.github.com/users/dhaffner/gists{/gist_id}","starred_url":"https://api.github.com/users/dhaffner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhaffner/subscriptions","organizations_url":"https://api.github.com/users/dhaffner/orgs","repos_url":"https://api.github.com/users/dhaffner/repos","events_url":"https://api.github.com/users/dhaffner/events{/privacy}","received_events_url":"https://api.github.com/users/dhaffner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-22T21:59:09Z","updated_at":"2018-10-22T22:21:24Z","closed_at":null,"author_association":"NONE","body":"Hi! I was playing around with rejoiner and I saw that there's [support for returning simple Java scalars](https://github.com/google/rejoiner/blob/68fa0f540afc75421418877eb42603aa8ca4e8ef/rejoiner/src/main/java/com/google/api/graphql/rejoiner/SchemaModule.java#L438) with a TODO: \"handle collections of Java Scalars\". Would there ever be a desire to support arbitrary return types? \r\n\r\n[Here's how](https://github.com/nfl/glitr/blob/master/src/main/java/com/nfl/glitr/registry/type/GraphQLObjectTypeFactory.java#L46) another project, GLiTR, generates such a type from an input class. \r\n\r\nI had success generating a `GraphQLOutputType` on the fly from a POJO inside of `SchemaModule::configureSchema()`, and then using that type in a`GraphQLFieldDefinition` which I pass to `addQuery()`.\r\n\r\nMaybe a good idea for a module in rejoiner?"},"comment":{"url":"https://api.github.com/repos/google/rejoiner/issues/comments/432011617","html_url":"https://github.com/google/rejoiner/issues/57#issuecomment-432011617","issue_url":"https://api.github.com/repos/google/rejoiner/issues/57","id":432011617,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjAxMTYxNw==","user":{"login":"siderakis","id":1545690,"node_id":"MDQ6VXNlcjE1NDU2OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1545690?v=4","gravatar_id":"","url":"https://api.github.com/users/siderakis","html_url":"https://github.com/siderakis","followers_url":"https://api.github.com/users/siderakis/followers","following_url":"https://api.github.com/users/siderakis/following{/other_user}","gists_url":"https://api.github.com/users/siderakis/gists{/gist_id}","starred_url":"https://api.github.com/users/siderakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siderakis/subscriptions","organizations_url":"https://api.github.com/users/siderakis/orgs","repos_url":"https://api.github.com/users/siderakis/repos","events_url":"https://api.github.com/users/siderakis/events{/privacy}","received_events_url":"https://api.github.com/users/siderakis/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T22:21:24Z","updated_at":"2018-10-22T22:21:24Z","author_association":"MEMBER","body":"I could see this being very useful.\r\n\r\nI wanted to add support for [AutoValue](https://github.com/google/auto/tree/master/value)s but POJOs would be more general.\r\n\r\nAdding support for using POJOs as return types doesn't seem like a lot of work. Supporting schema modification on POJO types might require some more thought and/or refactoring."}}
{"actor":{"display_login":"siderakis"}}