🆘 GraphQL Query on arrays #4153
iFrogHop2Worlds
started this conversation in
General
Replies: 1 comment
-
With Tina, the |
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
-
Never used GraphQL before trying tina so I am sorry if this is not really tina related. I am trying to grab an object from an array of objects within a collection. Not really sure how to structure the query. The way I have things setup right now is such that a collection is a category and within a category you have an array of products. Each product is an object. Id like to grab that object.
this is what I am currently doing and works for this simple use-case fine but if anyone can help me understand how to use resolver to fix this with graphql properly would appreciate it.
My current code. My naming conventions were horrible here as I changed things several times on the project just really focused on learning tina and I guess graphQL now. fileName is the .MD file obviously category items is an array of the objects I would like to isolate.
Beta Was this translation helpful? Give feedback.
All reactions