Sleep Quality Score

Use the sleepQualityScores query to retrieve the Sleep Quality Scores associated with the user's sleep tracked for the given time range.

Sleep Quality is an index scaling from 0 to 100, where the values above 77 signify good sleep quality, while those below 77 signify poor sleep quality.

Required Arguments

Argument

Type

Description

start

Date!

The date when the sleep quality score will be counted. Use the format: YYYY-MM-DD

end

Date!

The end date when the steps will be counted. Use the format: YYYY-MM-DD

first

Int

Retrieves the first results from the list.

after

String

It takes the cursor type and retrieves results after that position.

id

ID

Id of Sleep Quality Record.

source

String

Source of input, default is set to suggestic.

Available Fields

Field Name

Type

Description

average

Int!

Sleep quality average for the given dates, index scaling from 0 to 100, where the values above 77 signify good sleep quality, while those below 77 signify poor sleep quality.

hasNextPage

Boolean!

Displays whether there are results in the connection after the current segment.

hasPreviousPage

Boolean!

Displays whether there are results in the connection before the current segment.

date

Date!

Date of the Sleep Quality Score was logged YYYY-MM-DD

value

Int

Sleep quality index scaling from 0 to 100, where the values above 77 signify good sleep quality, while those below 77 signify poor sleep quality

source

String

Source of input, default is set to suggestic.

id

ID

Id of Sleep Quality Score Record.

Example

query{
  sleepQualityScores(start:"2022-08-30" end:"2022-09-02"){
   average
    pageInfo{
      hasNextPage
      hasPreviousPage
    }
    edges{
      node{
        date
        source
        value
        id
      }
    }
    
  }
}

Last updated