JMitnik / haas

haas
0 stars 0 forks source link

Workspace interactions query #422

Closed Cold-A-Muse closed 2 years ago

Cold-A-Muse commented 2 years ago

In this PR

Use search field to filter based on topics Use dialogueIds field to filter based on team(s) Use scoreRange field to filter based on score

Example Query

query GetWorkspaceSessions(
    $id: ID,
    $filter: SessionConnectionFilterInput
) {
  customer(id: $id) {
    id
    sessionConnection(filter: $filter) {
            sessions {
                mainScore
                dialogue {
                    title
                }
                dialogueId
            }
            totalPages
            pageInfo {
                hasPrevPage
                hasNextPage
                nextPageOffset
                prevPageOffset
                pageIndex
            }
        }
         }
}

Example input

{
    "id": "cl56eysx02729t9oitxkexitj",
    "filter": {
        "offset": 0,
        "perPage": 10,
        "startDate": "27-06-2022",
        "endDate": "05-07-2022",
        "orderBy": { 
            "by": "createdAt", 
            "desc":true 
        },
        "search": "Management",
        "scoreRange": {
            "max": 50
        },
        "dialogueIds": [
            "cl56ez0ci16713t9oieyb160s0", "cl56eysz52795t9oilt0msmv9"
        ]
    }
}
JMitnik commented 2 years ago

Few notes:

A few more thigns would be good to have here:

Cold-A-Muse commented 2 years ago

I added both followUpAction and withFollowUpAction @JMitnik