Skip to content

Event crud feature and Recurrence events removed #3981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 31, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 51 additions & 40 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -258,32 +258,34 @@ interface Error {
}

type Event {
_id: ID!
actionItems: [ActionItem]
admins(adminId: ID): [User!]
allDay: Boolean!
attendees: [User]
attendeesCheckInStatus: [CheckInStatus!]!
averageFeedbackScore: Float
createdAt: DateTime!
agendaFolders(
after: String
before: String
first: Int
last: Int
): EventAgendaFoldersConnection

allDay: Boolean
attachments: [EventAttachment!]
createdAt: DateTime
creator: User
description: String!
endDate: Date
endTime: Time
feedback: [Feedback!]!
description: String
endAt: DateTime
id: ID!
isPublic: Boolean!
isRegisterable: Boolean!
latitude: Latitude
location: String
longitude: Longitude
name: String
organization: Organization
recurrance: Recurrance
recurring: Boolean!
startDate: Date!
startTime: Time
status: Status!
title: String!
updatedAt: DateTime!
startAt: DateTime
updatedAt: DateTime
updater: User
venues(
after: String
before: String
first: Int
last: Int
): EventVenuesConnection
}

input EventAttendeeInput {
Expand Down Expand Up @@ -782,10 +784,8 @@ type Mutation {
payPalId: ID!
userId: ID!
): Donation!
createEvent(
data: EventInput!
recurrenceRuleData: RecurrenceRuleInput
): Event!
createEvent(input: MutationCreateEventInput!): Event

createEventVolunteer(data: EventVolunteerInput!): EventVolunteer!
createMember(input: UserAndOrganizationInput!): Organization!
createOrganization(data: OrganizationInput, file: String): Organization!
Expand Down Expand Up @@ -862,7 +862,7 @@ type Mutation {
input: UpdateAgendaCategoryInput!
): AgendaCategory
updateCurrentUser(input: MutationUpdateCurrentUserInput!): UserPg
updateEvent(data: UpdateEventInput, id: ID!): Event!
updateEvent(data: MutationUpdateEventInput, id: ID!): Event!
updateEventVolunteer(
data: UpdateEventVolunteerInput
id: ID!
Expand Down Expand Up @@ -1919,20 +1919,6 @@ input RecaptchaVerification {
recaptchaToken: String!
}

enum Recurrance {
DAILY
MONTHLY
ONCE
WEEKLY
YEARLY
}

input RecurrenceRuleInput {
count: Int
frequency: Frequency
weekDays: [WeekDays]
}

enum Status {
ACTIVE
BLOCKED
Expand Down Expand Up @@ -2091,6 +2077,31 @@ enum Gender {
OTHER
}

input MutationCreateEventInput {
allDay: Boolean!
attachments: [Upload!]
description: String
endAt: DateTime!
isPublic: Boolean
isRegisterable: Boolean
location: String
name: String!
organizationId: ID!
startAt: DateTime!
}

input MutationUpdateEventInput {
id: ID!
name: String
description: String
startAt: DateTime
endAt: DateTime
allDay: Boolean
location: String
isPublic: Boolean
isRegisterable: Boolean
}

input MutationUpdateUserInput {
addressLine1: String
addressLine2: String
Expand Down
142 changes: 42 additions & 100 deletions src/GraphQl/Mutations/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,68 +323,34 @@ export const DELETE_ORGANIZATION_MUTATION = gql`
// to create the event by any organization

export const CREATE_EVENT_MUTATION = gql`
mutation CreateEvent(
$title: String!
$description: String!
$recurring: Boolean!
$isPublic: Boolean!
$isRegisterable: Boolean!
$organizationId: ID!
$startDate: Date!
$endDate: Date!
$allDay: Boolean!
$startTime: Time
$endTime: Time
$location: String
$recurrenceStartDate: Date
$recurrenceEndDate: Date
$frequency: Frequency
$weekDays: [WeekDays]
$count: PositiveInt
$interval: PositiveInt
$weekDayOccurenceInMonth: Int
$createChat: Boolean!
) {
createEvent(
data: {
title: $title
description: $description
recurring: $recurring
isPublic: $isPublic
isRegisterable: $isRegisterable
organizationId: $organizationId
startDate: $startDate
endDate: $endDate
allDay: $allDay
startTime: $startTime
endTime: $endTime
location: $location
createChat: $createChat
mutation Mutation_createEvent($input: MutationCreateEventInput!) {
createEvent(input: $input) {
id
name
description
startAt
endAt
allDay
location
isPublic
isRegisterable
organization {
id
}
recurrenceRuleData: {
recurrenceStartDate: $recurrenceStartDate
recurrenceEndDate: $recurrenceEndDate
frequency: $frequency
weekDays: $weekDays
interval: $interval
count: $count
weekDayOccurenceInMonth: $weekDayOccurenceInMonth
creator {
id
name
}
) {
_id
}
}
`;

// to delete any event by any organization

export const DELETE_EVENT_MUTATION = gql`
mutation RemoveEvent(
$id: ID!
$recurringEventDeleteType: RecurringEventMutationType
) {
removeEvent(id: $id, recurringEventDeleteType: $recurringEventDeleteType) {
_id
mutation DeleteEvent($input: MutationDeleteEventInput!) {
deleteEvent(input: $input) {
id
}
}
`;
Expand Down Expand Up @@ -500,55 +466,31 @@ export const UPDATE_POST_MUTATION = gql`
`;

export const UPDATE_EVENT_MUTATION = gql`
mutation UpdateEvent(
$id: ID!
$title: String
$description: String
$recurring: Boolean
$recurringEventUpdateType: RecurringEventMutationType
$isPublic: Boolean
$isRegisterable: Boolean
$allDay: Boolean
$startDate: Date
$endDate: Date
$startTime: Time
$endTime: Time
$location: String
$recurrenceStartDate: Date
$recurrenceEndDate: Date
$frequency: Frequency
$weekDays: [WeekDays]
$count: PositiveInt
$interval: PositiveInt
$weekDayOccurenceInMonth: Int
) {
updateEvent(
id: $id
data: {
title: $title
description: $description
recurring: $recurring
isPublic: $isPublic
isRegisterable: $isRegisterable
allDay: $allDay
startDate: $startDate
endDate: $endDate
startTime: $startTime
endTime: $endTime
location: $location
mutation UpdateEvent($input: MutationUpdateEventInput!) {
updateEvent(input: $input) {
id
name
description
startAt
endAt
allDay
location
isPublic
isRegisterable
createdAt
updatedAt
creator {
id
name
}
recurrenceRuleData: {
recurrenceStartDate: $recurrenceStartDate
recurrenceEndDate: $recurrenceEndDate
frequency: $frequency
weekDays: $weekDays
interval: $interval
count: $count
weekDayOccurenceInMonth: $weekDayOccurenceInMonth
updater {
id
name
}
organization {
id
name
}
recurringEventUpdateType: $recurringEventUpdateType
) {
_id
}
}
`;
Expand Down
Loading
Loading