quering post by id #28587
Unanswered
ashishch-98
asked this question in
Help
quering post by id
#28587
Replies: 1 comment
-
Can you share some code that you've already tried and that didn't work? Maybe someone will be able to help. It's hard to help just by reading this description. |
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.
-
Gatsby is awesome to use and I am using it dynamically for my PWA. Now I have connected my PWA with firebase to use thier products. I am adding a feature by which user can add the post to read later list. So I am adding the markdown blog id to users collection in firebase. Now on a client route for ex: '/user/read-later' I want to show the user the list of all the blogs which he added to the collection to read later.
So to achieve this I want to pass that id to the query and then get the post. So basically it will loop for all the ids stored by user and return them as a list with the properties of like title, author, excerpt etc for the respective id. I tried passing the id as a variable to static query in the component by then got to know that variables cant be passed to static queries.
Question: How can I get the posts by passing their ids to the query?
Beta Was this translation helpful? Give feedback.
All reactions