Загрузка данных


export const merchantCountryFilterQuery = ({
    page = 1,
    perPage = 25,
    localeId = 1,
    filter,
    sort
}) => {
    return JSON.stringify({
        variables: {
            page,
            perPage,
            localeId,
            filter,
            sort,
        },
        query: /* GraphQL */ `
            query merchantWineCountriesPagination(
                $localeId: Int!
                $filter: MerchantWineCountriesFilter!
                $page: PositiveInt! = 1
                $perPage: PositiveInt! = 25
                $sort: MerchantWineCountrySort! = RETAIL_COEF_ASC, 
            ) {
                merchantWineCountriesPagination(
                localeId: $localeId
                filter: $filter
                page: $page
                sort: $sort
                perPage: $perPage
            ) {
                pageInfo {
                    totalItems
                    hasNextPage
                }

                items {
                    country {
                    localizedName(localeId: $localeId)
                    codeISO
                    }
                    winesAnalyzedCount
                    retailCoefficient
                }
                }
            }
        `
    });
};