hasura / hasura/graphql-engine

Cursor shifts to the end of the input when editing remote schema customisation

Open
#8,269 1 comment 0 reactions 0 assignees View on GitHub
c/console k/bug t/gql-services
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.4.0-beta.1
CLI Version (for CLI related issue):

### Environment

OSS

### What is the expected behaviour?

Placing the cursor in the remote schema customisation field should allow me to edit the existing value in the right place.

### Keywords

remote schema customisation, input field

### What is the current behaviour?

The cursor jumps to the end of the existing input value after the first letter is typed in.

### How to reproduce the issue?

1. Navigate to remote schemas tab.
2. Add a remote schema (eg. `https://countries.trevorblades.com`)
3. Navigate to the edit page.
4. Open the `GraphQL Customizations` section.
5. Select the `prefix` input field and type in `prefix` as the initial input value.
6. Click outside the field to remove focus and then place your cursor at the beginning of the string.
7. Type in the words `my_` and notice the value is `mprefixy_` instead of `my_prefix`.

### Screenshots or Screencast

![Kapture 2022-03-03 at 09 37 41](https://user-images.githubusercontent.com/11921040/156495383-8254f417-ec90-43c5-83ef-ca372b7445f6.gif)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue from the remote schemas tab using the listed GraphQL Customizations steps, then trace the prefix input's value and cursor handling. Done means inserting text at the beginning preserves the intended order, producing my_prefix rather than mprefixy_.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.