lrj
21 小时以前 9f8395fab13ca4b230a0f7d62636e209745c91d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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();