Flatten fetcher responses

This commit is contained in:
tniezg
2021-09-03 09:52:59 +02:00
parent b9f8ed659d
commit 60894d32c5
15 changed files with 88 additions and 83 deletions

View File

@@ -46,9 +46,9 @@ export const handler: MutationHook<AddItemHook> = {
].join(','),
}
const {
data: { data: spreeSuccessResponse },
} = await fetch<GraphQLFetcherResult<{ data: IOrder }>>({
const { data: spreeSuccessResponse } = await fetch<
GraphQLFetcherResult<IOrder>
>({
variables: {
methodPath: 'cart.addItem',
arguments: [token, addItemParameters],