Skip to content

[V5] @globalId not working with @can #1535

@hosmelq

Description

@hosmelq

Describe the bug

In the following query I get this error No query results for model [App\Models\Student] U3R1ZGVudDoy located in CanDirective.php, this was working this morning before update the package with the latest changes.

If I remove the @can directive works well.

student(id: ID! @globalId(decode: "ID") @eq): Student
    @can(ability: "view", find: "id")
    @find

Expected behavior/Solution

Decode the ID field before pass it to @can

Lighthouse Version

dev-master

Metadata

Metadata

Assignees

No one assigned

    Labels

    5.xRelated to the 5.x release seriesbugAn error within Lighthouse

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions