Omprakash
01/30/2019, 1:00 PMahebwa49
01/30/2019, 3:56 PMrem
01/30/2019, 4:59 PMtonymj
01/30/2019, 7:02 PMtonymj
01/30/2019, 7:02 PMNoahVlncrt
01/30/2019, 8:33 PMrarutu
01/30/2019, 9:19 PMbepasquet
01/31/2019, 9:06 AMJon
01/31/2019, 11:08 AMJon
01/31/2019, 11:11 AMError: The type of Mutation.signup(data:) must be Input Type but got: SignupInput!.
Iāve defined the type in my schema.graphql:
# import * from './generated/prisma-client/prisma.graphql'
type SuccessMessage {
message: String
}
type Mutation {
createProperty(title: String, url: String): Property!
signup(data: SignupInput!): AuthPayload!
signin(email: String!, password: String!): AuthPayload!
signout: SuccessMessage
requestPasswordReset(email: String!): SuccessMessage
resetPassword(resetToken: String!, password: String!, passwordConfirmation: String!): User!
confirmEmail(email: String!, emailConfirmToken: String!): AuthPayload!
}
type AuthPayload {
token: String!
user: User!
}
type Query {
properties: [Property]!
currentUser: User
}
type SignupInput {
name: String
email: String!
password: String!
}
type User {
id: ID!
name: String!
email: String!
emailConfirmed: Boolean!
permissions: [Permission!]!
}
What am I missing here?Slackbot
01/31/2019, 1:49 PMahebwa49
01/31/2019, 2:21 PMahebwa49
01/31/2019, 2:25 PMahebwa49
01/31/2019, 2:27 PMahebwa49
01/31/2019, 2:29 PMahebwa49
01/31/2019, 2:32 PMahebwa49
01/31/2019, 2:33 PMdmytro.paduchak
01/31/2019, 2:53 PMdomko
01/31/2019, 3:59 PMJon
01/31/2019, 5:41 PM"message": "Variable \"$_v0_data\" got invalid value { activationToken: \"b6f9bbcf6e798a87fc65c50b6d8519f3514161b6\", activationTokenExpiry: 1548952935887 }; Field value.email of required type String! was not provided.\nVariable \"$_v0_data\" got invalid value { activationToken: \"b6f9bbcf6e798a87fc65c50b6d8519f3514161b6\", activationTokenExpiry: 1548952935887 }; Field value.password of required type String! was not provided."
Hereās my schema.graphql:
# import * from './generated/prisma-client/prisma.graphql'
type SuccessMessage {
message: String
}
type Mutation {
createProperty(title: String, url: String): Property!
signup(email: String!): SuccessMessage
accountActivation(activationToken: String!, url: String, name: String, password: String!, passwordConfirmation: String! ): User!
signin(email: String!, password: String!): User!
signout: SuccessMessage
requestPasswordReset(email: String!): SuccessMessage
resetPassword(resetToken: String!, password: String!, passwordConfirmation: String!): User!
}
type Query {
properties: [Property]!
currentUser: User
}
type User {
id: ID!
name: String!
email: String!
permissions: [Permission!]!
}
And hereās my query on the client side:
const SIGNUP_MUTATION = gql`
mutation SIGNUP_MUTATION($email: String!) {
signup(email: $email) {
message
}
}
`;
Jon
01/31/2019, 5:42 PMDaniel Martins
01/31/2019, 7:55 PMrohit
01/31/2019, 9:03 PMTravis Fischer
01/31/2019, 9:23 PMchan1di
01/31/2019, 9:44 PMsmartin
01/31/2019, 9:49 PMevents
where the startTime
field is a certain day, passed to the resolver as date = '2019-01-31'
. simply doing prisma.events({ where: { startTime: date } })
returns no results even though I only have events from this date.smartin
01/31/2019, 9:57 PMrarutu
02/01/2019, 9:20 AMJidƩ
02/01/2019, 10:45 AMJidƩ
02/01/2019, 10:57 AM