{"action":"opened","issue":{"url":"https://api.github.com/repos/apollostack/apollo-android/issues/54","repository_url":"https://api.github.com/repos/apollostack/apollo-android","labels_url":"https://api.github.com/repos/apollostack/apollo-android/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/apollostack/apollo-android/issues/54/comments","events_url":"https://api.github.com/repos/apollostack/apollo-android/issues/54/events","html_url":"https://github.com/apollostack/apollo-android/issues/54","id":195982224,"number":54,"title":"[Code Generation] Add support of input types","user":{"login":"sav007","id":902816,"avatar_url":"https://avatars.githubusercontent.com/u/902816?v=3","gravatar_id":"","url":"https://api.github.com/users/sav007","html_url":"https://github.com/sav007","followers_url":"https://api.github.com/users/sav007/followers","following_url":"https://api.github.com/users/sav007/following{/other_user}","gists_url":"https://api.github.com/users/sav007/gists{/gist_id}","starred_url":"https://api.github.com/users/sav007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sav007/subscriptions","organizations_url":"https://api.github.com/users/sav007/orgs","repos_url":"https://api.github.com/users/sav007/repos","events_url":"https://api.github.com/users/sav007/events{/privacy}","received_events_url":"https://api.github.com/users/sav007/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-16T05:09:22Z","updated_at":"2016-12-16T05:09:22Z","closed_at":null,"body":"In order to support mutation operation support input types is required.\r\n\r\nQuery as example :\r\n```\r\nmutation CreateReviewForEpisode($ep: Episode!, $review: ReviewInput!) {\r\n  createReview(episode: $ep, review: $review) {\r\n    stars\r\n    commentary\r\n  }\r\n}\r\n```\r\n\r\nIR json:\r\n```\r\n{\r\n\t\"operations\": [\r\n\t\t{\r\n\t\t\t\"operationName\": \"CreateReviewForEpisode\",\r\n\t\t\t\"operationType\": \"mutation\",\r\n\t\t\t\"variables\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"ep\",\r\n\t\t\t\t\t\"type\": \"Episode!\"\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"review\",\r\n\t\t\t\t\t\"type\": \"ReviewInput!\"\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"source\": \"mutation CreateReviewForEpisode($ep: Episode!, $review: ReviewInput!) {\\n  createReview(episode: $ep, review: $review) {\\n    stars\\n    commentary\\n  }\\n}\",\r\n\t\t\t\"fields\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"responseName\": \"createReview\",\r\n\t\t\t\t\t\"fieldName\": \"createReview\",\r\n\t\t\t\t\t\"type\": \"Review\",\r\n\t\t\t\t\t\"fields\": [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"responseName\": \"stars\",\r\n\t\t\t\t\t\t\t\"fieldName\": \"stars\",\r\n\t\t\t\t\t\t\t\"type\": \"Int!\"\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\"responseName\": \"commentary\",\r\n\t\t\t\t\t\t\t\"fieldName\": \"commentary\",\r\n\t\t\t\t\t\t\t\"type\": \"String\"\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t],\r\n\t\t\t\t\t\"fragmentSpreads\": [],\r\n\t\t\t\t\t\"inlineFragments\": []\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\"fragmentsReferenced\": []\r\n\t\t}\r\n\t],\r\n\t\"fragments\": [],\r\n\t\"typesUsed\": [\r\n\t\t{\r\n\t\t\t\"kind\": \"EnumType\",\r\n\t\t\t\"name\": \"Episode\",\r\n\t\t\t\"description\": \"The episodes in the Star Wars trilogy\",\r\n\t\t\t\"values\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"NEWHOPE\",\r\n\t\t\t\t\t\"description\": \"Star Wars Episode IV: A New Hope, released in 1977.\"\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"EMPIRE\",\r\n\t\t\t\t\t\"description\": \"Star Wars Episode V: The Empire Strikes Back, released in 1980.\"\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"JEDI\",\r\n\t\t\t\t\t\"description\": \"Star Wars Episode VI: Return of the Jedi, released in 1983.\"\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"kind\": \"InputObjectType\",\r\n\t\t\t\"name\": \"ReviewInput\",\r\n\t\t\t\"description\": \"The input object sent when someone is creating a new review\",\r\n\t\t\t\"fields\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"stars\",\r\n\t\t\t\t\t\"description\": \"0-5 stars\",\r\n\t\t\t\t\t\"type\": \"Int!\",\r\n\t\t\t\t\t\"defaultValue\": null\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"commentary\",\r\n\t\t\t\t\t\"description\": \"Comment about the movie, optional\",\r\n\t\t\t\t\t\"type\": \"String\",\r\n\t\t\t\t\t\"defaultValue\": null\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"favoriteColor\",\r\n\t\t\t\t\t\"description\": \"Favorite color, optional\",\r\n\t\t\t\t\t\"type\": \"ColorInput\",\r\n\t\t\t\t\t\"defaultValue\": null\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"kind\": \"InputObjectType\",\r\n\t\t\t\"name\": \"ColorInput\",\r\n\t\t\t\"description\": \"The input object sent when passing in a color\",\r\n\t\t\t\"fields\": [\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"red\",\r\n\t\t\t\t\t\"description\": \"\",\r\n\t\t\t\t\t\"type\": \"Int!\",\r\n\t\t\t\t\t\"defaultValue\": null\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"green\",\r\n\t\t\t\t\t\"description\": \"\",\r\n\t\t\t\t\t\"type\": \"Int!\",\r\n\t\t\t\t\t\"defaultValue\": null\r\n\t\t\t\t},\r\n\t\t\t\t{\r\n\t\t\t\t\t\"name\": \"blue\",\r\n\t\t\t\t\t\"description\": \"\",\r\n\t\t\t\t\t\"type\": \"Int!\",\r\n\t\t\t\t\t\"defaultValue\": null\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t]\r\n}\r\n```"}}
{"actor":{"display_login":"sav007"}}