mutation CreateEventListing($input: CreateEventListingInput!) {
createEventListing(input:$input){
_id
title
description
organizer
url
}
}
# variables
{
"input": {
"title": "Software development competition",
"description": "This is a sample event",
"organizer": "dineOrg",
"url": "dinethpiyumantha.netlify.app"
}
}
query GetEvent($id: ID!){
event(id:$id){
_id
title
description
url
organizer
}
}
# variables
{
"id": "654369d97c80cd8aebdf77a4"
}
mutation UpdateEvent($id: ID!, $input: UpdateEventListingInput!) {
updateEventListing(id:$id, input:$input){
title
description
_id
organizer
url
}
}
#variables
{
"id": "654369d97c80cd8aebdf77a4",
"input": {
"title": "Software development competition 2024"
}
}
mutation DeleteQuery($id: ID!){
deleteEventListing(id:$id){
deleteEventId
}
}
#variables
{
"id": "654369d97c80cd8aebdf77a4"
}
query GetAllEvents {
events {
_id
title
description
organizer
}
}
query PaginatedEvents {
eventsPaginated(page: 1, limit: 3) {
_id
title
description
organizer
}
}