graphql icon indicating copy to clipboard operation
graphql copied to clipboard

Aliases are not supported in map keys

Open astudnev opened this issue 2 years ago • 0 comments

when i query

{
    hello{
        alias1: id
        alias2: id
    }
}

and submit the map

{
    hello{
        alias1: "1"
        alias2: "2"
    }
}

it returns nil for both aliases

Expected result is alias1 :"1" and "alias2": "2"

There is another case... when i query

{
    hello{
        id
        alias2: id
    }
}

and submit the map

{
    hello{
        id: "1"
       alias2: "2"
    }
}

it returns alias2: "1" and id: "1"

Expected result is id :"1" and "alias2": "2"

both results are wrong!

It may be covered in PR https://github.com/graphql-go/graphql/pull/630 but i have not tested all possible cases

astudnev avatar Sep 04 '22 08:09 astudnev