Used both gql and literral strings to show it is possible to use both.
Pros of using gql is that your IDE might provide you syntax highlighting + autocompletion.
I was able to remove all<ReferenceField /> and <ReferenceManyField /> by simples <TextField /> and <ArrayField />, meaning all <List /> components now load in a single query. Performances were more than greatly improved.
The only cons right now is that we'll have to manually handle refs to other resources as react-admin no longer can automatically generate the <Link />.
Used both
gql
and literral strings to show it is possible to use both.gql
is that your IDE might provide you syntax highlighting + autocompletion.I was able to remove all
<ReferenceField />
and<ReferenceManyField />
by simples<TextField />
and<ArrayField />
, meaning all<List />
components now load in a single query. Performances were more than greatly improved.The only cons right now is that we'll have to manually handle refs to other resources as
react-admin
no longer can automatically generate the<Link />
.Here's a codesandbox plugged on that branch: