2020-02-18 07:57:00 +00:00
|
|
|
import gql from "graphql-tag";
|
2018-11-06 09:30:27 +00:00
|
|
|
|
2019-02-22 10:24:41 +00:00
|
|
|
const participantQuery = `
|
2020-02-18 07:57:00 +00:00
|
|
|
role,
|
|
|
|
id,
|
|
|
|
actor {
|
|
|
|
preferredUsername,
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
},
|
|
|
|
name,
|
|
|
|
id,
|
|
|
|
domain
|
|
|
|
},
|
|
|
|
event {
|
|
|
|
id,
|
|
|
|
uuid
|
|
|
|
},
|
|
|
|
metadata {
|
|
|
|
cancellationToken,
|
|
|
|
message
|
|
|
|
},
|
|
|
|
insertedAt
|
|
|
|
`;
|
|
|
|
|
|
|
|
const participantsQuery = `
|
2020-03-05 18:32:34 +00:00
|
|
|
total,
|
|
|
|
elements {
|
2020-02-18 07:57:00 +00:00
|
|
|
${participantQuery}
|
2019-02-22 10:24:41 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-09-09 09:21:42 +00:00
|
|
|
const physicalAddressQuery = `
|
|
|
|
description,
|
|
|
|
street,
|
|
|
|
locality,
|
|
|
|
postalCode,
|
|
|
|
region,
|
|
|
|
country,
|
2019-09-20 17:43:29 +00:00
|
|
|
geom,
|
2019-11-08 18:37:14 +00:00
|
|
|
type,
|
|
|
|
id,
|
|
|
|
originId
|
2019-09-09 09:21:42 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
const tagsQuery = `
|
|
|
|
id,
|
|
|
|
slug,
|
|
|
|
title
|
|
|
|
`;
|
|
|
|
|
|
|
|
const optionsQuery = `
|
|
|
|
maximumAttendeeCapacity,
|
|
|
|
remainingAttendeeCapacity,
|
|
|
|
showRemainingAttendeeCapacity,
|
2019-12-20 12:04:34 +00:00
|
|
|
anonymousParticipation,
|
2019-10-14 17:29:18 +00:00
|
|
|
showStartTime,
|
|
|
|
showEndTime,
|
2019-09-09 09:21:42 +00:00
|
|
|
offers {
|
|
|
|
price,
|
|
|
|
priceCurrency,
|
|
|
|
url
|
|
|
|
},
|
|
|
|
participationConditions {
|
|
|
|
title,
|
|
|
|
content,
|
|
|
|
url
|
|
|
|
},
|
|
|
|
attendees,
|
|
|
|
program,
|
|
|
|
commentModeration,
|
2020-02-18 07:57:00 +00:00
|
|
|
showParticipationPrice,
|
|
|
|
hideOrganizerWhenGroupEvent,
|
2019-10-03 14:54:56 +00:00
|
|
|
__typename
|
2019-09-09 09:21:42 +00:00
|
|
|
`;
|
|
|
|
|
2018-11-06 09:30:27 +00:00
|
|
|
export const FETCH_EVENT = gql`
|
2019-09-26 14:38:58 +00:00
|
|
|
query($uuid:UUID!) {
|
2019-02-22 10:24:41 +00:00
|
|
|
event(uuid: $uuid) {
|
|
|
|
id,
|
|
|
|
uuid,
|
|
|
|
url,
|
|
|
|
local,
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
beginsOn,
|
|
|
|
endsOn,
|
|
|
|
status,
|
|
|
|
visibility,
|
2019-09-20 16:22:03 +00:00
|
|
|
joinOptions,
|
2019-10-02 15:59:07 +00:00
|
|
|
draft,
|
2019-05-22 12:12:11 +00:00
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
2019-09-09 09:21:42 +00:00
|
|
|
name
|
2019-05-22 12:12:11 +00:00
|
|
|
},
|
2019-03-22 09:57:14 +00:00
|
|
|
publishAt,
|
2019-09-09 07:31:08 +00:00
|
|
|
onlineAddress,
|
|
|
|
phoneAddress,
|
2019-03-22 14:51:23 +00:00
|
|
|
physicalAddress {
|
2019-09-09 09:21:42 +00:00
|
|
|
${physicalAddressQuery}
|
2019-03-22 14:51:23 +00:00
|
|
|
}
|
2019-02-22 10:24:41 +00:00
|
|
|
organizerActor {
|
2019-05-22 12:12:11 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2019-05-22 12:12:11 +00:00
|
|
|
url
|
|
|
|
},
|
2019-02-22 10:24:41 +00:00
|
|
|
preferredUsername,
|
2019-04-12 15:00:55 +00:00
|
|
|
domain,
|
2019-02-22 10:24:41 +00:00
|
|
|
name,
|
2019-08-09 09:32:14 +00:00
|
|
|
url,
|
2019-09-04 16:24:31 +00:00
|
|
|
id,
|
2020-02-18 07:57:00 +00:00
|
|
|
summary
|
|
|
|
},
|
2020-09-29 07:53:48 +00:00
|
|
|
contacts {
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-09-29 07:53:48 +00:00
|
|
|
url,
|
|
|
|
}
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
summary,
|
|
|
|
domain,
|
|
|
|
url,
|
|
|
|
id
|
|
|
|
},
|
2020-02-18 07:57:00 +00:00
|
|
|
attributedTo {
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url,
|
|
|
|
}
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
summary,
|
|
|
|
domain,
|
|
|
|
url,
|
|
|
|
id
|
2019-02-22 10:24:41 +00:00
|
|
|
},
|
2019-09-11 14:37:30 +00:00
|
|
|
participantStats {
|
2019-10-25 15:43:37 +00:00
|
|
|
going,
|
|
|
|
notApproved,
|
|
|
|
participant
|
2019-09-11 14:37:30 +00:00
|
|
|
},
|
2019-04-03 15:29:03 +00:00
|
|
|
tags {
|
2019-09-09 09:21:42 +00:00
|
|
|
${tagsQuery}
|
2019-04-12 15:00:55 +00:00
|
|
|
},
|
|
|
|
relatedEvents {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2019-04-12 15:00:55 +00:00
|
|
|
uuid,
|
|
|
|
title,
|
|
|
|
beginsOn,
|
2019-10-07 14:48:13 +00:00
|
|
|
picture {
|
|
|
|
id,
|
|
|
|
url
|
|
|
|
}
|
2019-04-12 15:00:55 +00:00
|
|
|
physicalAddress {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2019-04-12 15:00:55 +00:00
|
|
|
description
|
|
|
|
},
|
|
|
|
organizerActor {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2019-05-22 12:12:11 +00:00
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2019-05-22 12:12:11 +00:00
|
|
|
url,
|
|
|
|
},
|
2019-04-12 15:00:55 +00:00
|
|
|
preferredUsername,
|
|
|
|
domain,
|
|
|
|
name,
|
|
|
|
}
|
2019-09-04 16:24:31 +00:00
|
|
|
},
|
|
|
|
options {
|
2019-09-09 09:21:42 +00:00
|
|
|
${optionsQuery}
|
2019-02-22 15:54:01 +00:00
|
|
|
}
|
2019-02-22 10:24:41 +00:00
|
|
|
}
|
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
`;
|
|
|
|
|
2020-12-07 13:48:48 +00:00
|
|
|
export const FETCH_EVENT_BASIC = gql`
|
|
|
|
query($uuid: UUID!) {
|
|
|
|
event(uuid: $uuid) {
|
|
|
|
id
|
|
|
|
uuid
|
|
|
|
joinOptions
|
|
|
|
participantStats {
|
|
|
|
going
|
|
|
|
notApproved
|
|
|
|
notConfirmed
|
|
|
|
participant
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2018-11-06 09:30:27 +00:00
|
|
|
export const FETCH_EVENTS = gql`
|
2019-02-22 10:24:41 +00:00
|
|
|
query {
|
|
|
|
events {
|
2020-12-09 16:55:38 +00:00
|
|
|
total
|
|
|
|
elements {
|
2019-05-22 12:12:11 +00:00
|
|
|
id
|
2020-12-09 16:55:38 +00:00
|
|
|
uuid
|
2019-05-22 12:12:11 +00:00
|
|
|
url
|
2020-12-09 16:55:38 +00:00
|
|
|
local
|
|
|
|
title
|
|
|
|
description
|
|
|
|
beginsOn
|
|
|
|
endsOn
|
|
|
|
status
|
|
|
|
visibility
|
2021-02-12 17:19:49 +00:00
|
|
|
insertedAt
|
2020-12-09 16:55:38 +00:00
|
|
|
picture {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2019-05-22 12:12:11 +00:00
|
|
|
url
|
2020-12-09 16:55:38 +00:00
|
|
|
}
|
|
|
|
publishAt
|
|
|
|
# online_address,
|
|
|
|
# phone_address,
|
|
|
|
physicalAddress {
|
|
|
|
id
|
|
|
|
description
|
|
|
|
locality
|
|
|
|
}
|
|
|
|
organizerActor {
|
|
|
|
id
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
preferredUsername
|
|
|
|
domain
|
|
|
|
name
|
|
|
|
}
|
|
|
|
# attributedTo {
|
|
|
|
# avatar {
|
|
|
|
# id
|
|
|
|
# url
|
|
|
|
# },
|
|
|
|
# preferredUsername,
|
|
|
|
# name,
|
|
|
|
# },
|
|
|
|
category
|
|
|
|
tags {
|
|
|
|
slug
|
|
|
|
title
|
|
|
|
}
|
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
}
|
2019-02-22 10:24:41 +00:00
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const CREATE_EVENT = gql`
|
2019-09-09 09:21:42 +00:00
|
|
|
mutation createEvent(
|
|
|
|
$organizerActorId: ID!,
|
2020-02-18 07:57:00 +00:00
|
|
|
$attributedToId: ID,
|
2019-09-02 12:35:50 +00:00
|
|
|
$title: String!,
|
|
|
|
$description: String!,
|
|
|
|
$beginsOn: DateTime!,
|
2019-09-04 16:24:31 +00:00
|
|
|
$endsOn: DateTime,
|
2019-09-09 09:21:42 +00:00
|
|
|
$status: EventStatus,
|
2019-09-20 16:22:03 +00:00
|
|
|
$visibility: EventVisibility,
|
|
|
|
$joinOptions: EventJoinOptions,
|
2019-10-02 15:59:07 +00:00
|
|
|
$draft: Boolean,
|
2019-09-02 12:35:50 +00:00
|
|
|
$tags: [String],
|
2020-11-26 10:41:13 +00:00
|
|
|
$picture: MediaInput,
|
2019-09-09 09:21:42 +00:00
|
|
|
$onlineAddress: String,
|
|
|
|
$phoneAddress: String,
|
|
|
|
$category: String,
|
2019-09-02 12:35:50 +00:00
|
|
|
$physicalAddress: AddressInput,
|
2019-09-09 09:21:42 +00:00
|
|
|
$options: EventOptionsInput,
|
2020-09-29 07:53:48 +00:00
|
|
|
$contacts: [Contact]
|
2019-02-22 10:24:41 +00:00
|
|
|
) {
|
|
|
|
createEvent(
|
2019-09-09 09:21:42 +00:00
|
|
|
organizerActorId: $organizerActorId,
|
2020-02-18 07:57:00 +00:00
|
|
|
attributedToId: $attributedToId,
|
2019-02-22 10:24:41 +00:00
|
|
|
title: $title,
|
|
|
|
description: $description,
|
|
|
|
beginsOn: $beginsOn,
|
2019-09-04 16:24:31 +00:00
|
|
|
endsOn: $endsOn,
|
2019-09-09 09:21:42 +00:00
|
|
|
status: $status,
|
|
|
|
visibility: $visibility,
|
2019-09-20 16:22:03 +00:00
|
|
|
joinOptions: $joinOptions,
|
2019-10-02 15:59:07 +00:00
|
|
|
draft: $draft,
|
2019-09-09 09:21:42 +00:00
|
|
|
tags: $tags,
|
|
|
|
picture: $picture,
|
|
|
|
onlineAddress: $onlineAddress,
|
|
|
|
phoneAddress: $phoneAddress,
|
2019-05-22 12:12:11 +00:00
|
|
|
category: $category,
|
2019-09-09 09:21:42 +00:00
|
|
|
physicalAddress: $physicalAddress
|
2019-08-28 09:28:27 +00:00
|
|
|
options: $options,
|
2020-09-29 07:53:48 +00:00
|
|
|
contacts: $contacts
|
2018-11-07 15:09:28 +00:00
|
|
|
) {
|
2019-02-22 10:24:41 +00:00
|
|
|
id,
|
|
|
|
uuid,
|
2019-05-22 12:12:11 +00:00
|
|
|
title,
|
2019-10-04 16:28:25 +00:00
|
|
|
url,
|
|
|
|
local,
|
2019-09-09 09:21:42 +00:00
|
|
|
description,
|
|
|
|
beginsOn,
|
|
|
|
endsOn,
|
|
|
|
status,
|
|
|
|
visibility,
|
2019-09-20 16:22:03 +00:00
|
|
|
joinOptions,
|
2019-10-02 15:59:07 +00:00
|
|
|
draft,
|
2019-05-22 12:12:11 +00:00
|
|
|
picture {
|
2019-09-09 09:21:42 +00:00
|
|
|
id
|
2019-05-22 12:12:11 +00:00
|
|
|
url
|
2019-09-09 09:21:42 +00:00
|
|
|
},
|
|
|
|
publishAt,
|
|
|
|
category,
|
2019-09-09 07:31:08 +00:00
|
|
|
onlineAddress,
|
|
|
|
phoneAddress,
|
2019-09-09 09:21:42 +00:00
|
|
|
physicalAddress {
|
|
|
|
${physicalAddressQuery}
|
|
|
|
},
|
2020-02-18 07:57:00 +00:00
|
|
|
attributedTo {
|
|
|
|
id,
|
|
|
|
domain,
|
|
|
|
name,
|
|
|
|
url,
|
|
|
|
preferredUsername,
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
},
|
2019-10-04 16:28:25 +00:00
|
|
|
organizerActor {
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2019-10-04 16:28:25 +00:00
|
|
|
url
|
|
|
|
},
|
|
|
|
preferredUsername,
|
|
|
|
domain,
|
|
|
|
name,
|
|
|
|
url,
|
|
|
|
id,
|
|
|
|
},
|
2020-09-29 07:53:48 +00:00
|
|
|
contacts {
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-09-29 07:53:48 +00:00
|
|
|
url
|
|
|
|
},
|
|
|
|
preferredUsername,
|
|
|
|
domain,
|
|
|
|
name,
|
|
|
|
url,
|
|
|
|
id,
|
|
|
|
},
|
2019-10-04 16:28:25 +00:00
|
|
|
participantStats {
|
2019-10-25 15:43:37 +00:00
|
|
|
going,
|
|
|
|
notApproved,
|
|
|
|
participant
|
2019-10-04 16:28:25 +00:00
|
|
|
},
|
2019-09-09 09:21:42 +00:00
|
|
|
tags {
|
|
|
|
${tagsQuery}
|
|
|
|
},
|
|
|
|
options {
|
|
|
|
${optionsQuery}
|
2019-05-22 12:12:11 +00:00
|
|
|
}
|
2019-02-22 10:24:41 +00:00
|
|
|
}
|
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const EDIT_EVENT = gql`
|
2019-09-04 16:24:31 +00:00
|
|
|
mutation updateEvent(
|
2019-09-09 09:21:42 +00:00
|
|
|
$id: ID!,
|
|
|
|
$title: String,
|
|
|
|
$description: String,
|
|
|
|
$beginsOn: DateTime,
|
|
|
|
$endsOn: DateTime,
|
2019-09-09 07:31:08 +00:00
|
|
|
$status: EventStatus,
|
2019-09-20 16:22:03 +00:00
|
|
|
$visibility: EventVisibility,
|
|
|
|
$joinOptions: EventJoinOptions,
|
2019-10-02 15:59:07 +00:00
|
|
|
$draft: Boolean,
|
2019-09-09 09:21:42 +00:00
|
|
|
$tags: [String],
|
2020-11-26 10:41:13 +00:00
|
|
|
$picture: MediaInput,
|
2019-09-09 09:21:42 +00:00
|
|
|
$onlineAddress: String,
|
|
|
|
$phoneAddress: String,
|
2019-11-18 15:06:24 +00:00
|
|
|
$organizerActorId: ID,
|
2020-02-18 07:57:00 +00:00
|
|
|
$attributedToId: ID,
|
2019-09-09 09:21:42 +00:00
|
|
|
$category: String,
|
|
|
|
$physicalAddress: AddressInput,
|
|
|
|
$options: EventOptionsInput,
|
2020-09-29 07:53:48 +00:00
|
|
|
$contacts: [Contact]
|
2019-02-22 10:24:41 +00:00
|
|
|
) {
|
2019-09-09 09:21:42 +00:00
|
|
|
updateEvent(
|
|
|
|
eventId: $id,
|
|
|
|
title: $title,
|
|
|
|
description: $description,
|
|
|
|
beginsOn: $beginsOn,
|
|
|
|
endsOn: $endsOn,
|
|
|
|
status: $status,
|
|
|
|
visibility: $visibility,
|
2019-09-20 16:22:03 +00:00
|
|
|
joinOptions: $joinOptions,
|
2019-10-02 15:59:07 +00:00
|
|
|
draft: $draft,
|
2019-09-09 09:21:42 +00:00
|
|
|
tags: $tags,
|
|
|
|
picture: $picture,
|
|
|
|
onlineAddress: $onlineAddress,
|
|
|
|
phoneAddress: $phoneAddress,
|
2019-11-18 15:06:24 +00:00
|
|
|
organizerActorId: $organizerActorId,
|
2020-02-18 07:57:00 +00:00
|
|
|
attributedToId: $attributedToId,
|
2019-09-09 09:21:42 +00:00
|
|
|
category: $category,
|
|
|
|
physicalAddress: $physicalAddress
|
|
|
|
options: $options,
|
2020-09-29 07:53:48 +00:00
|
|
|
contacts: $contacts
|
2019-09-09 09:21:42 +00:00
|
|
|
) {
|
|
|
|
id,
|
|
|
|
uuid,
|
|
|
|
title,
|
2019-10-03 14:54:56 +00:00
|
|
|
url,
|
|
|
|
local,
|
2019-09-09 09:21:42 +00:00
|
|
|
description,
|
|
|
|
beginsOn,
|
|
|
|
endsOn,
|
|
|
|
status,
|
|
|
|
visibility,
|
2019-09-20 16:22:03 +00:00
|
|
|
joinOptions,
|
2019-10-02 15:59:07 +00:00
|
|
|
draft,
|
2019-09-09 09:21:42 +00:00
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
},
|
|
|
|
publishAt,
|
|
|
|
category,
|
2019-09-09 07:31:08 +00:00
|
|
|
onlineAddress,
|
|
|
|
phoneAddress,
|
2019-09-09 09:21:42 +00:00
|
|
|
physicalAddress {
|
|
|
|
${physicalAddressQuery}
|
|
|
|
},
|
2020-02-18 07:57:00 +00:00
|
|
|
attributedTo {
|
|
|
|
id,
|
|
|
|
domain,
|
|
|
|
name,
|
|
|
|
url,
|
|
|
|
preferredUsername,
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
|
|
|
},
|
2020-09-29 07:53:48 +00:00
|
|
|
contacts {
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-09-29 07:53:48 +00:00
|
|
|
url
|
|
|
|
},
|
|
|
|
preferredUsername,
|
|
|
|
domain,
|
|
|
|
name,
|
|
|
|
url,
|
|
|
|
id,
|
|
|
|
},
|
2019-10-03 14:54:56 +00:00
|
|
|
organizerActor {
|
|
|
|
avatar {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2019-10-03 14:54:56 +00:00
|
|
|
url
|
|
|
|
},
|
|
|
|
preferredUsername,
|
|
|
|
domain,
|
|
|
|
name,
|
|
|
|
url,
|
|
|
|
id,
|
|
|
|
},
|
|
|
|
participantStats {
|
2019-10-25 15:43:37 +00:00
|
|
|
going,
|
|
|
|
notApproved,
|
|
|
|
participant
|
2019-10-03 14:54:56 +00:00
|
|
|
},
|
2019-09-09 09:21:42 +00:00
|
|
|
tags {
|
|
|
|
${tagsQuery}
|
|
|
|
},
|
|
|
|
options {
|
|
|
|
${optionsQuery}
|
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
}
|
2019-02-22 10:24:41 +00:00
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
`;
|
2019-01-21 14:08:22 +00:00
|
|
|
|
|
|
|
export const JOIN_EVENT = gql`
|
2020-06-09 08:07:30 +00:00
|
|
|
mutation JoinEvent($eventId: ID!, $actorId: ID!, $email: String, $message: String, $locale: String) {
|
2019-02-22 10:24:41 +00:00
|
|
|
joinEvent(
|
2019-02-25 16:20:06 +00:00
|
|
|
eventId: $eventId,
|
2019-12-20 12:04:34 +00:00
|
|
|
actorId: $actorId,
|
2020-03-05 18:32:34 +00:00
|
|
|
email: $email,
|
2020-06-09 08:07:30 +00:00
|
|
|
message: $message,
|
|
|
|
locale: $locale
|
2019-02-22 10:24:41 +00:00
|
|
|
) {
|
|
|
|
${participantQuery}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const LEAVE_EVENT = gql`
|
2019-12-20 12:04:34 +00:00
|
|
|
mutation LeaveEvent($eventId: ID!, $actorId: ID!, $token: String) {
|
2020-02-18 07:57:00 +00:00
|
|
|
leaveEvent(eventId: $eventId, actorId: $actorId, token: $token) {
|
2019-02-22 10:24:41 +00:00
|
|
|
actor {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-12-20 12:04:34 +00:00
|
|
|
export const CONFIRM_PARTICIPATION = gql`
|
|
|
|
mutation ConfirmParticipation($token: String!) {
|
|
|
|
confirmParticipation(confirmationToken: $token) {
|
|
|
|
actor {
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
|
|
|
}
|
2019-12-20 12:04:34 +00:00
|
|
|
event {
|
2020-10-07 15:05:15 +00:00
|
|
|
id
|
2019-12-20 12:04:34 +00:00
|
|
|
uuid
|
2020-10-07 15:05:15 +00:00
|
|
|
joinOptions
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2019-12-20 12:04:34 +00:00
|
|
|
role
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-09-30 11:48:47 +00:00
|
|
|
export const UPDATE_PARTICIPANT = gql`
|
2020-11-19 16:06:28 +00:00
|
|
|
mutation UpdateParticipant($id: ID!, $role: ParticipantRoleEnum!) {
|
|
|
|
updateParticipation(id: $id, role: $role) {
|
2020-02-18 07:57:00 +00:00
|
|
|
role
|
2019-09-20 16:22:03 +00:00
|
|
|
id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2019-02-22 10:24:41 +00:00
|
|
|
export const DELETE_EVENT = gql`
|
2020-11-19 16:06:28 +00:00
|
|
|
mutation DeleteEvent($eventId: ID!) {
|
|
|
|
deleteEvent(eventId: $eventId) {
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
2019-07-26 09:30:28 +00:00
|
|
|
}
|
2019-02-22 10:24:41 +00:00
|
|
|
}
|
2019-01-21 14:08:22 +00:00
|
|
|
`;
|
2019-09-20 16:22:03 +00:00
|
|
|
|
|
|
|
export const PARTICIPANTS = gql`
|
2020-11-19 16:06:28 +00:00
|
|
|
query($uuid: UUID!, $page: Int, $limit: Int, $roles: String) {
|
2019-09-20 16:22:03 +00:00
|
|
|
event(uuid: $uuid) {
|
2019-09-26 14:38:58 +00:00
|
|
|
id,
|
2020-06-18 13:23:05 +00:00
|
|
|
uuid,
|
|
|
|
title,
|
2020-11-19 16:06:28 +00:00
|
|
|
participants(page: $page, limit: $limit, roles: $roles) {
|
2020-02-18 07:57:00 +00:00
|
|
|
${participantsQuery}
|
2019-09-20 16:22:03 +00:00
|
|
|
},
|
|
|
|
participantStats {
|
2019-10-25 15:43:37 +00:00
|
|
|
going,
|
|
|
|
notApproved,
|
2019-10-11 13:06:58 +00:00
|
|
|
rejected,
|
2019-10-25 15:43:37 +00:00
|
|
|
participant
|
2019-09-20 16:22:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2019-09-26 14:38:58 +00:00
|
|
|
|
|
|
|
export const EVENT_PERSON_PARTICIPATION = gql`
|
2019-10-04 16:28:25 +00:00
|
|
|
query($actorId: ID!, $eventId: ID!) {
|
|
|
|
person(id: $actorId) {
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
2019-09-26 14:38:58 +00:00
|
|
|
participations(eventId: $eventId) {
|
2020-06-11 17:13:21 +00:00
|
|
|
total
|
|
|
|
elements {
|
2019-09-26 14:38:58 +00:00
|
|
|
id
|
2020-06-11 17:13:21 +00:00
|
|
|
role
|
|
|
|
actor {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
event {
|
|
|
|
id
|
|
|
|
}
|
2019-09-26 14:38:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2019-12-03 10:29:51 +00:00
|
|
|
|
|
|
|
export const EVENT_PERSON_PARTICIPATION_SUBSCRIPTION_CHANGED = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
subscription($actorId: ID!, $eventId: ID!) {
|
2019-12-03 10:29:51 +00:00
|
|
|
eventPersonParticipationChanged(personId: $actorId) {
|
2020-02-18 07:57:00 +00:00
|
|
|
id
|
2019-12-03 10:29:51 +00:00
|
|
|
participations(eventId: $eventId) {
|
2020-06-11 17:13:21 +00:00
|
|
|
total
|
|
|
|
elements {
|
2019-12-03 10:29:51 +00:00
|
|
|
id
|
2020-06-11 17:13:21 +00:00
|
|
|
role
|
|
|
|
actor {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
event {
|
|
|
|
id
|
|
|
|
}
|
2019-12-03 10:29:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2020-11-06 10:34:32 +00:00
|
|
|
|
|
|
|
export const GROUP_MEMBERSHIP_SUBSCRIPTION_CHANGED = gql`
|
|
|
|
subscription($actorId: ID!) {
|
|
|
|
groupMembershipChanged(personId: $actorId) {
|
|
|
|
id
|
|
|
|
memberships {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
role
|
|
|
|
parent {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
invitedBy {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
}
|
|
|
|
insertedAt
|
|
|
|
updatedAt
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2020-12-09 08:56:53 +00:00
|
|
|
|
|
|
|
export const FETCH_GROUP_EVENTS = gql`
|
|
|
|
query(
|
|
|
|
$name: String!
|
|
|
|
$afterDateTime: DateTime
|
|
|
|
$beforeDateTime: DateTime
|
|
|
|
$organisedEventsPage: Int
|
|
|
|
$organisedEventslimit: Int
|
|
|
|
) {
|
|
|
|
group(preferredUsername: $name) {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
domain
|
|
|
|
name
|
|
|
|
organizedEvents(
|
|
|
|
afterDatetime: $afterDateTime
|
|
|
|
beforeDatetime: $beforeDateTime
|
|
|
|
page: $organisedEventsPage
|
|
|
|
limit: $organisedEventslimit
|
|
|
|
) {
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
uuid
|
|
|
|
title
|
|
|
|
beginsOn
|
|
|
|
draft
|
|
|
|
options {
|
|
|
|
maximumAttendeeCapacity
|
|
|
|
}
|
|
|
|
participantStats {
|
|
|
|
participant
|
|
|
|
notApproved
|
|
|
|
}
|
|
|
|
attributedTo {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
}
|
|
|
|
organizerActor {
|
|
|
|
id
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
domain
|
|
|
|
}
|
|
|
|
}
|
|
|
|
total
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2021-02-12 17:19:49 +00:00
|
|
|
|
|
|
|
export const CLOSE_EVENTS = gql`
|
|
|
|
query CloseEvents($location: String, $radius: Float) {
|
|
|
|
searchEvents(location: $location, radius: $radius, page: 1, limit: 10) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
title
|
|
|
|
uuid
|
|
|
|
beginsOn
|
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
tags {
|
|
|
|
slug
|
|
|
|
title
|
|
|
|
}
|
|
|
|
__typename
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|