Skip to content
New issue

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

ExecRaw does not respect OperationName option #96

Open
bhoriuchi opened this issue Jun 21, 2023 · 1 comment
Open

ExecRaw does not respect OperationName option #96

bhoriuchi opened this issue Jun 21, 2023 · 1 comment

Comments

@bhoriuchi
Copy link

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

@hgiasac
Copy link

hgiasac commented Jun 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants