hasura / hasura/graphql-engine
Adding session arguments to a tracked mutation function turns it into a query function
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.0.10
CLI Version (for CLI related issue): 2.0.0-beta.1
### Environment
Localhost (MacOS)
### What is the expected behaviour?
After adding the session arguments to a tracked volatile function (tracked as mutation), it should simply work!
### Keywords
functions, mutation, session argument
### What is the current behaviour?
After adding the session arguments to a tracked volatile function (tracked as mutation), the metadata removes the `exposed_as: mutation` which turns it into a normal (tracked as a query) function. This can be fixed by manually changing the yaml file in the metadata so the bug is related to the UI console.
### How to reproduce the issue?
1. Create a volatile function that gets a session argument and track it as a mutation
2. Set the session argument name
3. Watch as it changes to a query instead!
### Any possible solutions?
Probably a simple bug in the console.
### If the bug is confirmed, would you be willing to submit a PR?
Nope!
Contributor guide
Research direction
Start in the UI console flow for tracking a volatile function as a mutation and setting its session argument name. Reproduce the metadata change and inspect why exposed_as: mutation is removed. Done means the session argument can be configured without changing the tracked function into a query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100