Allow to search events by online status

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-06 14:37:45 +01:00
parent 9ac3da618d
commit 69e91e89f5
8 changed files with 232 additions and 75 deletions

View File

@@ -158,8 +158,6 @@ export const FETCH_EVENTS = gql`
url
}
publishAt
# online_address,
# phone_address,
physicalAddress {
...AdressFragment
}

View File

@@ -1,6 +1,7 @@
import gql from "graphql-tag";
import { ACTOR_FRAGMENT } from "./actor";
import { ADDRESS_FRAGMENT } from "./address";
import { EVENT_OPTIONS_FRAGMENT } from "./event_options";
import { TAG_FRAGMENT } from "./tags";
export const SEARCH_EVENTS_AND_GROUPS = gql`
@@ -9,9 +10,11 @@ export const SEARCH_EVENTS_AND_GROUPS = gql`
$radius: Float
$tags: String
$term: String
$type: EventType
$beginsOn: DateTime
$endsOn: DateTime
$page: Int
$eventPage: Int
$groupPage: Int
$limit: Int
) {
searchEvents(
@@ -19,9 +22,10 @@ export const SEARCH_EVENTS_AND_GROUPS = gql`
radius: $radius
tags: $tags
term: $term
type: $type
beginsOn: $beginsOn
endsOn: $endsOn
page: $page
page: $eventPage
limit: $limit
) {
total
@@ -46,6 +50,9 @@ export const SEARCH_EVENTS_AND_GROUPS = gql`
attributedTo {
...ActorFragment
}
options {
...EventOptions
}
__typename
}
}
@@ -53,7 +60,7 @@ export const SEARCH_EVENTS_AND_GROUPS = gql`
term: $term
location: $location
radius: $radius
page: $page
page: $groupPage
limit: $limit
) {
total
@@ -75,6 +82,7 @@ export const SEARCH_EVENTS_AND_GROUPS = gql`
}
}
}
${EVENT_OPTIONS_FRAGMENT}
${TAG_FRAGMENT}
${ADDRESS_FRAGMENT}
${ACTOR_FRAGMENT}