Functional specs: https://wazo-dev.atlassian.net/browse/WP-42
Get search results:
{
me {
contacts(term:pascal, first:2, after:my-cursor) {
edges {
node {
user_uuid
firstname
lastname
main_extension
extensions(first:2, after:my-cursor) {
edges {
is_main
node {
exten
}
}
pageInfo {
startCursor
endCursor
hasNextPage
}
}
}
}
pageInfo {
startCursor
endCursor
hasNextPage
}
}
}
}
Get favorites:
{
me {
contacts(favorite:true, first:2, after:my-cursor) {
...skipping edges/node/pageInfo...
source_id
contact_id
user_uuid
firstname
lastname
main_extension
}
}
}
Get personal contacts:
{
me {
contacts(source:personal, first:2, after:my-cursor) {
...skipping edges/node/pageInfo...
source_id
contact_id
user_uuid
firstname
lastname
main_extension
}
}
}
Listing available companies:
{
me {
contact_companies {
...skipping edges/node/pageInfo...
name
}
}
}
OR (requires more processing for response consumer)
{
me {
contacts {
...skipping edges/node/pageInfo...
company
}
}
}
Get contacts of a company:
{
me {
contact_companies(term:wazo) {
...skipping edges/node/pageInfo...
contacts {
...skipping edges/node/pageInfo...
firstname
lastname
main_extension
}
}
}
}
Get contact by UUID (multiple contacts by batching queries):
{
me {
contact(source:wazo_internal, contact_id:my-uuid) {
user_uuid
firstname
lastname
}
}
}
and batch multiple queries with different contact_id
Get contact matching an extension
{
me {
contact(exten:4181111111) {
user_uuid
firstname
lastname
}
}
}