Conditional navigation on client side with Apollo + Next.js

Shopify Partner
16 0 8

I am working according to this Tutorial:

and trying to implement a basic conditional routing with Apollo and Next.js.


The logic I am trying to achieve is -

1. Once the app starts / first page renders check if the user has already gone through the onboarding process.

2. If not - redirect him to onboarding

3. If yes - redirect him to app's main page


Usually, I would handle this by creating a PrivateRoute which checks that and re-routes conditionally to the onboarding process.

However, In this case, since I am using Apollo and Next.js it is not clear to me how I can achieve the same functionality.


Any tips would be very appreciated.


New Member
1 0 0

@uriab, any progress with this? I want to do the same but can't find the solution