Centralized graph files (hooks/graph/*.ts) define GraphQL queries consumed by multiple page components. This architecture intentionally separates field definitions from usage, triggering relay/unused-fields and relay/must-colocate-fragment-spreads. File-level eslint-disable comments suppress these false positives. Also adds explicit TypeScript generics to useMutation and usePaginationFragment calls to satisfy relay/generated-typescript-types without eslint-disable. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
20 lines
369 B
TypeScript
20 lines
369 B
TypeScript
import { graphql } from "relay-runtime";
|
|
|
|
/* eslint-disable relay/unused-fields */
|
|
|
|
export const evidenceFileQuery = graphql`
|
|
query EvidenceGraphFileQuery($evidenceId: ID!) {
|
|
node(id: $evidenceId) {
|
|
... on Evidence {
|
|
id
|
|
file {
|
|
mimeType
|
|
fileName
|
|
size
|
|
downloadUrl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|