{"action":"closed","issue":{"url":"https://api.github.com/repos/apollographql/apollo-client/issues/3271","repository_url":"https://api.github.com/repos/apollographql/apollo-client","labels_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3271/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3271/comments","events_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3271/events","html_url":"https://github.com/apollographql/apollo-client/issues/3271","id":311604022,"node_id":"MDU6SXNzdWUzMTE2MDQwMjI=","number":3271,"title":"Documentation for typesafe named mutation queries is inadequate","user":{"login":"koblas","id":219934,"node_id":"MDQ6VXNlcjIxOTkzNA==","avatar_url":"https://avatars3.githubusercontent.com/u/219934?v=4","gravatar_id":"","url":"https://api.github.com/users/koblas","html_url":"https://github.com/koblas","followers_url":"https://api.github.com/users/koblas/followers","following_url":"https://api.github.com/users/koblas/following{/other_user}","gists_url":"https://api.github.com/users/koblas/gists{/gist_id}","starred_url":"https://api.github.com/users/koblas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koblas/subscriptions","organizations_url":"https://api.github.com/users/koblas/orgs","repos_url":"https://api.github.com/users/koblas/repos","events_url":"https://api.github.com/users/koblas/events{/privacy}","received_events_url":"https://api.github.com/users/koblas/received_events","type":"User","site_admin":false},"labels":[{"id":562484092,"node_id":"MDU6TGFiZWw1NjI0ODQwOTI=","url":"https://api.github.com/repos/apollographql/apollo-client/labels/can't-reproduce","name":"can't-reproduce","color":"bfd4f2","default":false},{"id":354009588,"node_id":"MDU6TGFiZWwzNTQwMDk1ODg=","url":"https://api.github.com/repos/apollographql/apollo-client/labels/docs","name":"docs","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"hwillson","id":137740,"node_id":"MDQ6VXNlcjEzNzc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/137740?v=4","gravatar_id":"","url":"https://api.github.com/users/hwillson","html_url":"https://github.com/hwillson","followers_url":"https://api.github.com/users/hwillson/followers","following_url":"https://api.github.com/users/hwillson/following{/other_user}","gists_url":"https://api.github.com/users/hwillson/gists{/gist_id}","starred_url":"https://api.github.com/users/hwillson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwillson/subscriptions","organizations_url":"https://api.github.com/users/hwillson/orgs","repos_url":"https://api.github.com/users/hwillson/repos","events_url":"https://api.github.com/users/hwillson/events{/privacy}","received_events_url":"https://api.github.com/users/hwillson/received_events","type":"User","site_admin":false},"assignees":[{"login":"hwillson","id":137740,"node_id":"MDQ6VXNlcjEzNzc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/137740?v=4","gravatar_id":"","url":"https://api.github.com/users/hwillson","html_url":"https://github.com/hwillson","followers_url":"https://api.github.com/users/hwillson/followers","following_url":"https://api.github.com/users/hwillson/following{/other_user}","gists_url":"https://api.github.com/users/hwillson/gists{/gist_id}","starred_url":"https://api.github.com/users/hwillson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwillson/subscriptions","organizations_url":"https://api.github.com/users/hwillson/orgs","repos_url":"https://api.github.com/users/hwillson/repos","events_url":"https://api.github.com/users/hwillson/events{/privacy}","received_events_url":"https://api.github.com/users/hwillson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-04-05T13:11:40Z","updated_at":"2018-06-14T17:31:22Z","closed_at":"2018-06-14T17:31:22Z","author_association":"NONE","body":"<!--\r\n  Thanks for filing an issue on Apollo Client!\r\n\r\n  Please make sure that you include the following information to ensure that your issue is actionable.\r\n\r\n  If you don't follow the template, your issue may end up being closed without anyone looking at it carefully, because it is not actionable for us without the information in this template.\r\n\r\n  If you're filing a feature request, you do not need to follow the template, but please mark the feature box at the bottom and include a specific example in which that feature would be useful.\r\n-->\r\n\r\n**Intended outcome:**\r\nI'm trying to port code from react-apollo 2.0 to 2.1, with named mutations. Expect to be able to write code that will compile.\r\n\r\nhttps://www.apollographql.com/docs/react/recipes/static-typing.html\r\n\r\n**Actual outcome:**\r\nAt the moment there are enough issues in the documentation that it's not possible to do this.\r\n\r\n**How to reproduce the issue:**\r\n\r\n1. Reading the example code fragments shows many errors that are not valid code (missing > and double >>)\r\n2. The ```Request``` and ```Args``` values are interchanged to type definitions\r\n3. No examples of mutations\r\n\r\n**Version**\r\n- react-apollo@2.1.3\r\n- apollo-client@2.2.8\r\n- graphql@0.13.2\r\n\r\n**Issue Labels**\r\n\r\n- [ ] has-reproduction\r\n- [ ] feature\r\n- [x] docs\r\n- [ ] blocking\r\n- [ ] good first issue\r\n\r\n\r\n**Example code**\r\n\r\nThis is the code that I'm trying to port from 2.0 to 2.1 for reference.\r\n\r\n    const MUTATION = gql`\r\n      mutation ($input: UserUpdateInput!) {\r\n        user_update(input: $input) {\r\n          validationErrors {\r\n            field\r\n            message\r\n          }\r\n          user {\r\n            id\r\n            email\r\n            name\r\n            avatarUrl\r\n          }\r\n        }\r\n      }\r\n    `;\r\n  \r\n    export interface Response {\r\n      data: {\r\n        user_update: {\r\n          user?: UserQuery.UserType;\r\n          validationErrors?: ValidationError[];\r\n        };\r\n      };\r\n    }\r\n  \r\n    export interface Args {\r\n      input: {\r\n        email?: string;\r\n        name?: string;\r\n        newpass?: string;\r\n        password?: string;\r\n      }\r\n    }\r\n  \r\n    export const mutation = graphql<Response, Args>(MUTATION, {\r\n      props: ({ mutate }: any) => ({\r\n        userUpdate: (input: Args) => mutate({ variables: { input } }),\r\n      }),\r\n    });\r\n\r\n"}}
{"actor":{"display_login":"hwillson"}}