Use Rest or Graphql – Stack Overflow

I am trying to write a Calendar application and also backend for it.

one of the requirement is conflict , where given time range and accounts, we would like to know which all accounts are conflicting.

Using REST:

/getConflicts(date, timeStart, timeEnd, accountIds){
// get eeach account id times and see if conflict exists,
return [{id:2, conflict: true}, {id:3, conflict: false}...]
}

Now if i have to do this in Graphql we can design schema something like

conflicts(date, timeStart, timeEnd, accountIds): Array<{id: string, conflict: boolean}>{
   AccountId
   conflict
}

now which is better practise. is it a valid graphql use case ?

Read more here: Source link