Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulcain support for reference fields/inputs #448

Open
Jayfrown opened this issue Apr 24, 2022 · 1 comment
Open

Vulcain support for reference fields/inputs #448

Jayfrown opened this issue Apr 24, 2022 · 1 comment

Comments

@Jayfrown
Copy link

Description
Hey! I am currently using APIP with this admin package to build a UI on top of my API. Most of my resources have multiple many-to-one or many-to-many relationships, which end up on each screen (show, create, edit). I'm using the default <ReferenceField /> and <ReferenceInput /> to load these relationships, but these end up making quite a few additional API calls which slows down page render.

If I understood correctly, Vulcain could help combat this issue by hitting the API once, and passing an additional header specifying which additional resources to pass in the response. However, this doesn't seem possible with my set-up, as I'm not calling the dataProvider directly (it is done by the reference components) and cannot specify the header for Vulcain.

Or maybe I am missing something. Should I not be using the <ReferenceField />/<ReferenceInput /> in this case? Would it be possible to pass the Preload header if I use the dataProvider methods directly? (eg. useGetList, useGetOne, useGetMany etc)

Thanks.

@alanpoulain
Copy link
Member

Vulcain support is not added (yet?) in API Platform Admin. PR welcome though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants