events Countquery
query
2024-10latest
Count of events. Limited to a maximum of 10000.
Arguments
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
Was this section helpful?
Count possible returns
Anchor to CountCountDetails for count of elements.
Was this section helpful?
Code examples for QUERY: eventsCount
Query Reference for QUERY: eventsCount
"{\n eventsCount {\n # Count fields\n }\n}"
Input Reference for QUERY: eventsCount
Schema Reference for QUERY: eventsCount
Display Examples for QUERY: eventsCount
[ { "example": { "type_name": "eventscount", "title": "Retrieve the amount of events for given filters", "description": "Retrieves the amount of events given our filters.", "query_string": "query {\n eventsCount(query: \"comments:1 AND subject_type:'PRODUCT'\") {\n count\n precision\n }\n}", "query_arguments": { "query": "comments:1 AND subject_type:'PRODUCT'" }, "response": { "data": { "eventsCount": { "count": 7, "precision": "EXACT" } } }, "api_name": "admin", "location": "/components/platform/admin/test/unit/graph_api/events_count_test.rb", "minimum_api_version": null, "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\": \"query { eventsCount(query: \\\"comments:1 AND subject_type:'\\''PRODUCT'\\''\\\") { count precision } }\"\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n eventsCount(query: \"comments:1 AND subject_type:'PRODUCT'\") {\n count\n precision\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 eventsCount(query: \"comments:1 AND subject_type:'PRODUCT'\") {\n count\n precision\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 eventsCount(query: \"comments:1 AND subject_type:'PRODUCT'\") {\n count\n precision\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 eventsCount(query: \"comments:1 AND subject_type:'PRODUCT'\") {\n count\n precision\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" }, "titleStringKey": "arguments", "inputVariableEntries": [ { "arg": { "name": "query", "description": "A filter made up of terms, connectives, modifiers, and comparators.\n| name | type | description | acceptable_values | default_value | example_use |\n| ---- | ---- | ---- | ---- | ---- | ---- |\n| action | string | The action that occured. | | | - `action:create` |\n| comments | string | Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing 0 will exclude comment-events, any other value will include comment-events. | | | - `0`<br/> - `1` |\n| created_at | time | Filter by the date and time when the event happened. | | | - `created_at:>2020-10-21T23:39:20Z`<br/> - `created_at:<now`<br/> - `created_at:<=2024` |\n| id | id | Filter by `id` range. | | | - `id:1234`<br/> - `id:>=1234`<br/> - `id:<=1234` |\n| subject_type | string | The resource type affected by this event, See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values. | | | - `COMPANY` |\nYou can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).\n", "type": { "kind": "SCALAR", "name": "String", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "String", "isDeprecated": false, "deprecationReason": null }, "key": "query", "argValue": " \"comments:1 AND subject_type:'PRODUCT'\"", "typeKind": "QUERY" } ] } ]