go-graphql-client
go-graphql-client copied to clipboard
ExecRaw does not respect OperationName option
ExecRaw takes options arguments but does not apply them. This causes issue when supplying multiple operations in a request and trying to execute a specific operation by name.
https://github.com/hasura/go-graphql-client/blob/master/graphql.go#L126
Hi,
Because you can input the raw GraphQL query string directly in Exec
and ExecRaw
methods, it doesn't worth manipulating the string to inject the operation name into it. It's very easy to inject the operation name into the GraphQL string by some builder function with fmt.Sprintf
We still add optional arguments for these methods for further extensions. However, it doesn't mean we have to support all extensions.