I use examples from tutorial (mutation step 4). In my example I use “composer”:
module AlbumRelayComposerFragment = %relay(`
fragment AlbumRelayComposerFragment on Viewer {
__id
}
`)
I use it in Fragment
module, and in code I get the connection like this:
let {data: albumsRef, refetch} = Fragment.usePagination(viewerRef.viewer.fragmentRefs)
let album_nodes = albumsRef.albums->Fragment.getConnectionNodes
let (addAlbum, isAddingAlbum) = AddMutation.use()
let {__id} = AlbumRelayComposerFragment.use(albumsRef.fragmentRefs)
let connectionId = RescriptRelay.ConnectionHandler.getConnectionID(
__id,
"AlbumRelayAlbumsSection_albums",
(),
)
It’s a bet but because I use AlbumRelayComposerFragment.use
I guess it’s not updated when pagination is refetched.
I can’t see how in my case connection is related to filter
I don’t have repro at the moment but I can push it later today.