Skip to content
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

Error: Argument id for data.postedBy.connect.id must not be null. Please use undefined instead. #110

Open
willwang888 opened this issue Dec 7, 2020 · 2 comments

Comments

@willwang888
Copy link

Hi,

I posted about this in the the howtographql repo, but it looks like that repo is pretty unmaintained. My issue also has to do specifically with this repo as well:

howtographql/howtographql#1217 (comment)

Would greatly appreciate any help here. Thank you!

@gokulyc
Copy link

gokulyc commented Dec 18, 2020

I checked about this in the the howtographql repo.

howtographql/howtographql#1227 (comment)

How to fix the issue?

@HangCcZ
Copy link

HangCcZ commented Dec 24, 2020

A workaround to this problem is by making signup and login mutations to the server before you make any other mutations so the getUserId function from the utils file would not return null value.

You should query token in the login mutation and use the returned token in the Authorization field of HTTP HEADERS.

Make sure to always set Authorization field with the token you obtained from the login query so you are authorized to make the post mutation.
image
image

Hope this help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants