gabotechs / graphqxl

GraphQXL is a new language built on top of the GraphQL syntax that extends the original language with some additional features useful for creating scalable and big server side schemas. This repository contains the source code for the GraphQXL compiler.
https://gabotechs.github.io/graphqxl
MIT License
272 stars 8 forks source link

Default values for enum arguments is not according to the spec #54

Closed praveensvsrk closed 8 months ago

praveensvsrk commented 8 months ago

I am seeing incorrect behaviour when using default values for enum arguments. I get parsing error during conversion. I have demonstrated this using a small example below.

enum Language {
    DE
    FR
}

type Query {
    toEnglish(from: Language! = DE): String
}

This is a valid schema, but graphqxl fails to parse it. Notice the error while parsing the default value for the argument from.

image

however, string literal as value is getting accepted, which shouldn't be the case.

image

ref: Oct 2021 spec

jasonav commented 8 months ago

@gabotechs Can you take a look at this? It is a blocker issue for us.

gabotechs commented 8 months ago

Taking a look now...

gabotechs commented 8 months ago

It was an easy fix, it's already released under the 0.40.1 tag. Feel free to reopen if you find any issue.

jasonav commented 8 months ago

Thank you!!