Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jwm0 committed Jul 12, 2021
2 parents b47d4a5 + 026f6d5 commit 5ece096
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Enable incremental server-side regeneration for store pages - #988 by @pitorgrundas
- Update account mutations with channel slug - #1039 by @orzechdev
- Update register mutation with channel slug - #1045 by @orzechdev
- Update queries with new channel API - #1072 by @orzechdev

## 2.11.0

Expand Down
2 changes: 1 addition & 1 deletion gqlTypes/globalTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export interface AttributeInput {
slug: string;
values?: (string | null)[] | null;
valuesRange?: IntRangeInput | null;
boolean?: boolean | null;
}

export interface IntRangeInput {
Expand All @@ -294,7 +295,6 @@ export interface IntRangeInput {

export interface ProductOrder {
direction: OrderDirection;
channel?: string | null;
attributeId?: string | null;
field?: ProductOrderField | null;
}
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"browserslist": "last 2 versions",
"dependencies": {
"@lhci/cli": "^0.7.0",
"@saleor/sdk": "^0.3.0-9",
"@saleor/sdk": "^0.3.0-10",
"@sentry/apm": "^5.15.5",
"@sentry/browser": "^5.15.5",
"@stripe/react-stripe-js": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/@next/graphql/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export const shopAttributesQuery = gql`
$categoryId: ID
) {
attributes(
channel: $channel
filter: {
channel: $channel
inCollection: $collectionId
inCategory: $categoryId
filterableInStorefront: true
Expand Down
7 changes: 2 additions & 5 deletions src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ProductOrder } from "@saleor/sdk";
import { FetchResult } from "apollo-link";

import { channelSlug } from "@temp/constants";

import {
AttributeInput,
OrderDirection,
Expand Down Expand Up @@ -64,8 +62,7 @@ export const getValueOrEmpty = <T>(value: T): T | string =>
value === undefined || value === null ? "" : value;

export const convertSortByFromString = (
sortBy: string,
channel = channelSlug
sortBy: string
): ProductOrder | null => {
if (!sortBy) {
return null;
Expand Down Expand Up @@ -93,7 +90,7 @@ export const convertSortByFromString = (
default:
return null;
}
return { field, direction, channel };
return { field, direction };
};

export const maybe = <T>(exp: () => T, d?: T) => {
Expand Down
1 change: 0 additions & 1 deletion src/views/Category/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const useProductsQuery = (
},
collections: collectionId ? [collectionId] : [],
categories: categoryId ? [categoryId] : [],
channel: channelSlug,
attributes: filters.attributes
? convertToAttributeScalar(filters.attributes)
: [],
Expand Down

2 comments on commit 5ece096

@vercel
Copy link

@vercel vercel bot commented on 5ece096 Jul 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 5ece096 Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.