Open eliscie opened 1 year ago
Hello!
Decoders generated by elm-gql seem to swap fields around if the fragment is nested alongside other fields.
elm-gql
Affected query:
query TestBuses { buses { id name rows seats { front ...SideSeats back } } } fragment SideSeats on Seats { rightRow # changed order! leftRow }
The query executed in the GraphiQL tool is fine:
elm-gql-decoded query, unfortunately, is not:
However, a similar query (third column in the screenshot above), in which the fragment is not used alongside other fields, gets decoded correctly.
GitHub repository with issue reproduction: https://github.com/eliscie/city-parking My original message on the Incremental Elm Discord server: https://discord.com/channels/534524278847045633/1018161791152431234/1063527955751506070 Possibly related message on the same server: https://discord.com/channels/534524278847045633/1018161791152431234/1048392743573008416
Thank you for making elm-gql.
I also encountered this bug. I had to "flatten" a lot of my fragments, otherwise the decoders would have fields in the wrong order.
Hello!
Decoders generated by
elm-gql
seem to swap fields around if the fragment is nested alongside other fields.Affected query:
The query executed in the GraphiQL tool is fine:
elm-gql
-decoded query, unfortunately, is not:However, a similar query (third column in the screenshot above), in which the fragment is not used alongside other fields, gets decoded correctly.
GitHub repository with issue reproduction: https://github.com/eliscie/city-parking My original message on the Incremental Elm Discord server: https://discord.com/channels/534524278847045633/1018161791152431234/1063527955751506070 Possibly related message on the same server: https://discord.com/channels/534524278847045633/1018161791152431234/1048392743573008416
Thank you for making
elm-gql
.