Replies: 1 comment
-
|
Yes, you can bypass client-side validation in sgqlc. A few approaches:
from sgqlc.operation import Operation
# Build raw query string
query = """{
processorSummary {
arch
}
}"""
# Send directly without type validation
result = endpoint(query, variables={"arch": "z"})
# Add the value dynamically before the request
Arch._member_map_["z"] = "z"
from sgqlc.types import Variable
op = Operation(Query)
op.processor_summary(arch=Variable("archInput"))
# Variables bypass enum validation
result = endpoint(op, variables={"archInput": "z"})Option 3 is cleanest - variables are passed as-is to the server without client-side enum checking. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to build a request and send it without client-side validation? For example, if the request I plan to send contains an Enum and I want to send a regular string (not part of the Enum), is this possible? I get a type error when trying to send this value vie RequestEndpoint in to_graphql method.
Beta Was this translation helpful? Give feedback.
All reactions