TownHallHQ / TownHall

MIT License
27 stars 13 forks source link

feat: pagination support for user fetch #111

Closed cudidotdev closed 11 months ago

cudidotdev commented 11 months ago

I was unable to solve an error that I was getting. I still got this error even when I replace everything in the function user in the UserQueryRoot struct with the todo! macro

the trait bound `Users: OutputType` is not satisfied
the following other types implement trait `OutputType`:
  &'a [T]
  &T
  AccessToken
  Arc<T>
  Arc<[T]>
  BTreeMap<K, V>
  BTreeSet<T>
  Box<T>
and 81 others

Please help me debug this. Thank you

EstebanBorai commented 11 months ago

@CudiLala also remember to update the me query!

            let records = context
                .services
                .user
                .list(None, Some(UserFilter {
                    id: Some(claims.uid),
                    ..Default::default()
                }))
                .await?;