I'm struggling while using argumentDefinitions with react-relay 16.2.0 and can't find why it is not working.
Globally I have something like that (I have also tried with useQueryLoader) :
const incidentsLinesPaginationQuery = graphql`
query IncidentsLinesPaginationQuery(
$count: Int
) {
...IncidentsLines_data
@arguments(
count: $count
)
}
`;
const IncidentsLinesFragment = graphql`
fragment IncidentsLines_data on Query
@refetchable(queryName: "IncidentsLinesRefetchQuery")
@argumentDefinitions(
count: { type: "Int", defaultValue: 25 }
) {
incidents(
first: $count
) @connection(key: "Pagination_incidents") {
edges {
node {
id
}
}
}
}
`;
const Component = () => {
const toto = useLazyLoadQuery(incidentsLinesPaginationQuery, {});
...
};
And when the query is sent I have "null" in variables. What am I missing ?