question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No mutation operation access is allowed on remote schema for unauthenticated users after running hasura metadata apply

See original GitHub issue

Version Information

Server Version: 2.6.0 CLI Version (for CLI related issue): >= 2.5.0

Environment

OSS

What is the expected behaviour?

Unauthenticated users should always be able to access mutation operation provided by the remote schema that enabled public insert/update mutation

Keywords

mutation remote schema unauthenticated users hasura metadata apply

What is the current behaviour?

After running hasura metadata apply, all public access to mutation operation on any remote schema that enabled public insert/update mutation is resulting in an error field not found in type: 'mutation_root' or mutation not exists

How to reproduce the issue?

  1. Allow insert/update from unauthenticated users on a remote schema using web console
  2. Export metadata to the local Hasura console
  3. Reapply metadata from the local Hasura console

Any possible solutions?

Modify any permission on the same remote schema again using web console.

After comparing the metadata of remote schema before and after I did the above solution, I found the difference is the missing schema { query: Query mutation: Mutation } in the permission definition schema makes it not work.

Can you identify the location in the source code where the problem exists?

No

If the bug is confirmed, would you be willing to submit a PR?

I am not familiar with Go or Haskell

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
dsandipcommented, Aug 19, 2022

@maxcan @AThilenius Re-opening this till we get more information. cc: @BenoitRanque @birlam

2reactions
Rokamakucommented, May 5, 2022

I found that issue happens not only to the unauthenticated users but also all other roles

Read more comments on GitHub >

github_iconTop Results From Across the Web

Query mutation: Mutation } on remote_schemas.yaml hasura ...
Missing schema { query: Query mutation: Mutation } and when a missing role user make a query or mutation we receive a No...
Read more >
Remote schema permissions | Hasura GraphQL Docs
When remote schema permissions are not enabled, all remote schemas are considered to be public entities, i.e. all roles will have unrestricted access...
Read more >
Unauthenticated / Public access | Hasura GraphQL Docs
You can configure Hasura GraphQL engine to allow access to unauthenticated users by defining a specific role which will be set for all...
Read more >
Configuring permission rules | Hasura GraphQL Docs
Permission rules are defined for each role, table, operation (insert, select, update, delete) by using the Console or the metadata APIs for permissions....
Read more >
Allow List of operations | Hasura GraphQL Docs
Introduction​. The Allow List is a list of safe operations (GraphQL queries, mutations or subscriptions) that is stored by the GraphQL Engine in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found