-
Notifications
You must be signed in to change notification settings - Fork 267
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
aws-appsync-auth-link
+ Next.js produces TypeError: forward is not a function
error
#473
Comments
This issue can be resolved if you add |
As I understand:
const link = ApolloLink.from([
createAuthLink({ url, region, auth }),
createSubscriptionHandshakeLink(url, httpLink)
]);
const link = ApolloLink.from([
createAuthLink({ url, region, auth }),
]);
const link = ApolloLink.from([
createAuthLink({ url, region, auth }),
httpLink,
]); This is reasonable if you know the link is split in createSubscriptionHandshakeLink. |
Yep, you are right. My fault. Thanks, @dai-shi! |
@dai-shi, perhaps you can help me here. I am trying to initialize apollo-client as I described above. Everything works client-side but not on the server. I get this error:
and here is how my
so this part of
|
Unfortunately, I don't have any clue at first glance. So, it works without appsync auth link, does it? |
When it's working, can you make a PR on next repo @sakhmedbayev ? |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Following this example, I am trying to initialize apollo client using Next.js. Here is an example I follow to make it work except my
lib/initApolloClient.ts
looks like the following:All the above produces the following error:
Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?
here is my complete
package.json
file:The text was updated successfully, but these errors were encountered: