We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to use the Hasura GraphQL API.
query getTenantDetails { tenant_by_pk(id: $id) { id slug project { id endpoint } } }
I defined the struct below and run with these script.
var GetTenantDetails struct { TenantByPK struct { //ID graphql.ID Cloud graphql.String Region graphql.String } `graphql:"tenant_by_pk(id: $id)"` } q := GetTenantDetails vars := map[string]interface{}{ "id": graphql.ID("my-id"), } if err := client.Query(ctx, &q, vars); err != nil { log.Fatal(err) }
But I get this weird error.
Error: variable id of type ID! is used in position expecting uuid!
How can I use uuid? I read the GoDoc but I couldn't find any types for UUID. Thanks in advance.
uuid
The text was updated successfully, but these errors were encountered:
With the way the library determines types, I believe the following works:
type uuid string vars := map[string]interface{}{ "id": uuid("my-id"), }
(uuid here should be literally the type that's used in the API)
Sorry, something went wrong.
No branches or pull requests
What
I want to use the Hasura GraphQL API.
I defined the struct below and run with these script.
But I get this weird error.
How can I use
uuid
? I read the GoDoc but I couldn't find any types for UUID.Thanks in advance.
The text was updated successfully, but these errors were encountered: