Skip to content

Commit c3f1578

Browse files
committed
Setup MSW
1 parent 79e08c4 commit c3f1578

19 files changed

+1223
-81
lines changed

frontend/codegen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const config: CodegenConfig = {
1313
generates: {
1414
"./src/gql/": {
1515
preset: "client",
16+
plugins: ["typescript-msw"],
1617
config: {
1718
useTypeImports: true,
1819
enumsAsTypes: true,

frontend/package-lock.json

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

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@graphql-codegen/add": "^5.0.3",
5454
"@graphql-codegen/cli": "^5.0.3",
5555
"@graphql-codegen/client-preset": "^4.5.0",
56+
"@graphql-codegen/typescript-msw": "^3.0.0",
5657
"@graphql-codegen/urql-introspection": "^3.0.0",
5758
"@storybook/addon-essentials": "^8.4.2",
5859
"@storybook/react": "^8.4.2",
@@ -72,6 +73,7 @@
7273
"browserslist-to-esbuild": "^2.1.1",
7374
"happy-dom": "^15.11.2",
7475
"i18next-parser": "^9.0.2",
76+
"msw": "^2.6.4",
7577
"postcss": "^8.4.49",
7678
"postcss-modules": "^6.0.1",
7779
"postcss-nesting": "^13.0.1",

frontend/src/components/Layout/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { graphqlClient } from "../../graphql";
1515
import styles from "./Layout.module.css";
1616

1717
const QUERY = graphql(/* GraphQL */ `
18-
query FooterQuery {
18+
query Footer {
1919
siteConfig {
2020
id
2121
...Footer_siteConfig

frontend/src/components/UserProfile/UserEmailList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import PaginationControls from "../PaginationControls";
1919
import UserEmail from "../UserEmail";
2020

2121
const QUERY = graphql(/* GraphQL */ `
22-
query UserEmailListQuery(
22+
query UserEmailList(
2323
$userId: ID!
2424
$first: Int
2525
$after: String

frontend/src/components/VerifyEmail/VerifyEmail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const FRAGMENT = graphql(/* GraphQL */ `
2323
`);
2424

2525
const VERIFY_EMAIL_MUTATION = graphql(/* GraphQL */ `
26-
mutation VerifyEmail($id: ID!, $code: String!) {
26+
mutation DoVerifyEmail($id: ID!, $code: String!) {
2727
verifyEmail(input: { userEmailId: $id, code: $code }) {
2828
status
2929

frontend/src/gql/gql.ts

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.

frontend/src/gql/graphql.ts

Lines changed: 606 additions & 40 deletions
Large diffs are not rendered by default.

frontend/src/routes/_account.index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { graphql } from "../gql";
1313
import { graphqlClient } from "../graphql";
1414

1515
const QUERY = graphql(/* GraphQL */ `
16-
query UserProfileQuery {
16+
query UserProfile {
1717
viewer {
1818
__typename
1919
... on User {

frontend/src/routes/_account.sessions.$id.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { graphql } from "../gql";
1111
import { graphqlClient } from "../graphql";
1212

1313
const QUERY = graphql(/* GraphQL */ `
14-
query SessionDetailQuery($id: ID!) {
14+
query SessionDetail($id: ID!) {
1515
viewerSession {
1616
... on Node {
1717
id

0 commit comments

Comments
 (0)