Replies: 1 comment
-
I posted this question on https://stackoverflow.com/questions/66755176/gatsby-runquery-inside-createresolver-using-group |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to use
createResolvers
to run a query usinggroup
, but I don't think this is possible at the moment. According to Accessing Gatsby’s data store from field resolvers, it seemsrunQuery
currently acceptsfilter
andsort
query arguments, but notgroup
. I was hopeful thatrunQuery
would supportgroup
(based on #15453), but I can't find any examples of grouping usingrunQuery
If possible, how can I use
createResolvers
to run a query usinggroup
for the following query?For context, I have 2 folders (coding & recipes) that I am sourcing markdown files from. Here is my
gatsby-config.js
:Currently, I am able to use
runQuery
to run queries usingfilter
. Here is mygatsby-node.js
:But now I want to use
createResolver
torunQuery
usinggroup
. Is this possible? If so, how?I've produced a minimal repo at https://github.com/kimbaudi/gatsby-group-query
Beta Was this translation helpful? Give feedback.
All reactions