-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Description
The relay-compiler already validate if we have defined a variable and doesn't use them and in some cases when you don't need to use @arguments/@argumentDefinitions we receive a false negative, like this case:
const response = useLazyLoadQuery<StoresListQuery>(
graphql`
query StoresListQuery(
$count: Int # Variable "$count" is never used in operation "StoresListQuery"
$cursor: String
$where: StoresWhereInput!
$search: String
) {
...StoresList_stores # relay already understand that here we are using count/cursor/where/search
}
`,
{ count: PER_PAGE, where }
)
const list = usePaginationFragment<
StoresList_stores_refetch,
StoresList_stores$key
>(
graphql`
fragment StoresList_stores on Query
@refetchable(queryName: "StoresList_stores_refetch") {
stores(first: $count, after: $cursor, where: $where, search: $search)
@connection(key: "StoreList_stores") {
Metadata
Metadata
Assignees
Labels
No labels