2

I have an application with Auth0 and graphQl.

I use dataloaders to batching requests to DB. https://github.com/graphql/dataloader

For example, fetching data from DB looks like:

// Booking is Mongoose model
new DataLoader(
  bookingIds => Booking.find({ _id: { $in: bookingIds } }),
);

And now I need to fetch data about group of users. Of course, I can write


// getUser is ManagementClient.getUser from 'auth0' package
new DataLoader(
  userIds => Promise.all(
    userIds.map(
      id => getUser({ id }),
    ),
  ),
)

This solution is slowly. Can I get data of collection of users by one request?

Oleg
  • 1,048
  • 1
  • 9
  • 18

1 Answers1

0

I work with the Auth0 Community team. You can retrieve users with the GET users endpoint from the management console. Give it a look when you get a chance. Thanks!

Coding Morrison
  • 431
  • 2
  • 4
  • 1
    Thank you. But I cant find by id by this endpoint. When I trying, I have an error: Invalid query: filter can not be used with unknown field 'id' – Oleg Jan 16 '20 at 18:26