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();