Hello there!
Are there any reasons for generating getConnectionNodes helper for refetchable fragments only?
From my point of view, it would be nice to have it for both queries and regular fragments as well:
module SomeQuery = %relay(`
query SomeQuery {
whateverConnection @connection(key: "SomeConnection") {
edges {
node {
id
}
}
}
}
}
`)
let data = SomeQuery.use(~variables=(), ())
let connectionNodes = SomeQuery.getConnectionNodes(data.whateverConnection)
module SomeFragment = %relay(`
fragment SomeFragment_node on SomeNode {
whateverConnection @connection(key: "SomeConnection") {
edges {
node {
id
}
}
}
}
`)
let data = SomeFragment.use(nodeRef)
let connectionNodes = SomeFragment.getConnectionNodes(data.whateverConnection)
Right now, for queries case, I have to wrap everything in the query with refetchable fragment, and for the case of the fragment, I have to make the fragment be refetchable even if I don't need refetch for this fragment.
Hello there!
Are there any reasons for generating
getConnectionNodeshelper for refetchable fragments only?From my point of view, it would be nice to have it for both queries and regular fragments as well:
Right now, for queries case, I have to wrap everything in the query with refetchable fragment, and for the case of the fragment, I have to make the fragment be refetchable even if I don't need refetch for this fragment.