Graphql BigDecimal图形

Graphql BigDecimal图形,graphql,graphql-js,Graphql,Graphql Js,我想在graphql中声明一个“BigDecimal”标量。 我在冲突解决程序中添加了此声明: BigDecimal: new GraphQLScalarType({ name: 'BigDecimal', description: 'BigDecimal scalar type', serialize: (value) => value, parseValue: (value) => value,

我想在graphql中声明一个“BigDecimal”标量。 我在冲突解决程序中添加了此声明:

    BigDecimal:  new GraphQLScalarType({
        name: 'BigDecimal',
        description: 'BigDecimal scalar type',
        serialize: (value) => value,
        parseValue: (value) => value,
        parseLiteral: (ast) => {ast.kind === "FloatValue" ? parseFloat(ast.value) : null}

})
但是,当我调用我的查询时,如下所示:

   mutation basePost(  
      numberPost:{
                 amt:1.111
                 } )
这给了我一个错误:

"errors": [
    {
      "message": "Expected type BigDecimal, found 1.111.",
      "locations": [
        {
          "line": 41,
          "column": 27
        }
      ]
    },
我的输入模式如下:

input numberPost {
    amt: BigDecimal
}

我的错误在哪里?是否有其他方式为graphql声明bigDecimal?

我使用graphql的浮点标量来绕过这个问题