-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gql: add field "assignedSchedules" to type "User" #3231
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
I propose we expand the existing Secondly, an type Schedule {
// ...
shifts(start: ISOTimestamp!, end: ISOTimestamp!, userIDs: [ID!]): [OnCallShift!]!
// ...
}
type User {
// ...
assignedSchedules: [Schedule!]
// ...
} |
b21f911
When attempting to find any temporary schedules, the application gets stuck in an infinite timeout. No idea why. It happens on this line:
|
Blocked by #3286 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
return nil, err | ||
} | ||
|
||
shifts, err := s.OnCallStore.HistoryBySchedule(ctx, raw.ID, start, end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment, but should we avoid "magic numbers" like the 50 used here and above in end.After(start.AddDate(0, 0, 50
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's an issue with most of our calls to validate.ManyUUID
, so I'm going to document that for its own issue, if possible
Description:
Adds the field
assignedSchedules
to typeUser
so that each schedule's shifts can be fetched for a given user. This will be especially important for adding a calendar to a user's profile, so they know the context of each shift they are on-call for.Which issue(s) this PR fixes:
This PR is precedent to #3229 and is a part of #3164
Screenshots:
Other changes:
Also adds the argument
user
on queryshifts
to use for filtering: