(t *testing.T)
| 156 | } |
| 157 | |
| 158 | func TestHandleExecuteGraphQL_EmptyQuery(t *testing.T) { |
| 159 | ms := mockMcpServerWithConfig(MCPConfig{ |
| 160 | AllowRawQueries: true, |
| 161 | AllowMutations: true, |
| 162 | }) |
| 163 | ctx := context.Background() |
| 164 | |
| 165 | req := newToolRequest(map[string]any{ |
| 166 | "query": "", |
| 167 | }) |
| 168 | |
| 169 | result, err := ms.handleExecuteGraphQL(ctx, req) |
| 170 | if err != nil { |
| 171 | t.Fatalf("Unexpected error: %v", err) |
| 172 | } |
| 173 | |
| 174 | assertToolError(t, result, "query is required") |
| 175 | } |
| 176 | |
| 177 | func TestHandleExecuteGraphQL_MutationBlocked(t *testing.T) { |
| 178 | ms := mockMcpServerWithConfig(MCPConfig{ |
nothing calls this directly
no test coverage detected