capstone
capstone copied to clipboard
Allow API queries to limit response data to certain fields?
We have a user request for the API to let you limit what fields are returned, I believe to make results in the API browser more readable.
If we want to add that, https://django-restql.yezyilomo.com/ could be a good library. It uses a graphql-inspired syntax to filter down result fields, like ?query={id}
(only return the requested fields), ?query={id, cites{*}}
(nested fields, wildcards), ?query={-cites}
(excluded fields). Not sure if it'll just work or if it'll conflict with all the other fancy stuff we're doing to work with elasticsearch -- depends on how exactly it does what it does.