const axios = require('axios'); const API_URL = 'http://localhost:8080/api/graphql'; async function testRatingScheme() { try { console.log('测试评分方案是否存在...'); // 查询特定评分方案 const ratingSchemeQuery = { query: ` query { ratingScheme(id: "3") { id name description items { id name maxScore } } } ` }; const response = await axios.post(API_URL, ratingSchemeQuery); console.log('评分方案查询结果:', JSON.stringify(response.data, null, 2)); } catch (error) { console.error('查询失败:', error.response?.data || error.message); } } testRatingScheme();