-
Notifications
You must be signed in to change notification settings - Fork 464
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
PaginatedPosts resolver cursor #4
Comments
Okay, I am not sure what is happening here. For me in the web index.tsx page, I have
Looking at the web console when requesting more posts, I get
In the server code I have
When initially loading the site this produces
which is as expected. When requesting more posts I get
I don't understand how parseInt is working for you. But that's okay, it works for me without doing that. Posting this just in case it helps anyone else. Thanks for the awesome tutorials! There are little details you add to your videos that make a huge difference, such as making the decision to say what keyboard shortcuts you are using. Much appreciated. |
Oh the difference is, I am passing the date as a timestamp e.g. |
lireddit/server/src/resolvers/post.ts
Line 138 in 5d857b8
Should this line be replacements.push(cursor) ?
I don't think ParseInt and Date are helping here. Using those functions turns the string into a date close to the beginning of time according to Unix. No extra posts will be retrieved when createdAt is set to this date.
The text was updated successfully, but these errors were encountered: