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

GraphQL filters function not supported? #185

Open
jeffspurlock opened this issue Sep 6, 2024 · 2 comments
Open

GraphQL filters function not supported? #185

jeffspurlock opened this issue Sep 6, 2024 · 2 comments

Comments

@jeffspurlock
Copy link

I'm not 100% sure if this is the right repository to ask this on, but I am trying to display our blog posts in a Hyrdogen storefront, and i'm building a sort and filter option. I've been able to build the filter option, as the articles connection supports the reverse flag, but it seems like in order to filter blog posts by tag name, i'm going to have to fetch all blog posts and then filter client side. This seems like a major flaw in the GQL implementation around blog posts. Whats the point of tagging blogs if i can't filter for the tags in the GQL query.

Maybe i'm missing something here, but there's gotta be a way to do this without fetching all and filtering on the client. I thought about fetching all posts just for their GID and tags, filtering by tags, and then providing an array of GIDs to fetch in the deferred data function, but this seems like a poor approach too.

@jeffspurlock
Copy link
Author

Please note i've also tried using the query: "tags: $tagName" as well, and this doesn't filter. I can do a query on title, but not on tags.

@jeffspurlock
Copy link
Author

OK, progress; sounds like query does work, but this isn't mentioned anywhere in the documentation, but the query is "tag:{tagname}", singular tag, not plural tags like the field name.

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

No branches or pull requests

1 participant