diff --git a/app/account/graphql/query/getUser.graphql b/app/account/graphql/query/getUser.graphql
index 3c50887..60a4ecc 100644
--- a/app/account/graphql/query/getUser.graphql
+++ b/app/account/graphql/query/getUser.graphql
@@ -1,8 +1,8 @@
-query getUser($uuid: UUID!) {
- usersCollection(filter: { uuid: { eq: $uuid } }) {
+query getUser($id: UUID!) {
+ usersCollection(filter: { id: { eq: $id } }) {
edges {
node {
- uuid
+ id
email
name
profile_picture_url
diff --git a/app/account/page.tsx b/app/account/page.tsx
index 6b77922..53c5d51 100644
--- a/app/account/page.tsx
+++ b/app/account/page.tsx
@@ -16,15 +16,15 @@ import { MdAccountCircle } from 'react-icons/md'
import { PrimaryButton, AlertButton } from '@/components/button'
import { Link } from '@/components/link'
import { Loading } from '@/components/loading'
-import { useUserUuid } from '@/providers/session-provider'
+import { useUserId } from '@/providers/session-provider'
import { useGetUserQuery } from '@generated/api'
export default function AccountPage() {
const bg = useColorModeValue('white', 'gray.800')
const color = useColorModeValue('black', 'gray.300')
- const uuid = useUserUuid()
+ const userId = useUserId()
const { data, loading, error } = useGetUserQuery({
- variables: { uuid }
+ variables: { id: userId }
})
const user = data?.usersCollection?.edges[0].node
diff --git a/app/activity/[id]/graphql/query/activityCollection.graphql b/app/activity/[id]/graphql/query/activityCollection.graphql
index 5472aec..752b00a 100644
--- a/app/activity/[id]/graphql/query/activityCollection.graphql
+++ b/app/activity/[id]/graphql/query/activityCollection.graphql
@@ -1,9 +1,8 @@
-query activityCollection($uuid: UUID!) {
- activityCollection(filter: { uuid: { eq: $uuid } }) {
+query activityCollection($id: UUID!) {
+ activityCollection(filter: { id: { eq: $id } }) {
edges {
node {
id
- uuid
trip_id
title
time_from
diff --git a/app/activity/[id]/page.tsx b/app/activity/[id]/page.tsx
index c8e205d..ff3ebce 100644
--- a/app/activity/[id]/page.tsx
+++ b/app/activity/[id]/page.tsx
@@ -17,7 +17,7 @@ export default function ActivityDetails({
const { data, loading } = useActivityCollectionQuery({
variables: {
- uuid: params.id
+ id: params.id
}
})
diff --git a/app/layout.tsx b/app/layout.tsx
index 6fdcbcd..011a993 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -24,14 +24,14 @@ export default function RootLayout({
}: {
children: React.ReactNode
}) {
- const uuid = cookies().get(USER_UUID_COOKIE_NAME)?.value ?? undefined
+ const userId = cookies().get(USER_UUID_COOKIE_NAME)?.value ?? undefined
return (
- {uuid ? (
- {children}
+ {userId ? (
+ {children}
) : (
children
)}
diff --git a/app/page.tsx b/app/page.tsx
index 3e10391..d7969e6 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -13,7 +13,7 @@ import { useRouter } from 'next/navigation'
import { PrimaryButton } from '@/components/button'
import { Loading } from '@/components/loading'
import { Header, Footer } from '@/components/navigation'
-import { useUserUuid } from '@/providers/session-provider'
+import { useUserId } from '@/providers/session-provider'
import { TripSearch, TripSort, TripCard } from '@/trip/components'
import { useTripsCollectionQuery, TripsOrderBy } from '@generated/api'
@@ -23,12 +23,12 @@ export default function Top({ searchParams }: { searchParams: { q: string } }) {
const color = useColorModeValue('black', 'gray.300')
const searchWord = searchParams.q
- const uuid = useUserUuid()
+ const userId = useUserId()
const { data, loading, fetchMore, refetch } = useTripsCollectionQuery({
variables: {
filter: {
- uuid: { eq: uuid },
+ user_id: { eq: userId },
...(searchWord &&
searchWord.length && { title: { like: `%${searchWord}%` } })
},
diff --git a/app/providers/session-provider.tsx b/app/providers/session-provider.tsx
index 6343feb..37de318 100644
--- a/app/providers/session-provider.tsx
+++ b/app/providers/session-provider.tsx
@@ -5,21 +5,21 @@ import { redirect } from 'next/navigation'
const SessionContext = createContext(undefined)
-export const useUserUuid = (): string => {
- const uuid = useContext(SessionContext)
- if (typeof uuid !== 'string') {
+export const useUserId = (): string => {
+ const userId = useContext(SessionContext)
+ if (typeof userId !== 'string') {
redirect('/signin')
}
- return uuid
+ return userId
}
export function SessionProvider({
children,
- uuid
+ userId
}: {
children: ReactNode
- uuid: string
+ userId: string
}) {
return (
- {children}
+ {children}
)
}
diff --git a/app/trip/[id]/__test__/mock.ts b/app/trip/[id]/__test__/mock.ts
index b23eade..b172605 100644
--- a/app/trip/[id]/__test__/mock.ts
+++ b/app/trip/[id]/__test__/mock.ts
@@ -6,7 +6,7 @@ export const tripDetailsMock1 = [
request: {
query: TripDetailsDocument,
variables: {
- uuid: 'trip-uuid-1'
+ id: 'trip-uuid-1'
}
},
result: {
@@ -15,7 +15,7 @@ export const tripDetailsMock1 = [
edges: [
{
node: {
- uuid: 'trip-uuid-1',
+ id: 'trip-uuid-1',
image_storage_object_id: null,
title: 'Tokyo',
date_from: '2021-01-01',
@@ -52,7 +52,7 @@ export const tripDetailsMock1 = [
time_from: '2021-01-01T10:00:00+00:00',
time_to: '2021-01-01T11:00:00+00:00',
title: 'Activity 1',
- uuid: 'abc1'
+ id: 'abc1'
}
},
{
@@ -61,7 +61,7 @@ export const tripDetailsMock1 = [
time_from: '2021-01-02T10:00:00+00:00',
time_to: '2021-01-02T11:00:00+00:00',
title: 'Activity 2',
- uuid: 'abc2'
+ id: 'abc2'
}
},
{
@@ -70,7 +70,7 @@ export const tripDetailsMock1 = [
time_from: '2021-01-03T11:00:00+00:00',
time_to: '2021-01-03T12:00:00+00:00',
title: 'Activity 3',
- uuid: 'abc3'
+ id: 'abc3'
}
},
{
@@ -79,7 +79,7 @@ export const tripDetailsMock1 = [
time_from: '2021-01-03T14:00:00+00:00',
time_to: '2021-01-03T08:00:00+00:00',
title: 'Activity 4',
- uuid: 'abc4'
+ id: 'abc4'
}
}
]
@@ -99,7 +99,7 @@ export const tripDetailsMock2 = [
request: {
query: TripDetailsDocument,
variables: {
- uuid: 'trip-uuid-2'
+ id: 'trip-uuid-2'
}
},
result: {
@@ -108,7 +108,7 @@ export const tripDetailsMock2 = [
edges: [
{
node: {
- uuid: 'trip-uuid-2',
+ id: 'trip-uuid-2',
image_storage_object_id: null,
title: 'Tokyo',
date_from: '2021-01-01',
@@ -145,7 +145,7 @@ export const tripDetailsMock2 = [
time_from: '2021-01-01T10:00:00+00:00',
time_to: '2021-01-01T11:00:00+00:00',
title: 'Activity 1',
- uuid: 'abc1'
+ id: 'abc1'
}
},
{
@@ -154,7 +154,7 @@ export const tripDetailsMock2 = [
time_from: '2021-01-01T12:00:00+00:00',
time_to: '2021-01-03T11:00:00+00:00',
title: 'Activity 2',
- uuid: 'abc2'
+ id: 'abc2'
}
},
{
@@ -163,7 +163,7 @@ export const tripDetailsMock2 = [
time_from: '2021-01-03T11:00:00+00:00',
time_to: '2021-01-03T12:00:00+00:00',
title: 'Activity 3',
- uuid: 'abc3'
+ id: 'abc3'
}
},
{
@@ -172,7 +172,7 @@ export const tripDetailsMock2 = [
time_from: '2021-01-03T14:00:00+00:00',
time_to: '2021-01-04T08:00:00+00:00',
title: 'Activity 4',
- uuid: 'abc4'
+ id: 'abc4'
}
}
]
diff --git a/app/trip/[id]/__test__/trip-details-tabs.test.tsx b/app/trip/[id]/__test__/trip-details-tabs.test.tsx
index b07260d..0da4194 100644
--- a/app/trip/[id]/__test__/trip-details-tabs.test.tsx
+++ b/app/trip/[id]/__test__/trip-details-tabs.test.tsx
@@ -19,7 +19,7 @@ describe('TripDetails Tabs', () => {
activities={
tripDetailsMock1[0].result.data.tripsCollection.edges[0].node.activityCollection?.edges.map(
(activity) => ({
- id: activity.node.uuid,
+ id: activity.node.id,
timeFrom: activity.node.time_from,
timeTo: activity.node.time_to,
title: activity.node.title,
@@ -65,7 +65,7 @@ describe('TripDetails Tabs', () => {
activities={
tripDetailsMock2[0].result.data.tripsCollection.edges[0].node.activityCollection?.edges.map(
(activity) => ({
- id: activity.node.uuid,
+ id: activity.node.id,
timeFrom: activity.node.time_from,
timeTo: activity.node.time_to,
title: activity.node.title,
diff --git a/app/trip/[id]/components/trip-details-header.tsx b/app/trip/[id]/components/trip-details-header.tsx
index ec7b5c7..9d18582 100644
--- a/app/trip/[id]/components/trip-details-header.tsx
+++ b/app/trip/[id]/components/trip-details-header.tsx
@@ -21,11 +21,11 @@ type TripDetailsHeaderProps = {
dateFrom: string | null | undefined
dateTo: string | null | undefined
users: {
- id: number | undefined
+ id: string | undefined
image: string | null | undefined
}[]
- tags: { id: number | undefined; name: string | undefined }[]
+ tags: { id: string | undefined; name: string | undefined }[]
}
export const TripDetailsHeader = ({
diff --git a/app/trip/[id]/page.tsx b/app/trip/[id]/page.tsx
index f730f79..66768a4 100644
--- a/app/trip/[id]/page.tsx
+++ b/app/trip/[id]/page.tsx
@@ -20,7 +20,7 @@ export default function TripDetailsPage({
const { data: tripData, loading: tripLoading } = useTripDetailsQuery({
variables: {
- uuid: params.id
+ id: params.id
}
})
@@ -42,7 +42,7 @@ export default function TripDetailsPage({
) : (
<>
({
- id: activity.node.uuid,
+ id: activity.node.id,
timeFrom: activity.node.time_from,
timeTo: activity.node.time_to,
title: activity.node.title,
diff --git a/app/trip/components/trip-card.tsx b/app/trip/components/trip-card.tsx
index eed729a..6157790 100644
--- a/app/trip/components/trip-card.tsx
+++ b/app/trip/components/trip-card.tsx
@@ -28,7 +28,7 @@ export const TripCard = ({ data }: TripCardProps) => {
return (
cost?: Maybe
- id: Scalars['BigInt']['output']
+ id: Scalars['UUID']['output']
image_storage_object_id?: Maybe
memo?: Maybe
/** Globally Unique Record Identifier */
@@ -476,10 +476,9 @@ export type Activity = Node & {
time_from: Scalars['Datetime']['output']
time_to?: Maybe
title: Scalars['String']['output']
- trip_id?: Maybe
+ trip_id?: Maybe
trips?: Maybe
url?: Maybe
- uuid: Scalars['UUID']['output']
}
export type ActivityConnection = {
@@ -505,29 +504,28 @@ export type ActivityEdge = {
export type ActivityFilter = {
address?: InputMaybe
cost?: InputMaybe
- id?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
memo?: InputMaybe
nodeId?: InputMaybe
time_from?: InputMaybe
time_to?: InputMaybe
title?: InputMaybe
- trip_id?: InputMaybe
+ trip_id?: InputMaybe
url?: InputMaybe
- uuid?: InputMaybe
}
export type ActivityInsertInput = {
address?: InputMaybe
cost?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
memo?: InputMaybe
time_from?: InputMaybe
time_to?: InputMaybe
title?: InputMaybe
- trip_id?: InputMaybe
+ trip_id?: InputMaybe
url?: InputMaybe
- uuid?: InputMaybe
}
export type ActivityInsertResponse = {
@@ -549,20 +547,19 @@ export type ActivityOrderBy = {
title?: InputMaybe
trip_id?: InputMaybe
url?: InputMaybe
- uuid?: InputMaybe
}
export type ActivityUpdateInput = {
address?: InputMaybe
cost?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
memo?: InputMaybe
time_from?: InputMaybe
time_to?: InputMaybe
title?: InputMaybe
- trip_id?: InputMaybe
+ trip_id?: InputMaybe
url?: InputMaybe
- uuid?: InputMaybe
}
export type ActivityUpdateResponse = {
@@ -576,17 +573,16 @@ export type ActivityUpdateResponse = {
export type Invitations = Node & {
__typename?: 'invitations'
email: Scalars['String']['output']
- id: Scalars['BigInt']['output']
+ id: Scalars['UUID']['output']
invitation_url: Scalars['String']['output']
- invited_by_user_id?: Maybe
- invitee_user_id?: Maybe
+ invited_by_user_id?: Maybe
+ invitee_user_id?: Maybe
/** Globally Unique Record Identifier */
nodeId: Scalars['ID']['output']
permission_level: Permission_Level_Enum
- trip_id?: Maybe
+ trip_id?: Maybe
trips?: Maybe
users?: Maybe
- uuid: Scalars['UUID']['output']
}
export type InvitationsConnection = {
@@ -611,24 +607,23 @@ export type InvitationsEdge = {
export type InvitationsFilter = {
email?: InputMaybe
- id?: InputMaybe
+ id?: InputMaybe
invitation_url?: InputMaybe
- invited_by_user_id?: InputMaybe
- invitee_user_id?: InputMaybe
+ invited_by_user_id?: InputMaybe
+ invitee_user_id?: InputMaybe
nodeId?: InputMaybe
permission_level?: InputMaybe
- trip_id?: InputMaybe
- uuid?: InputMaybe
+ trip_id?: InputMaybe
}
export type InvitationsInsertInput = {
email?: InputMaybe
+ id?: InputMaybe
invitation_url?: InputMaybe
- invited_by_user_id?: InputMaybe
- invitee_user_id?: InputMaybe
+ invited_by_user_id?: InputMaybe
+ invitee_user_id?: InputMaybe
permission_level?: InputMaybe
- trip_id?: InputMaybe
- uuid?: InputMaybe
+ trip_id?: InputMaybe
}
export type InvitationsInsertResponse = {
@@ -647,17 +642,16 @@ export type InvitationsOrderBy = {
invitee_user_id?: InputMaybe
permission_level?: InputMaybe
trip_id?: InputMaybe
- uuid?: InputMaybe
}
export type InvitationsUpdateInput = {
email?: InputMaybe
+ id?: InputMaybe
invitation_url?: InputMaybe
- invited_by_user_id?: InputMaybe
- invitee_user_id?: InputMaybe
+ invited_by_user_id?: InputMaybe
+ invitee_user_id?: InputMaybe
permission_level?: InputMaybe
- trip_id?: InputMaybe
- uuid?: InputMaybe
+ trip_id?: InputMaybe
}
export type InvitationsUpdateResponse = {
@@ -683,12 +677,11 @@ export type Permission_Level_EnumFilter = {
export type Tags = Node & {
__typename?: 'tags'
- id: Scalars['BigInt']['output']
+ id: Scalars['UUID']['output']
name: Scalars['String']['output']
/** Globally Unique Record Identifier */
nodeId: Scalars['ID']['output']
trip_tagsCollection?: Maybe
- uuid: Scalars['UUID']['output']
}
export type TagsTrip_TagsCollectionArgs = {
@@ -721,15 +714,14 @@ export type TagsEdge = {
}
export type TagsFilter = {
- id?: InputMaybe
+ id?: InputMaybe
name?: InputMaybe
nodeId?: InputMaybe
- uuid?: InputMaybe
}
export type TagsInsertInput = {
+ id?: InputMaybe
name?: InputMaybe
- uuid?: InputMaybe
}
export type TagsInsertResponse = {
@@ -743,12 +735,11 @@ export type TagsInsertResponse = {
export type TagsOrderBy = {
id?: InputMaybe
name?: InputMaybe
- uuid?: InputMaybe
}
export type TagsUpdateInput = {
+ id?: InputMaybe
name?: InputMaybe
- uuid?: InputMaybe
}
export type TagsUpdateResponse = {
@@ -824,14 +815,13 @@ export type Test_TenantUpdateResponse = {
export type Trip_Tags = Node & {
__typename?: 'trip_tags'
- id: Scalars['BigInt']['output']
+ id: Scalars['UUID']['output']
/** Globally Unique Record Identifier */
nodeId: Scalars['ID']['output']
- tag_id?: Maybe
+ tag_id?: Maybe
tags?: Maybe
- trip_id?: Maybe
+ trip_id?: Maybe
trips?: Maybe
- uuid: Scalars['UUID']['output']
}
export type Trip_TagsConnection = {
@@ -855,17 +845,16 @@ export type Trip_TagsEdge = {
}
export type Trip_TagsFilter = {
- id?: InputMaybe
+ id?: InputMaybe
nodeId?: InputMaybe
- tag_id?: InputMaybe
- trip_id?: InputMaybe
- uuid?: InputMaybe
+ tag_id?: InputMaybe
+ trip_id?: InputMaybe
}
export type Trip_TagsInsertInput = {
- tag_id?: InputMaybe
- trip_id?: InputMaybe
- uuid?: InputMaybe
+ id?: InputMaybe
+ tag_id?: InputMaybe
+ trip_id?: InputMaybe
}
export type Trip_TagsInsertResponse = {
@@ -880,13 +869,12 @@ export type Trip_TagsOrderBy = {
id?: InputMaybe
tag_id?: InputMaybe
trip_id?: InputMaybe
- uuid?: InputMaybe
}
export type Trip_TagsUpdateInput = {
- tag_id?: InputMaybe
- trip_id?: InputMaybe
- uuid?: InputMaybe
+ id?: InputMaybe
+ tag_id?: InputMaybe
+ trip_id?: InputMaybe
}
export type Trip_TagsUpdateResponse = {
@@ -905,16 +893,15 @@ export type Trips = Node & {
date_from: Scalars['Date']['output']
date_to?: Maybe
description?: Maybe
- id: Scalars['BigInt']['output']
+ id: Scalars['UUID']['output']
image_storage_object_id?: Maybe
invitationsCollection?: Maybe
/** Globally Unique Record Identifier */
nodeId: Scalars['ID']['output']
title: Scalars['String']['output']
trip_tagsCollection?: Maybe
- user_id?: Maybe
+ user_id?: Maybe
users?: Maybe
- uuid: Scalars['UUID']['output']
}
export type TripsActivityCollectionArgs = {
@@ -970,12 +957,11 @@ export type TripsFilter = {
date_from?: InputMaybe
date_to?: InputMaybe
description?: InputMaybe
- id?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
nodeId?: InputMaybe
title?: InputMaybe
- user_id?: InputMaybe
- uuid?: InputMaybe
+ user_id?: InputMaybe
}
export type TripsInsertInput = {
@@ -984,10 +970,10 @@ export type TripsInsertInput = {
date_from?: InputMaybe
date_to?: InputMaybe
description?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
title?: InputMaybe
- user_id?: InputMaybe
- uuid?: InputMaybe
+ user_id?: InputMaybe
}
export type TripsInsertResponse = {
@@ -1008,7 +994,6 @@ export type TripsOrderBy = {
image_storage_object_id?: InputMaybe
title?: InputMaybe
user_id?: InputMaybe
- uuid?: InputMaybe
}
export type TripsUpdateInput = {
@@ -1017,10 +1002,10 @@ export type TripsUpdateInput = {
date_from?: InputMaybe
date_to?: InputMaybe
description?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
title?: InputMaybe
- user_id?: InputMaybe
- uuid?: InputMaybe
+ user_id?: InputMaybe
}
export type TripsUpdateResponse = {
@@ -1034,14 +1019,13 @@ export type TripsUpdateResponse = {
export type Users = Node & {
__typename?: 'users'
email: Scalars['String']['output']
- id: Scalars['BigInt']['output']
+ id: Scalars['UUID']['output']
invitationsCollection?: Maybe
name: Scalars['String']['output']
/** Globally Unique Record Identifier */
nodeId: Scalars['ID']['output']
profile_picture_url?: Maybe
tripsCollection?: Maybe
- uuid: Scalars['UUID']['output']
}
export type UsersInvitationsCollectionArgs = {
@@ -1084,18 +1068,17 @@ export type UsersEdge = {
export type UsersFilter = {
email?: InputMaybe
- id?: InputMaybe
+ id?: InputMaybe
name?: InputMaybe
nodeId?: InputMaybe
profile_picture_url?: InputMaybe
- uuid?: InputMaybe
}
export type UsersInsertInput = {
email?: InputMaybe
+ id?: InputMaybe
name?: InputMaybe
profile_picture_url?: InputMaybe
- uuid?: InputMaybe
}
export type UsersInsertResponse = {
@@ -1111,14 +1094,13 @@ export type UsersOrderBy = {
id?: InputMaybe
name?: InputMaybe
profile_picture_url?: InputMaybe
- uuid?: InputMaybe
}
export type UsersUpdateInput = {
email?: InputMaybe
+ id?: InputMaybe
name?: InputMaybe
profile_picture_url?: InputMaybe
- uuid?: InputMaybe
}
export type UsersUpdateResponse = {
@@ -1130,7 +1112,7 @@ export type UsersUpdateResponse = {
}
export type GetUserQueryVariables = Exact<{
- uuid: Scalars['UUID']['input']
+ id: Scalars['UUID']['input']
}>
export type GetUserQuery = {
@@ -1141,7 +1123,7 @@ export type GetUserQuery = {
__typename: 'usersEdge'
node: {
__typename: 'users'
- uuid: string
+ id: string
email: string
name: string
profile_picture_url?: string | null
@@ -1151,7 +1133,7 @@ export type GetUserQuery = {
}
export type ActivityCollectionQueryVariables = Exact<{
- uuid: Scalars['UUID']['input']
+ id: Scalars['UUID']['input']
}>
export type ActivityCollectionQuery = {
@@ -1162,9 +1144,8 @@ export type ActivityCollectionQuery = {
__typename: 'activityEdge'
node: {
__typename: 'activity'
- id: number
- uuid: string
- trip_id?: number | null
+ id: string
+ trip_id?: string | null
title: string
time_from: string
time_to?: string | null
@@ -1179,7 +1160,7 @@ export type ActivityCollectionQuery = {
}
export type CreateTripMutationVariables = Exact<{
- user_id: Scalars['BigInt']['input']
+ user_id: Scalars['UUID']['input']
title: Scalars['String']['input']
date_from?: InputMaybe
date_to?: InputMaybe
@@ -1189,17 +1170,12 @@ export type CreateTripMutation = {
__typename: 'Mutation'
insertIntotripsCollection?: {
__typename: 'tripsInsertResponse'
- records: Array<{
- __typename: 'trips'
- id: number
- uuid: string
- title: string
- }>
+ records: Array<{ __typename: 'trips'; id: string; title: string }>
} | null
}
export type TripDetailsQueryVariables = Exact<{
- uuid: Scalars['UUID']['input']
+ id: Scalars['UUID']['input']
}>
export type TripDetailsQuery = {
@@ -1210,7 +1186,7 @@ export type TripDetailsQuery = {
__typename: 'tripsEdge'
node: {
__typename: 'trips'
- uuid: string
+ id: string
title: string
date_from: string
date_to?: string | null
@@ -1223,7 +1199,7 @@ export type TripDetailsQuery = {
__typename: 'invitations'
users?: {
__typename: 'users'
- id: number
+ id: string
profile_picture_url?: string | null
} | null
}
@@ -1235,7 +1211,7 @@ export type TripDetailsQuery = {
__typename: 'activityEdge'
node: {
__typename: 'activity'
- uuid: string
+ id: string
title: string
time_from: string
time_to?: string | null
@@ -1249,7 +1225,7 @@ export type TripDetailsQuery = {
__typename: 'trip_tagsEdge'
node: {
__typename: 'trip_tags'
- tags?: { __typename: 'tags'; id: number; name: string } | null
+ tags?: { __typename: 'tags'; id: string; name: string } | null
}
}>
} | null
@@ -1273,8 +1249,7 @@ export type TripsCollectionQuery = {
__typename: 'tripsEdge'
node: {
__typename: 'trips'
- id: number
- uuid: string
+ id: string
title: string
date_from: string
date_to?: string | null
@@ -1288,7 +1263,7 @@ export type TripsCollectionQuery = {
__typename: 'invitations'
users?: {
__typename: 'users'
- id: number
+ id: string
profile_picture_url?: string | null
} | null
}
@@ -1298,7 +1273,7 @@ export type TripsCollectionQuery = {
__typename: 'activityConnection'
edges: Array<{
__typename: 'activityEdge'
- node: { __typename: 'activity'; id: number }
+ node: { __typename: 'activity'; id: string }
}>
} | null
}
@@ -1314,15 +1289,15 @@ export type TripsCollectionQuery = {
}
export const GetUserDocument = gql`
- query getUser($uuid: UUID!) {
+ query getUser($id: UUID!) {
__typename
- usersCollection(filter: { uuid: { eq: $uuid } }) {
+ usersCollection(filter: { id: { eq: $id } }) {
__typename
edges {
__typename
node {
__typename
- uuid
+ id
email
name
profile_picture_url
@@ -1344,7 +1319,7 @@ export const GetUserDocument = gql`
* @example
* const { data, loading, error } = useGetUserQuery({
* variables: {
- * uuid: // value for 'uuid'
+ * id: // value for 'id'
* },
* });
*/
@@ -1391,16 +1366,15 @@ export function refetchGetUserQuery(variables: GetUserQueryVariables) {
return { query: GetUserDocument, variables: variables }
}
export const ActivityCollectionDocument = gql`
- query activityCollection($uuid: UUID!) {
+ query activityCollection($id: UUID!) {
__typename
- activityCollection(filter: { uuid: { eq: $uuid } }) {
+ activityCollection(filter: { id: { eq: $id } }) {
__typename
edges {
__typename
node {
__typename
id
- uuid
trip_id
title
time_from
@@ -1428,7 +1402,7 @@ export const ActivityCollectionDocument = gql`
* @example
* const { data, loading, error } = useActivityCollectionQuery({
* variables: {
- * uuid: // value for 'uuid'
+ * id: // value for 'id'
* },
* });
*/
@@ -1488,7 +1462,7 @@ export function refetchActivityCollectionQuery(
}
export const CreateTripDocument = gql`
mutation createTrip(
- $user_id: BigInt!
+ $user_id: UUID!
$title: String!
$date_from: Date
$date_to: Date
@@ -1508,7 +1482,6 @@ export const CreateTripDocument = gql`
records {
__typename
id
- uuid
title
}
}
@@ -1560,15 +1533,15 @@ export type CreateTripMutationOptions = Apollo.BaseMutationOptions<
CreateTripMutationVariables
>
export const TripDetailsDocument = gql`
- query tripDetails($uuid: UUID!) {
+ query tripDetails($id: UUID!) {
__typename
- tripsCollection(filter: { uuid: { eq: $uuid } }) {
+ tripsCollection(filter: { id: { eq: $id } }) {
__typename
edges {
__typename
node {
__typename
- uuid
+ id
title
date_from
date_to
@@ -1593,7 +1566,7 @@ export const TripDetailsDocument = gql`
__typename
node {
__typename
- uuid
+ id
title
time_from
time_to
@@ -1633,7 +1606,7 @@ export const TripDetailsDocument = gql`
* @example
* const { data, loading, error } = useTripDetailsQuery({
* variables: {
- * uuid: // value for 'uuid'
+ * id: // value for 'id'
* },
* });
*/
@@ -1707,7 +1680,7 @@ export const TripsCollectionDocument = gql`
node {
__typename
id
- uuid
+ id
title
date_from
date_to
diff --git a/graphql-codegen/generated/gql.ts b/graphql-codegen/generated/gql.ts
index de9302b..f4b387f 100644
--- a/graphql-codegen/generated/gql.ts
+++ b/graphql-codegen/generated/gql.ts
@@ -13,15 +13,15 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-
* Therefore it is highly recommended to use the babel or swc plugin for production.
*/
const documents = {
- 'query getUser($uuid: UUID!) {\n usersCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n uuid\n email\n name\n profile_picture_url\n }\n }\n }\n}':
+ 'query getUser($id: UUID!) {\n usersCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n email\n name\n profile_picture_url\n }\n }\n }\n}':
types.GetUserDocument,
- 'query activityCollection($uuid: UUID!) {\n activityCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n id\n uuid\n trip_id\n title\n time_from\n time_to\n address\n url\n memo\n cost\n image_storage_object_id\n }\n }\n }\n}':
+ 'query activityCollection($id: UUID!) {\n activityCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n trip_id\n title\n time_from\n time_to\n address\n url\n memo\n cost\n image_storage_object_id\n }\n }\n }\n}':
types.ActivityCollectionDocument,
- 'mutation createTrip($user_id: BigInt!, $title: String!, $date_from: Date, $date_to: Date) {\n insertIntotripsCollection(\n objects: [{user_id: $user_id, title: $title, date_from: $date_from, date_to: $date_to}]\n ) {\n records {\n __typename\n id\n uuid\n title\n }\n }\n}':
+ 'mutation createTrip($user_id: UUID!, $title: String!, $date_from: Date, $date_to: Date) {\n insertIntotripsCollection(\n objects: [{user_id: $user_id, title: $title, date_from: $date_from, date_to: $date_to}]\n ) {\n records {\n __typename\n id\n title\n }\n }\n}':
types.CreateTripDocument,
- 'query tripDetails($uuid: UUID!) {\n tripsCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n uuid\n title\n date_from\n date_to\n image_storage_object_id\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n uuid\n title\n time_from\n time_to\n address\n }\n }\n }\n trip_tagsCollection {\n edges {\n node {\n tags {\n id\n name\n }\n }\n }\n }\n }\n }\n }\n}':
+ 'query tripDetails($id: UUID!) {\n tripsCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n title\n date_from\n date_to\n image_storage_object_id\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n title\n time_from\n time_to\n address\n }\n }\n }\n trip_tagsCollection {\n edges {\n node {\n tags {\n id\n name\n }\n }\n }\n }\n }\n }\n }\n}':
types.TripDetailsDocument,
- 'query tripsCollection($filter: tripsFilter, $orderBy: [tripsOrderBy!], $first: Int!, $after: Cursor) {\n tripsCollection(\n filter: $filter\n first: $first\n after: $after\n orderBy: $orderBy\n ) {\n edges {\n node {\n id\n uuid\n title\n date_from\n date_to\n image_storage_object_id\n created_at\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n }\n}':
+ 'query tripsCollection($filter: tripsFilter, $orderBy: [tripsOrderBy!], $first: Int!, $after: Cursor) {\n tripsCollection(\n filter: $filter\n first: $first\n after: $after\n orderBy: $orderBy\n ) {\n edges {\n node {\n id\n id\n title\n date_from\n date_to\n image_storage_object_id\n created_at\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n }\n}':
types.TripsCollectionDocument
}
@@ -43,32 +43,32 @@ export function graphql(source: string): unknown
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: 'query getUser($uuid: UUID!) {\n usersCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n uuid\n email\n name\n profile_picture_url\n }\n }\n }\n}'
-): (typeof documents)['query getUser($uuid: UUID!) {\n usersCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n uuid\n email\n name\n profile_picture_url\n }\n }\n }\n}']
+ source: 'query getUser($id: UUID!) {\n usersCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n email\n name\n profile_picture_url\n }\n }\n }\n}'
+): (typeof documents)['query getUser($id: UUID!) {\n usersCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n email\n name\n profile_picture_url\n }\n }\n }\n}']
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: 'query activityCollection($uuid: UUID!) {\n activityCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n id\n uuid\n trip_id\n title\n time_from\n time_to\n address\n url\n memo\n cost\n image_storage_object_id\n }\n }\n }\n}'
-): (typeof documents)['query activityCollection($uuid: UUID!) {\n activityCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n id\n uuid\n trip_id\n title\n time_from\n time_to\n address\n url\n memo\n cost\n image_storage_object_id\n }\n }\n }\n}']
+ source: 'query activityCollection($id: UUID!) {\n activityCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n trip_id\n title\n time_from\n time_to\n address\n url\n memo\n cost\n image_storage_object_id\n }\n }\n }\n}'
+): (typeof documents)['query activityCollection($id: UUID!) {\n activityCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n trip_id\n title\n time_from\n time_to\n address\n url\n memo\n cost\n image_storage_object_id\n }\n }\n }\n}']
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: 'mutation createTrip($user_id: BigInt!, $title: String!, $date_from: Date, $date_to: Date) {\n insertIntotripsCollection(\n objects: [{user_id: $user_id, title: $title, date_from: $date_from, date_to: $date_to}]\n ) {\n records {\n __typename\n id\n uuid\n title\n }\n }\n}'
-): (typeof documents)['mutation createTrip($user_id: BigInt!, $title: String!, $date_from: Date, $date_to: Date) {\n insertIntotripsCollection(\n objects: [{user_id: $user_id, title: $title, date_from: $date_from, date_to: $date_to}]\n ) {\n records {\n __typename\n id\n uuid\n title\n }\n }\n}']
+ source: 'mutation createTrip($user_id: UUID!, $title: String!, $date_from: Date, $date_to: Date) {\n insertIntotripsCollection(\n objects: [{user_id: $user_id, title: $title, date_from: $date_from, date_to: $date_to}]\n ) {\n records {\n __typename\n id\n title\n }\n }\n}'
+): (typeof documents)['mutation createTrip($user_id: UUID!, $title: String!, $date_from: Date, $date_to: Date) {\n insertIntotripsCollection(\n objects: [{user_id: $user_id, title: $title, date_from: $date_from, date_to: $date_to}]\n ) {\n records {\n __typename\n id\n title\n }\n }\n}']
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: 'query tripDetails($uuid: UUID!) {\n tripsCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n uuid\n title\n date_from\n date_to\n image_storage_object_id\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n uuid\n title\n time_from\n time_to\n address\n }\n }\n }\n trip_tagsCollection {\n edges {\n node {\n tags {\n id\n name\n }\n }\n }\n }\n }\n }\n }\n}'
-): (typeof documents)['query tripDetails($uuid: UUID!) {\n tripsCollection(filter: {uuid: {eq: $uuid}}) {\n edges {\n node {\n uuid\n title\n date_from\n date_to\n image_storage_object_id\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n uuid\n title\n time_from\n time_to\n address\n }\n }\n }\n trip_tagsCollection {\n edges {\n node {\n tags {\n id\n name\n }\n }\n }\n }\n }\n }\n }\n}']
+ source: 'query tripDetails($id: UUID!) {\n tripsCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n title\n date_from\n date_to\n image_storage_object_id\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n title\n time_from\n time_to\n address\n }\n }\n }\n trip_tagsCollection {\n edges {\n node {\n tags {\n id\n name\n }\n }\n }\n }\n }\n }\n }\n}'
+): (typeof documents)['query tripDetails($id: UUID!) {\n tripsCollection(filter: {id: {eq: $id}}) {\n edges {\n node {\n id\n title\n date_from\n date_to\n image_storage_object_id\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n title\n time_from\n time_to\n address\n }\n }\n }\n trip_tagsCollection {\n edges {\n node {\n tags {\n id\n name\n }\n }\n }\n }\n }\n }\n }\n}']
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
- source: 'query tripsCollection($filter: tripsFilter, $orderBy: [tripsOrderBy!], $first: Int!, $after: Cursor) {\n tripsCollection(\n filter: $filter\n first: $first\n after: $after\n orderBy: $orderBy\n ) {\n edges {\n node {\n id\n uuid\n title\n date_from\n date_to\n image_storage_object_id\n created_at\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n }\n}'
-): (typeof documents)['query tripsCollection($filter: tripsFilter, $orderBy: [tripsOrderBy!], $first: Int!, $after: Cursor) {\n tripsCollection(\n filter: $filter\n first: $first\n after: $after\n orderBy: $orderBy\n ) {\n edges {\n node {\n id\n uuid\n title\n date_from\n date_to\n image_storage_object_id\n created_at\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n }\n}']
+ source: 'query tripsCollection($filter: tripsFilter, $orderBy: [tripsOrderBy!], $first: Int!, $after: Cursor) {\n tripsCollection(\n filter: $filter\n first: $first\n after: $after\n orderBy: $orderBy\n ) {\n edges {\n node {\n id\n id\n title\n date_from\n date_to\n image_storage_object_id\n created_at\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n }\n}'
+): (typeof documents)['query tripsCollection($filter: tripsFilter, $orderBy: [tripsOrderBy!], $first: Int!, $after: Cursor) {\n tripsCollection(\n filter: $filter\n first: $first\n after: $after\n orderBy: $orderBy\n ) {\n edges {\n node {\n id\n id\n title\n date_from\n date_to\n image_storage_object_id\n created_at\n invitationsCollection {\n edges {\n node {\n users {\n id\n profile_picture_url\n }\n }\n }\n }\n activityCollection {\n edges {\n node {\n id\n }\n }\n }\n }\n }\n pageInfo {\n startCursor\n endCursor\n hasPreviousPage\n hasNextPage\n }\n }\n}']
export function graphql(source: string) {
return (documents as any)[source] ?? {}
diff --git a/graphql-codegen/generated/graphql.ts b/graphql-codegen/generated/graphql.ts
index 31d7695..1ad1470 100644
--- a/graphql-codegen/generated/graphql.ts
+++ b/graphql-codegen/generated/graphql.ts
@@ -476,7 +476,7 @@ export type Activity = Node & {
__typename?: 'activity'
address?: Maybe
cost?: Maybe
- id: Scalars['BigInt']['output']
+ id: Scalars['UUID']['output']
image_storage_object_id?: Maybe
memo?: Maybe
/** Globally Unique Record Identifier */
@@ -484,10 +484,9 @@ export type Activity = Node & {
time_from: Scalars['Datetime']['output']
time_to?: Maybe
title: Scalars['String']['output']
- trip_id?: Maybe
+ trip_id?: Maybe
trips?: Maybe
url?: Maybe
- uuid: Scalars['UUID']['output']
}
export type ActivityConnection = {
@@ -513,29 +512,28 @@ export type ActivityEdge = {
export type ActivityFilter = {
address?: InputMaybe
cost?: InputMaybe
- id?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
memo?: InputMaybe
nodeId?: InputMaybe
time_from?: InputMaybe
time_to?: InputMaybe
title?: InputMaybe
- trip_id?: InputMaybe
+ trip_id?: InputMaybe
url?: InputMaybe
- uuid?: InputMaybe
}
export type ActivityInsertInput = {
address?: InputMaybe
cost?: InputMaybe
+ id?: InputMaybe
image_storage_object_id?: InputMaybe
memo?: InputMaybe
time_from?: InputMaybe
time_to?: InputMaybe
title?: InputMaybe
- trip_id?: InputMaybe
+ trip_id?: InputMaybe
url?: InputMaybe
- uuid?: InputMaybe
}
export type ActivityInsertResponse = {
@@ -557,20 +555,19 @@ export type ActivityOrderBy = {
title?: InputMaybe
trip_id?: InputMaybe
url?: InputMaybe
- uuid?: InputMaybe
}
export type ActivityUpdateInput = {
address?: InputMaybe