(t *testing.T)
| 137 | } |
| 138 | |
| 139 | func TestHandleExecuteGraphQL_MissingQuery(t *testing.T) { |
| 140 | ms := mockMcpServerWithConfig(MCPConfig{ |
| 141 | AllowRawQueries: true, |
| 142 | AllowMutations: true, |
| 143 | }) |
| 144 | ctx := context.Background() |
| 145 | |
| 146 | req := newToolRequest(map[string]any{ |
| 147 | // No query provided |
| 148 | }) |
| 149 | |
| 150 | result, err := ms.handleExecuteGraphQL(ctx, req) |
| 151 | if err != nil { |
| 152 | t.Fatalf("Unexpected error: %v", err) |
| 153 | } |
| 154 | |
| 155 | assertToolError(t, result, "query is required") |
| 156 | } |
| 157 | |
| 158 | func TestHandleExecuteGraphQL_EmptyQuery(t *testing.T) { |
| 159 | ms := mockMcpServerWithConfig(MCPConfig{ |
nothing calls this directly
no test coverage detected