{"id":273,"date":"2021-05-11T19:21:05","date_gmt":"2021-05-11T19:21:05","guid":{"rendered":"http:\/\/doableyo.com\/yes\/?p=273"},"modified":"2021-05-11T19:24:57","modified_gmt":"2021-05-11T19:24:57","slug":"how-to-play-with-graphql-playground-for-mutations","status":"publish","type":"post","link":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/","title":{"rendered":"How to  play with Graphql playground for Mutation&#8217;s?"},"content":{"rendered":"\n<p>Okay, well I was also looking for solution to this and here it is:<\/p>\n\n\n\n<p>Mutation example of adding employee using Graphql Playground, most important step after you have added the code below to playground tab window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Write your query or mutation here\r\nmutation AddEmployee(\r\n  $name: String!,\r\n  $phoneNumber: String!,\r\n  $email: String! ,\r\n  $designation: String,\r\n  $image: String) {\r\n    addEmployee(employee: \r\n      { name: $name, phoneNumber:$phoneNumber, email: $email, designation: $designation, image:$image },\r\n    ) \r\n      {\r\n        emp_id\r\n        name\r\n      }\r\n    \r\n}\r\n<\/code><\/pre>\n\n\n\n<p>You need to add your JSON payload to QUERY VARIABLES tab window (which is closed by default on below main playground window, without this input payload you will not see results, but error. (keep an eye on here while you make mutation test in graphql playground)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"443\" height=\"437\" src=\"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png\" alt=\"\" class=\"wp-image-274\" srcset=\"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png 443w, http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01-300x296.png 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><figcaption>grapql-mutation-example-with-query-variable-input-parameters<\/figcaption><\/figure>\n\n\n\n<p>Thanks for visiting!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Okay, well I was also looking for solution to this and here it is: Mutation example of adding employee using Graphql Playground, most important step after you have added the code below to playground tab window: You need to add your JSON payload to QUERY VARIABLES tab window (which is closed by default on below [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":274,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,9,14],"tags":[21,20,19,22],"class_list":["post-273","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-learning-blog","category-tech","tag-apolloserver","tag-graphql","tag-graphqlmutation","tag-mutation","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to play with Graphql playground for Mutation&#039;s? - DoableYo!<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to play with Graphql playground for Mutation&#039;s? - DoableYo!\" \/>\n<meta property=\"og:description\" content=\"Okay, well I was also looking for solution to this and here it is: Mutation example of adding employee using Graphql Playground, most important step after you have added the code below to playground tab window: You need to add your JSON payload to QUERY VARIABLES tab window (which is closed by default on below [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/\" \/>\n<meta property=\"og:site_name\" content=\"DoableYo!\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-11T19:21:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-11T19:24:57+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png\" \/>\n\t<meta property=\"og:image:width\" content=\"443\" \/>\n\t<meta property=\"og:image:height\" content=\"437\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/doableyo.com\/yes\/#\/schema\/person\/0b9be73850e0b7b2bda8b903e2ea07c3\"},\"headline\":\"How to play with Graphql playground for Mutation&#8217;s?\",\"datePublished\":\"2021-05-11T19:21:05+00:00\",\"dateModified\":\"2021-05-11T19:24:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/\"},\"wordCount\":95,\"image\":{\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png\",\"keywords\":[\"apolloserver\",\"graphql\",\"graphqlmutation\",\"mutation\"],\"articleSection\":[\"Javascript\",\"Learning\",\"Tech\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/\",\"url\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/\",\"name\":\"How to play with Graphql playground for Mutation's? - DoableYo!\",\"isPartOf\":{\"@id\":\"https:\/\/doableyo.com\/yes\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png\",\"datePublished\":\"2021-05-11T19:21:05+00:00\",\"dateModified\":\"2021-05-11T19:24:57+00:00\",\"author\":{\"@id\":\"https:\/\/doableyo.com\/yes\/#\/schema\/person\/0b9be73850e0b7b2bda8b903e2ea07c3\"},\"breadcrumb\":{\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage\",\"url\":\"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png\",\"contentUrl\":\"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png\",\"width\":443,\"height\":437,\"caption\":\"graphql-mutation-add-example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/doableyo.com\/yes\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to play with Graphql playground for Mutation&#8217;s?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/doableyo.com\/yes\/#website\",\"url\":\"https:\/\/doableyo.com\/yes\/\",\"name\":\"DoableYo!\",\"description\":\"Yo is the boost behind it!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/doableyo.com\/yes\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/doableyo.com\/yes\/#\/schema\/person\/0b9be73850e0b7b2bda8b903e2ea07c3\",\"name\":\"admin\",\"url\":\"http:\/\/doableyo.com\/yes\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to play with Graphql playground for Mutation's? - DoableYo!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/","og_locale":"en_US","og_type":"article","og_title":"How to play with Graphql playground for Mutation's? - DoableYo!","og_description":"Okay, well I was also looking for solution to this and here it is: Mutation example of adding employee using Graphql Playground, most important step after you have added the code below to playground tab window: You need to add your JSON payload to QUERY VARIABLES tab window (which is closed by default on below [&hellip;]","og_url":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/","og_site_name":"DoableYo!","article_published_time":"2021-05-11T19:21:05+00:00","article_modified_time":"2021-05-11T19:24:57+00:00","og_image":[{"width":443,"height":437,"url":"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#article","isPartOf":{"@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/"},"author":{"name":"admin","@id":"https:\/\/doableyo.com\/yes\/#\/schema\/person\/0b9be73850e0b7b2bda8b903e2ea07c3"},"headline":"How to play with Graphql playground for Mutation&#8217;s?","datePublished":"2021-05-11T19:21:05+00:00","dateModified":"2021-05-11T19:24:57+00:00","mainEntityOfPage":{"@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/"},"wordCount":95,"image":{"@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage"},"thumbnailUrl":"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png","keywords":["apolloserver","graphql","graphqlmutation","mutation"],"articleSection":["Javascript","Learning","Tech"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/","url":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/","name":"How to play with Graphql playground for Mutation's? - DoableYo!","isPartOf":{"@id":"https:\/\/doableyo.com\/yes\/#website"},"primaryImageOfPage":{"@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage"},"image":{"@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage"},"thumbnailUrl":"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png","datePublished":"2021-05-11T19:21:05+00:00","dateModified":"2021-05-11T19:24:57+00:00","author":{"@id":"https:\/\/doableyo.com\/yes\/#\/schema\/person\/0b9be73850e0b7b2bda8b903e2ea07c3"},"breadcrumb":{"@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#primaryimage","url":"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png","contentUrl":"http:\/\/doableyo.com\/yes\/wp-content\/uploads\/2021\/05\/screenshot-2021-05-12-00_44_01.png","width":443,"height":437,"caption":"graphql-mutation-add-example"},{"@type":"BreadcrumbList","@id":"http:\/\/doableyo.com\/yes\/how-to-play-with-graphql-playground-for-mutations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/doableyo.com\/yes\/"},{"@type":"ListItem","position":2,"name":"How to play with Graphql playground for Mutation&#8217;s?"}]},{"@type":"WebSite","@id":"https:\/\/doableyo.com\/yes\/#website","url":"https:\/\/doableyo.com\/yes\/","name":"DoableYo!","description":"Yo is the boost behind it!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/doableyo.com\/yes\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/doableyo.com\/yes\/#\/schema\/person\/0b9be73850e0b7b2bda8b903e2ea07c3","name":"admin","url":"http:\/\/doableyo.com\/yes\/author\/admin\/"}]}},"_links":{"self":[{"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/posts\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":2,"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"predecessor-version":[{"id":276,"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/posts\/273\/revisions\/276"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/media\/274"}],"wp:attachment":[{"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/doableyo.com\/yes\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}