Can anyone help me with an issue I am having with ...
# prisma-whats-new
p
Can anyone help me with an issue I am having with graphql - question here on stack overflow - https://stackoverflow.com/questions/48270794/duplicated-items-with-mutation-graph-cool-graphql
h
Create team, get Id of team and then in creating players set teamId for id you got before
p
@huv1k that gives the following error
Copy code
"errors": [
    {
      "message": "Argument 'team' expected type 'PlayerteamTeam' but got: {id: \"cjcgr17zyfkne0128xhlapwo2\"}. Reason: 'id' Field 'id' is not defined in the input type 'PlayerteamTeam'. (line 9, column 11):\n    team: { \n          ^\n (line 10, column 6):\n    \tid: \"cjcgr17zyfkne0128xhlapwo2\"\n     ^",
h
teamId
not
team
Copy code
mutation {
      createPlayer(
      name: "Peter Flanagan",
      gamesPlayed: 1,
      yellowCards: 0,
      redCards: 1,
      goalsScored: 4,
      photo: "<http://cdn2-www.craveonline.com/assets/uploads/2017/02/bret1.png>",
      teamId: "TEAMID"
    ) {
        id
      }
}
p
perfect, that worked, cheers. not v clear in the docs tho... appreciate your help... do you want to add to SO?
h
heh i don't use SO anymore :X
let me check if i can login
p
cool
haha!
h
Its in
p
good man! some points there for ya boyo!