Azure / Azure/data-api-builder

[Bug]: Incorrect parsing of default values when GQL context variables are used

Aperta
#2,079 6 commenti 0 reazioni 1 assegnatario Rivendicata da @ayush3797 Vedi su GitHub
bug graphql
Lingua principale
C#
Stelle
1.5k
Fork
370
Merge medio
3g 17h
PR unite (30g)
8

Descrizione

Consider the table definition for `type_table`:

image

The column `float_types` is a column which has a default value of `1.1`. Now, if we execute a GQL create mutation on this table and:

1. Provide input using GQL context variables
2. Omit value for the `float_types` column (since it has a default value so we don't need to specify it)

We get an error:

```json
{
"errors": [
{
"message": "Float cannot parse the given literal of type `StringValueNode`.",
"path": [
"item",
"float_types"
],
"extensions": {
"field": "CreateSupportedTypeInput.float_types",
"fieldType": "Float"
}
}
]
}
```

image

Similar behavior was observed when `int_types` was given a default value.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.