You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Making an SSR page using Nextjs implies getting the initial state server side using getInitialProps helper function. With Amplify dataStore there seems to be no way to get the initial app state server side.
Describe the solution you'd like
Ideally being able to call datastore.query inside getInitialProps (server side).
Internally, DataStore won't run the sync engine when on the server: instead it will get all the data it needs to satisfy DataStore.query(...) and return it. No subscriptions needed :)
Is your feature request related to a problem? Please describe.
Making an SSR page using Nextjs implies getting the initial state server side using
getInitialProps
helper function. With Amplify dataStore there seems to be no way to get the initial app state server side.Describe the solution you'd like
Ideally being able to call datastore.query inside
getInitialProps
(server side).Additional context
From Amplify datastore documentation it says :
Maybe make use of what @dabit3 did with AppSync https://github.com/dabit3/next-apollo-appsync/blob/master/src/withData.js
The text was updated successfully, but these errors were encountered: