Open
Description
Code setup as follows:
...
import type { DashboardPageUserViewedDashboardMutation } from "./__generated__/DashboardPageUserViewedDashboardMutation.graphql"
...
export default function DashboardPage() {
...
const [userViewedDashboardMutation] =
useMutation<DashboardPageUserViewedDashboardMutation>(graphql`
mutation DashboardPageUserViewedDashboardMutation {
userViewedDashboard {
viewedDashboard
}
}
`)
...
}
...
Setting "relay/generated-flow-types": "error"
Gives the following issue:
![Screenshot 2024-11-29 at 15 00 33](https://private-user-images.githubusercontent.com/31384409/391124794-becc5d27-45d7-4f30-96f1-e62664c3f261.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MzgyMDAsIm5iZiI6MTczODkzNzkwMCwicGF0aCI6Ii8zMTM4NDQwOS8zOTExMjQ3OTQtYmVjYzVkMjctNDVkNy00ZjMwLTk2ZjEtZTYyNjY0YzNmMjYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE0MTgyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUxYTM2MTdhZjQ5YWE5YWMyNjFmNjNmMzY5NjQwOGRhYWUyMWI5ZmVjYjI1MWNhNjkzNzhjMjNmMjQ3M2ZkNWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zEslR9Zxhy4F9FrXqdV3nNke5oP2jzQnHeEL4vZ5Aj0)
I see a test case for the failure condition here https://github.com/relayjs/eslint-plugin-relay/blob/main/test/generated-typescript-types.js#L538-L552 but no corresponding passing condition test.
From what I can see in the source code here https://github.com/relayjs/eslint-plugin-relay/blob/main/src/rule-generated-flow-types.js#L567-L583 what I have should not be an issue.
Looks like this was added by @tyao1 via 3d1ebcd so maybe they can advise.
Metadata
Assignees
Labels
No labels