datocms / product-roadmap

This project is now discontinued. For feature requests, please use our community forum.
https://community.datocms.com/
19 stars 1 forks source link

Expose inverse relations in Dashboard and GraphQL API #98

Open sedubois opened 6 years ago

sedubois commented 6 years ago

If I have a Post model with a category property of type PostCategory, it allows me to easily display the post's category when querying for a specific post: datoCmsPost(...) { category { ... } } (this is the syntax of gatsby-source-datocms).

To do the opposite and create a page with all posts of a specific category, currently I have to query all posts and add a filter to select only the relevant category: allDatoCmsPost(filter: { category: { ... } }) { ... }.

However:

So it would be great if, when creating the Post's category property in the dashboard, we could expose the inverse relation as well. (Kind of equivalent to belongs_to :parent_model, inverse_of: :model in ruby on rails.) This inverse relation would be visible/navigatable in DatoCMS' dashboard and in the GraphQL API and gatsby-source-datocms API.

flippidippi commented 6 years ago

We are currently looking into GraphQL headless CMSs and deep filtering is the major missing piece for us in DatoCMS. GraphCMS and others have this ability but we much prefer DatoCMS interface and flexibility. Are there any plans to make this happen?

SergeyRe commented 6 years ago

"is the major missing piece" -Absolutly!

stefanoverna commented 6 years ago

We're actively working on deep filtering.. should be ready in the next 2 weeks!

kainbacher commented 5 years ago

are there some updates for this issue?

flippidippi commented 5 years ago

Any updates on deep filtering?

stefanoverna commented 5 years ago

We'll track the deep filtering feature into a new issue: https://github.com/datocms/product-roadmap/issues/128

matjack1 commented 5 years ago

This feature request has been moved to https://community.datocms.com/t/313