Skip to content

Retrieve schema from uplink #35

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 11 commits into from
May 6, 2025
Merged

Retrieve schema from uplink #35

merged 11 commits into from
May 6, 2025

Conversation

pubmodmatt
Copy link
Contributor

@pubmodmatt pubmodmatt commented May 5, 2025

Significant rewrite of the server to support loading the supergraph schema from Uplink. Supports hot reloading the schema. A local schema file can also be used, and also supports hot reloading as the file changes.

Important Note - with this change, the MCP server requires the supergraph schema SDL, similarly to Apollo Router. It will no longer work with an API or subgraph schema. To use with a local schema file, this can be composed locally (with rover supergraph compose) or downloaded from GraphOS (with rover graph fetch). The weather example has been updated with a supergraph.graphql file.

Changes:

  • Use a state machine to run the server. This is similar to Apollo Router. The server is only ready to serve requests once the schema and operations have been loaded.
  • Add code to pull the schema from Uplink to mcp-server-registry. This code is borrowed directly from router, and should be shared long-term.
  • Fix the explorer tool - this was using the wrong method to generate the URL, and needed more validation to prevent the AI model sending incorrect input.

@pubmodmatt pubmodmatt self-assigned this May 5, 2025
@pubmodmatt pubmodmatt merged commit 2e94aab into main May 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant