Once the Django server is running python manage.py runserver
, you can either test APIs in Browser or in the Altair.
In order to test in browser, access the GraphiQL at http://127.0.0.1:8000/graphql in any browser of your choice.
Queries are mentioned under Guest Environment, copy/page in the query section of the graphiql
environment of the browser.
Some queries required authenticated users, for this login using Django Admin panel by visiting http://127.0.0.1:8000/admin.
Once Logged in, open the http://127.0.0.1:8000/graphql and copy/pasted the queries mentioned under Authenticated Environment
Altair backup environment and collection's backup can be found at zee_utils/assets/altair/backup
, to quick start the testing
you can import those in the following order,
- Clicking Setting gear and click
Import backup data
and selectcalendy_backup.agbkp
2. Under the collection, click import collection and import calendy.agc
After the importing the backup & collection you can skip to Explore the APIs
Open Altair and create two environments, first for guest users and second for authenticated users. Click the setting gear ICON at the right top corner of the Altair app.
Create two environments named Guest
& Authentication
.
Now select the Guest
environment and all the following query to list all meetings.
Following APIs can be explored by any guest user.
query{
allMeetings{
id
owner
startTime
endTime
title
isReserved
startTime
meetingDuration
}
}
query{
meetingsByOwner(userName: "edx"){
id
startTime
endTime
meetingDuration
isReserved
owner
}
}
query{
bookableMeetings{
id
owner
title
startTime
endTime
meetingDuration
}
}
mutation{
reserveMeeting: reserveMeeting(
meetingId: 1,
reserverName: "Dave",
reserverEmail: "dave@example.om") {
meeting{
id
title
reserverName
isReserved
startTime
endTime
meetingDuration
reserverEmail
owner
}
}
}
In order to create a meeting, switch to Authentication
environment.
query{
myMeetings{
id
startTime
endTime
meetingDuration
isReserved
reserverName
reserverEmail
}
}
mutation{
createUpdateMeeting: createUpdateMeeting(
title: "Automation for QA Team",
startTime: "2022-10-20T18:15:14+00:00",
slotDurationInMinutes:30) {
meeting {
title,
owner,
startTime,
endTime,
meetingDuration
}
}
}
In order to create a meeting, switch to Authentication
environment.
mutation{
createUpdateMeeting: createUpdateMeeting(
title: "The created Via Web",
startTime: "2022-05-20T18:15:14+00:00",
slotDurationInMinutes:45,
meetingId:4)
{
meeting {
title
owner
startTime
endTime
meetingDuration
}
}
}
mutation{
deleteMeeting: deleteMeeting(
meetingId: 4
) {
message
}
}