Unfortunately, this is not working as you expect. The reason for that is the framework we are using (graphql-dotnet) parses the input into a dictionary, where there property is the key. However, the dictionary is sorting the keys lexicographically, so they appear in alphabetical order.
To change this, we need to make significant changes in the framework, which was not something we were willing to do.
The same problem we had when evaluating a request like this:
orderLine_create(values:[{
orderNo : 855
productNo : "405"
unit: 1
orgUnit1: 1
orgUnit2: 1
taxCode: 3
quantity : 2.0
currencyNo: 47
priceInCurrency: 14.0
discountPercent1: 0.0
description: "Kvikklunsj, 22.04.2023 16:58 - 23.04.2023 12:00, Refnr.:"
}]
The framework read all these object properties and put them in a dictionary. We fixed this by ditching the graphql-dotnet parsing and do it all explicit (which led to some bugs over time).
Bottom line is, we will add this to the backlog and see what we can do to make it work.
There is a workaround in the meantime. Don't pass an object as variables, but individual properties:
query:
mutation create_order($cid : Int!,
$custno : Int,
$ordType : Int,
$ordPref : Int,
$info5 : String,
$info6 : String,
$ttype : Int,
$ourref : String,
$yourref : String)
{
useCompany(no : $cid)
{
order_create(values: [{
customerNo : $custno
orderType : $ordType
orderPreferences : $ordPref
information5 : $info5
information6 : $info6,
transactionType : $ttype,
ourReference : $ourref,
yourReference : $yourref
}])
{
affectedRows
items
{
orderNo
}
}
}
}
variables:
{
"cid":xxxxxxxxxx,
"custno":10290,
"ordType":2,
"ordPref":0,
"info5":"1",
"info6":null,
"ttype":1,
"ourref":"test@griegconnect.com",
"yourref":"Ref tjeneste"
}
This should work as expected.
... View more