21 lines
513 B
TypeScript
21 lines
513 B
TypeScript
import { getClientWithToken } from '../apollo/client';
|
|
import * as GQL from '../types';
|
|
|
|
export async function createCustomer(variables: GQL.CreateCustomerMutationVariables) {
|
|
const { mutate } = await getClientWithToken();
|
|
|
|
return mutate({
|
|
mutation: GQL.CreateCustomerDocument,
|
|
variables,
|
|
});
|
|
}
|
|
|
|
export async function getCustomer(variables: GQL.GetCustomerQueryVariables) {
|
|
const { query } = await getClientWithToken();
|
|
|
|
return query({
|
|
query: GQL.GetCustomerDocument,
|
|
variables,
|
|
});
|
|
}
|