Skip to content

Sparse fieldsets returning all fields #559

@arthurpankiewicz

Description

@arthurpankiewicz

Describe the bug
Querying by sparse fieldsets is not behaving as expected. When trying to specify multiple fields for one resource, it does not work (all fields are returned). It works if you specify the multiple fields for the one resource across multiple query params.

  • does not work, but should: [resource1]=field1,field2,field3
  • workaround: [resource1]=field1&[resource1]=field2&[resource1]=field3

To Reproduce
Use the fields parameter with useAll or useDataGridState, it will structure the query in the jsonapi format, but the request will return all fields regardless.

Expected behavior
Using the jsonapi URL format returns only specified fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions