menu

Apollo

A community of developers, designers and others who love Apollo and GraphQL. 🚀

Channels
Team

Relay-style query query generator being considered?

August 3, 2020 at 6:06pm

Relay-style query query generator being considered?

August 3, 2020 at 6:06pm
I've come to Apollo from spending a lot of time with Relay, and the one thing I really miss is the query generator, which allows you to declaratively specify which data a React component needs as a GraphQL fragment alongside the component, and then generates the top level query on your behalf.
It also adds a linter to ensure that only data declared in a components fragment is used by the component.
This makes it impossible to overfetch data as well as making it impossible to accidentally render some data in your component that it hasn't requested (which is fragile as somebody else could remove that field later).
Is Apollo thinking of implementing similar functionality?

August 3, 2020 at 6:49pm
Was just thinking about making the switch over to relay for this exact reason
  • reply
  • like