Skip to content

Link counts seem to cap at 10 and meta data also implies only 10 links. #141

Description

@Bud-Macaulay

When getting the links for a node with more than 10 results the links seem to cap at 10.

This is both for the returned data and the metadata that implies only 10 total links exist...

i.e. for a now with 12 incoming: http://localhost:8000/v0/nodes/8797076a-2950-45ff-97c3-c91922a82540/links?direction=incoming

{
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "total": 10,
    "page": 1,
    "page_size": 10
  },
  "links": {
    "last": "http://localhost:8000/v0/nodes/8797076a-2950-45ff-97c3-c91922a82540/links?direction=incoming&page=1&page_size=10",
    "self": "http://localhost:8000/v0/nodes/8797076a-2950-45ff-97c3-c91922a82540/links?direction=incoming&page=1&page_size=10"
  },
  "data": [ 10 ... ]

However changing the response changes the total number in meta...
http://localhost:8000/v0/nodes/8797076a-2950-45ff-97c3-c91922a82540/links?direction=incoming&page=1&page_size=20

{
  "jsonapi": {
    "version": "1.1"
  },
  "meta": {
    "total": 12,
    "page": 1,
    "page_size": 20
  },
  "links": {
    "last": "http://localhost:8000/v0/nodes/8797076a-2950-45ff-97c3-c91922a82540/links?direction=incoming&page=1&page_size=20",
    "self": "http://localhost:8000/v0/nodes/8797076a-2950-45ff-97c3-c91922a82540/links?direction=incoming&page=1&page_size=20"
  },
  "data": [ 12 ... ]

The total in meta should be reflective of all nodes to ensure consumers can paginate their responses correctly.
We should ensure that this is fixed for all responses -

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions