export const appellationQuery = ({
page = 1,
perPage = 50,
localeId = 1,
filter,
sort,
includeUnusedLabels = false
}) => {
return JSON.stringify({
variables: {
localeId,
page,
perPage,
sort,
filter
},
query: `
query merchantNatTypeGIPagination(
$localeId: Int! = 1,
$page: PositiveInt! = 1,
$perPage: PositiveInt! = 20,
$query: String,
$sort: GeoIndicationSort! = RETAIL_COEF_ASC,
$filter: MerchantGeoIndicationsFilter!
) {
merchantNatTypeGIPagination(
localeId: $localeId
page: $page
perPage: $perPage
query: $query
sort: $sort
filter: $filter
) {
pageInfo {
page
perPage
totalItems
hasNextPage
hasPreviousPage
__typename
}
items {
record {
__typename
... on GeoIndication {
id
localizedName(localeId: $localeId)
code
wineTerritoryType {
masterName
country {
codeISO
localizedName(localeId: $localeId)
__typename
}
__typename
}
}
... on NationalGIType {
id
localizedShortName(localeId: $localeId)
}
}
retailCoefficient
winesAnalyzedCount
winesWithoutRRPCount
__typename
}
__typename
}
}
`
});
};