lrj
昨天 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
const axios = require('axios');
 
const API_URL = 'http://localhost:8080/api/graphql';
 
async function testActivityExists() {
    try {
        console.log('测试活动是否存在...');
        
        // 查询特定活动
        const activityQuery = {
            query: `
                query {
                    activity(id: "55") {
                        id
                        name
                        description
                        signupDeadline
                        state
                        ratingSchemeId
                    }
                }
            `
        };
        
        const response = await axios.post(API_URL, activityQuery);
        console.log('活动查询结果:', JSON.stringify(response.data, null, 2));
        
    } catch (error) {
        console.error('查询失败:', error.response?.data || error.message);
    }
}
 
testActivityExists();