zakum1
zakum1

Reputation: 1112

Query user details using the getstream.io activity feed client (using React Native)

I would like to be able to fetch the user details for a list of users, preferably in a single API call. Is this possible using the JS client (my preference) or via the REST API?

There is a reference to a listUsers interface in the chat documentation:

const response = await client.queryUsers({ id: { $in: ['john', 'jack', 'jessie'] } });

but this doesn't seem to be available on the activity feed client. In my activity feed app, I am accessing the client using the <StreamApp.Consumer> in react native. client.queryUsers is not an available method on this context.

It seems that there is also no general query interface on the rest APIs. I can only see an API to fetch a single user details.

Is there a way to query user details for a list of users.

Upvotes: 1

Views: 679

Answers (1)

ferhatelmas
ferhatelmas

Reputation: 3978

Not possible at the moment.

However, it's in the backlog to be added.

As you realize, there is a single user read.

On the other hand, react native is a client which shouldn't query users directly. Needed users can be extended on feed/reaction read via enrichment automatically, which is the difference than chat.

Upvotes: 2

Related Questions