Space-based gravitational-wave ( GW ) detectors , such as LISA or a similar ESA-led mission , will offer unique opportunities to test general relativity . We study the bounds that space-based detectors could realistically place on the graviton Compton wavelength \lambda _ { g } = h / ( m _ { g } c ) by observing multiple inspiralling black hole ( BH ) binaries . We show that while observations of individual inspirals will yield mean bounds \lambda _ { g } \sim 3 \times 10 ^ { 15 } km , the combined bound from observing \sim 50 events in a two-year mission is about ten times better : \lambda _ { g } \simeq 3 \times 10 ^ { 16 } km ( m _ { g } \simeq 4 \times 10 ^ { -26 } eV ) . The bound improves faster than the square root of the number of observed events , because typically a few sources provide constraints as much as three times better than the mean . This result is only mildly dependent on details of BH formation and detector characteristics . The bound achievable in practice should be one order of magnitude better than this figure ( and hence almost competitive with the static , model-dependent bounds from gravitational effects on cosmological scales ) , because our calculations ignore the merger/ringdown portion of the waveform . The observation that an ensemble of events can sensibly improve the bounds that individual binaries set on \lambda _ { g } applies to any theory whose deviations from general relativity are parametrized by a set of global parameters .