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

GQLCLient should return GQLError for query and mutation methods #97

Closed samcoe closed 1 year ago

samcoe commented 1 year ago

Right now the query and mutations methods on GQLCLient return an error type from shurcooL-graphql which does not match the concrete error type from the do methods. This causes unnecessary complexity when trying to do type assertion on the errors returned from the GQLCLient methods. To fix this we can wrap the errors returned from query and mutations methods in a GQLError.