Just started doing the apollo-react tutorial. gett...
# prisma-whats-new
j
Just started doing the apollo-react tutorial. getting stuck at 7/10 (More Mutations and Updating the Store). I’m at the point where I need to update my schema so I can work on the voting feature but when I try and push the new schema I get the following error in my console:
You are adding a required relation to 'User' but there are already items. (Request ID: cj57h1l8a71sl0181k38zlcjx)
Can anyone explain what the error means?
a
@joshpitzalis Exactly that, there are existing nodes for that Type, so you cannot add a required relationship to that Type
You can either add the relation as optional, then update existing items manually, or delete all existing nodes before adding the required relationship
j
Thanks for getting back to me so soon. I don’t understand how to make things optional yet. I’ll look into the docs, thanks. It works fine in the tutorial though. What am I missing?
a
Could you paste the link to the tutorial?
j
Exactly. So I tried updating the new schema with the CLI and I got that error. But then I went into the online console and added the relation manually and it seems to have updated fine.
a
I suspect this to be a bug, if you can get the same result in the console without errors. But maybe tomorrow @nilan can chime in, to be sure.
It's not blocking for you anymore after you did it in the console, right?
j
I managed to move forward so problem solved for now. Thank you very much.
😎 1
n
hey @joshpitzalis which relation did you try to add to your project?
j
@nilan Not sure, I created the vote type and added both votes relations in one go, and then tried to push as the tutorial directed.
n
ok thanks for the info 🙂 glad you got it working in the end!
👍 2