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,13 +1,14 @@
import useCustomer, { UseCustomer } from '@commerce/customer/use-customer'
import { Customer } from '@commerce/types'
import { SWRHook } from '@commerce/utils/types'
import { getCustomerQuery } from '../utils'
import * as query from '../utils/queries'
export default useCustomer as UseCustomer<typeof handler>
export const handler: SWRHook<Customer | null> = {
fetchOptions: {
query: getCustomerQuery,
query: query.CustomerCurrent,
},
async fetcher({ options, fetch }) {
const data = await fetch<any | null>({