{"action":"created","issue":{"url":"https://api.github.com/repos/APIs-guru/graphql-faker/issues/80","repository_url":"https://api.github.com/repos/APIs-guru/graphql-faker","labels_url":"https://api.github.com/repos/APIs-guru/graphql-faker/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/APIs-guru/graphql-faker/issues/80/comments","events_url":"https://api.github.com/repos/APIs-guru/graphql-faker/issues/80/events","html_url":"https://github.com/APIs-guru/graphql-faker/issues/80","id":504785611,"node_id":"MDU6SXNzdWU1MDQ3ODU2MTE=","number":80,"title":"Return passed-in value from mutation","user":{"login":"LeeroyJenks","id":3408364,"node_id":"MDQ6VXNlcjM0MDgzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3408364?v=4","gravatar_id":"","url":"https://api.github.com/users/LeeroyJenks","html_url":"https://github.com/LeeroyJenks","followers_url":"https://api.github.com/users/LeeroyJenks/followers","following_url":"https://api.github.com/users/LeeroyJenks/following{/other_user}","gists_url":"https://api.github.com/users/LeeroyJenks/gists{/gist_id}","starred_url":"https://api.github.com/users/LeeroyJenks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeeroyJenks/subscriptions","organizations_url":"https://api.github.com/users/LeeroyJenks/orgs","repos_url":"https://api.github.com/users/LeeroyJenks/repos","events_url":"https://api.github.com/users/LeeroyJenks/events{/privacy}","received_events_url":"https://api.github.com/users/LeeroyJenks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2019-10-09T17:20:54Z","updated_at":"2019-10-21T20:01:20Z","closed_at":"2019-10-20T18:41:51Z","author_association":"NONE","body":"Thank you so much for this tool. It's really made it a lot easier for me to work in tandem with our back end team here and hopefully get projects out quicker.\r\n\r\nI wanted to be able to have a mutation return the passed-in value. \r\n\r\nFor example, if I have a type `Lead`:\r\n```GraphQL\r\ntype Lead {\r\n  id: ID @fake(type: uuid)\r\n  status: String @examples(values:[ \"New Lead\", \"In Communication\" ])\r\n}\r\n```\r\n\r\nAnd I extend my `QueryRoot` like so:\r\n```GraphQL\r\nextend type QueryRoot {\r\n\tleads: [Lead] @listLength(min: 0, max:20)\r\n}\r\n```\r\n\r\nAnd then extend my `MutationRoot`:\r\n```GraphQL\r\nextend type MutationRoot {\r\n  update_lead_status(lead_id:ID! status: String!): Lead\r\n}\r\n```\r\n\r\nWhen I run the mutation:\r\n```GraphQL\r\nmutation {\r\n  update_lead_status(id: \"2fe0df37-955d-4de2-bd50-d1176a1bd4c4\" status: \"New Lead\") {\r\n    id\r\n    status\r\n  }\r\n}\r\n```\r\n\r\nIt'll still return a random `id` and `status`.  Is there a way to have it return the passed-in values instead? I want to mimmic a successful mutation of values and check some Apollo caching, which would at the very least require the id to be returned.\r\n\r\nthanks!"},"comment":{"url":"https://api.github.com/repos/APIs-guru/graphql-faker/issues/comments/544682859","html_url":"https://github.com/APIs-guru/graphql-faker/issues/80#issuecomment-544682859","issue_url":"https://api.github.com/repos/APIs-guru/graphql-faker/issues/80","id":544682859,"node_id":"MDEyOklzc3VlQ29tbWVudDU0NDY4Mjg1OQ==","user":{"login":"LeeroyJenks","id":3408364,"node_id":"MDQ6VXNlcjM0MDgzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3408364?v=4","gravatar_id":"","url":"https://api.github.com/users/LeeroyJenks","html_url":"https://github.com/LeeroyJenks","followers_url":"https://api.github.com/users/LeeroyJenks/followers","following_url":"https://api.github.com/users/LeeroyJenks/following{/other_user}","gists_url":"https://api.github.com/users/LeeroyJenks/gists{/gist_id}","starred_url":"https://api.github.com/users/LeeroyJenks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeeroyJenks/subscriptions","organizations_url":"https://api.github.com/users/LeeroyJenks/orgs","repos_url":"https://api.github.com/users/LeeroyJenks/repos","events_url":"https://api.github.com/users/LeeroyJenks/events{/privacy}","received_events_url":"https://api.github.com/users/LeeroyJenks/received_events","type":"User","site_admin":false},"created_at":"2019-10-21T20:01:20Z","updated_at":"2019-10-21T20:01:20Z","author_association":"NONE","body":"I guess it was working before because I was extending an existing graphql endpoint.\r\n\r\nThank you!"}}
{"actor":{"display_login":"LeeroyJenks"}}