{
users(query: "jeff") {
id
firstName
lastName
email
skills
interests
}
}
In this example, we are searching for users with 'cooking' listed as a skill. Useful for creating groups around common interests!
{
users(query: "cooking", page: 3, pageSize: 6) {
email
skills
}
}
This example returns new hires.
{
users(query: "", sortBy: anniversaryDate, sortDirection: descending) {
email
anniversaryDate
}
}
{
users(query: "engineer", sortBy: education_school_name) {
email
title
education {
degreeType
fieldsOfStudy
minors
school {
name
}
}
}
}
remoteTeamMembers
and recruiters
are just aliases that can be changed to anything
{
remoteTeamMembers: users(query: "", sortBy: isRemote) {
displayName
email
isRemote
}
recruiters: users(query: "recruiter") {
displayName
email
title
}
}
{
__type(name: "User") {
fields {
name
type {
name
kind
ofType {
name
}
}
}
}
}
First, start off with a query. In the in-browser playground, paste the following into the big white box on the left side of the screen:
query ($filters: [UsersFilter]) {
users(filters: $filters) {
# add your desired fields here
email
}
}
Then, add query variables. In the in-browser playground, click the QUERY VARIABLES
link on the bottom left side of the screen then paste in one of the following JSON objects:
Example 1:
{
"filters": {
"subTeam": "team burt"
}
}
Example 2:
{
"filters": {
"firstName_starts_with": "jeff"
}
}
Example 1:
{
"filters": {
"education_school_name_not_contains": "michigan",
"education_school_exists": true
}
}
Example 2:
{
"filters": {
"anniversaryDate_gte": "1/1/2018",
"teamLeader": "John Smith"
}
}
{
"filters": {
"or": {
"interests_item_contains": "popcorn",
"skills_item_contains": "popcorn"
}
}
}
Use an array!
{
"filters": {
"or": [
{
"title_contains": "engineer"
},
{
"title_contains": "designer"
}
]
}
}
{
"filters": {
"interests_exist": false,
"skills_exist": false,
"or": {
"directReportCount_gte": 1,
"anniversaryDate_gte": "1/1/2018"
}
}
}
- As you type in the playground, a hint box will show up to give you autocomplete suggestions. If you want the box to appear without typing anything, press
Ctrl
+Spacebar
. - On the right side of the playground, you'll see a green
SCHEMA
button. If you click this, and search forUser
(then click the first search result), you will see a detailed list of all fields that can be added to ausers
query.
Simply email us at api@justsift.com
Feel free to fork this repository and create a pull request!