mobilizon/js/src/graphql/search.ts
Thomas Citharel 3807ab1b63
Allow events to be searched by location and period
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-08-10 15:40:18 +02:00

58 lines
1.1 KiB
TypeScript

import gql from "graphql-tag";
export const SEARCH_EVENTS = gql`
query SearchEvents($location: String, $radius: Float, $tag: String, $term: String) {
searchEvents(location: $location, radius: $radius, tag: $tag, term: $term) {
total
elements {
title
uuid
beginsOn
picture {
url
}
tags {
slug
title
}
__typename
}
}
}
`;
export const SEARCH_GROUPS = gql`
query SearchGroups($searchText: String!) {
searchGroups(search: $searchText) {
total
elements {
avatar {
url
}
domain
preferredUsername
name
__typename
}
}
}
`;
export const SEARCH_PERSONS = gql`
query SearchPersons($searchText: String!, $page: Int, $limit: Int) {
searchPersons(search: $searchText, page: $page, limit: $limit) {
total
elements {
id
avatar {
url
}
domain
preferredUsername
name
__typename
}
}
}
`;