| | |
| | | const GET_APPLICATIONS = ` |
| | | query GetApplications($name: String, $activityId: ID, $state: Int, $page: Int, $size: Int) { |
| | | activityPlayerApplications(name: $name, activityId: $activityId, state: $state, page: $page, size: $size) { |
| | | id playerName activityName phone applyTime state |
| | | content { |
| | | id playerName activityName projectName phone applyTime state |
| | | } |
| | | totalElements |
| | | page |
| | | size |
| | | } |
| | | } |
| | | ` |
| | |
| | | export const PlayerApi = { |
| | | getApplications: async (name, activityId, state, page, size) => { |
| | | const data = await graphqlRequest(GET_APPLICATIONS, { name, activityId, state, page, size }) |
| | | return data.activityPlayerApplications || [] |
| | | return data.activityPlayerApplications || { content: [], totalElements: 0, page: 1, size: 10 } |
| | | } |
| | | } |