sullivtr / terraform-provider-graphql

Terraform GraphQL plugin to automate the full life-cycle of graphql api resources.
https://sullivtr.github.io/terraform-provider-graphql
Mozilla Public License 2.0
53 stars 13 forks source link

Set type for computed attributes #97

Closed dlecocq closed 1 month ago

dlecocq commented 7 months ago

Dealing with a 🤦 API, some endpoints seem to require that for some queries, the id be an Integer, but for others, a String. I know that for providing our own mutation variables, it's possible to make explicit whether we want a string or int (like "\"123\""), but it seems there's no way to do that for a computed variable. Any thoughts on how that could be accomplished? I keep getting back an id of "123", but when providing it to the endpoint, it gets recognized as JSON and converted to 123.

sullivtr commented 1 month ago

@dlecocq I merged you MR that was related to this issue, which will be release in v2.5.5.

sullivtr commented 1 month ago

https://github.com/sullivtr/terraform-provider-graphql/pull/96 closes this issue :)