The project fetches user data from Zone 01 kisumu
and displays user data in a nice format.
- API Endpoint:
https://learn.zone01kisumu.ke/api/graphql-engine/v1/graphql
- Authentication is required via JWT (JSON Web Token) obtained from the login
endpoint
.
- User Authentication
- Login using either
username:password
oremail:password
. - JWT-based authentication with Bearer token for GraphQL queries.
- Login using either
- Profile Data Display
- Basic Identification (ID, login, etc.)
- XP earned
- Grades & skills
- Audit details
- Graphical Data Visualization
- XP Progress Over Time
- Audit Ratio
- Hosting
- The project has been hosted on
Railway
- The project has been hosted on
git https://learn.zone01kisumu.ke/git/aosindo/graphql.git
cd graphql
Open Live Server
Navigate to http://localhost:port
or the hosted URL.
{
user {
id
login
}
}
{
skills: transactions(
where: { type: { _like: "skill_%" } }
order_by: [{ amount: desc }]
) {
type
amount
}
}
{
transaction(
where: { _and: [{ eventId: { _eq: 75 } }] }
order_by: { createdAt: desc }
) {
amount
createdAt
eventId
path
type
userId
}
}
{
audits(
order_by: { createdAt: desc }
where: {
closedAt: { _is_null: true }
group: { captain: { canAccessPlatform: { _eq: true } } }
}
) {
closedAt
group {
captain {
canAccessPlatform
}
captainId
captainLogin
path
createdAt
updatedAt
members {
userId
userLogin
}
}
private {
code
}
}
}
{
events(where: { eventId: { _eq: 75 } }) {
level
}
}
{
progress(
where: { _and: [{ grade: { _is_null: false } }, { eventId: { _eq: 75 } }] }
order_by: { createdAt: desc }
) {
id
createdAt
eventId
grade
path
}
}
{
"data": {
"transaction": [
{ "type": "xp", "amount": 500 },
{ "type": "xp", "amount": -300 },
{ "type": "xp", "amount": 200 }
]
}
}