Skip to main content

Events

List and filter community events published by verified masjids and Islamic organizations on Ummat Pro. Requires the events:read scope.

List upcoming events

query UpcomingEvents($after: timestamptz!, $limit: Int = 20) {
  up_events(
    where: {
      published_at: { _is_null: false }
      starts_at: { _gte: $after }
      cancelled_at: { _is_null: true }
    }
    order_by: { starts_at: asc }
    limit: $limit
  ) {
    id
    title
    description
    starts_at
    ends_at
    location
    is_online
    meeting_url
    capacity
    rsvp_count
    registration_url
    entity {
      id
      name
      type
    }
  }
}

Events by masjid

query MasjidEvents($entityId: uuid!, $after: timestamptz!) {
  up_events(
    where: {
      entity_id: { _eq: $entityId }
      published_at: { _is_null: false }
      starts_at: { _gte: $after }
      cancelled_at: { _is_null: true }
    }
    order_by: { starts_at: asc }
  ) {
    id
    title
    starts_at
    ends_at
    location
    is_online
  }
}

Get event by ID

query GetEvent($id: uuid!) {
  up_events_by_pk(id: $id) {
    id
    title
    description
    body
    starts_at
    ends_at
    location
    address
    city
    state
    latitude
    longitude
    is_online
    meeting_url
    cover_image_url
    capacity
    rsvp_count
    is_free
    ticket_price
    registration_url
    published_at
    cancelled_at
    entity {
      id
      name
      type
      city
    }
  }
}

Fields reference

Field Type Description
iduuidUnique event ID
titletextEvent title
starts_attimestamptzStart time (UTC)
ends_attimestamptzEnd time (UTC), nullable
is_onlinebooleanVirtual event flag
rsvp_countintegerCurrent RSVP count
capacityintegerMax attendees (null = unlimited)
cancelled_attimestamptzNull unless the event was cancelled