Skip to content

Commit 82946a5

Browse files
authored
Merge branch 'main' into lkostrowski/graphql-eslint-unused
2 parents 0d37e69 + df53357 commit 82946a5

17 files changed

Lines changed: 138 additions & 389 deletions

File tree

graphql-lint.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// eslint-disable-next-line no-undef
2+
module.exports = {
3+
include: ["src/**/*.{ts,tsx}"],
4+
exclude: [
5+
"node_modules/**",
6+
"**/*.test.*",
7+
"**/*.stories.*",
8+
"**/*.generated.ts",
9+
"**/*.fixture.*",
10+
"src/graphql/**",
11+
],
12+
advanced: true,
13+
maxFiles: 0,
14+
};

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"generate": "pnpm run generate:main && pnpm run generate:staging",
3737
"generate:main": "graphql-codegen --config codegen-main.ts",
3838
"generate:staging": "graphql-codegen --config codegen-staging.ts",
39+
"graphql-lint-unused": "graphql-lint-unused-fields . --advanced",
3940
"knip": "knip --reporter markdown",
4041
"knip:fix": "knip --fix --allow-remove-files",
4142
"lint": "pnpm run /^lint:.*$/",
@@ -204,6 +205,7 @@
204205
"front-matter": "^4.0.2",
205206
"globals": "^16.5.0",
206207
"graphql-config": "^5.1.5",
208+
"graphql-lint-unused-fields": "^1.6.18",
207209
"html-to-react": "^1.7.0",
208210
"identity-obj-proxy": "^3.0.0",
209211
"is-ci": "^3.0.1",

pnpm-lock.yaml

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

src/collections/mutations.ts

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,6 @@ export const assignCollectionProduct = gql`
4242
}
4343
}
4444
collectionReorderProducts(collectionId: $collectionId, moves: $moves) {
45-
collection {
46-
id
47-
products(
48-
first: $first
49-
after: $after
50-
before: $before
51-
last: $last
52-
sortBy: { field: COLLECTION, direction: ASC }
53-
) {
54-
edges {
55-
node {
56-
...CollectionProduct
57-
}
58-
}
59-
pageInfo {
60-
endCursor
61-
hasNextPage
62-
hasPreviousPage
63-
startCursor
64-
}
65-
}
66-
}
6745
errors {
6846
message
6947
}
@@ -163,28 +141,6 @@ export const reorderProductsInCollection = gql`
163141
$before: String
164142
) {
165143
collectionReorderProducts(collectionId: $collectionId, moves: $moves) {
166-
collection {
167-
id
168-
products(
169-
first: $first
170-
after: $after
171-
before: $before
172-
last: $last
173-
sortBy: { field: COLLECTION, direction: ASC }
174-
) {
175-
edges {
176-
node {
177-
...CollectionProduct
178-
}
179-
}
180-
pageInfo {
181-
endCursor
182-
hasNextPage
183-
hasPreviousPage
184-
startCursor
185-
}
186-
}
187-
}
188144
errors {
189145
message
190146
}

src/components/Shop/queries.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const shopInfo = gql`
2525
...Language
2626
}
2727
name
28-
trackInventoryByDefault
2928
permissions {
3029
...Permission
3130
}

src/extensions/fixtures.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const appDetails: NonNullable<AppQuery["app"]> = {
1515
manifestUrl: "http://localhost:8888/api/manifest",
1616
configurationUrl: "htpp://localhost:8888/configuration",
1717
created: "2020-06-02T12:24:26.818138+00:00",
18-
dataPrivacy: "Lorem ipsum",
1918
dataPrivacyUrl: "http://localhost:8888/app-data-privacy",
2019
homepageUrl: "http://localhost:8888/homepage",
2120
id: "QXBwOjE4MQ==",

src/extensions/queries.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export const appDetails = gql`
9494
code
9595
name
9696
}
97-
dataPrivacy
9897
dataPrivacyUrl
9998
brand {
10099
logo {

src/giftCards/GiftCardsList/GiftCardListSearchAndFilters/queries.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/giftCards/GiftCardsList/queries.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,5 @@ export const giftCardProductsCount = gql`
6868
giftCardProductTypes: productTypes(filter: { kind: GIFT_CARD }) {
6969
totalCount
7070
}
71-
giftCardProducts: products(filter: { giftCard: true }, channel: $channel) {
72-
totalCount
73-
}
7471
}
7572
`;

0 commit comments

Comments
 (0)