-
Notifications
You must be signed in to change notification settings - Fork 94
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
Cannot use dynamic graphql client to invoke mutation with non-null parameter #2259
Comments
Hi @frisket, try using Variable inputVar = Variable.var("arg1", nonNull("String")); // ScalarType.GQL_STRING
Document query = document(
operation(vars(inputVar), field("returnSomething", arg("input", inputVar))
)
);
Response response = client.executeSync(query, Map.of("arg1", "Hello")); The problem is that we added naming validators, and they do not accept characters such as |
I would say that using these wrapper methods to denote non-null and arrays is intentional and good, it makes the code a bit more type-safe, no? I would say that we could update the |
Yeah, the error messages for the validators are lacking and don't say anything of importance in general. |
PR: #2260 |
I'm attempting to call a graphql API that has a non-null parameter defined.
Eg, with a schema like this:
type Film {
title: String
}
mutation {
updateTitle(name: Film!) {
title
}
}
I cannot invoke the "updateTitle" API because I get a name validation error trying to build the graphql client.
The specific exception I get is:
Attempting to invoke as so:
I am able to send the same query manually via other tools (eg: Altair) to the endpoint succesfully.
Found this older ticket that seems similar: quarkusio/quarkus#18194
The text was updated successfully, but these errors were encountered: