Skip to content

Is it possible to send metadata? #5

Description

@Eusse

I have a paginated query like this:

const contacts = yield Database
      .from('contacts')
      .where(conditions)
      .orderBy(sort, dir)
      .paginate(page, limit)
response.jsonApi('Contact', contacts.data)

this will return some metadata like

  total: 406,
  currentPage: 1,
  perPage: 10,
  lastPage: 41

i would like to access it for ui pagination purposes but it is not being sent from the JsonApiView.
It there a way to do it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions