Azure / Azure/data-api-builder

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

Abierto
#2,079 6 comentarios 0 reacciones 1 asignado Reclamado por @ayush3797 Ver en GitHub
bug graphql
Lenguaje dominante
C#
Estrellas
1.5k
Forks
370
Merge medio
3 d 22 h
PR fusionados (30 d)
9

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.