mobile Platform Application Createmutation
mutation
2024-10latest
Requires write
access scope. Please contact Shopify Support to enable this scope for your app.
Create a mobile platform application.
Arguments
The input to create a mobile platform application.
Was this section helpful?
MobilePlatformApplicationCreatePayload returns
Anchor to MobilePlatformApplicationCreatePayload.mobilePlatformApplicationmobilePlatform Application Created mobile platform application.
The list of errors that occurred from executing the mutation.
Was this section helpful?
Code examples for MUTATION: mobilePlatformApplicationCreate
Query Reference for MUTATION: mobilePlatformApplicationCreate
"mutation mobilePlatformApplicationCreate($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n # MobilePlatformApplication fields\n }\n userErrors {\n field\n message\n }\n }\n}"
Input Reference for MUTATION: mobilePlatformApplicationCreate
"{\n \"input\": {\n \"android\": {\n \"appLinksEnabled\": true,\n \"applicationId\": \"<your-applicationId>\",\n \"sha256CertFingerprints\": [\n \"<your-sha256CertFingerprints>\"\n ]\n },\n \"apple\": {\n \"appClipApplicationId\": \"<your-appClipApplicationId>\",\n \"appClipsEnabled\": true,\n \"appId\": \"<your-appId>\",\n \"sharedWebCredentialsEnabled\": true,\n \"universalLinksEnabled\": true\n }\n }\n}"
Schema Reference for MUTATION: mobilePlatformApplicationCreate
"input MobilePlatformApplicationCreateInput {\n android: MobilePlatformApplicationCreateAndroidInput\n apple: MobilePlatformApplicationCreateAppleInput\n}\n\ninput MobilePlatformApplicationCreateAndroidInput {\n appLinksEnabled: Boolean!\n applicationId: String\n sha256CertFingerprints: [String!]!\n}\n\ninput MobilePlatformApplicationCreateAppleInput {\n appClipApplicationId: String\n appClipsEnabled: Boolean\n appId: String\n sharedWebCredentialsEnabled: Boolean!\n universalLinksEnabled: Boolean!\n}\n"
Display Examples for MUTATION: mobilePlatformApplicationCreate
[ { "example": { "type_name": "mobileplatformapplicationcreate", "title": "Create an Android Mobile Platform Application", "description": "Create a Mobile Platform Application for the Android platform.", "query_string": "mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AndroidApplication {\n id\n applicationId\n sha256CertFingerprints\n appLinksEnabled\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n}", "variables": { "input": { "android": { "applicationId": "com.android.package", "appLinksEnabled": true, "sha256CertFingerprints": [ "A1:B2:C3:D4" ] } } }, "response": { "data": { "mobilePlatformApplicationCreate": { "mobilePlatformApplication": { "id": "gid://shopify/MobilePlatformApplication/1066176002", "applicationId": "com.android.package", "sha256CertFingerprints": [ "A1:B2:C3:D4" ], "appLinksEnabled": true, "__typename": "AndroidApplication" }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2024-07", "maximum_api_version": "unstable", "location": "/components/mobile_support/test/unit/graph_api/admin/mutations/mobile_platform_application_create_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AndroidApplication { id applicationId sha256CertFingerprints appLinksEnabled __typename } } userErrors { field message code } } }\",\n \"variables\": {\n \"input\": {\n \"android\": {\n \"applicationId\": \"com.android.package\",\n \"appLinksEnabled\": true,\n \"sha256CertFingerprints\": [\n \"A1:B2:C3:D4\"\n ]\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AndroidApplication {\n id\n applicationId\n sha256CertFingerprints\n appLinksEnabled\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"android\": {\n \"applicationId\": \"com.android.package\",\n \"appLinksEnabled\": true,\n \"sha256CertFingerprints\": [\n \"A1:B2:C3:D4\"\n ]\n }\n }\n },\n },\n);\n\nconst data = await response.json();\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 CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AndroidApplication {\n id\n applicationId\n sha256CertFingerprints\n appLinksEnabled\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"android\": {\n \"applicationId\": \"com.android.package\",\n \"appLinksEnabled\": true,\n \"sha256CertFingerprints\": [\"A1:B2:C3:D4\"]\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AndroidApplication {\n id\n applicationId\n sha256CertFingerprints\n appLinksEnabled\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"android\": {\n \"applicationId\": \"com.android.package\",\n \"appLinksEnabled\": true,\n \"sha256CertFingerprints\": [\n \"A1:B2:C3:D4\"\n ]\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AndroidApplication {\n id\n applicationId\n sha256CertFingerprints\n appLinksEnabled\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }\nQUERY;\n\n$variables = [\n \"input\" => [\n \"android\" => [\n \"applicationId\" => \"com.android.package\",\n \"appLinksEnabled\" => true,\n \"sha256CertFingerprints\" => [\"A1:B2:C3:D4\"],\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "input", "description": "The input to create a mobile platform application.", "type": { "kind": "INPUT_OBJECT", "name": "MobilePlatformApplicationCreateInput", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "MobilePlatformApplicationCreateInput!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "input", "argValue": " {\"android\":{\"applicationId\":\"com.android.package\",\"appLinksEnabled\":true,\"sha256CertFingerprints\":[\"A1:B2:C3:D4\"]}}", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "mobileplatformapplicationcreate", "title": "Create an Apple Mobile Platform Application", "description": "Create a Mobile Platform Application for the Apple platform.", "query_string": "mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AppleApplication {\n id\n appId\n universalLinksEnabled\n sharedWebCredentialsEnabled\n appClipsEnabled\n appClipApplicationId\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n}", "variables": { "input": { "apple": { "appId": "com.apple.package", "appClipsEnabled": true, "appClipApplicationId": "clip.app", "universalLinksEnabled": false, "sharedWebCredentialsEnabled": false } } }, "response": { "data": { "mobilePlatformApplicationCreate": { "mobilePlatformApplication": { "id": "gid://shopify/MobilePlatformApplication/1066176003", "appId": "com.apple.package", "universalLinksEnabled": false, "sharedWebCredentialsEnabled": false, "appClipsEnabled": true, "appClipApplicationId": "clip.app", "__typename": "AppleApplication" }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2024-07", "location": "/components/mobile_support/test/unit/graph_api/admin/mutations/mobile_platform_application_create_test.rb", "maximum_api_version": null, "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) { mobilePlatformApplicationCreate(input: $input) { mobilePlatformApplication { ... on AppleApplication { id appId universalLinksEnabled sharedWebCredentialsEnabled appClipsEnabled appClipApplicationId __typename } } userErrors { field message code } } }\",\n \"variables\": {\n \"input\": {\n \"apple\": {\n \"appId\": \"com.apple.package\",\n \"appClipsEnabled\": true,\n \"appClipApplicationId\": \"clip.app\",\n \"universalLinksEnabled\": false,\n \"sharedWebCredentialsEnabled\": false\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AppleApplication {\n id\n appId\n universalLinksEnabled\n sharedWebCredentialsEnabled\n appClipsEnabled\n appClipApplicationId\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }`,\n {\n variables: {\n \"input\": {\n \"apple\": {\n \"appId\": \"com.apple.package\",\n \"appClipsEnabled\": true,\n \"appClipApplicationId\": \"clip.app\",\n \"universalLinksEnabled\": false,\n \"sharedWebCredentialsEnabled\": false\n }\n }\n },\n },\n);\n\nconst data = await response.json();\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 CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AppleApplication {\n id\n appId\n universalLinksEnabled\n sharedWebCredentialsEnabled\n appClipsEnabled\n appClipApplicationId\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }\nQUERY\n\nvariables = {\n \"input\": {\n \"apple\": {\n \"appId\": \"com.apple.package\",\n \"appClipsEnabled\": true,\n \"appClipApplicationId\": \"clip.app\",\n \"universalLinksEnabled\": false,\n \"sharedWebCredentialsEnabled\": false\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AppleApplication {\n id\n appId\n universalLinksEnabled\n sharedWebCredentialsEnabled\n appClipsEnabled\n appClipApplicationId\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }`,\n \"variables\": {\n \"input\": {\n \"apple\": {\n \"appId\": \"com.apple.package\",\n \"appClipsEnabled\": true,\n \"appClipApplicationId\": \"clip.app\",\n \"universalLinksEnabled\": false,\n \"sharedWebCredentialsEnabled\": false\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation CreateMobilePlatformApplication($input: MobilePlatformApplicationCreateInput!) {\n mobilePlatformApplicationCreate(input: $input) {\n mobilePlatformApplication {\n ... on AppleApplication {\n id\n appId\n universalLinksEnabled\n sharedWebCredentialsEnabled\n appClipsEnabled\n appClipApplicationId\n __typename\n }\n }\n userErrors {\n field\n message\n code\n }\n }\n }\nQUERY;\n\n$variables = [\n \"input\" => [\n \"apple\" => [\n \"appId\" => \"com.apple.package\",\n \"appClipsEnabled\" => true,\n \"appClipApplicationId\" => \"clip.app\",\n \"universalLinksEnabled\" => false,\n \"sharedWebCredentialsEnabled\" => false,\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "input", "description": "The input to create a mobile platform application.", "type": { "kind": "INPUT_OBJECT", "name": "MobilePlatformApplicationCreateInput", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "MobilePlatformApplicationCreateInput!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "input", "argValue": " {\"apple\":{\"appId\":\"com.apple.package\",\"appClipsEnabled\":true,\"appClipApplicationId\":\"clip.app\",\"universalLinksEnabled\":false,\"sharedWebCredentialsEnabled\":false}}", "typeKind": "MUTATION" } ] } ]