-
-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
…g:-cats' and filter='tag:sports+tag:cats'
…a post contains 1 or more tags and doesn't contain 1 or more tags
I need to investigate why the tests are hanging |
Hi @bethanyr apologies for the slow response here, and massive props for taking the time to work on GQL (not many people have delved in here 😬) It's been two full years since GQL was implemented and it's served us well despite these crazy limitations around many-to-many relationships. I'm about to embark on a project to overcome all of those limitations and it's probably going to need a complete rewrite. Gonna take a look at your approach this week to see where it gets us and whether we can use it to work around other limitations short of a rewrite. I'm interested to know if you picked this issue up because you have a use case that currently isn't being met, or just for fun? |
HI @ErisDS - thanks for taking a look at my approach - I know you are busy working on new features for ghost - which we are very interested in (ex: new editor and dynamic routing). I ended up having to make some changes to our copy of ghost core to work with the gql changes I made (updating the config.channels.json for the tag route filter to: We actually have some use cases that we are addressing with my change - and are using the changes I made in gql on our site as of today. We are using a customized version of ghost for foto.gettyimages.com - and our content publishers highly curate the home page and topic pages with which stories appear in each of the page sections - using internal tags. We would like to reduce the number of tags that editors need to apply to stories to determine where they appear - so being able to filter posts to show those that have both X tag and Y tag will be helpful. We also have a tag, |
Quick answer to the most important point first:
The dynamic routing beta completely replaces the channels config beta, but dynamic routing is not yet feature-equivalent to channels. If you're using config.channels.json, please don't update Ghost your production Ghost to 1.24 just yet. Will reply to the rest in a bit, wanted to leave that here :) |
Hi @bethanyr, it took us a while, but we have rewritten GQL as https://github.com/nexesjs/NQL, which uses mongo json as the intermediary format, has the tool mongo-knex for building queries, and now supports negation correctly. The work in this PR really helped to inform the approach we took, so thank you for the time you put into writing this. |
proposed solution to support different filtering around tags in ghost which supports many-to-many relationships. Some sample filters include: filter="tag:sports+tag:cats" and filter="tag:sports+tag:-cats"
Addresses: issue #16