graphql / graphql/graphiql

[graphiql] Cannot edit query name from explorer plugin

Open
#3,582 0 comments 0 reactions 0 assignees View on GitHub
bug graphiql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

See the CodeSandbox link below.

If I don't include any query in the query block, I cannot edit the query name from the explorer:

https://github.com/graphql/graphiql/assets/7614947/d1fac448-3530-4748-99ef-2010731d74a7

However, if I add any query to the block, I can edit the query name as normal again:

https://github.com/graphql/graphiql/assets/7614947/743f685a-7b6e-4b8d-949d-86a5d7fb9d15

### Expected Behavior

The both cases I should be able to edit the query name from the explorer panel.

### Steps To Reproduce

See [the codesandbox link](https://codesandbox.io/p/devbox/l5xzs7?migrateFrom=dtd9cq&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clux4v95100063b6mst70hy4e%2522%252C%2522sizes%2522%253A%255B70%252C30%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clux4v95000023b6mku9l2p61%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clux4v95000043b6mvi746tbb%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clux4v95000053b6mn06kfe0g%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clux4v95000023b6mku9l2p61%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clux4v95000013b6mmokfc0ap%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fpackage.json%2522%257D%255D%252C%2522id%2522%253A%2522clux4v95000023b6mku9l2p61%2522%252C%2522activeTabId%2522%253A%2522clux4v95000013b6mmokfc0ap%2522%257D%252C%2522clux4v95000053b6mn06kfe0g%2522%253A%257B%2522id%2522%253A%2522clux4v95000053b6mn06kfe0g%2522%252C%2522activeTabId%2522%253A%2522clux50nrt00kd3b6medq12zlb%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A5173%252C%2522id%2522%253A%2522clux50nrt00kd3b6medq12zlb%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252F%2522%257D%255D%257D%252C%2522clux4v95000043b6mvi746tbb%2522%253A%257B%2522id%2522%253A%2522clux4v95000043b6mvi746tbb%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clux4v95000033b6mdia8hk0d%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522clux4va2d000rd9f8cxqq5ifq%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clux4v95000033b6mdia8hk0d%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D)

### Environment

* GraphiQL Version:
* OS:
* Browser:
* Bundler:
* `react` Version:
* `graphql` Version:

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.