User has to be authenticated.
A user navigates to the site and sees a list of fantasy leagues. The user has the ability to create a team if the following criteria is met:
The user is authenticated
The league is not locked by the commissioner (this is done through the league settings that the commissioner has access to)
Based on the league settings of allowing multiple teams
If multiple teams are allowed then the user can create a team no matter what
If multiple teams are not allowed the user can only create a team if they already don’t have a team created for the fantasy league
example of updateFantasyTeam:
{"id":35,"fantasyTeamPlayers":[{"playerId":499},{"playerId":283},{"playerId":137},{"playerId":5},{"playerId":97},{"playerId":395},{"playerId":355},{"playerId":54},{"playerId":228},{"playerId":187},{"playerId":522},{"playerId":254},{"playerId":307},{"playerId":441},{"playerId":154},{"playerId":366}]}
User has to be authenticated. A user navigates to the site and sees a list of fantasy leagues. The user has the ability to create a team if the following criteria is met:
Mutation: mutation ($fantasyTeam: FantasyTeamInput!){ createFantasyTeam(fantasyTeam: $fantasyTeam) { id success message } } Variable: "FantasyTeam": { "leagueId": 1, "name": "TeamName" }
example of updateFantasyTeam: {"id":35,"fantasyTeamPlayers":[{"playerId":499},{"playerId":283},{"playerId":137},{"playerId":5},{"playerId":97},{"playerId":395},{"playerId":355},{"playerId":54},{"playerId":228},{"playerId":187},{"playerId":522},{"playerId":254},{"playerId":307},{"playerId":441},{"playerId":154},{"playerId":366}]}