hasura / hasura/graphql-engine
Remote schema permissions, allow omitting the Query root
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Hello,
When defining permissions over a remote schema, we currently must include the Query root.
I can understand that the Query root is needed when directly exposing a GraphQL schema as per the [standard](https://spec.graphql.org/June2018/#sec-Root-Operation-Types) but in the case of Hasura the remote schema can be merged with other APIs or Hasura's own schema so I don't think it makes sense to include the Query root in the scope of permissions.
I think that only the exposed schema should be standard compliant and as a user I find it a bit counter intuitive to have to specify access to a dummy `Query { ok: Boolean! }` when all I want is to grant a role access to one or two remote mutations.
Contributor guide
Research direction
Start by tracing the remote schema permissions flow described in the issue and how it validates the Query root against GraphQL root-operation requirements. The work is done when a role can grant access to remote mutations without defining a dummy Query root, while directly exposed schemas remain compliant with the cited standard; add or update coverage for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api, authorization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100