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