Skip to main content

GraphQL API

All Ummat API data is accessed through a single GraphQL endpoint. The schema is generated from the Hasura metadata and reflects the live database structure.

Endpoint

POST https://api.ummat.dev/v1/graphql

Sandbox endpoint (read-only fixture data, no auth required for public queries):

POST https://sandbox.api.ummat.dev/v1/graphql

Interactive playground

Run queries directly against the sandbox. No API key required. The schema explorer on the left lets you browse all available types.

Open the GraphiQL playground ›

Making requests

curl -X POST https://api.ummat.dev/v1/graphql \
  -H "Authorization: Bearer umk_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ up_masjids(limit: 5) { id name city state } }"}'

Available namespaces

The schema is namespaced by app. Your key scopes determine which tables are accessible.

Prefix Namespace Required scope
up_Ummat Pro (masjids, entities, events)masjid:read, events:read
ua_Ummat App (donations, members)donations:read, members:read
pc_PrayCalc (prayer time sources)prayer-times:read

API sections

Pagination

All list queries support limit and offset arguments. Maximum page size is 100 rows.

{
  up_masjids(limit: 20, offset: 40) {
    id
    name
  }
}

Filtering

Use Hasura where clauses for filtering:

{
  up_masjids(where: { city: { _eq: "Chicago" } }) {
    id
    name
    address
  }
}