I'm getting Error, Can you tell me how can i resol...
# prisma-whats-new
p
I'm getting Error, Can you tell me how can i resolve: error "GraphQL error: Variable '$trainingSessions' cannot be non input type '[TrainingDate]'. (line 1, column 116):\nmutation createTraining($instituteId: ID!, $coachId: ID!, $sessionCount: Int, $address: String, $trainingSessions: [TrainingDate], $teams: [TrainingTeam]) {\n ^\nGraphQL error: Variable '$teams' cannot be non input type '[TrainingTeam]'. (line 1, column 140):\nmutation createTraining($instituteId: ID!, $coachId: ID!, $sessionCount: Int, $address: String, $trainingSessions: [TrainingDate], $teams: [TrainingTeam]) {\n ^" Sent at 18:32 on Friday
1
My schema like this type Training implements Node { id: ID! @isUnique institute: Institute @relation(name: "InstituteOnTraining") dateTime: DateTime coach: Coach @relation(name: "CoachOnTraining") address: String numberOfSessions: Int createdAt: DateTime! updatedAt: DateTime! trainingTeams: [TrainingTeam!]! @relation(name: "TrainingOnTrainingTeam") trainingDates: [TrainingDate!]! @relation(name: "TrainingOnTrainingDate") }
a
Maybe use [TrainingDate!]!, as that is the type of the field? Haven't tried though...
p
I have used its also but same error
p
@nilan Thanks for your help....Its working Nice now 🙂