Skip to content

Got a trouble with 500 error using sparse fields #26

Closed
@FuturFuturFutur

Description

@FuturFuturFutur

Can't use sparse fields option of specificaction (https://jsonapi.org/format/#fetching-sparse-fieldsets) like this:
GET api/v1/posts?include=user&fields[posts]=title, I am getting 500 error end an exception: "message": "Argument 1 passed to LaravelJsonApi\\Core\\Query\\FieldSets::LaravelJsonApi\\Core\\Query\\{closure}() must be of the type array, string given", "exception": "TypeError", "file": "/var/www/html/vendor/laravel-json-api/core/src/Core/Query/FieldSets.php", "line": 74,

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions