cli / go-gh

A Go module for interacting with gh and the GitHub API from the command line.
https://pkg.go.dev/github.com/cli/go-gh/v2
MIT License
322 stars 45 forks source link

ExampleGQLClient_Mutate_simple #99

Closed mntlty closed 1 year ago

mntlty commented 1 year ago

Fixes https://github.com/cli/go-gh/issues/98

Adds a mutation for https://docs.github.com/en/graphql/reference/mutations#addstar with input and first params, and inline fragments on the response to demonstrate how these are used.

I tested this in a local func main() to confirm the format is correct and the request can succeed (output is vilmibm).

The node that global_id R_kgDOF_MgQQ references is left as an exercise for the user :smile:

mislav commented 1 year ago

Thank you!