copyright | link | is |
---|---|---|
Copyright IBM Corp. 2017 |
get-a-list-of-users |
published |
Now that you can get information for one person, here is the GraphQL query to get information about a list of people. In this example, we are specifying an array of user IDs to get information for these specific users.
query getProfiles {
people(id: ["user-id1", "user-id2"]) {
items {
id
displayName
email
}
}
}
Next, let’s just grab the first ten users’ information:
query getProfiles {
people(first: 10) {
items {
id
displayName
email
}
}
}
Let’s say you just want to get a list of users named 'Kevin'. This example GraphQL query shows how to return the first five users in a space named Kevin.
query getProfiles {
people(name: "Kevin", first: 5) {
items {
id
displayName
email
}
}
}