-
Notifications
You must be signed in to change notification settings - Fork 53
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
Related categories from a category query #177
Labels
Comments
markhuot
added a commit
that referenced
this issue
Oct 22, 2018
This is now possible. All category fields applied to entries expose two fields, the name of the field as well as the name of the field + {
entriesConnection(limit:10) { # pull 10 entries
edges {
node {
title # get the title of the 10 entries
categoryFieldHandleConnection { # get the categories of on each of the 10 entries
edges {
node {
title # get the title of the related category
}
relatedEntries { # get related entries to each category applied to the 10 entries
entries {
title
}
}
}
}
}
}
}
} |
Closing this issue. The fix is included in version 1.2.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a main category that itself contains a field for sub categories. The two categories belong to different category groups. Can I use craftql to create a query that exposes all main categories, within them their sub categories, and within these the entries that are related to the respective sub category?
The text was updated successfully, but these errors were encountered: