Marian Paul
04/04/2018, 10:06 PMenum ADDRESS_TYPE {
WORK
HOME
OTHER
}
const where = {
type: HOME, // Not working
}
return ctx.db.query.addresses({ where }, info)
lawjolla
04/04/2018, 10:08 PMlawjolla
04/04/2018, 10:09 PMwhere = { type: "HOME" }
Marian Paul
04/04/2018, 10:12 PMCan't assign the type 'string' to type 'ADDRESS_TYPE'.
This is the first thing I tried since it is working for a mutationlawjolla
04/04/2018, 10:14 PMlawjolla
04/04/2018, 10:14 PMtype
Marian Paul
04/04/2018, 10:20 PMlawjolla
04/04/2018, 10:25 PMMarian Paul
04/04/2018, 10:25 PMParticipantWhereInput
and ParticipantCreateInput
and they both reference PARTICIPATION_STATUSMarian Paul
04/04/2018, 10:25 PMtype Participant {
id: ID! @unique
moment: Moment
user: User!
status: PARTICIPATION_STATUS! @default(value: NOT_ANSWERED)
reason: String
}
enum PARTICIPATION_STATUS {
YES
NO
MAYBE
WATCHING
NOT_ANSWERED
}
lawjolla
04/04/2018, 10:26 PMlawjolla
04/04/2018, 10:29 PMdb.query.participants({ where: { status: "YES" } }, info)
returns what?Marian Paul
04/04/2018, 10:30 PMlawjolla
04/04/2018, 10:31 PMMarian Paul
04/04/2018, 10:39 PMMarian Paul
04/05/2018, 3:43 PMas
const where = {
isPublished: false,
type: "EVENT" as MOMENT_TYPE,
creator: {
id
}
}
This is probably related to duck typing with Typescript