Skip to content

Commit

Permalink
fix: codegen build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Maiz27 committed Jan 17, 2024
1 parent 89e97e6 commit 2c8125e
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 114 deletions.
2 changes: 1 addition & 1 deletion apps/client/src/Products/ProductsCatalogue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const ProductsCatalogue = () => {
);

useEffect(() => {
setProducts(products);
setProducts(products as Products[]);
}, [products, setProducts]);

if (error) {
Expand Down
1 change: 0 additions & 1 deletion apps/client/src/hooks/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
import {
InsertBusinessOrderMutation,
InsertBusinessOrderMutationVariables,
OrdersActionInput,
} from "@sahil/lib/graphql/__generated__/graphql";

export const useFetchOrders = () => {
Expand Down
4 changes: 1 addition & 3 deletions apps/client/src/hooks/products.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useMutation, useQuery } from "@apollo/client";
import { FETCH_PRODUCTS, FETCH_PRODUCTS_BY_NAME } from "@sahil/lib/graphql";
import { GetProductsQuery } from "@sahil/lib/graphql/__generated__/graphql";
import { useRouter } from "next/router";

// graphql types
Expand All @@ -9,7 +8,7 @@ import {
GetProductsByNameQueryVariables,
GetProductsQuery,
GetProductsQueryVariables,
} from '@sahil/lib/graphql/__generated__/graphql';
} from "@sahil/lib/graphql/__generated__/graphql";

export const useFetchProducts = ({
offset = 0,
Expand All @@ -27,7 +26,6 @@ export const useFetchProducts = ({
GetProductsQuery | GetProductsByNameQuery,
GetProductsQueryVariables | GetProductsByNameQueryVariables
>(graphqlQuery, {

variables: {
offset,
limit,
Expand Down
16 changes: 16 additions & 0 deletions packages/lib/graphql/__generated__/gql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2c8125e

Please sign in to comment.