  A group $\Gamma$ has separable cohomology if the profinite completion map
$\iota \colon \Gamma \to \widehat{\Gamma}$ induces an isomorphism on cohomology
with finite coefficient modules. In this article, cohomological separability is
decided within the class of generalised Baumslag--Solitar groups, i.e. graphs
of groups with infinite cyclic fibers. Equivalent conditions are given both
explicitly in terms of the defining graph of groups and in terms of the induced
topology on vertex groups. Restricted to the class of Baumslag--Solitar groups,
we obtain a trichotomy of cohomological separability and cohomological
dimension of the profinite completions. In particular, this yields examples of
non-residually-finite one-relator groups which have separable cohomology, and
examples which do not.
