Version: unstable
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) { gateConfigurationUpdate(input: $input) { userErrors { field message } gateConfiguration { id reactions: metafield(namespace: \\\"myapp\\\", key: \\\"reactions\\\") { id type value description } } } }\",\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"metafields\": [\n {\n \"key\": \"reactions\",\n \"namespace\": \"myapp\",\n \"description\": \"My second gate reaction\",\n \"type\": \"json\",\n \"value\": \"{\\\"reactions\\\":\\\"test\\\"}\"\n }\n ]\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n reactions: metafield(namespace: \"myapp\", key: \"reactions\") {\n id\n type\n value\n description\n }\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"metafields\": [\n {\n \"key\": \"reactions\",\n \"namespace\": \"myapp\",\n \"description\": \"My second gate reaction\",\n \"type\": \"json\",\n \"value\": \"{\\\"reactions\\\":\\\"test\\\"}\"\n }\n ]\n }\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n reactions: metafield(namespace: \"myapp\", key: \"reactions\") {\n id\n type\n value\n description\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"metafields\": [{\"key\"=>\"reactions\", \"namespace\"=>\"myapp\", \"description\"=>\"My second gate reaction\", \"type\"=>\"json\", \"value\"=>\"{\\\"reactions\\\":\\\"test\\\"}\"}]\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[\n \"id\" => \"gid://shopify/GateConfiguration/43548663\",\n \"metafields\" => [{\"key\"=>\"reactions\", \"namespace\"=>\"myapp\", \"description\"=>\"My second gate reaction\", \"type\"=>\"json\", \"value\"=>\"{\\\"reactions\\\":\\\"test\\\"}\"}],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n reactions: metafield(namespace: \"myapp\", key: \"reactions\") {\n id\n type\n value\n description\n }\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"metafields\": [\n {\n \"key\": \"reactions\",\n \"namespace\": \"myapp\",\n \"description\": \"My second gate reaction\",\n \"type\": \"json\",\n \"value\": \"{\\\"reactions\\\":\\\"test\\\"}\"\n }\n ]\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n reactions: metafield(namespace: \"myapp\", key: \"reactions\") {\n id\n type\n value\n description\n }\n }\n }\n}"
input: { "input": { "id": "gid://shopify/GateConfiguration/43548663", "metafields": [ { "key": "reactions", "namespace": "myapp", "description": "My second gate reaction", "type": "json", "value": "{\"reactions\":\"test\"}" } ] } }
response: { "data": { "gateConfigurationUpdate": { "userErrors": [], "gateConfiguration": { "id": "gid://shopify/GateConfiguration/43548663", "reactions": { "id": "gid://shopify/Metafield/1069229041", "type": "json", "value": "{\"reactions\":\"test\"}", "description": "My second gate reaction" } } } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) { gateConfigurationUpdate(input: $input) { userErrors { field message } gateConfiguration { id name } } }\",\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"name\": \"My second gate\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n name\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"name\": \"My second gate\"\n }\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n name\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"name\": \"My second gate\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[\n \"id\" => \"gid://shopify/GateConfiguration/43548663\",\n \"name\" => \"My second gate\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n name\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/43548663\",\n \"name\": \"My second gate\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n name\n }\n }\n}"
input: { "input": { "id": "gid://shopify/GateConfiguration/43548663", "name": "My second gate" } }
response: { "data": { "gateConfigurationUpdate": { "userErrors": [], "gateConfiguration": { "id": "gid://shopify/GateConfiguration/43548663", "name": "My second gate" } } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/unstable/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) { gateConfigurationUpdate(input: $input) { userErrors { field message } gateConfiguration { id } } }\",\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/0\"\n }\n }\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/0\"\n }\n },\n },\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/0\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<[\n \"id\" => \"gid://shopify/GateConfiguration/0\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"id\": \"gid://shopify/GateConfiguration/0\"\n }\n },\n },\n);\n\nconst data = await response.json();\n" Graphql query: "mutation gateConfigurationUpdate($input: GateConfigurationUpdateInput!) {\n gateConfigurationUpdate(input: $input) {\n userErrors {\n field\n message\n }\n gateConfiguration {\n id\n }\n }\n}"
input: { "input": { "id": "gid://shopify/GateConfiguration/0" } }
response: { "data": { "gateConfigurationUpdate": { "userErrors": [ { "field": [ "input", "id" ], "message": "Unable to find gate record with id" } ], "gateConfiguration": null } } }