2020-02-18 07:57:00 +00:00
|
|
|
import gql from "graphql-tag";
|
2021-10-29 08:54:35 +00:00
|
|
|
import { ACTOR_FRAGMENT } from "./actor";
|
2021-11-06 09:08:20 +00:00
|
|
|
import { ADDRESS_FRAGMENT } from "./address";
|
2021-11-06 13:37:45 +00:00
|
|
|
import { EVENT_OPTIONS_FRAGMENT } from "./event_options";
|
2021-11-06 09:08:20 +00:00
|
|
|
import { TAG_FRAGMENT } from "./tags";
|
2018-11-06 09:30:27 +00:00
|
|
|
|
2021-11-06 09:08:20 +00:00
|
|
|
export const SEARCH_EVENTS_AND_GROUPS = gql`
|
|
|
|
query SearchEventsAndGroups(
|
2020-08-05 09:42:23 +00:00
|
|
|
$location: String
|
|
|
|
$radius: Float
|
|
|
|
$tags: String
|
|
|
|
$term: String
|
2021-11-06 13:37:45 +00:00
|
|
|
$type: EventType
|
2022-03-28 15:42:59 +00:00
|
|
|
$category: String
|
2020-08-05 09:42:23 +00:00
|
|
|
$beginsOn: DateTime
|
|
|
|
$endsOn: DateTime
|
2021-11-06 13:37:45 +00:00
|
|
|
$eventPage: Int
|
|
|
|
$groupPage: Int
|
2020-09-22 09:45:54 +00:00
|
|
|
$limit: Int
|
2020-08-05 09:42:23 +00:00
|
|
|
) {
|
|
|
|
searchEvents(
|
|
|
|
location: $location
|
|
|
|
radius: $radius
|
|
|
|
tags: $tags
|
|
|
|
term: $term
|
2021-11-06 13:37:45 +00:00
|
|
|
type: $type
|
2022-03-28 15:42:59 +00:00
|
|
|
category: $category
|
2020-08-05 09:42:23 +00:00
|
|
|
beginsOn: $beginsOn
|
|
|
|
endsOn: $endsOn
|
2021-11-06 13:37:45 +00:00
|
|
|
page: $eventPage
|
2020-09-22 09:45:54 +00:00
|
|
|
limit: $limit
|
2020-08-05 09:42:23 +00:00
|
|
|
) {
|
2020-02-18 07:57:00 +00:00
|
|
|
total
|
|
|
|
elements {
|
2020-10-21 10:14:53 +00:00
|
|
|
id
|
2019-04-24 17:01:39 +00:00
|
|
|
title
|
2020-02-18 07:57:00 +00:00
|
|
|
uuid
|
|
|
|
beginsOn
|
|
|
|
picture {
|
2020-10-22 14:19:26 +00:00
|
|
|
id
|
2020-02-18 07:57:00 +00:00
|
|
|
url
|
|
|
|
}
|
2021-11-26 13:46:25 +00:00
|
|
|
status
|
2020-02-18 07:57:00 +00:00
|
|
|
tags {
|
2021-11-06 09:08:20 +00:00
|
|
|
...TagFragment
|
|
|
|
}
|
|
|
|
physicalAddress {
|
|
|
|
...AdressFragment
|
|
|
|
}
|
|
|
|
organizerActor {
|
|
|
|
...ActorFragment
|
|
|
|
}
|
|
|
|
attributedTo {
|
|
|
|
...ActorFragment
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2021-11-06 13:37:45 +00:00
|
|
|
options {
|
|
|
|
...EventOptions
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
__typename
|
|
|
|
}
|
2019-04-24 17:01:39 +00:00
|
|
|
}
|
2020-11-30 09:24:11 +00:00
|
|
|
searchGroups(
|
|
|
|
term: $term
|
|
|
|
location: $location
|
|
|
|
radius: $radius
|
2021-11-06 13:37:45 +00:00
|
|
|
page: $groupPage
|
2020-11-30 09:24:11 +00:00
|
|
|
limit: $limit
|
|
|
|
) {
|
2020-02-18 07:57:00 +00:00
|
|
|
total
|
|
|
|
elements {
|
2021-10-29 08:54:35 +00:00
|
|
|
...ActorFragment
|
2021-11-06 09:08:20 +00:00
|
|
|
banner {
|
|
|
|
id
|
|
|
|
url
|
2022-07-12 08:55:28 +00:00
|
|
|
}
|
|
|
|
members(roles: "member,moderator,administrator,creator") {
|
|
|
|
total
|
|
|
|
}
|
|
|
|
followers(approved: true) {
|
|
|
|
total
|
|
|
|
}
|
|
|
|
physicalAddress {
|
|
|
|
...AdressFragment
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
${EVENT_OPTIONS_FRAGMENT}
|
|
|
|
${TAG_FRAGMENT}
|
|
|
|
${ADDRESS_FRAGMENT}
|
|
|
|
${ACTOR_FRAGMENT}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const SEARCH_EVENTS = gql`
|
|
|
|
query SearchEvents(
|
|
|
|
$location: String
|
|
|
|
$radius: Float
|
|
|
|
$tags: String
|
|
|
|
$term: String
|
|
|
|
$type: EventType
|
|
|
|
$category: String
|
|
|
|
$beginsOn: DateTime
|
|
|
|
$endsOn: DateTime
|
|
|
|
$eventPage: Int
|
|
|
|
$limit: Int
|
|
|
|
) {
|
|
|
|
searchEvents(
|
|
|
|
location: $location
|
|
|
|
radius: $radius
|
|
|
|
tags: $tags
|
|
|
|
term: $term
|
|
|
|
type: $type
|
|
|
|
category: $category
|
|
|
|
beginsOn: $beginsOn
|
|
|
|
endsOn: $endsOn
|
|
|
|
page: $eventPage
|
|
|
|
limit: $limit
|
|
|
|
) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
id
|
|
|
|
title
|
|
|
|
uuid
|
|
|
|
beginsOn
|
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
status
|
|
|
|
tags {
|
|
|
|
...TagFragment
|
|
|
|
}
|
|
|
|
physicalAddress {
|
|
|
|
...AdressFragment
|
|
|
|
}
|
|
|
|
organizerActor {
|
|
|
|
...ActorFragment
|
|
|
|
}
|
|
|
|
attributedTo {
|
|
|
|
...ActorFragment
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
...EventOptions
|
|
|
|
}
|
|
|
|
__typename
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
${EVENT_OPTIONS_FRAGMENT}
|
|
|
|
${TAG_FRAGMENT}
|
|
|
|
${ADDRESS_FRAGMENT}
|
|
|
|
${ACTOR_FRAGMENT}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const SEARCH_GROUPS = gql`
|
|
|
|
query SearchGroups(
|
|
|
|
$location: String
|
|
|
|
$radius: Float
|
|
|
|
$tags: String
|
|
|
|
$term: String
|
|
|
|
$category: String
|
|
|
|
$groupPage: Int
|
|
|
|
$limit: Int
|
|
|
|
) {
|
|
|
|
searchGroups(
|
|
|
|
term: $term
|
|
|
|
location: $location
|
|
|
|
radius: $radius
|
|
|
|
page: $groupPage
|
|
|
|
limit: $limit
|
|
|
|
) {
|
|
|
|
total
|
|
|
|
elements {
|
|
|
|
...ActorFragment
|
|
|
|
banner {
|
|
|
|
id
|
|
|
|
url
|
2021-11-06 09:08:20 +00:00
|
|
|
}
|
|
|
|
members(roles: "member,moderator,administrator,creator") {
|
|
|
|
total
|
|
|
|
}
|
|
|
|
followers(approved: true) {
|
|
|
|
total
|
|
|
|
}
|
2021-11-06 10:15:16 +00:00
|
|
|
physicalAddress {
|
|
|
|
...AdressFragment
|
|
|
|
}
|
2020-02-18 07:57:00 +00:00
|
|
|
}
|
2018-11-06 09:30:27 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-06 13:37:45 +00:00
|
|
|
${EVENT_OPTIONS_FRAGMENT}
|
2021-11-06 09:08:20 +00:00
|
|
|
${TAG_FRAGMENT}
|
|
|
|
${ADDRESS_FRAGMENT}
|
2021-10-29 08:54:35 +00:00
|
|
|
${ACTOR_FRAGMENT}
|
2018-12-21 16:10:39 +00:00
|
|
|
`;
|
2019-05-29 14:46:23 +00:00
|
|
|
|
|
|
|
export const SEARCH_PERSONS = gql`
|
2020-02-18 07:57:00 +00:00
|
|
|
query SearchPersons($searchText: String!, $page: Int, $limit: Int) {
|
2020-08-05 14:44:08 +00:00
|
|
|
searchPersons(term: $searchText, page: $page, limit: $limit) {
|
2020-02-18 07:57:00 +00:00
|
|
|
total
|
2019-05-29 14:46:23 +00:00
|
|
|
elements {
|
2021-10-29 08:54:35 +00:00
|
|
|
...ActorFragment
|
2019-05-29 14:46:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-29 08:54:35 +00:00
|
|
|
${ACTOR_FRAGMENT}
|
2019-05-29 14:46:23 +00:00
|
|
|
`;
|
2020-11-06 10:34:32 +00:00
|
|
|
|
|
|
|
export const INTERACT = gql`
|
|
|
|
query Interact($uri: String!) {
|
|
|
|
interact(uri: $uri) {
|
|
|
|
... on Event {
|
|
|
|
id
|
|
|
|
title
|
|
|
|
uuid
|
|
|
|
beginsOn
|
2021-11-26 13:46:25 +00:00
|
|
|
status
|
2020-11-06 10:34:32 +00:00
|
|
|
picture {
|
|
|
|
id
|
|
|
|
url
|
|
|
|
}
|
|
|
|
tags {
|
|
|
|
slug
|
|
|
|
title
|
|
|
|
}
|
|
|
|
__typename
|
|
|
|
}
|
|
|
|
... on Group {
|
2021-10-29 08:54:35 +00:00
|
|
|
...ActorFragment
|
2020-11-06 10:34:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-29 08:54:35 +00:00
|
|
|
${ACTOR_FRAGMENT}
|
2020-11-06 10:34:32 +00:00
|
|
|
`;
|