RevereCRE / relay-nextjs

⚡️ Relay integration for Next.js apps
https://reverecre.github.io/relay-nextjs/
MIT License
251 stars 30 forks source link

WiredComponent.getInitialProps -> Always async #70

Closed gio-work closed 1 year ago

gio-work commented 2 years ago

Hey there,

We noticed that WiredComponent.getInitialProps is sync on client and async on server. We would be interested in them being async on either or, since it's technically allowed in Next.JS

If this works for y'all, I'm happy to put out a PR.

Thanks!

rrdelaney commented 2 years ago

Don't see any reason that it had to be synchronous, would happily accept a PR! Let's make sure that it's backwards compatible and we can return either the value itself or a promise.