-
-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/PalisadoesFoundation/tal…
…awa-admin into develop
- Loading branch information
Showing
17 changed files
with
1,078 additions
and
669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
/** | ||
* GraphQL mutation to create a new comment on a post. | ||
* | ||
* @param comment - The text content of the comment. | ||
* @param postId - The ID of the post to which the comment is being added. | ||
* @returns The created comment object. | ||
*/ | ||
|
||
export const CREATE_COMMENT_POST = gql` | ||
mutation createComment($comment: String!, $postId: ID!) { | ||
createComment(data: { text: $comment }, postId: $postId) { | ||
_id | ||
creator { | ||
_id | ||
firstName | ||
lastName | ||
} | ||
likeCount | ||
likedBy { | ||
_id | ||
} | ||
text | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to like a comment. | ||
* | ||
* @param commentId - The ID of the comment to be liked. | ||
* @returns The liked comment object. | ||
*/ | ||
|
||
export const LIKE_COMMENT = gql` | ||
mutation likeComment($commentId: ID!) { | ||
likeComment(id: $commentId) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to unlike a comment. | ||
* | ||
* @param commentId - The ID of the comment to be unliked. | ||
* @returns The unliked comment object. | ||
*/ | ||
|
||
export const UNLIKE_COMMENT = gql` | ||
mutation unlikeComment($commentId: ID!) { | ||
unlikeComment(id: $commentId) { | ||
_id | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
/** | ||
* GraphQL mutation to add an attendee to an event. | ||
* | ||
* @param userId - The ID of the user being added as an attendee. | ||
* @param eventId - The ID of the event to which the user is being added as an attendee. | ||
* @returns The updated event object with the added attendee. | ||
*/ | ||
|
||
export const ADD_EVENT_ATTENDEE = gql` | ||
mutation addEventAttendee($userId: ID!, $eventId: ID!) { | ||
addEventAttendee(data: { userId: $userId, eventId: $eventId }) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to remove an attendee from an event. | ||
* | ||
* @param userId - The ID of the user being removed as an attendee. | ||
* @param eventId - The ID of the event from which the user is being removed as an attendee. | ||
* @returns The updated event object without the removed attendee. | ||
*/ | ||
|
||
export const REMOVE_EVENT_ATTENDEE = gql` | ||
mutation removeEventAttendee($userId: ID!, $eventId: ID!) { | ||
removeEventAttendee(data: { userId: $userId, eventId: $eventId }) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to mark a user's check-in at an event. | ||
* | ||
* @param userId - The ID of the user checking in. | ||
* @param eventId - The ID of the event at which the user is checking in. | ||
* @param allotedRoom - The room assigned to the user during check-in (optional). | ||
* @param allotedSeat - The seat assigned to the user during check-in (optional). | ||
* @returns The updated event object with the user's check-in information. | ||
*/ | ||
|
||
export const MARK_CHECKIN = gql` | ||
mutation checkIn( | ||
$userId: ID! | ||
$eventId: ID! | ||
$allotedRoom: String | ||
$allotedSeat: String | ||
) { | ||
checkIn( | ||
data: { | ||
userId: $userId | ||
eventId: $eventId | ||
allotedRoom: $allotedRoom | ||
allotedSeat: $allotedSeat | ||
} | ||
) { | ||
_id | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import gql from 'graphql-tag'; | ||
|
||
/** | ||
* GraphQL mutation to update an event project task. | ||
* | ||
* @param title - The updated title of the task. | ||
* @param description - The updated description of the task. | ||
* @param taskId - The ID of the task to be updated. | ||
* @param deadline - The updated deadline for the task. | ||
* @param completed - The updated completion status of the task. | ||
* @returns The updated task object. | ||
*/ | ||
|
||
export const UPDATE_EVENT_PROJECT_TASK_MUTATION = gql` | ||
mutation UpdateEventTask( | ||
$title: String! | ||
$description: String! | ||
$taskId: ID! | ||
$deadline: DateTime! | ||
$completed: Boolean! | ||
) { | ||
updateTask( | ||
id: $taskId | ||
data: { | ||
title: $title | ||
description: $description | ||
deadline: $deadline | ||
completed: $completed | ||
} | ||
) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to delete an event project task. | ||
* | ||
* @param id - The ID of the task to be deleted. | ||
* @returns The deleted task object. | ||
*/ | ||
|
||
export const DELETE_EVENT_TASK_MUTATION = gql` | ||
mutation DeleteTask($id: ID!) { | ||
removeTask(id: $id) { | ||
_id | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* GraphQL mutation to set volunteers for an event project task. | ||
* | ||
* @param id - The ID of the task for which volunteers are being set. | ||
* @param volunteers - An array of user IDs representing the volunteers for the task. | ||
* @returns The updated task object with the assigned volunteers. | ||
*/ | ||
|
||
export const SET_TASK_VOLUNTEERS_MUTATION = gql` | ||
mutation SetTaskVolunteers($id: ID!, $volunteers: [ID]!) { | ||
setTaskVolunteers(id: $id, volunteers: $volunteers) { | ||
_id | ||
} | ||
} | ||
`; |
Oops, something went wrong.