hasura / hasura/graphql-engine

Hasura actions not available when defined as queries in relay

Open
#9,480 2 comments 2 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.19.0
CLI Version (for CLI related issue): v2.15.2

### Environment

Gitpod/Hasura cloud

### What is the current behaviour?

### What is the expected behaviour?

When Hasura action is created as a query it doesn't appear in "Explorer" and we can't call this action by name either by writing action name directly in "GraphiQL"
Note: This issue only happens in relay, action that is created using "Query" is available in non-relay version of graphql but is not available in relay.

### How to reproduce the issue?

1. create a Hasura action using type Query
2. give permission to role using to access this query
3. turn on relay
4. in API explorer query explorer this action can't be queried

### Screenshots or Screencast

defination of action:
![defination](https://user-images.githubusercontent.com/4238297/223167597-af8e35bc-2de0-4612-9805-36ff8f6307c7.png)

action non relay:
![non_relay](https://user-images.githubusercontent.com/4238297/223167667-bafe3114-1625-4404-83d2-d81d2b274166.png)

action in relay:
![relay](https://user-images.githubusercontent.com/4238297/223167716-aa6dcf9d-5782-46bc-973c-e04641a88ebd.png)

Possibly

My guess is that since we can't query any view or table where primary keys are not defined in relay. This might be related to that same issue

### Keywords

hasura action
query action

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Hasura Cloud or Gitpod using the listed steps, then compare the Relay and non-Relay API Explorer schemas and GraphiQL behavior for a query action. The fix is complete when a permitted query action appears in the Relay explorer and can be called by name.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.