Skip to content

Commit 92bf2da

Browse files
committed
fix(checkout,client): fix query keys
1 parent 600506c commit 92bf2da

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

client/client/client.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,22 @@ export class HackbarClient implements QueryClient, MutationClient {
5959
return { data: res.data.menu, error: null }
6060
}
6161
async getUncheckedOrdersCustomer() {
62-
const res = await this.fetch<{ orders: types.Order[] }>(
62+
const res = await this.fetch<{ uncheckedOrdersCustomer: types.Order[] }>(
6363
query.getUncheckedOrdersCustomer(),
6464
)
6565
if (res.error !== null) {
6666
return { data: null, error: res.error }
6767
}
68-
return { data: res.data.orders, error: null }
68+
return { data: res.data.uncheckedOrdersCustomer, error: null }
6969
}
7070
async getUncheckedOrders() {
71-
const res = await this.fetch<{ orders: types.Order[] }>(
71+
const res = await this.fetch<{ uncheckedOrders: types.Order[] }>(
7272
query.getUncheckedOrders(),
7373
)
7474
if (res.error !== null) {
7575
return { data: null, error: res.error }
7676
}
77-
return { data: res.data.orders, error: null }
77+
return { data: res.data.uncheckedOrders, error: null }
7878
}
7979
async getRecipes() {
8080
const res = await this.fetch<{ recipes: types.RecipeGroup[] }>(
@@ -94,14 +94,14 @@ export class HackbarClient implements QueryClient, MutationClient {
9494
}
9595
return { data: res.data.materials, error: null }
9696
}
97-
async getUncashedCheckouts() {
98-
const res = await this.fetch<{ uncashedCheckouts: types.Checkout[] }>(
99-
query.getUncashedCheckouts(),
97+
async getUncashedoutCheckouts() {
98+
const res = await this.fetch<{ uncashedoutCheckouts: types.Checkout[] }>(
99+
query.getUncashedoutCheckouts(),
100100
)
101101
if (res.error !== null) {
102102
return { data: null, error: res.error }
103103
}
104-
return { data: res.data.uncashedCheckouts, error: null }
104+
return { data: res.data.uncashedoutCheckouts, error: null }
105105
}
106106
async getCashouts(input: types.InputCashoutQuery) {
107107
const res = await this.fetch<{ cashouts: types.Cashout[] }>(

client/client/gen/interface.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface QueryClient {
88
): Promise<
99
{ data: null; error: string } | { data: types.Cashout[]; error: null }
1010
>
11-
getUncashedCheckouts(): Promise<
11+
getUncashedoutCheckouts(): Promise<
1212
{ data: null; error: string } | { data: types.Checkout[]; error: null }
1313
>
1414
getMenu(): Promise<

client/client/gen/query.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ export const getCashouts = (variables: { input: types.InputCashoutQuery }) => ({
4444
variables,
4545
})
4646

47-
export const getUncashedCheckouts = () => ({
47+
export const getUncashedoutCheckouts = () => ({
4848
query: `
49-
query getUncashedCheckouts {
50-
uncashedCheckouts {
49+
query getUncashedoutCheckouts {
50+
uncashedoutCheckouts {
5151
__typename
5252
id
5353
customerEmail

client/client/gen/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export type Query = {
251251
materials: Array<Material>
252252
menu: Array<MenuItem>
253253
recipes: Array<RecipeGroup>
254-
uncashedCheckouts: Array<Checkout>
254+
uncashedoutCheckouts: Array<Checkout>
255255
uncheckedOrders: Array<Order>
256256
uncheckedOrdersCustomer: Array<Order>
257257
userInfo: User

client/hackbar-copilot.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ input InputPriceDiff {
7070
#*
7171

7272
extend type Query {
73-
uncashedCheckouts: [Checkout!]!
73+
uncashedoutCheckouts: [Checkout!]!
7474
}
7575

7676
type Checkout {

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tingtt/hackbar-copilot",
3-
"version": "0.5.0",
3+
"version": "0.5.2",
44
"publishConfig": {
55
"access": "public"
66
},

internal/interface-adapter/handler/graphql/graph/checkout.query.graphqls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
extend type Query {
2-
uncashedCheckouts: [Checkout!]!
2+
uncashedoutCheckouts: [Checkout!]!
33
}
44

55
type Checkout {

internal/interface-adapter/handler/graphql/graph/checkout.query.resolvers.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/interface-adapter/handler/graphql/graph/generated.go

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)