diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index 8cdae65f8e..1235243be3 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -7111,13 +7111,10 @@ export type ProjectHealthViewQueryVariables = Exact<{ export type ProjectHealthViewQuery = { __typename?: "Query"; - projectSettings: { - __typename?: "ProjectSettings"; - projectRef?: { - __typename?: "Project"; - id: string; - projectHealthView: ProjectHealthView; - } | null; + project: { + __typename?: "Project"; + id: string; + projectHealthView: ProjectHealthView; }; }; diff --git a/src/gql/queries/project-health-view.graphql b/src/gql/queries/project-health-view.graphql index 544a0dc1b0..0a83b77a4f 100644 --- a/src/gql/queries/project-health-view.graphql +++ b/src/gql/queries/project-health-view.graphql @@ -1,8 +1,6 @@ query ProjectHealthView($identifier: String!) { - projectSettings(identifier: $identifier) { - projectRef { - id - projectHealthView - } + project(projectIdentifier: $identifier) { + id + projectHealthView } } diff --git a/src/pages/commits/ViewToggle.tsx b/src/pages/commits/ViewToggle.tsx index 3d27af4b5d..9471ccb9f9 100644 --- a/src/pages/commits/ViewToggle.tsx +++ b/src/pages/commits/ViewToggle.tsx @@ -42,7 +42,7 @@ export const ViewToggle: React.FC = ({ identifier }) => { useEffect(() => { if (!view) { - setView(data?.projectSettings?.projectRef?.projectHealthView); + setView(data?.project?.projectHealthView); } }, [data, setView, view]);