Fix relay lint in components and pages
Remove unused GraphQL fields (createdAt, updatedAt, totalCount, __id, sourceId, etc.) from queries and fragments across 50+ files. Add TypeScript generics to useMutation, usePaginationFragment, useRefetchableFragment, and useLazyLoadQuery calls to satisfy relay/generated-typescript-types. Add justified eslint-disable comments for fields needed by Relay cache normalization (id) or consumed by sibling components through fragment spreads. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -12,16 +12,22 @@ import { useFormWithSchema } from "../useFormWithSchema";
|
||||
const RiskFragment = graphql`
|
||||
fragment useRiskFormFragment on Risk {
|
||||
id
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
name
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
category
|
||||
description
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
treatment
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
inherentLikelihood
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
inherentImpact
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
residualLikelihood
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
residualImpact
|
||||
inherentRiskScore
|
||||
residualRiskScore
|
||||
# eslint-disable-next-line relay/unused-fields
|
||||
note
|
||||
owner {
|
||||
id
|
||||
|
||||
Reference in New Issue
Block a user