Closed YazeedAlKhalaf closed 1 year ago
Hi @YazeedAlKhalaf
That is the expected behavior. The GraphQL client is generic and can convert basic GraphQL scalar types in the spec. I guess you assume the bigint
type should be handled because the library is forked by Hasura, right? We still follow the design of the original client and don't try to satisfy Hasura GraphQL Engine only.
Thanks @hgiasac for the quick reply.
Makes sense, yes I thought it would be handled.
Well if it helps anybody in the future, here is how I was able to input a bigint
in the query, I used a raw query and called the Exec
function with the rawQuery, nil variables and if it is a subscription the handler.
Now for the raw query you can use fmt.Sprintf
to include the variables in their places and no need for the ($var_name:var_type)
when using this method.
You can use a type alias instead. The client uses reflection to infer and print the equivalent type. We mention this in the doc https://github.com/hasura/go-graphql-client#specify-graphql-type-name
type bigint int64
a := bigint(20)
i believe we need to change the Int64 to be considered
"bigint"
, unless there is some reason behind making all Int types beInt
.