Open marktani opened 6 years ago
Comment by schickling Friday Sep 08, 2017 at 09:29 GMT
Comment by marktani Monday Jul 03, 2017 at 08:39 GMT
Can you share the relevant part of your GraphQL schema (the type the function is defined on) and the mutation that you run to trigger 2?
Comment by schickling Friday Sep 08, 2017 at 09:29 GMT
Comment by wallslide Monday Jul 03, 2017 at 08:45 GMT
type Event implements Node {
...
eventDateTime: DateTime!
eventDurationMinutes: Int!
status: EVENT_STATUS! @defaultValue(value: RECRUITING_PARTICIPANTS)
completedOn: DateTime
...
}
enum EVENT_STATUS {
CANCELLED
COMPLETED
IN_PROGRESS
RECRUITING_PARTICIPANTS
}
mutation EndEvent($eventId: ID!, $completedOn: DateTime! ){
updateEvent(id: $eventId, status: COMPLETED, completedOn: $completedOn){
id,
status,
}
}
My function is meant to enforce the constraint "An event may not be set to COMPLETED
before its expected end time, which is calculated by adding eventDurationMinutes
to eventDateTime
Comment by schickling Friday Sep 08, 2017 at 09:29 GMT
Comment by marktani Monday Jul 03, 2017 at 08:46 GMT
I just looked into our logs, and 2. is an occurence of https://github.com/graphcool/api-bugs/issues/111, which will get fixed soon.
Issue by schickling Friday Sep 08, 2017 at 09:29 GMT Originally opened as https://github.com/graphcool/prisma/issues/397
Issue by wallslide Monday Jul 03, 2017 at 08:08 GMT Originally opened as https://github.com/graphcool/api-bugs/issues/160
What is the current behavior? When returning an object with the
error
property, two unexpected things happen:Please share the relevant part of your GraphQL schema and all functions, permissions or other project settings for easier reproduction
Here is my RP function:
What is the expected behavior?
errors
field in the http response to have the error that is returned in my RP function"Cannot end event early"
, instead of aninternal server error
message.