Closed omid closed 3 years ago
Definitely. I think the pattern should be:
fn foo(&self, user_id: ID)
struct CreateCalendarInput {
pub user_id: ID,
pub timezone: String,
...
}
fn create( &self, input: CreateCalendarInput, )
I 100% agree with what you said.
I just realized to delete a user, we need to pass
ID
but to delete a calendar we need to passDeleteCalendarInput
which contains one field forID
.It's better to follow one pattern.
It can be there for all requests, delete/update/... and calendar/event/user/...