hasura / go-graphql-client

Package graphql provides a GraphQL client implementation.
MIT License
405 stars 94 forks source link

Does it support or provides a way to support scalar JSON? #137

Open koote opened 5 months ago

koote commented 5 months ago

Is there a way to extend the support to types like scalar JSON?

hgiasac commented 5 months ago

https://github.com/hasura/go-graphql-client?tab=readme-ov-file#custom-scalar-tag

Basically, you need to add scalar:"true" tag. The library considers that field as a scalar and decodes it with json.Unmarshal