Skip to content

Commit

Permalink
update mockData
Browse files Browse the repository at this point in the history
now we can make mock data without any type assertion
  • Loading branch information
tnyo43 committed Oct 15, 2023
1 parent 7e72f4f commit 6c07d99
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/User.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { UserWithAvatar_UserFragment } from "./USerWithAvatar";
import { UserContact_UserFragment } from "./UserContact";
import { graphql, makeFragmentData } from "./gql";

export const User_UserFragment = graphql(`
Expand All @@ -11,15 +9,10 @@ export const User_UserFragment = graphql(`

const mockData = makeFragmentData(
{
...makeFragmentData(
{
username: "aaa",
avatarUrl: "aaa",
id: "user_1",
},
UserWithAvatar_UserFragment
),
...makeFragmentData({ email: "a", id: "a" }, UserContact_UserFragment),
id: "user_1",
username: "aaa",
avatarUrl: "aaa",
email: "[email protected]",
},
User_UserFragment
);

0 comments on commit 6c07d99

Please sign in to comment.