2020-02-18 07:57:00 +00:00
|
|
|
import gql from "graphql-tag";
|
2019-07-30 08:35:29 +00:00
|
|
|
|
2021-06-10 08:06:23 +00:00
|
|
|
export const ADDRESS_FRAGMENT = gql`
|
|
|
|
fragment AdressFragment on Address {
|
|
|
|
id
|
|
|
|
description
|
|
|
|
geom
|
|
|
|
street
|
|
|
|
locality
|
|
|
|
postalCode
|
|
|
|
region
|
|
|
|
country
|
|
|
|
type
|
|
|
|
url
|
|
|
|
originId
|
|
|
|
}
|
2019-11-08 18:37:14 +00:00
|
|
|
`;
|
|
|
|
|
2019-07-30 08:35:29 +00:00
|
|
|
export const ADDRESS = gql`
|
2021-06-10 08:06:23 +00:00
|
|
|
query ($query: String!, $locale: String, $type: AddressSearchType) {
|
|
|
|
searchAddress(query: $query, locale: $locale, type: $type) {
|
|
|
|
...AdressFragment
|
2019-11-08 18:37:14 +00:00
|
|
|
}
|
2021-06-10 08:06:23 +00:00
|
|
|
}
|
|
|
|
${ADDRESS_FRAGMENT}
|
2019-11-08 18:37:14 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const REVERSE_GEOCODE = gql`
|
2021-06-10 08:06:23 +00:00
|
|
|
query ($latitude: Float!, $longitude: Float!, $zoom: Int, $locale: String) {
|
|
|
|
reverseGeocode(
|
|
|
|
latitude: $latitude
|
|
|
|
longitude: $longitude
|
|
|
|
zoom: $zoom
|
|
|
|
locale: $locale
|
|
|
|
) {
|
|
|
|
...AdressFragment
|
2019-07-30 08:35:29 +00:00
|
|
|
}
|
2021-06-10 08:06:23 +00:00
|
|
|
}
|
|
|
|
${ADDRESS_FRAGMENT}
|
2019-07-30 08:35:29 +00:00
|
|
|
`;
|