2020-02-18 08:57:00 +01:00
|
|
|
import gql from "graphql-tag";
|
2018-11-06 10:30:27 +01:00
|
|
|
|
2019-04-24 19:01:39 +02:00
|
|
|
export const SEARCH_EVENTS = gql`
|
2020-08-05 11:42:23 +02:00
|
|
|
query SearchEvents(
|
|
|
|
$location: String
|
|
|
|
$radius: Float
|
|
|
|
$tags: String
|
|
|
|
$term: String
|
|
|
|
$beginsOn: DateTime
|
|
|
|
$endsOn: DateTime
|
2020-09-22 11:45:54 +02:00
|
|
|
$page: Int
|
|
|
|
$limit: Int
|
2020-08-05 11:42:23 +02:00
|
|
|
) {
|
|
|
|
searchEvents(
|
|
|
|
location: $location
|
|
|
|
radius: $radius
|
|
|
|
tags: $tags
|
|
|
|
term: $term
|
|
|
|
beginsOn: $beginsOn
|
|
|
|
endsOn: $endsOn
|
2020-09-22 11:45:54 +02:00
|
|
|
page: $page
|
|
|
|
limit: $limit
|
2020-08-05 11:42:23 +02:00
|
|
|
) {
|
2020-02-18 08:57:00 +01:00
|
|
|
total
|
|
|
|
elements {
|
2020-10-21 12:14:53 +02:00
|
|
|
id
|
2019-04-24 19:01:39 +02:00
|
|
|
title
|
2020-02-18 08:57:00 +01:00
|
|
|
uuid
|
|
|
|
beginsOn
|
|
|
|
picture {
|
2020-10-22 16:19:26 +02:00
|
|
|
id
|
2020-02-18 08:57:00 +01:00
|
|
|
url
|
|
|
|
}
|
|
|
|
tags {
|
|
|
|
slug
|
|
|
|
title
|
|
|
|
}
|
|
|
|
__typename
|
|
|
|
}
|
2019-04-24 19:01:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const SEARCH_GROUPS = gql`
|
2020-11-30 10:24:11 +01:00
|
|
|
query SearchGroups(
|
|
|
|
$term: String
|
|
|
|
$location: String
|
|
|
|
$radius: Float
|
|
|
|
$page: Int
|
|
|
|
$limit: Int
|
|
|
|
) {
|
|
|
|
searchGroups(
|
|
|
|
term: $term
|
|
|
|
location: $location
|
|
|
|
radius: $radius
|
|
|
|
page: $page
|
|
|
|
limit: $limit
|
|
|
|
) {
|
2020-02-18 08:57:00 +01:00
|
|
|
total
|
|
|
|
elements {
|
2020-10-21 12:14:53 +02:00
|
|
|
id
|
2020-02-18 08:57:00 +01:00
|
|
|
avatar {
|
2020-10-22 16:19:26 +02:00
|
|
|
id
|
2020-02-18 08:57:00 +01:00
|
|
|
url
|
|
|
|
}
|
|
|
|
domain
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
__typename
|
|
|
|
}
|
2018-11-06 10:30:27 +01:00
|
|
|
}
|
|
|
|
}
|
2018-12-21 17:10:39 +01:00
|
|
|
`;
|
2019-05-29 16:46:23 +02:00
|
|
|
|
|
|
|
export const SEARCH_PERSONS = gql`
|
2020-02-18 08:57:00 +01:00
|
|
|
query SearchPersons($searchText: String!, $page: Int, $limit: Int) {
|
2020-08-05 16:44:08 +02:00
|
|
|
searchPersons(term: $searchText, page: $page, limit: $limit) {
|
2020-02-18 08:57:00 +01:00
|
|
|
total
|
2019-05-29 16:46:23 +02:00
|
|
|
elements {
|
2020-02-18 08:57:00 +01:00
|
|
|
id
|
2019-05-29 16:46:23 +02:00
|
|
|
avatar {
|
2020-10-22 16:19:26 +02:00
|
|
|
id
|
2019-05-29 16:46:23 +02:00
|
|
|
url
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
domain
|
|
|
|
preferredUsername
|
|
|
|
name
|
2019-05-29 16:46:23 +02:00
|
|
|
__typename
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
2020-11-06 11:34:32 +01:00
|
|
|
|
|
|
|
export const INTERACT = gql`
|
|
|
|
query Interact($uri: String!) {
|
|
|
|
interact(uri: $uri) {
|
|
|
|
... on Event {
|
|
|
|
id
|
|
|
|
title
|
|
|
|
uuid
|
|
|
|
beginsOn
|
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
tags {
|
|
|
|
slug
|
|
|
|
title
|
|
|
|
}
|
|
|
|
__typename
|
|
|
|
}
|
|
|
|
... on Group {
|
|
|
|
id
|
|
|
|
avatar {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
domain
|
|
|
|
preferredUsername
|
|
|
|
name
|
|
|
|
__typename
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|