From 6c07d99ecda0dbd4c5296469aa83c61349c43a7f Mon Sep 17 00:00:00 2001 From: Tomoya Kashifuku Date: Mon, 16 Oct 2023 00:42:12 +0900 Subject: [PATCH] update mockData now we can make mock data without any type assertion --- src/User.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/User.tsx b/src/User.tsx index 24bcbee..d333ce2 100644 --- a/src/User.tsx +++ b/src/User.tsx @@ -1,5 +1,3 @@ -import { UserWithAvatar_UserFragment } from "./USerWithAvatar"; -import { UserContact_UserFragment } from "./UserContact"; import { graphql, makeFragmentData } from "./gql"; export const User_UserFragment = graphql(` @@ -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: "mail@mail.com", }, User_UserFragment );