2024-10latest
Lookup an App by ID or return the currently authenticated App.
Arguments
The ID to lookup the App by.
Was this section helpful?
App possible returns
A Shopify application.
Was this section helpful?
Code examples for QUERY: app
Query Reference for QUERY: app
"{\n app {\n # App fields\n }\n}"
Input Reference for QUERY: app
Schema Reference for QUERY: app
Display Examples for QUERY: app
[ { "example": { "type_name": "app", "title": "Get an app by its ID", "description": "Retrieve an app with its ID, returning the app title", "query_string": "query {\n app(id: \"gid://shopify/App/193172482\") {\n title\n }\n}", "query_arguments": { "id": "gid://shopify/App/193172482" }, "response": { "data": { "app": { "title": "Invoicing Application" } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/apps/test/unit/graph_api/admin/app_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\": \"query { app(id: \\\"gid://shopify/App/193172482\\\") { title } }\"\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n app(id: \"gid://shopify/App/193172482\") {\n title\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 query {\n app(id: \"gid://shopify/App/193172482\") {\n title\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n app(id: \"gid://shopify/App/193172482\") {\n title\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 query {\n app(id: \"gid://shopify/App/193172482\") {\n title\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" }, "titleStringKey": "arguments", "inputVariableEntries": [ { "arg": { "name": "id", "description": "The ID to lookup the App by.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "ID", "isDeprecated": false, "deprecationReason": null }, "key": "id", "argValue": " \"gid://shopify/App/193172482\"", "typeKind": "QUERY" } ] }, { "example": { "type_name": "app", "title": "Get the currently authenticated app", "description": "Retrieve the currently authenticated app, returning the app title", "query_string": "query {\n app {\n title\n }\n}", "response": { "data": { "app": { "title": "Invoicing Application" } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/apps/test/unit/graph_api/admin/app_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\": \"query { app { title } }\"\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n app {\n title\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 query {\n app {\n title\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n app {\n title\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 query {\n app {\n title\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" }, "titleStringKey": "arguments", "inputVariableEntries": [] } ]