diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx
index 5959a00c1..612cd0236 100644
--- a/app/product/[handle]/page.tsx
+++ b/app/product/[handle]/page.tsx
@@ -99,7 +99,7 @@ export default async function ProductPage({ params }: { params: { handle: string
async function RelatedProducts({ id }: { id: string }) {
const relatedProducts = await getProductRecommendations(id);
- if (!relatedProducts) return null;
+ if (!relatedProducts.length) return null;
return (
diff --git a/components/grid/three-items.tsx b/components/grid/three-items.tsx
index eeec2ce50..6814a171a 100644
--- a/components/grid/three-items.tsx
+++ b/components/grid/three-items.tsx
@@ -37,7 +37,7 @@ function ThreeItemGridItem({
export async function ThreeItemGrid() {
// Collections that start with `hidden-*` are hidden from the search page.
- const homepageItems = await getCollectionProducts('hidden-homepage-featured-items', 3);
+ const homepageItems = await getCollectionProducts('hidden-homepage-featured-items');
if (!homepageItems[0] || !homepageItems[1] || !homepageItems[2]) return null;
diff --git a/lib/shopify/queries/collection.ts b/lib/shopify/queries/collection.ts
index 8df815992..423cb3217 100644
--- a/lib/shopify/queries/collection.ts
+++ b/lib/shopify/queries/collection.ts
@@ -36,9 +36,9 @@ export const getCollectionsQuery = /* GraphQL */ `
`;
export const getCollectionProductsQuery = /* GraphQL */ `
- query getCollectionProducts($handle: String!, $first: Int = 100) {
+ query getCollectionProducts($handle: String!) {
collection(handle: $handle) {
- products(first: $first) {
+ products(first: 100) {
edges {
node {
...product
diff --git a/lib/shopify/types.ts b/lib/shopify/types.ts
index d4e7a6c4d..aca4c413b 100644
--- a/lib/shopify/types.ts
+++ b/lib/shopify/types.ts
@@ -199,7 +199,6 @@ export type ShopifyCollectionProductsOperation = {
};
variables: {
handle: string;
- first?: number;
};
};