Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
839f515
upgrade apollo 3.14 -> 4
rudransh-shrivastava Aug 25, 2025
5e68e09
run initial apollo client codemod
rudransh-shrivastava Aug 25, 2025
6b2e8a4
remove @client and @defer codemod codeblocks
rudransh-shrivastava Aug 25, 2025
b175fb9
format and lint code
rudransh-shrivastava Aug 27, 2025
9215da4
Merge branch 'main' into refactor/migrate-apollo-3-to-4t
rudransh-shrivastava Sep 3, 2025
b8a110c
replace queries with typed-document-node
rudransh-shrivastava Sep 3, 2025
8d7ccec
Merge branch 'main' into refactor/migrate-apollo-3-to-4
rudransh-shrivastava Sep 21, 2025
e50807c
revert type changes
rudransh-shrivastava Sep 21, 2025
4706816
revert type changes
rudransh-shrivastava Sep 21, 2025
3e70433
Create and use fragments in About page
rudransh-shrivastava Sep 21, 2025
0637a84
Create and use fragments in Chapter pages
rudransh-shrivastava Sep 21, 2025
ee6352d
Revert "Create and use fragments in Chapter pages"
rudransh-shrivastava Sep 22, 2025
14348ca
Revert "Create and use fragments in About page"
rudransh-shrivastava Sep 22, 2025
98858fc
change types to match generated graphql schema types make types optio…
rudransh-shrivastava Sep 22, 2025
2b52229
revert as string type casts
rudransh-shrivastava Sep 22, 2025
32da88b
fix tests by updating imports
rudransh-shrivastava Sep 23, 2025
04081e9
fix tests by updating queries, dates, imports
rudransh-shrivastava Sep 23, 2025
75ab358
Merge branch 'main' into refactor/migrate-apollo-3-to-4
rudransh-shrivastava Sep 23, 2025
28b7fa8
update enums, address CR comments
rudransh-shrivastava Sep 23, 2025
7c4fbb4
Merge branch 'main' into refactor/migrate-apollo-3-to-4
rudransh-shrivastava Sep 29, 2025
66b6d67
resolve TODO comments
rudransh-shrivastava Sep 29, 2025
99c45bf
update code
rudransh-shrivastava Sep 29, 2025
a728eb2
replace remaining queries with typed-document-node
rudransh-shrivastava Sep 29, 2025
61a817c
Merge branch 'main' into refactor/migrate-apollo-3-to-4
rudransh-shrivastava Sep 30, 2025
f7c05eb
replace upperFirst with capitalize
rudransh-shrivastava Sep 30, 2025
483477b
remove gql imports and cleanup tests
rudransh-shrivastava Oct 1, 2025
5350382
Merge branch 'main' into refactor/migrate-apollo-3-to-4
rudransh-shrivastava Oct 1, 2025
95b9549
sonar qube suggestions
rudransh-shrivastava Oct 1, 2025
bf62643
sonar qube suggestions
rudransh-shrivastava Oct 1, 2025
a91abc1
make input optional
rudransh-shrivastava Oct 1, 2025
a3d4583
spread fields
rudransh-shrivastava Oct 1, 2025
34b74a5
Merge branch 'main' into pr/rudransh-shrivastava/2178
arkid15r Oct 5, 2025
b3291f4
Update deps
arkid15r Oct 5, 2025
936a31f
Merge branch 'main' into pr/rudransh-shrivastava/2178
arkid15r Oct 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test:unit": "tsc --noEmit && NODE_OPTIONS='--experimental-vm-modules --no-warnings=DEP0040' jest"
},
"dependencies": {
"@apollo/client": "^3.14.0",
"@apollo/client": "^4.0.0",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-regular-svg-icons": "^6.7.2",
Expand Down Expand Up @@ -63,6 +63,7 @@
"react-dom": "^19.1.1",
"react-icons": "^5.5.0",
"react-router-dom": "^7.8.2",
"rxjs": "^7.8.2",
"tailwind-merge": "^3.3.1",
"tailwindcss-animate": "^1.0.7"
},
Expand Down
71 changes: 13 additions & 58 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 21 additions & 12 deletions frontend/src/app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client'
import { useQuery } from '@apollo/client'
import { useQuery } from '@apollo/client/react'
import {
faCircleCheck,
faClock,
Expand All @@ -19,11 +19,16 @@ import { useRouter } from 'next/navigation'
import { useEffect, useState } from 'react'
import FontAwesomeIconWrapper from 'wrappers/FontAwesomeIconWrapper'
import { ErrorDisplay, handleAppError } from 'app/global-error'
import { GET_PROJECT_METADATA, GET_TOP_CONTRIBUTORS } from 'server/queries/projectQueries'
import { GET_LEADER_DATA } from 'server/queries/userQueries'
import type { Contributor } from 'types/contributor'
import type { Project } from 'types/project'
import type { User } from 'types/user'
import {
GetProjectMetadataDocument,
GetProjectMetadataQuery,
GetTopContributorsDocument,
GetTopContributorsQuery,
} from 'types/__generated__/projectQueries.generated'
import {
GetLeaderDataDocument,
GetLeaderDataQuery,
} from 'types/__generated__/userQueries.generated'
import { aboutText, technologies } from 'utils/aboutData'
import AnchorTitle from 'components/AnchorTitle'
import AnimatedCounter from 'components/AnimatedCounter'
Expand All @@ -42,14 +47,14 @@ const projectKey = 'nest'

const About = () => {
const { data: projectMetadataResponse, error: projectMetadataRequestError } = useQuery(
GET_PROJECT_METADATA,
GetProjectMetadataDocument,
{
variables: { key: projectKey },
}
)

const { data: topContributorsResponse, error: topContributorsRequestError } = useQuery(
GET_TOP_CONTRIBUTORS,
GetTopContributorsDocument,
{
variables: {
excludedUsernames: Object.keys(leaders),
Expand All @@ -60,8 +65,12 @@ const About = () => {
}
)

const [projectMetadata, setProjectMetadata] = useState<Project | null>(null)
const [topContributors, setTopContributors] = useState<Contributor[]>([])
const [projectMetadata, setProjectMetadata] = useState<GetProjectMetadataQuery['project'] | null>(
null
)
const [topContributors, setTopContributors] = useState<
GetTopContributorsQuery['topContributors']
>([])

useEffect(() => {
if (projectMetadataResponse?.project) {
Expand Down Expand Up @@ -247,7 +256,7 @@ const About = () => {
}

const LeaderData = ({ username }: { username: string }) => {
const { data, loading, error } = useQuery(GET_LEADER_DATA, {
const { data, loading, error } = useQuery(GetLeaderDataDocument, {
variables: { key: username },
})
const router = useRouter()
Expand All @@ -261,7 +270,7 @@ const LeaderData = ({ username }: { username: string }) => {
return <p>No data available for {username}</p>
}

const handleButtonClick = (user: User) => {
const handleButtonClick = (user: GetLeaderDataQuery['user']) => {
router.push(`/members/${user.login}`)
}

Expand Down
18 changes: 11 additions & 7 deletions frontend/src/app/chapters/[chapterKey]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
'use client'
import { useQuery } from '@apollo/client'
import { useQuery } from '@apollo/client/react'
import Link from 'next/link'
import { useParams } from 'next/navigation'
import { useState, useEffect } from 'react'
import { handleAppError, ErrorDisplay } from 'app/global-error'
import { GET_CHAPTER_DATA } from 'server/queries/chapterQueries'
import type { Chapter } from 'types/chapter'
import {
GetChapterDataDocument,
GetChapterDataQuery,
} from 'types/__generated__/chapterQueries.generated'
import type { Contributor } from 'types/contributor'
import { formatDate } from 'utils/dateFormatter'
import DetailsCard from 'components/CardDetailsPage'
import LoadingSpinner from 'components/LoadingSpinner'

export default function ChapterDetailsPage() {
const { chapterKey } = useParams()
const [chapter, setChapter] = useState<Chapter>({} as Chapter)
const { chapterKey } = useParams<{ chapterKey: string }>()
const [chapter, setChapter] = useState<GetChapterDataQuery['chapter']>(
{} as GetChapterDataQuery['chapter']
)
const [topContributors, setTopContributors] = useState<Contributor[]>([])
const [isLoading, setIsLoading] = useState<boolean>(true)

const { data, error: graphQLRequestError } = useQuery(GET_CHAPTER_DATA, {
const { data, error: graphQLRequestError } = useQuery(GetChapterDataDocument, {
variables: { key: chapterKey },
})

Expand Down Expand Up @@ -63,7 +67,7 @@ export default function ChapterDetailsPage() {
<DetailsCard
details={details}
entityKey={chapter.key}
geolocationData={[chapter]}
geolocationData={[chapter]} // TODO: change the type of component
isActive={chapter.isActive}
socialLinks={chapter.relatedUrls}
summary={chapter.summary}
Expand Down
12 changes: 7 additions & 5 deletions frontend/src/app/committees/[committeeKey]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client'
import { useQuery } from '@apollo/client'
import { useQuery } from '@apollo/client/react'
import {
faCode,
faCodeFork,
Expand All @@ -11,20 +11,22 @@ import Link from 'next/link'
import { useParams } from 'next/navigation'
import { useState, useEffect } from 'react'
import { ErrorDisplay, handleAppError } from 'app/global-error'
import { GET_COMMITTEE_DATA } from 'server/queries/committeeQueries'
import type { Committee } from 'types/committee'
import {
GetCommitteeDataDocument,
GetCommitteeDataQuery,
} from 'types/__generated__/committeeQueries.generated'
import type { Contributor } from 'types/contributor'
import { formatDate } from 'utils/dateFormatter'
import DetailsCard from 'components/CardDetailsPage'
import LoadingSpinner from 'components/LoadingSpinner'

export default function CommitteeDetailsPage() {
const { committeeKey } = useParams<{ committeeKey: string }>()
const [committee, setCommittee] = useState<Committee | null>(null)
const [committee, setCommittee] = useState<GetCommitteeDataQuery['committee'] | null>(null)
const [topContributors, setTopContributors] = useState<Contributor[]>([])
const [isLoading, setIsLoading] = useState<boolean>(true)

const { data, error: graphQLRequestError } = useQuery(GET_COMMITTEE_DATA, {
const { data, error: graphQLRequestError } = useQuery(GetCommitteeDataDocument, {
variables: { key: committeeKey },
})

Expand Down
28 changes: 12 additions & 16 deletions frontend/src/app/members/[memberKey]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client'
import { useQuery } from '@apollo/client'
import { useQuery } from '@apollo/client/react'
import {
faCodeMerge,
faFolderOpen,
Expand All @@ -12,26 +12,22 @@ import { useParams } from 'next/navigation'
import { useTheme } from 'next-themes'
import React, { useState, useEffect, useRef } from 'react'
import { handleAppError, ErrorDisplay } from 'app/global-error'
import { GET_USER_DATA } from 'server/queries/userQueries'
import type { Issue } from 'types/issue'
import type { Milestone } from 'types/milestone'
import type { RepositoryCardProps } from 'types/project'
import type { PullRequest } from 'types/pullRequest'
import type { Release } from 'types/release'
import type { UserDetails } from 'types/user'
import { GetUserDataDocument, GetUserDataQuery } from 'types/__generated__/userQueries.generated'
import { formatDate } from 'utils/dateFormatter'
import { drawContributions, fetchHeatmapData, HeatmapData } from 'utils/helpers/githubHeatmap'
import DetailsCard from 'components/CardDetailsPage'
import LoadingSpinner from 'components/LoadingSpinner'

const UserDetailsPage: React.FC = () => {
const { memberKey } = useParams()
const [user, setUser] = useState<UserDetails | null>()
const [issues, setIssues] = useState<Issue[]>([])
const [topRepositories, setTopRepositories] = useState<RepositoryCardProps[]>([])
const [milestones, setMilestones] = useState<Milestone[]>([])
const [pullRequests, setPullRequests] = useState<PullRequest[]>([])
const [releases, setReleases] = useState<Release[]>([])
const { memberKey } = useParams<{ memberKey: string }>()
const [user, setUser] = useState<GetUserDataQuery['user'] | null>()
const [issues, setIssues] = useState<GetUserDataQuery['recentIssues']>([])
const [topRepositories, setTopRepositories] = useState<
GetUserDataQuery['topContributedRepositories']
>([])
const [milestones, setMilestones] = useState<GetUserDataQuery['recentMilestones']>([])
const [pullRequests, setPullRequests] = useState<GetUserDataQuery['recentPullRequests']>([])
const [releases, setReleases] = useState<GetUserDataQuery['recentReleases']>([])
const [data, setData] = useState<HeatmapData>({} as HeatmapData)
const [isLoading, setIsLoading] = useState<boolean>(true)
const [username, setUsername] = useState('')
Expand All @@ -40,7 +36,7 @@ const UserDetailsPage: React.FC = () => {
const canvasRef = useRef<HTMLCanvasElement | null>(null)
const theme = 'blue'

const { data: graphQLData, error: graphQLRequestError } = useQuery(GET_USER_DATA, {
const { data: graphQLData, error: graphQLRequestError } = useQuery(GetUserDataDocument, {
variables: { key: memberKey },
})

Expand Down
Loading
Loading