Skip to content

Conversation

@dimitrovmaksim
Copy link
Member

@dimitrovmaksim dimitrovmaksim commented Jan 19, 2026

Resolves #6248

This PR improves graphman remove command and remove mutation feedback when passing incorrect argument or non existing subgraph name.

  • Updated graphman remove to accept DeploymentSearch to ensure only subgraph names are accepted
  • Added StoreError::SubgraphNotFound(String) variant to provide typed errors for missing subgraphs
  • Changed to return Err(SubgraphNotFound) instead of Ok(vec![]) when the subgraph doesn't exist
  • Log successful subgraph removal to the console.
  • Return SubgraphNotFound error through the graphman graphql api for non existing subgraphs instead of success: true
  • Added tests and test fixes

…t subgraph

Previously, remove_subgraph returned Ok(vecsilently when the
subgraph didn't exist. Now it returns a proper StoreError::SubgraphNotFound
error with the subgraph name, giving users clear feedback.

Signed-off-by: Maksim Dimitrov <[email protected]>
Change the remove command to accept DeploymentSearch and validate
that only subgraph names are accepted. Passing an IPFS hash or schema
namespace now returns a clear error message instead of being silently
treated as a name.

Signed-off-by: Maksim Dimitrov <[email protected]>
…olver

Add missing .map_err(GraphmanError::from) to properly convert
store errors (including the new SubgraphNotFound) to GraphQL errors.

Signed-off-by: Maksim Dimitrov <[email protected]>
The test was silently passing because remove_subgraph returned Ok(vecfor non-existent subgraphs. Now that SubgraphNotFound error is properly
returned, the test needs to actually create the subgraph first.

Signed-off-by: Maksim Dimitrov <[email protected]>
…aphs that may not exist

Signed-off-by: Maksim Dimitrov <[email protected]>
@dimitrovmaksim dimitrovmaksim changed the title Feat/improve graphman remove feedback Improve graphman remove feedback Jan 19, 2026
@dimitrovmaksim dimitrovmaksim self-assigned this Jan 19, 2026
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.

Improve graphman remove feedback

1 participant