We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Well, since this withApollo hoc is using getInitialProps for ssr, there is a conflict when using getServerSideProps on a page component.
const Restaurant: NextPage<IProps> = ({ id }) => { console.log("id", id); const { data, loading } = useRestaurantQuery({ variables: { input: { restaurantId: id, }, }, }); console.log("loading", loading); console.log("data", data); if (loading) { return <div>Loading...</div>; } return ( <div> restaurant <div>{data?.restaurant.result?.name}</div> </div> ); }; export default withApollo({ssr: true})(Restaurant); export const getServerSideProps: GetServerSideProps = async (ctx) => { console.log("ctx", ctx); const { id } = ctx.query; if (!id) { return { props: {}, }; } return { props: { id: parseInt(id as string) }, }; };
So, I'm looking for a way to make withApollo hoc utlizing getServerSideProps for "ssr" mode.
Could there be a way to do that?
The text was updated successfully, but these errors were encountered:
Yes, it would be great to have that change, since next has moved to version 10.1
Sorry, something went wrong.
Please introduce this @adamsoffer. But for now, is there a workaround or a temporary fix?
Is there any action on this?
No branches or pull requests
Well, since this withApollo hoc is using getInitialProps for ssr, there is a conflict when using getServerSideProps on a page component.
So, I'm looking for a way to make withApollo hoc utlizing getServerSideProps for "ssr" mode.
Could there be a way to do that?
The text was updated successfully, but these errors were encountered: