mobile Platform Application Updatemutation
mutation
2025-01release candidate
Requires
write_mobile_platform_applications
access scope. Please contact Shopify Support to enable this scope for your app.
Update a mobile platform application.
Arguments
The ID of the Mobile Platform Application to be updated.
The input to updat a Mobile Platform Application.
Was this section helpful?
MobilePlatformApplicationUpdatePayload returns
Anchor to MobilePlatformApplicationUpdatePayload.mobilePlatformApplicationmobilePlatform Application Created mobile platform application.
The list of errors that occurred from executing the mutation.
Was this section helpful?
Examples
Hide code
DescriptionCopy
mutation UpdateMobilePlatformApplication($id: ID!, $input: MobilePlatformApplicationUpdateInput!) { mobilePlatformApplicationUpdate(id: $id, input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }
curl -X POST \ https://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation UpdateMobilePlatformApplication($id: ID!, $input: MobilePlatformApplicationUpdateInput!) { mobilePlatformApplicationUpdate(id: $id, input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }", "variables": { "id": "gid://shopify/MobilePlatformApplication/1066175996", "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } } }'
const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation UpdateMobilePlatformApplication($id: ID!, $input: MobilePlatformApplicationUpdateInput!) { mobilePlatformApplicationUpdate(id: $id, input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }`, { variables: { "id": "gid://shopify/MobilePlatformApplication/1066175996", "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } }, }, ); const data = await response.json();
session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY mutation UpdateMobilePlatformApplication($id: ID!, $input: MobilePlatformApplicationUpdateInput!) { mobilePlatformApplicationUpdate(id: $id, input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } } QUERY variables = { "id": "gid://shopify/MobilePlatformApplication/1066175996", "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": ["A1:B2:C3:D4"] } } } response = client.query(query: query, variables: variables)
const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation UpdateMobilePlatformApplication($id: ID!, $input: MobilePlatformApplicationUpdateInput!) { mobilePlatformApplicationUpdate(id: $id, input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }`, "variables": { "id": "gid://shopify/MobilePlatformApplication/1066175996", "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } }, }, });
use Shopify\Clients\Graphql; $client = new Graphql("your-development-store.myshopify.com", $accessToken); $query = <<<QUERY mutation UpdateMobilePlatformApplication($id: ID!, $input: MobilePlatformApplicationUpdateInput!) { mobilePlatformApplicationUpdate(id: $id, input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } } QUERY; $variables = [ "id" => "gid://shopify/MobilePlatformApplication/1066175996", "input" => [ "android" => [ "applicationId" => "com.android.package", "appLinksEnabled" => true, "sha256CertFingerprints" => ["A1:B2:C3:D4"], ], ], ]; $response = $client->query(["query" => $query, "variables" => $variables]);
Hide code
Input variables
Copy
{ "id": "gid://shopify/MobilePlatformApplication/1066175996", "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } }
Hide code
Response
JSON
{ "mobilePlatformApplicationUpdate": { "mobilePlatformApplication": { "id": "gid://shopify/MobilePlatformApplication/1066175996", "applicationId": "com.android.package", "sha256CertFingerprints": [ "A1:B2:C3:D4" ], "appLinksEnabled": true, "__typename": "AndroidApplication" }, "userErrors": [] } }