这是indexloc提供的服务,不要输入任何密码
Skip to content

V2 no longer allows constrained related tables for unauthorised roles #7111

@galipmedia

Description

@galipmedia

I used to be able to make a public (unauthorised role) query which involved a related table which had a x-hasura-user-id constraint on it. In V2 it throws an error that it is missing x-hasura-user-id. Previously if the user was not logged in the field would just return empty []. This was extremely handy because it meant I could use one query regardless of whether the user was logged in or not. And it would always return the same set of objects back in the json. Now I need to make 2 different queries and add extra logic because certain objects will now be 'undefined' if the user is not logged in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions