Skip to content

Missing included attribute when using useQuery with Q('io.cozy.files').getById(id) #1620

@zatteo

Description

@zatteo

With the following query Q('io.cozy.files').getById(id), we call the GET /files/:file-id route from cozy-stack.

This route return the following object :

{
  links: {...},
  data: {...},
  included: [{...}] // if id it is a directory, it contains the list of files and sub-directories inside (paginated 30 by 30)
}

However, when using useQuery, the included field is not returned. It is correctly returned when calling directly client.query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions