-
Notifications
You must be signed in to change notification settings - Fork 192
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
[SSR] SSR and Counts #533
Comments
@SachaG that's a feature. In the server (with SSR) you can't access to the whole database. You only have access to the data fetched from publications. I assume, you can can |
OK, that's what I thought. Any way to bypass this? Maybe And no, |
@SachaG You shouldn't bypass that. That's the idea. In the server, SSR is also just like the client for data. |
I understand the principle, but how else can I deal with this issue? Writing (Also ideally I'd prefer avoiding using |
Actually, it don't need much refactoring. Just run this code on the server as well. Then |
I might be wrong but I thought @tmeasday was saying it's not that simple? |
That's possible because we created that :) |
I hope we can close this since we are clear with how FlowRouter SSR do things. |
I'm using the publish-counts package to publish a count of how many total posts exist on the server to the client.
Publish-counts only works on the client, so it doesn't work when called server-side with FlowRouter-SSR. So I decided to do this instead:
But it seems like even when called on the server,
Posts.find()
returns the data that would be published to the client, not the total data available server-side. Is this expected behavior? Or am I mistaken?The text was updated successfully, but these errors were encountered: