Skip to content

Latest commit

 

History

History
208 lines (179 loc) · 2.97 KB

mobile-queries.md

File metadata and controls

208 lines (179 loc) · 2.97 KB

List of GQL API Queries used by the Mobile App

Summary:

activeConfiguration(key: "TRIVIA_CRACK").data
me.teams.team;
me.primaryCommittee;
me.primaryTeam(teamType: TeamType).team.pointEntries.personFrom
me.primaryTeam(teamType: TeamType).team.members.person
me.fundraisingAssignments.entry;
loginState.loggedIn;
device(uuid: String).data.notificationDeliveries.notification
events(dateFilters: [{comparison: GREATER_THAN_OR_EQUAL_TO, field: occurrenceStart, value: DateTimeISO }, { comparison: LESS_THAN_OR_EQUAL_TO, field: occurrenceStart, value: DateTimeISO }], sortDirection: asc, sortBy: "occurrence").data.occurrences.interval
events(...).data.images
feed(limit: 20).image
currentMarathon.mapImages;
latestMarathon.hours.mapImages;
teams(sortBy: ["totalPoints", "name"], sortDirection: [desc, asc], type: TeamType, marathonId: GlobalId, sendAll: true).data
currentMarathon.id;
registerDevice(input: RegisterDeviceInput)

Queries:

query MobileQuery(
  $type: TeamType!
  $deviceUuid: String!
  $pageSize: Int
  $page: Int
  $verifier: String
  $earliestTimestamp: DateTimeISO!
  $lastTimestamp: DateTimeISO!
  $marathonId: GlobalId!
) {
  activeConfiguration(key: "TRIVIA_CRACK") {
    data {
      id
    }
  }

  me {
    teams {
      team {
        id
      }
    }
    primaryCommittee {
      id
    }
    primaryTeam(teamType: $type) {
      team {
        pointEntries {
          personFrom {
            id
          }
        }
        members {
          person {
            id
          }
        }
      }
    }
    fundraisingAssignments {
      entry {
        id
      }
    }
  }

  loginState {
    loggedIn
  }

  device(uuid: $deviceUuid) {
    data {
      notificationDeliveries(
        pageSize: $pageSize
        page: $page
        verifier: $verifier
      ) {
        notification {
          id
        }
      }
    }
  }

  events(
    dateFilters: [
      {
        comparison: GREATER_THAN_OR_EQUAL_TO
        field: occurrenceStart
        value: $earliestTimestamp
      }
      {
        comparison: LESS_THAN_OR_EQUAL_TO
        field: occurrenceStart
        value: $lastTimestamp
      }
    ]
    sortDirection: asc
    sortBy: "occurrence"
  ) {
    data {
      occurrences {
        interval {
          start
          end
        }
      }
      images {
        id
      }
    }
  }

  feed(limit: 20) {
    image {
      id
    }
  }

  currentMarathonHour {
    mapImages {
      id
    }
  }

  latestMarathon {
    hours {
      mapImages {
        id
      }
    }
  }

  teams(
    sendAll: true
    sortBy: ["totalPoints", "name"]
    sortDirection: [desc, asc]
    type: [$type]
    marathonId: [$marathonId]
  ) {
    data {
      id
    }
  }

  currentMarathon {
    id
  }
}

mutation RegisterDevice($input: RegisterDeviceInput!) {
  registerDevice(input: $input) {
    ok
  }
}
``