GraphOS MCP Server
Search Apollo docs, specs, and best practices
我该使用它吗
质量与安全性
发现(15)
- LOW在 ApolloConnectorsSpec 中
- LOW在 GetLaunch 中
- LOW在 GetClientMetrics 中
- LOW在 ApolloDocsSearch 中
- LOW在 ApolloConnectorsSpec 中
- LOW在 GetTopOperations 中
- LOW在 GetMyIdentity 中
- LOW在 GetSubgraphMetrics 中
- LOW在 GetLatestLaunch 中
- LOW在 GetVariantDetails 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"graphos-mcp-server": {
"url": "https://mcp.apollographql.com"
}
}
}远程端点
https://mcp.apollographql.comstreamable-http它能做什么
工具清单
工具(14)
🟢GetLaunch(graphId, variant, launchId)
Inspect a single launch by ID for full detail: status, timestamps, which subgraphs changed, composition errors, and the schema diff summary. Use to drill into a specific launch — e.g. a failed or superseded one found via GetLaunchHistory (pass its id here). Provide the graph ID, variant name, and launch ID.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"variant": {
"type": "string"
},
"launchId": {
"type": "string"
}
},
"required": [
"graphId",
"variant",
"launchId"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"variant": {
"description": "Provides details of the graph variant with the provided `name`, if a variant\nwith that name exists for this graph. Otherwise, returns null.\n\n For a list of _all_ variants associated with a graph, use `Graph.variants` instead.",
"anyOf": [
{
"type": "object",
"properties": {
"launch": {
"description": "Retrieve a launch for this variant by ID.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for this launch.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"status": {
"description": "The launch's status. If a launch is superseded, its status remains `LAUNCH_INITIATED`. To check for a superseded launch, use `supersededAt`.",
"$ref": "#/definitions/LaunchStatus"
},
"createdAt": {
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
"completedAt": {
"description": "The timestamp when the launch completed. This value is null until the launch completes.",
"anyOf": [
{
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
{
"type": "null"
}
]
},
"subgraphChanges": {
"description": "A list of subgraph changes that are included in this launch.",
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The subgraph's name.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"required": [
"name"
]
}
},
{
"type": "null"
}
]
},
"publication": {
"description": "A specific publication of a graph variant pertaining to this launch.",
"anyOf": [
{
"type": "object",
"properties": {
"compositionResult": {
"description": "The result of federated composition executed for this publication. This result includes either a supergraph schema or error details, depending on whether composition succeeded. This value is null when the publication is for a non-federated graph.",
"anyOf": [
{
"type": "object",
"properties": {
"errors": {
"description": "A list of errors that occurred during composition. Errors mean that Apollo was unable to compose the graph variant's subgraphs into a supergraph schema. If any errors are present, gateways / routers are not updated.",
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"description": "A human-readable message describing the error.",
"type": "string"
},
"code": {
"description": "A machine-readable error code.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"locations": {
"description": "Source locations related to the error.",
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"line": {
"description": "Line number.",
"type": "integer"
},
"column": {
"description": "Column number.",
"type": "integer"
}
},
"required": [
"line",
"column"
]
},
{
"type": "null"
}
]
}
}
},
"required": [
"message",
"locations"
]
}
}
},
"required": [
"errors"
]
},
{
"type": "null"
}
]
},
"diffToPrevious": {
"description": "A schema diff comparing against the schema from the most recent previous successful publication.",
"anyOf": [
{
"type": "object",
"properties": {
"changeSummary": {
"description": "Numeric summaries for each type of change in the diff.",
"type": "object",
"properties": {
"total": {
"description": "Counts for all changes.",
"type": "object",
"properties": {
"additions": {
"description": "Number of changes that are additions. This includes adding types, adding fields to object, input\nobject, and interface types, adding values to enums, adding members to interfaces and unions, and\nadding arguments.",
"type": "integer"
},
"removals": {
"description": "Number of changes that are removals. This includes removing types, removing fields from object,\ninput object, and interface types, removing values from enums, removing members from interfaces\nand unions, and removing arguments. This also includes removing @deprecated usages.",
"type": "integer"
},
"edits": {
"description": "Number of changes that are edits. This includes types changing kind, fields and arguments\nchanging type, arguments changing default value, and any description changes. This also includes\nedits to @deprecated reason strings.",
"type": "integer"
},
"deprecations": {
"description": "Number of changes that are new usages of the @deprecated directive.",
"type": "integer"
}
},
"required": [
"additions",
"removals",
"edits",
"deprecations"
]
}
},
"required": [
"total"
]
}
},
"required": [
"changeSummary"
]
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"createdAt"
]
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
},
"definitions": {
"LaunchStatus": {
"type": "string",
"enum": [
"LAUNCH_COMPLETED",
"LAUNCH_FAILED",
"LAUNCH_INITIATED"
]
}
}
}🟢GetClientMetrics(graphId, from, to, resolution, orderBy, ...)
Traffic broken down by client for a graph over a time window, as compact CSV. Columns: start timestamp, end exclusive timestamp, client name, client version, operation name, request count, request latency p50 ms, request latency p99 ms, request with error count. Answers which clients call a graph, which client versions are still on the wire, and which client drives errors or latency. Clients that do not report `apollographql-client-name`/`-version` come back with empty name and version columns. Ranked by `orderBy` descending: default REQUEST_COUNT (busiest); REQUEST_WITH_ERROR_COUNT for most error-prone, REQUEST_LATENCY_P99_MS for slowest. `variantName` and `operationName` scope to one or more variants or operations by exact name (omit for all). Rows are one per client + version + operation, so a busy graph has far more groups than the other metrics tools: scope by `operationName` or raise `limit` when a breakdown looks truncated. Keep the default `resolution` of ENTIRE_RANGE for totals and top-N, which gives one row per group ranked over the whole window. DAY/HOUR/MINUTE give one row per group per bucket ranked within each bucket, so a window total then needs a per-group sum plus a `limit` big enough to cover every bucket; too small a `limit` silently undercounts. Only HOUR and MINUTE accept a `to` of now, so use them for bursts in the last 24 hours. Avoid MONTH: it labels buckets by calendar month, not by the requested window.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"from": {
"description": "The starting timestamp for the report. Must be in the format: 2025-01-01T00:00:00Z (ISO 8601).",
"$ref": "#/definitions/Timestamp"
},
"to": {
"description": "The ending timestamp for the report. Must be in the format: 2025-01-01T08:00:00Z (ISO 8601).",
"$ref": "#/definitions/Timestamp"
},
"resolution": {
"description": "The resolution of the time groups for the report. This resolution will affect the range of times that can be used for the 'from' and\n'to' timestamps:\n- For the MINUTE resolution, the total time between 'from' and 'to' must be no more than 1 day, and the 'from' time must be no earlier than 30 days ago.\n- For the HOUR resolution, the total time between 'from' and 'to' must be no more than 7 days, and the 'from' time must be no earlier than 90 days ago.\n- For the DAY, MONTH, and ENTIRE_RANGE resolutions, the 'from' time must be no earlier than 549 days ago (approx 18 months), and the 'to' time must be no later than 1 day ago.\nIf these criteria are not met, this will return a REQUEST_INVALID error.",
"anyOf": [
{
"$ref": "#/definitions/TimeseriesReportResolution"
},
{
"type": "null"
}
],
"default": "ENTIRE_RANGE"
},
"orderBy": {
"anyOf": [
{
"$ref": "#/definitions/OperationInsightsTimeseriesReportMetric"
},
{
"type": "null"
}
],
"default": "REQUEST_COUNT"
},
"variantName": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"operationName": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"limit": {
"description": "Maximum number of records to return (default: 100, max 10000).",
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 50
}
},
"required": [
"graphId",
"from",
"to"
],
"definitions": {
"Timestamp": {
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
"TimeseriesReportResolution": {
"description": "The size of each time bucket in a timeseries report.\n\nValues:\nDAY: One-day buckets.\nENTIRE_RANGE: Single bucket containing the entire time range.\nHOUR: One-hour buckets.\nMINUTE: One-minute buckets.\nMONTH: One-month buckets.",
"type": "string",
"enum": [
"DAY",
"ENTIRE_RANGE",
"HOUR",
"MINUTE",
"MONTH"
]
},
"OperationInsightsTimeseriesReportMetric": {
"description": "\n\nValues:\nREQUEST_COUNT: \nREQUEST_LATENCY_P50_MS: \nREQUEST_LATENCY_P90_MS: \nREQUEST_LATENCY_P99_MS: \nREQUEST_WITH_ERROR_COUNT: ",
"type": "string",
"enum": [
"REQUEST_COUNT",
"REQUEST_LATENCY_P50_MS",
"REQUEST_LATENCY_P90_MS",
"REQUEST_LATENCY_P99_MS",
"REQUEST_WITH_ERROR_COUNT"
]
}
}
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"operationInsightsTimeseriesReport": {
"description": " Returns a timeseries of operation metrics across a specified time range for this graph. This will return specified metrics (request count,\n avg latency, etc) grouped by time and the specified dimensions (query ID, query name, client name, etc). This API is rate limited and only\n allows a small number of requests per minute, and will return a RATE_LIMIT_EXCEEDED error if too many requests are made for a graph. If a\nrequest to this field times out, we recommend that you try a shorter time range or fewer dimensions.",
"type": "object",
"properties": {
"csv": {
"description": "A CSV representation of the results. This includes a header and rows that have a column for start and end timestamp and all requested dimensions and metrics.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"operationInsightsTimeseriesReport"
]
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢ApolloDocsSearch(query)
Searches official Apollo documentation for GraphQL, GraphOS, Apollo Router, Apollo Client, MCP Server, schema design, deployment, and Connectors. Returns URLs, slugs, and excerpts.
输入模式
{
"type": "object",
"properties": {
"query": {
"description": "Use terms that would lead to broad result with a maximum of 2 keywords.",
"type": "string"
}
},
"required": [
"query"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"documentation": {
"description": "Access documentation pages and search functionality",
"type": "object",
"properties": {
"search": {
"description": "Search for documentation pages matching the query",
"type": "array",
"items": {
"type": "object",
"properties": {
"slug": {
"description": "Unique slug identifier for the page",
"type": "string"
},
"firstFiveHundredCharacters": {
"description": "The content of the page, optionally sliced based on input parameters",
"type": "object",
"properties": {
"content": {
"description": "The content of the section",
"type": "string"
}
},
"required": [
"content"
]
}
},
"required": [
"slug",
"firstFiveHundredCharacters"
]
}
}
},
"required": [
"search"
]
}
},
"required": [
"documentation"
]
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢ApolloConnectorsSpec
Returns the Apollo Connectors specification for guidance on creating or modifying GraphQL schemas that use @connect or @source.
输入模式
{
"type": "object",
"properties": {}
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"connectorTools": {
"description": "Fields that back Connector-related MCP tools",
"type": "object",
"properties": {
"spec": {
"description": "A specification for Apollo Connectors",
"type": "string"
}
},
"required": [
"spec"
]
}
},
"required": [
"connectorTools"
]
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢GetTopOperations(graphId, variant, from, to, limit)
Identify the most-used operations on a graph variant for a time range, with request counts, types, and signatures. Use to find high-traffic operations, detect unused operations, and prioritize findings by traffic impact. Provide graph ID, variant, and a from/to time range (ISO 8601 timestamps; `to` must be at least 6 hours before now), plus an optional limit (default 50). This report is rate limited.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"variant": {
"type": "string"
},
"from": {
"description": "The starting timestamp for the report.\n\n- Must be in the format: 2025-01-01T00:00:00Z (ISO 8601).\n - Must be within the last 549 days.\n - The duration between 'from' and 'to' must not exceed 31 days.",
"$ref": "#/definitions/Timestamp"
},
"to": {
"description": "The ending timestamp for the report.\n\n- Must be in the format: 2025-01-01T08:00:00Z (ISO 8601).\n- Must be at least 6 hours from the current time.\n - The duration between 'from' and 'to' must not exceed 31 days.",
"$ref": "#/definitions/Timestamp"
},
"limit": {
"description": "Maximum number of records to return (default: 10)",
"type": "integer",
"default": 50
}
},
"required": [
"graphId",
"variant",
"from",
"to"
],
"definitions": {
"Timestamp": {
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
}
}
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"variant": {
"description": "Provides details of the graph variant with the provided `name`, if a variant\nwith that name exists for this graph. Otherwise, returns null.\n\n For a list of _all_ variants associated with a graph, use `Graph.variants` instead.",
"anyOf": [
{
"type": "object",
"properties": {
"topOperationsReport": {
"description": "Returns a list of the top operations reported for this variant within a given time range. This API is rate limited,\nand will return an error if too many requests are made for a graph.",
"type": "array",
"items": {
"type": "object",
"properties": {
"operationId": {
"description": "The unique id for this operation.",
"type": "string"
},
"name": {
"description": "The operation name or null if the operation is unnamed.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"type": {
"description": "The operation type or null if the operation type could not be determined from the signature.",
"anyOf": [
{
"$ref": "#/definitions/OperationType"
},
{
"type": "null"
}
]
},
"requestCount": {
"description": "Long type"
},
"signature": {
"description": "The operation's signature body or null if the signature is unavailable due to parse errors.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"operationId",
"requestCount"
]
}
}
},
"required": [
"topOperationsReport"
]
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
},
"definitions": {
"OperationType": {
"type": "string",
"enum": [
"MUTATION",
"QUERY",
"SUBSCRIPTION"
]
}
}
}🟢GetMyIdentity
Resolve the caller's identity from their API key or OAuth token. Call this FIRST when the user asks about "my graph" but has not provided a graph ID. For a graph/service key, `me` resolves to a Graph: use `id` as the graphId and `variants[].name` as the variant for the graph-scoped health-check tools, so the user does not have to supply either. For a user (personal key or OAuth), `me` resolves to a User instead: there's no single graph, so each org membership's `graphs[].id` / `graphs[].variants[].name` lists the graphId/variant options the graph-scoped tools need, across every org the user belongs to. Also handles service-account keys.
输入模式
{
"type": "object",
"properties": {}
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"me": {
"description": "Returns details of the authenticated `User` or `Graph` executing this query. If this is an unauthenticated query (i.e., no API key is provided), this field returns null.",
"anyOf": [
{
"type": "object",
"properties": {
"__typename": {
"description": "The typename of this object",
"type": "string"
},
"id": {
"description": "The identity's identifier, which is unique among objects of its type.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"name": {
"description": "The identity's human-readable name.",
"type": "string"
},
"memberships": {
"description": "A list of the user's memberships in Apollo Studio organizations.",
"type": "array",
"items": {
"type": "object",
"properties": {
"account": {
"description": "The organization that the user belongs to.",
"type": "object",
"properties": {
"id": {
"description": "Globally unique identifier, which isn't guaranteed stable (can be changed by administrators).",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"name": {
"description": "Name of the organization, which can change over time and isn't unique.",
"type": "string"
},
"graphs": {
"description": "Graphs belonging to this organization.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "The graph's globally unique identifier.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"name": {
"type": "string"
},
"variants": {
"description": "A list of the variants for this graph.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The variant's name (e.g., `staging`).",
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [
"id",
"name",
"variants"
]
}
}
},
"required": [
"id",
"name",
"graphs"
]
}
},
"required": [
"account"
]
}
},
"organization": {
"description": "The organization this service account belongs to.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"description": "Globally unique identifier, which isn't guaranteed stable (can be changed by administrators).",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"name": {
"description": "Name of the organization, which can change over time and isn't unique.",
"type": "string"
}
},
"required": [
"id",
"name"
]
},
{
"type": "null"
}
]
},
"account": {
"description": "The organization that this graph belongs to.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"description": "Globally unique identifier, which isn't guaranteed stable (can be changed by administrators).",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"name": {
"description": "Name of the organization, which can change over time and isn't unique.",
"type": "string"
}
},
"required": [
"id",
"name"
]
},
{
"type": "null"
}
]
},
"variants": {
"description": "A list of the variants for this graph.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The variant's name (e.g., `staging`).",
"type": "string"
}
},
"required": [
"name"
]
}
}
},
"required": [
"id",
"name"
]
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢GetSubgraphMetrics(graphId, from, to, resolution, orderBy, ...)
Top subgraphs/connectors by traffic/health for a graph over a time window, as compact CSV. Columns: start timestamp, end exclusive timestamp, fetch service name, fetch count, fetch latency p50 ms, fetch latency p99 ms, fetch with errors count. Ranked by `orderBy` descending: default FETCH_COUNT (busiest); FETCH_WITH_ERRORS_COUNT for most error-prone, FETCH_LATENCY_P99_MS for slowest. `variantName` scopes to one or more variants (omit for all). `subgraphName` scopes to one or more subgraphs by exact name (omit for all); pattern/substring matching is not supported. `clients` scopes to the fetches driven by one or more clients; omit `clientVersion` to match every version of that client, and use GetClientMetrics to discover the names a graph sees. Keep the default `resolution` of ENTIRE_RANGE for totals and top-N, which gives one row per subgraph ranked over the whole window. DAY/HOUR/MINUTE give one row per subgraph per bucket ranked within each bucket, so a window total then needs a per-subgraph sum plus a `limit` big enough to cover every bucket; too small a `limit` silently undercounts. Only HOUR and MINUTE accept a `to` of now, so use them for bursts in the last 24 hours. Avoid MONTH: it labels buckets by calendar month, not by the requested window.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"from": {
"description": "The starting timestamp for the report. Must be in the format: 2025-01-01T00:00:00Z (ISO 8601).",
"$ref": "#/definitions/Timestamp"
},
"to": {
"description": "The ending timestamp for the report. Must be in the format: 2025-01-01T08:00:00Z (ISO 8601).",
"$ref": "#/definitions/Timestamp"
},
"resolution": {
"description": "The resolution of the time groups for the report. This resolution will affect the range of times that can be used for the 'from' and\n'to' timestamps:\n- For the MINUTE resolution, the total time between 'from' and 'to' must be no more than 1 day, and the 'from' time must be no earlier than 30 days ago.\n- For the HOUR resolution, the total time between 'from' and 'to' must be no more than 7 days, and the 'from' time must be no earlier than 90 days ago.\n- For the DAY, MONTH, and ENTIRE_RANGE resolutions, the 'from' time must be no earlier than 549 days ago (approx 18 months), and the 'to' time must be no later than 1 day ago.\nIf these criteria are not met, this will return a REQUEST_INVALID error.",
"anyOf": [
{
"$ref": "#/definitions/TimeseriesReportResolution"
},
{
"type": "null"
}
],
"default": "ENTIRE_RANGE"
},
"orderBy": {
"anyOf": [
{
"$ref": "#/definitions/SubgraphInsightsTimeseriesReportMetric"
},
{
"type": "null"
}
],
"default": "FETCH_COUNT"
},
"variantName": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"subgraphName": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"clients": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/SubgraphInsightsTimeseriesReportClientFilterInInput"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"limit": {
"description": "Maximum number of records to return (default: 100, max 10000).",
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 50
}
},
"required": [
"graphId",
"from",
"to"
],
"definitions": {
"Timestamp": {
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
"TimeseriesReportResolution": {
"description": "The size of each time bucket in a timeseries report.\n\nValues:\nDAY: One-day buckets.\nENTIRE_RANGE: Single bucket containing the entire time range.\nHOUR: One-hour buckets.\nMINUTE: One-minute buckets.\nMONTH: One-month buckets.",
"type": "string",
"enum": [
"DAY",
"ENTIRE_RANGE",
"HOUR",
"MINUTE",
"MONTH"
]
},
"SubgraphInsightsTimeseriesReportMetric": {
"description": "Metrics available for subgraph and connector timeseries fetches, representing aggregated data\ncollected over the given time window for the selected dimensions. Each request from the router to a downstream subgraph\nor connector service is counted as a fetch.\n\nValues:\nFETCH_COUNT: The total number of fetch requests sent from the router to the downstream subgraph or connector service as part of its query plan execution.\nFETCH_LATENCY_P50_MS: The 50th percentile (median) latency of fetches (in milliseconds).\nFETCH_LATENCY_P90_MS: The 90th percentile latency of fetch requests (in milliseconds).\nFETCH_LATENCY_P99_MS: The 99th percentile latency of fetch requests (in milliseconds).\nFETCH_WITH_ERRORS_COUNT: The number of fetch requests that resulted in error responses from the downstream service.",
"type": "string",
"enum": [
"FETCH_COUNT",
"FETCH_LATENCY_P50_MS",
"FETCH_LATENCY_P90_MS",
"FETCH_LATENCY_P99_MS",
"FETCH_WITH_ERRORS_COUNT"
]
},
"SubgraphInsightsTimeseriesReportClientFilterInInput": {
"description": "The named type and version of the clients to include or exclude in the subgraph and connector timeseries report.",
"type": "object",
"properties": {
"clientName": {
"description": "The client name.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"clientVersion": {
"description": "The client version.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
}
}
}
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"subgraphInsightsTimeseriesReport": {
"description": " Returns a timeseries of subgraph and connector fetch metrics across a specified time range for this graph. Each\nrequest from the router to a subgraph or connector service is counted as a fetch. A single GraphQL operation can\nresult in multiple fetches, depending on the operation shape and query plan. This will return specified metrics (fetch\ncount, avg latency, etc.) grouped by time and the specified dimensions (fetch service ID, fetch service name, client\nname, etc.). This API is rate limited and only allows a small number of requests per minute, and will return a\nRATE_LIMIT_EXCEEDED error if too many requests are made for a graph. If a request to this field times out, we\nrecommend that you try a shorter time range or fewer dimensions.",
"type": "object",
"properties": {
"csv": {
"description": "A CSV representation of the results. This includes a header and rows that have a column for start and end timestamp and all requested dimensions and metrics.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"subgraphInsightsTimeseriesReport"
]
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢GetLatestLaunch(graphId, variant)
Inspect the most recent launch for a graph variant: status, completion time, subgraph changes, composition errors, and a schema diff summary vs the previous launch (additions/removals/edits/deprecations plus affected operations). Use to assess schema composition health and the impact of recent schema changes. Also returns the latest approved launch for comparison. Provide the graph ID and variant name.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"variant": {
"type": "string"
}
},
"required": [
"graphId",
"variant"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"variant": {
"description": "Provides details of the graph variant with the provided `name`, if a variant\nwith that name exists for this graph. Otherwise, returns null.\n\n For a list of _all_ variants associated with a graph, use `Graph.variants` instead.",
"anyOf": [
{
"type": "object",
"properties": {
"latestLaunch": {
"description": "Latest launch for the variant, whether successful or not.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for this launch.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"status": {
"description": "The launch's status. If a launch is superseded, its status remains `LAUNCH_INITIATED`. To check for a superseded launch, use `supersededAt`.",
"$ref": "#/definitions/LaunchStatus"
},
"completedAt": {
"description": "The timestamp when the launch completed. This value is null until the launch completes.",
"anyOf": [
{
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
{
"type": "null"
}
]
},
"subgraphChanges": {
"description": "A list of subgraph changes that are included in this launch.",
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The subgraph's name.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"required": [
"name"
]
}
},
{
"type": "null"
}
]
},
"publication": {
"description": "A specific publication of a graph variant pertaining to this launch.",
"anyOf": [
{
"type": "object",
"properties": {
"compositionResult": {
"description": "The result of federated composition executed for this publication. This result includes either a supergraph schema or error details, depending on whether composition succeeded. This value is null when the publication is for a non-federated graph.",
"anyOf": [
{
"type": "object",
"properties": {
"errors": {
"description": "A list of errors that occurred during composition. Errors mean that Apollo was unable to compose the graph variant's subgraphs into a supergraph schema. If any errors are present, gateways / routers are not updated.",
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"description": "A human-readable message describing the error.",
"type": "string"
},
"code": {
"description": "A machine-readable error code.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"locations": {
"description": "Source locations related to the error.",
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"line": {
"description": "Line number.",
"type": "integer"
},
"column": {
"description": "Column number.",
"type": "integer"
}
},
"required": [
"line",
"column"
]
},
{
"type": "null"
}
]
}
}
},
"required": [
"message",
"locations"
]
}
}
},
"required": [
"errors"
]
},
{
"type": "null"
}
]
},
"diffToPrevious": {
"description": "A schema diff comparing against the schema from the most recent previous successful publication.",
"anyOf": [
{
"type": "object",
"properties": {
"changeSummary": {
"description": "Numeric summaries for each type of change in the diff.",
"type": "object",
"properties": {
"total": {
"description": "Counts for all changes.",
"type": "object",
"properties": {
"additions": {
"description": "Number of changes that are additions. This includes adding types, adding fields to object, input\nobject, and interface types, adding values to enums, adding members to interfaces and unions, and\nadding arguments.",
"type": "integer"
},
"removals": {
"description": "Number of changes that are removals. This includes removing types, removing fields from object,\ninput object, and interface types, removing values from enums, removing members from interfaces\nand unions, and removing arguments. This also includes removing @deprecated usages.",
"type": "integer"
},
"edits": {
"description": "Number of changes that are edits. This includes types changing kind, fields and arguments\nchanging type, arguments changing default value, and any description changes. This also includes\nedits to @deprecated reason strings.",
"type": "integer"
},
"deprecations": {
"description": "Number of changes that are new usages of the @deprecated directive.",
"type": "integer"
}
},
"required": [
"additions",
"removals",
"edits",
"deprecations"
]
},
"field": {
"description": "Counts for changes to fields of objects, input objects, and interfaces.",
"type": "object",
"properties": {
"additions": {
"description": "Number of changes that are additions of fields to object, interface, and input types.",
"type": "integer"
},
"removals": {
"description": "Number of changes that are removals of fields from object, interface, and input types.",
"type": "integer"
},
"edits": {
"description": "Number of changes that are field edits. This includes fields changing type and any field\ndeprecation and description changes, but also includes any argument changes and any input object\nfield changes.",
"type": "integer"
}
},
"required": [
"additions",
"removals",
"edits"
]
}
},
"required": [
"total",
"field"
]
},
"affectedQueries": {
"description": "Operations affected by all changes in the diff.",
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"name": {
"description": "Name provided for the operation, which can be empty string if it is an anonymous operation",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"isValid": {
"description": "Determines if this query validates against the proposed schema",
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"markedAsIgnored": {
"description": "Whether this operation was ignored and its severity was downgraded for that reason",
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"markedAsSafe": {
"description": "Whether the changes were marked as safe and its severity was downgraded for that reason",
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
"required": [
"id"
]
}
},
{
"type": "null"
}
]
}
},
"required": [
"changeSummary"
]
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status"
]
},
{
"type": "null"
}
]
},
"latestApprovedLaunch": {
"description": "Latest approved launch for the variant, and what is served through Uplink.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for this launch.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"status": {
"description": "The launch's status. If a launch is superseded, its status remains `LAUNCH_INITIATED`. To check for a superseded launch, use `supersededAt`.",
"$ref": "#/definitions/LaunchStatus"
},
"completedAt": {
"description": "The timestamp when the launch completed. This value is null until the launch completes.",
"anyOf": [
{
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status"
]
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
},
"definitions": {
"LaunchStatus": {
"type": "string",
"enum": [
"LAUNCH_COMPLETED",
"LAUNCH_FAILED",
"LAUNCH_INITIATED"
]
}
}
}🟢GetVariantDetails(graphId, variant)
Retrieve metadata for a graph variant: its identifier, federation version, the URL of its GraphQL endpoint, and its subgraph inventory (names only). Use this to assess a variant's composition setup, such as subgraph inventory and federation version compliance. Provide the graph ID and variant name (e.g., "production").
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"variant": {
"type": "string"
}
},
"required": [
"graphId",
"variant"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"variant": {
"description": "Provides details of the graph variant with the provided `name`, if a variant\nwith that name exists for this graph. Otherwise, returns null.\n\n For a list of _all_ variants associated with a graph, use `Graph.variants` instead.",
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"description": "The variant's global identifier in the form `graphID@variant`.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"name": {
"description": "The variant's name (e.g., `staging`).",
"type": "string"
},
"federationVersion": {
"description": "Federation version this variant uses",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"url": {
"description": "The URL of the variant's GraphQL endpoint for query and mutation operations. For subscription operations, use `subscriptionUrl`.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"subgraphs": {
"description": "A list of the subgraphs included in this variant. This value is null for non-federated variants. Set `includeDeleted` to `true` to include deleted subgraphs.",
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The subgraph's name.",
"type": "string"
}
},
"required": [
"name"
]
}
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name"
]
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢GetLaunchHistory(graphId, variant, limit, offset)
Retrieve recent launches for a graph variant (most recent first) to detect deployment instability such as repeated failures or frequent superseded launches. Each entry includes the launch id, status, and timestamps, so you can identify a specific launch and drill into it with GetLaunch. Use to assess deployment stability. Provide the graph ID, variant name, and optionally a limit (default 20 most recent launches, max 100 per page) and an offset to page further back.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"variant": {
"type": "string"
},
"limit": {
"type": "integer",
"default": 20
},
"offset": {
"type": "integer",
"default": 0
}
},
"required": [
"graphId",
"variant"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"variant": {
"description": "Provides details of the graph variant with the provided `name`, if a variant\nwith that name exists for this graph. Otherwise, returns null.\n\n For a list of _all_ variants associated with a graph, use `Graph.variants` instead.",
"anyOf": [
{
"type": "object",
"properties": {
"launchSummaries": {
"description": "A list of launches metadata ordered by date, asc or desc depending on orderBy. The maximum limit is 100.",
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"description": "The unique identifier for this launch.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"status": {
"description": "The launch's status. If a launch is superseded, its status remains `LAUNCH_INITIATED`. To check for a superseded launch, use `supersededAt`.",
"$ref": "#/definitions/LaunchStatus"
},
"createdAt": {
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
"completedAt": {
"description": "The timestamp when the launch completed. This value is null until the launch completes.",
"anyOf": [
{
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"createdAt"
]
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
},
"definitions": {
"LaunchStatus": {
"type": "string",
"enum": [
"LAUNCH_COMPLETED",
"LAUNCH_FAILED",
"LAUNCH_INITIATED"
]
}
}
}🟢GetLintResults(graphId, limit)
Retrieve schema lint violations from a graph's most recent check workflows: each diagnostic's coordinate, severity level, message, rule, and source location, plus error/warning/total/ignored counts. Use to assess schema quality and naming/best-practice violations. Provide the graph ID and optionally a limit (default 5 most recent check workflows).
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"limit": {
"type": "integer",
"default": 5
}
},
"required": [
"graphId"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"checkWorkflows": {
"description": "Get check workflows for this graph ordered by creation time, most recent first.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"status": {
"description": "Overall status of the workflow, based on the underlying task statuses.",
"$ref": "#/definitions/CheckWorkflowStatus"
},
"completedAt": {
"description": "The timestamp when the check workflow completed.",
"anyOf": [
{
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
{
"type": "null"
}
]
},
"implementingServiceName": {
"description": "The name of the implementing service that was responsible for triggering the validation.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"tasks": {
"description": "The set of check tasks associated with this workflow, e.g. composition, operations, etc.",
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/CheckWorkflowTaskStatus"
},
"result": {
"anyOf": [
{
"type": "object",
"properties": {
"diagnostics": {
"description": "The set of lint rule violations found in the schema.",
"type": "array",
"items": {
"type": "object",
"properties": {
"coordinate": {
"description": "The schema coordinate of this diagnostic.",
"type": "string"
},
"level": {
"description": "The graph's configured level for the rule.",
"$ref": "#/definitions/LintDiagnosticLevel"
},
"message": {
"description": "The message describing the rule violation.",
"type": "string"
},
"rule": {
"description": "The lint rule being violated.",
"$ref": "#/definitions/LintRule"
},
"sourceLocations": {
"description": "The human readable position in the file of the rule violation.",
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"anyOf": [
{
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
},
"required": [
"line",
"column"
]
},
{
"type": "null"
}
]
},
"end": {
"anyOf": [
{
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
},
"required": [
"line",
"column"
]
},
{
"type": "null"
}
]
},
"subgraphName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
}
}
}
},
"required": [
"coordinate",
"level",
"message",
"rule",
"sourceLocations"
]
}
},
"stats": {
"description": "Stats generated from the resulting diagnostics.",
"type": "object",
"properties": {
"errorsCount": {
"description": "Total number of lint errors.",
"type": "integer"
},
"warningsCount": {
"description": "Total number of lint warnings.",
"type": "integer"
},
"totalCount": {
"description": "Total number of lint rules violated.",
"type": "integer"
},
"ignoredCount": {
"description": "Total number of lint rules ignored.",
"type": "integer"
}
},
"required": [
"errorsCount",
"warningsCount",
"totalCount",
"ignoredCount"
]
}
},
"required": [
"diagnostics",
"stats"
]
},
{
"type": "null"
}
]
}
}
}
}
},
"required": [
"id",
"status",
"tasks"
]
}
}
},
"required": [
"checkWorkflows"
]
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
},
"definitions": {
"CheckWorkflowStatus": {
"type": "string",
"enum": [
"FAILED",
"PASSED",
"PENDING"
]
},
"CheckWorkflowTaskStatus": {
"type": "string",
"enum": [
"BLOCKED",
"FAILED",
"PASSED",
"PENDING"
]
},
"LintDiagnosticLevel": {
"description": "The severity level of an lint result.",
"type": "string",
"enum": [
"ERROR",
"IGNORED",
"WARNING"
]
},
"LintRule": {
"type": "string",
"enum": [
"ALL_ELEMENTS_REQUIRE_DESCRIPTION",
"CONTACT_DIRECTIVE_MISSING",
"DEFINED_TYPES_ARE_UNUSED",
"DEPRECATED_DIRECTIVE_MISSING_REASON",
"DIRECTIVE_COMPOSITION",
"DIRECTIVE_NAMES_SHOULD_BE_CAMEL_CASE",
"DOES_NOT_PARSE",
"ENUM_PREFIX",
"ENUM_SUFFIX",
"ENUM_USED_AS_INPUT_WITHOUT_SUFFIX",
"ENUM_USED_AS_OUTPUT_DESPITE_SUFFIX",
"ENUM_VALUES_SHOULD_BE_SCREAMING_SNAKE_CASE",
"FIELD_NAMES_SHOULD_BE_CAMEL_CASE",
"FROM_SUBGRAPH_DOES_NOT_EXIST",
"INCONSISTENT_ARGUMENT_PRESENCE",
"INCONSISTENT_BUT_COMPATIBLE_ARGUMENT_TYPE",
"INCONSISTENT_BUT_COMPATIBLE_FIELD_TYPE",
"INCONSISTENT_DEFAULT_VALUE_PRESENCE",
"INCONSISTENT_DESCRIPTION",
"INCONSISTENT_ENTITY",
"INCONSISTENT_ENUM_VALUE_FOR_INPUT_ENUM",
"INCONSISTENT_ENUM_VALUE_FOR_OUTPUT_ENUM",
"INCONSISTENT_EXECUTABLE_DIRECTIVE_LOCATIONS",
"INCONSISTENT_EXECUTABLE_DIRECTIVE_PRESENCE",
"INCONSISTENT_EXECUTABLE_DIRECTIVE_REPEATABLE",
"INCONSISTENT_INPUT_OBJECT_FIELD",
"INCONSISTENT_INTERFACE_VALUE_TYPE_FIELD",
"INCONSISTENT_NON_REPEATABLE_DIRECTIVE_ARGUMENTS",
"INCONSISTENT_OBJECT_VALUE_TYPE_FIELD",
"INCONSISTENT_RUNTIME_TYPES_FOR_SHAREABLE_RETURN",
"INCONSISTENT_TYPE_SYSTEM_DIRECTIVE_LOCATIONS",
"INCONSISTENT_TYPE_SYSTEM_DIRECTIVE_REPEATABLE",
"INCONSISTENT_UNION_MEMBER",
"INPUT_ARGUMENT_NAMES_SHOULD_BE_CAMEL_CASE",
"INPUT_TYPE_SUFFIX",
"INTERFACE_PREFIX",
"INTERFACE_SUFFIX",
"MERGED_NON_REPEATABLE_DIRECTIVE_ARGUMENTS",
"NO_EXECUTABLE_DIRECTIVE_INTERSECTION",
"NULLABLE_PATH_VARIABLE",
"OBJECT_PREFIX",
"OBJECT_SUFFIX",
"OVERRIDDEN_FIELD_CAN_BE_REMOVED",
"OVERRIDE_DIRECTIVE_CAN_BE_REMOVED",
"OVERRIDE_MIGRATION_IN_PROGRESS",
"QUERY_DOCUMENT_DECLARATION",
"RESTY_FIELD_NAMES",
"TAG_DIRECTIVE_USES_UNKNOWN_NAME",
"TYPE_NAMES_SHOULD_BE_PASCAL_CASE",
"TYPE_PREFIX",
"TYPE_SUFFIX",
"UNUSED_ENUM_TYPE"
]
}
}
}🟢ApolloDocsRead(slug, chunkIndex)
Reads an Apollo documentation page by slug in chunks. Use slugs returned by ApolloDocsSearch.
输入模式
{
"type": "object",
"properties": {
"slug": {
"description": "The slug returned from the ApolloDocsSearch tool",
"type": "string"
},
"chunkIndex": {
"description": "The character index to start reading from, will return up to the next 10000 characters",
"type": "integer"
}
},
"required": [
"slug",
"chunkIndex"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"documentation": {
"description": "Access documentation pages and search functionality",
"type": "object",
"properties": {
"page": {
"description": "Retrieve a specific documentation page by its slug",
"anyOf": [
{
"type": "object",
"properties": {
"url": {
"description": "The full URL of the documentation page",
"type": "string"
},
"slug": {
"description": "Unique slug identifier for the page",
"type": "string"
},
"contentSlice": {
"description": "The content of the page, optionally sliced based on input parameters",
"type": "object",
"properties": {
"content": {
"description": "The content of the section",
"type": "string"
},
"index": {
"description": "The index of the section",
"type": "integer"
},
"totalCount": {
"description": "Total number of sections available",
"type": "integer"
}
},
"required": [
"content",
"index",
"totalCount"
]
}
},
"required": [
"url",
"slug",
"contentSlice"
]
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"documentation"
]
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢GetPersistedQueryListStatus(graphId, variant)
Check whether a graph variant has a Persisted Query List (PQL) and its current build (revision and operation count). Use to assess PQL configuration — a production variant with no PQL is a security gap. Provide the graph ID and variant name.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"variant": {
"type": "string"
}
},
"required": [
"graphId",
"variant"
]
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"variant": {
"description": "Provides details of the graph variant with the provided `name`, if a variant\nwith that name exists for this graph. Otherwise, returns null.\n\n For a list of _all_ variants associated with a graph, use `Graph.variants` instead.",
"anyOf": [
{
"type": "object",
"properties": {
"persistedQueryList": {
"description": "The Persisted Query List linked to this variant, if any.",
"anyOf": [
{
"type": "object",
"properties": {
"currentBuild": {
"description": "The current build of this PQL.",
"type": "object",
"properties": {
"revision": {
"description": "The revision of this Persisted Query List. Revision 0 is the initial empty list; each publish increments the revision by 1.",
"type": "integer"
},
"totalOperationsInList": {
"description": "The total number of operations in the list after this build. Compare to PersistedQueriesPublish.operationCounts.",
"type": "integer"
}
},
"required": [
"revision",
"totalOperationsInList"
]
}
},
"required": [
"currentBuild"
]
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}🟢GetOperationMetrics(graphId, from, to, resolution, orderBy, ...)
Top operations by usage/health for a graph over a time window, as compact CSV. Columns: start timestamp, end exclusive timestamp, operation name, request count, request latency p50 ms, request latency p99 ms, request with error count. Ranked by `orderBy` descending: default REQUEST_COUNT (busiest); REQUEST_WITH_ERROR_COUNT for most error-prone, REQUEST_LATENCY_P99_MS for slowest. `variantName` scopes to one or more variants (omit for all). `clients` scopes to one or more clients; omit `clientVersion` to match every version of that client, and use GetClientMetrics to discover the names a graph sees. Keep the default `resolution` of ENTIRE_RANGE for totals and top-N, which gives one row per operation ranked over the whole window. DAY/HOUR/MINUTE give one row per operation per bucket ranked within each bucket, so a window total then needs a per-operation sum plus a `limit` big enough to cover every bucket; too small a `limit` silently undercounts. Only HOUR and MINUTE accept a `to` of now, so use them for bursts in the last 24 hours. Avoid MONTH: it labels buckets by calendar month, not by the requested window.
输入模式
{
"type": "object",
"properties": {
"graphId": {
"type": "string"
},
"from": {
"description": "The starting timestamp for the report. Must be in the format: 2025-01-01T00:00:00Z (ISO 8601).",
"$ref": "#/definitions/Timestamp"
},
"to": {
"description": "The ending timestamp for the report. Must be in the format: 2025-01-01T08:00:00Z (ISO 8601).",
"$ref": "#/definitions/Timestamp"
},
"resolution": {
"description": "The resolution of the time groups for the report. This resolution will affect the range of times that can be used for the 'from' and\n'to' timestamps:\n- For the MINUTE resolution, the total time between 'from' and 'to' must be no more than 1 day, and the 'from' time must be no earlier than 30 days ago.\n- For the HOUR resolution, the total time between 'from' and 'to' must be no more than 7 days, and the 'from' time must be no earlier than 90 days ago.\n- For the DAY, MONTH, and ENTIRE_RANGE resolutions, the 'from' time must be no earlier than 549 days ago (approx 18 months), and the 'to' time must be no later than 1 day ago.\nIf these criteria are not met, this will return a REQUEST_INVALID error.",
"anyOf": [
{
"$ref": "#/definitions/TimeseriesReportResolution"
},
{
"type": "null"
}
],
"default": "ENTIRE_RANGE"
},
"orderBy": {
"anyOf": [
{
"$ref": "#/definitions/OperationInsightsTimeseriesReportMetric"
},
{
"type": "null"
}
],
"default": "REQUEST_COUNT"
},
"variantName": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"clients": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/OperationInsightsTimeseriesReportClientFilterInInput"
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"limit": {
"description": "Maximum number of records to return (default: 100, max 10000).",
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": 50
}
},
"required": [
"graphId",
"from",
"to"
],
"definitions": {
"Timestamp": {
"description": "ISO 8601, extended format with nanoseconds, Zulu (or \"[+-]seconds\" as a string or number relative to now)"
},
"TimeseriesReportResolution": {
"description": "The size of each time bucket in a timeseries report.\n\nValues:\nDAY: One-day buckets.\nENTIRE_RANGE: Single bucket containing the entire time range.\nHOUR: One-hour buckets.\nMINUTE: One-minute buckets.\nMONTH: One-month buckets.",
"type": "string",
"enum": [
"DAY",
"ENTIRE_RANGE",
"HOUR",
"MINUTE",
"MONTH"
]
},
"OperationInsightsTimeseriesReportMetric": {
"description": "\n\nValues:\nREQUEST_COUNT: \nREQUEST_LATENCY_P50_MS: \nREQUEST_LATENCY_P90_MS: \nREQUEST_LATENCY_P99_MS: \nREQUEST_WITH_ERROR_COUNT: ",
"type": "string",
"enum": [
"REQUEST_COUNT",
"REQUEST_LATENCY_P50_MS",
"REQUEST_LATENCY_P90_MS",
"REQUEST_LATENCY_P99_MS",
"REQUEST_WITH_ERROR_COUNT"
]
},
"OperationInsightsTimeseriesReportClientFilterInInput": {
"description": "The named type and version of the clients to include or exclude in the operation timeseries report.",
"type": "object",
"properties": {
"clientName": {
"description": "The client name.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"clientVersion": {
"description": "The client version.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
}
}
}
}输出模式
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"graph": {
"description": "Returns details of the graph with the provided ID.",
"anyOf": [
{
"type": "object",
"properties": {
"operationInsightsTimeseriesReport": {
"description": " Returns a timeseries of operation metrics across a specified time range for this graph. This will return specified metrics (request count,\n avg latency, etc) grouped by time and the specified dimensions (query ID, query name, client name, etc). This API is rate limited and only\n allows a small number of requests per minute, and will return a RATE_LIMIT_EXCEEDED error if too many requests are made for a graph. If a\nrequest to this field times out, we recommend that you try a shorter time range or fewer dimensions.",
"type": "object",
"properties": {
"csv": {
"description": "A CSV representation of the results. This includes a header and rows that have a column for start and end timestamp and all requested dimensions and metrics.",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"operationInsightsTimeseriesReport"
]
},
{
"type": "null"
}
]
}
}
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
}
}
}
},
"path": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
},
"extensions": {
"type": "object"
}
},
"required": [
"message"
]
}
},
"extensions": {
"type": "object"
}
}
}社区
证据