Skip to content

Operation Collections Docs #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/command-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
| `-x, --explorer` | Expose a tool that returns the URL to open a GraphQL operation in Apollo Explorer (requires `APOLLO_GRAPH_REF`). |
| `-o, --operations [<OPERATIONS>...]` | Operation files to expose as MCP tools. [Learn more](/apollo-mcp-server/guides/#from-operation-files). |
| `--manifest <MANIFEST>` | The path to the persisted query manifest containing operations. |
| `--collection <COLLECTION_ID>` | The ID of an operation collection to use as the source for operations (requires `APOLLO_KEY`). If `default` is used instead of an ID, the MCP Tools for `APOLLO_GRAPH_REF` will be used as the source. |
| `--collection <COLLECTION_ID>` | The ID of an operation collection to use as the source for operations (requires `APOLLO_KEY`). If `default` is used instead of an ID, the MCP Tools for `APOLLO_GRAPH_REF` will be used as the source. [Learn more](/apollo-mcp-server/guides/#from-operation-collection) |

Check warning on line 112 in docs/source/command-reference.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/command-reference.mdx#L112

Use the present tense instead of the future tense. The phrase 'will be used' should be 'is used'. ```suggestion | <code>--collection <COLLECTION_ID></code> | The ID of an operation collection to use as the source for operations (requires <code>APOLLO_KEY</code>). If <code>default</code> is used instead of an ID, the MCP Tools for <code>APOLLO_GRAPH_REF</code> is used as the source. [Learn more](/apollo-mcp-server/guides/#from-operation-collection) | ```
| `--disable-type-description` | Disable operation root field types in tool description. |
| `--disable-schema-description` | Disable schema type definitions referenced by all fields returned by the operation in the tool description. |
| `-m, --allow-mutations <ALLOW_MUTATIONS>` | [default: `none`]<br /><br />Possible values:<ul><li>`none`: Don't allow any mutations</li><li>`explicit`: Allow explicit mutations, but don't allow the LLM to build them</li><li>`all`: Allow the LLM to build mutations</li></ul> |
Expand Down
20 changes: 20 additions & 0 deletions docs/source/guides/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,26 @@

Files and directories specified with `--operations` will be hot reloaded. When specifying a file, the MCP tool will be updated when the file contents are modified. When specifying a directory, operations exposed as MCP tools will be updated when files are added, modified, or removed from the directory.

### From Operation Collection

Check warning on line 74 in docs/source/guides/index.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/guides/index.mdx#L74

Headings in tutorials and guides should use imperative verbs. ```suggestion ### Use an operation collection ```

For graphs managed by GraphOS, Apollo MCP Server can get operations from an [Operation Collection](https://www.apollographql.com/docs/graphos/platform/explorer/operation-collections).

To use a GraphOS Operation Collection, you must:

- Set `APOLLO_GRAPH_REF` and `APOLLO_KEY` environment variables for a GraphOS graph

Each variant will have it's own default MCP Tools Collection, but you can specify any shared collection by using `--collection <collection-id>`.

Check failure on line 82 in docs/source/guides/index.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/guides/index.mdx#L82

The word 'it's' is a contraction for 'it is'. The correct possessive pronoun is 'its'. Additionally, use the present tense ('has') instead of the future tense ('will have'). ```suggestion Each variant has its own default MCP Tools Collection, but you can specify any shared collection by using <code>--collection <collection-id></code>. ```
Apollo MCP Server will automatically fetch the default collection if no id is specified.

Check warning on line 83 in docs/source/guides/index.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/guides/index.mdx#L83

Use the present tense ('fetches') instead of the future tense ('will automatically fetch'). Use active voice ('if you don't specify an ID') and use 'ID' for a generic identifier. The trailing space should also be removed. ```suggestion Apollo MCP Server automatically fetches the default collection if you don't specify an ID. ```

```sh title="Example command using a GraphOS Operation Collection"
apollo-mcp-server \
--directory <absolute path to this git repo> \
--schema graphql/weather/api.graphql \
--collection <collection-id>
```

The MCP Server supports hot reloading of the GraphOS Operation Collection, so it can automatically pick up changes from GraphOS without restarting.

Check notice on line 92 in docs/source/guides/index.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/guides/index.mdx#L92

For clarity and simplicity, replace the phrasal verb 'pick up' with a more direct verb like 'load'. ```suggestion The MCP Server supports hot reloading of the GraphOS Operation Collection, so it automatically loads changes from GraphOS without restarting. ```

### From persisted query manifests

Apollo MCP Server supports reading GraphQL operations from Apollo-formatted [persisted query manifest](/graphos/platform/security/persisted-queries#manifest-format) files.
Expand Down