Skip to content
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
3 changes: 3 additions & 0 deletions .changesets/fix_lb_supergraph_new_specs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Update SDL handling in sdl_to_api_schema function - @lennyburdette PR #365

Loads supergraph schemas using a function that supports various features, including Apollo Connectors. When supergraph loading failed, it would load it as a standard GraphQL schema, which reveals Federation query planning directives in when using the `search` and `introspection` tools.
2 changes: 1 addition & 1 deletion crates/apollo-mcp-server/src/server/states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl StateMachine {

#[allow(clippy::result_large_err)]
fn sdl_to_api_schema(schema_state: SchemaState) -> Result<Valid<Schema>, ServerError> {
match Supergraph::new(&schema_state.sdl) {
match Supergraph::new_with_router_specs(&schema_state.sdl) {
Ok(supergraph) => Ok(supergraph
.to_api_schema(ApiSchemaOptions::default())
.map_err(|e| ServerError::Federation(Box::new(e)))?
Expand Down
Loading