2018-11-06 10:30:27 +01:00
|
|
|
import gql from 'graphql-tag';
|
|
|
|
|
|
|
|
export const FETCH_EVENT = gql`
|
|
|
|
query($uuid:UUID!) {
|
|
|
|
event(uuid: $uuid) {
|
|
|
|
uuid,
|
|
|
|
url,
|
|
|
|
local,
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
begins_on,
|
|
|
|
ends_on,
|
|
|
|
state,
|
|
|
|
status,
|
2019-01-14 17:48:08 +01:00
|
|
|
visibility,
|
2018-11-06 10:30:27 +01:00
|
|
|
thumbnail,
|
|
|
|
large_image,
|
|
|
|
publish_at,
|
2019-01-11 14:24:33 +01:00
|
|
|
# online_address,
|
2019-01-14 17:48:08 +01:00
|
|
|
# phone_address,
|
2018-11-06 10:30:27 +01:00
|
|
|
organizerActor {
|
|
|
|
avatarUrl,
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
},
|
|
|
|
attributedTo {
|
|
|
|
avatarUrl,
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
},
|
|
|
|
participants {
|
|
|
|
actor {
|
|
|
|
avatarUrl,
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
},
|
|
|
|
role,
|
|
|
|
},
|
|
|
|
category {
|
|
|
|
title,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const FETCH_EVENTS = gql`
|
|
|
|
query {
|
|
|
|
events {
|
|
|
|
uuid,
|
|
|
|
url,
|
|
|
|
local,
|
|
|
|
title,
|
|
|
|
description,
|
|
|
|
begins_on,
|
|
|
|
ends_on,
|
|
|
|
state,
|
|
|
|
status,
|
2019-01-14 17:48:08 +01:00
|
|
|
visibility,
|
2018-11-06 10:30:27 +01:00
|
|
|
thumbnail,
|
|
|
|
large_image,
|
|
|
|
publish_at,
|
2019-01-11 14:24:33 +01:00
|
|
|
# online_address,
|
2019-01-14 17:48:08 +01:00
|
|
|
# phone_address,
|
2018-11-06 10:30:27 +01:00
|
|
|
organizerActor {
|
|
|
|
avatarUrl,
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
},
|
|
|
|
attributedTo {
|
|
|
|
avatarUrl,
|
|
|
|
preferredUsername,
|
|
|
|
name,
|
|
|
|
},
|
|
|
|
category {
|
|
|
|
title,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const CREATE_EVENT = gql`
|
|
|
|
mutation CreateEvent(
|
|
|
|
$title: String!,
|
|
|
|
$description: String!,
|
|
|
|
$organizerActorId: Int!,
|
|
|
|
$categoryId: Int!,
|
|
|
|
$beginsOn: DateTime!,
|
2018-11-07 16:09:28 +01:00
|
|
|
) {
|
|
|
|
createEvent(
|
2018-12-21 17:10:39 +01:00
|
|
|
title: $title,
|
|
|
|
description: $description,
|
|
|
|
beginsOn: $beginsOn,
|
|
|
|
organizerActorId: $organizerActorId,
|
2019-01-14 18:12:52 +01:00
|
|
|
categoryId: $categoryId
|
2018-11-06 10:30:27 +01:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const EDIT_EVENT = gql`
|
|
|
|
mutation EditEvent(
|
|
|
|
$title: String!,
|
|
|
|
$description: String!,
|
|
|
|
$organizerActorId: Int!,
|
|
|
|
$categoryId: Int!,
|
|
|
|
) {
|
|
|
|
EditEvent(title: $title, description: $description, organizerActorId: $organizerActorId, categoryId: $categoryId) {
|
|
|
|
uuid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|