saleor: unify GraphQL naming approach

This commit is contained in:
Zaiste
2021-05-14 15:57:45 +02:00
parent df3d85f86e
commit f530704efe
50 changed files with 217 additions and 216 deletions

View File

@@ -1,6 +1,6 @@
import { CollectionCountableEdge } from '../schema'
import { getConfig, SaleorConfig } from '../api'
import { getSiteCollectionsQuery } from '../utils/queries'
import * as query from '../utils/queries'
const getAllCollections = async (options?: {
variables?: any
@@ -10,7 +10,7 @@ const getAllCollections = async (options?: {
let { config, variables = { first: 100 } } = options ?? {}
config = getConfig(config)
const { data } = await config.fetch(getSiteCollectionsQuery, { variables })
const { data } = await config.fetch(query.CollectionMany, { variables })
const edges = data.collections?.edges ?? []
const categories = edges.map(