wallslide
03/24/2017, 8:46 AMUser model, a Team model, and there is a 1-to-1 relationship between the two. If I have the userId, can I update a Team immediately with that userId, or do I first have to use the userId to query for the teamId and then update the user's team with that teamId?nilan
03/24/2017, 8:50 AMnilan
03/24/2017, 8:51 AMUser model is deceptive in this context, as it doesn't allow you to update the team itself, but it will connect the user to a different team. See also: https://github.com/graphcool/feature-requests/issues/127wallslide
03/24/2017, 8:52 AMwallslide
03/24/2017, 9:02 AMError: GraphQL error: Variable '$team' cannot be non input type 'Team!'. (line 1, column 38):
mutation ($userId: ID!, $team: Team!) {wallslide
03/24/2017, 9:04 AMmutation ($userId: ID!, $team: Team!){
updateUser(id: $userId, team: $team) {
team {
teamName,
}
}
}nilan
03/24/2017, 9:05 AMTeam is not an input type. The specific input type for the nested mutation on User needs to be looked up in the playground docswallslide
03/24/2017, 9:05 AM