graphql / graphql/graphiql

[graphiql] Default Value not accepted in Variable

Open
#3,571 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

i have a `storyEdit(input: StoryEditInput!)` Mutation, with input fields like this
```graphql
input StoryEditInput {
id: ID!
publish: Boolean! = false
}
```

if i Put the variable inline there are no issues
Capture d’écran 2024-03-26 à 15 40 34

If i put the variable in variable panel, the lint isn't happy

Capture d’écran 2024-03-26 à 15 37 28

### Expected Behavior

The Same behavior should be done if both panel (not warning about missing variables)

### Steps To Reproduce

not provide an input variable with a default

### 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.