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

Fetch Operation - Document expected return data format #490

Closed
realtebo opened this issue Aug 4, 2023 · 3 comments
Closed

Fetch Operation - Document expected return data format #490

realtebo opened this issue Aug 4, 2023 · 3 comments

Comments

@realtebo
Copy link
Contributor

realtebo commented Aug 4, 2023

I am in need to override completely the fetch because I need to do some complex data extraction and manipulations.

I noticed just for a fortunate incident that when "paginate" => true we need a json output from a paginator, but when "paginate = falke` wwe need to output a json array.

And I suppose all we need are id a name, right?

@karandatwani92
Copy link
Contributor

Hey @realtebo FetchOperation is used to automatically setup API which sets a route and returns JSON.

You are free to use your own API on the data_source attribute of backpack fields, we only need to make sure API must return the same structure. For more idea of it, the FetchOperation definition here.

@realtebo
Copy link
Contributor Author

realtebo commented Aug 6, 2023

@karandatwani92 your link is broken.

Anyway, I kindly ask and suggest to document both return data format

@karandatwani92 karandatwani92 self-assigned this Aug 6, 2023
@karandatwani92 karandatwani92 added documentation Improvements or additions to documentation Priority: SHOULD Size: XS 1 hour and removed Priority: SHOULD documentation Improvements or additions to documentation Size: XS 1 hour labels Aug 10, 2023
@karandatwani92 karandatwani92 removed their assignment Aug 14, 2023
@karandatwani92
Copy link
Contributor

Hey @realtebo

I tried to re-evaluate what to be documented and I realized, it's already there where it should be. Examples are already set there with the `code.

Feel free to re-open if I missed something.

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

No branches or pull requests

2 participants