Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1.35 KB

File metadata and controls

30 lines (26 loc) · 1.35 KB
copyright Copyright IBM Corp. 2017
link search-for-people
is future

Search for people

This is a sample GraphQL query to search for people by name. Here we are looking for people whose names contain "john", or (optionally) a phonetically similar string. The requested property directMessageSpaceId will be populated for people with
whom we have an existing direct message conversation, and null for others within our organization with whom we have yet to converse directly.

Other (optional) parameters which may be included are:

  • sources: Specify whether to search in DMs, shared SPACES, and/or your ORGANIZATION (default if omitted is all sources)
  • size: Maximum number of matching results to return
  • includeRequester: A boolean indicating whether or not the requesting user should be included in results
{
  searchPeople(name: "john", phonetic: true) {
    items {
      displayName
      extId
      email
      directMessageSpaceId
  }
}

Try it out with our GraphQL tool - Search for People