quiz
quiz copied to clipboard
Is it possible to send graphql variables, like the input objects for mutations?
How can I accomplish this?
The query:
mutation user($user: CreateUserInput!) {
createUser(input: $user) {
user {
id
name
email
}
}
}
And send the variables as an input obj:
{
"user": {
"name": "Sebas",
"email": "bla@test...",
"birthdate": "2001-01-01"
}
}
Hi @x0y-gt thanks for creating this issue.
Variables and mutations are not yet supported. Also not yet in the upcoming release. It is on the backlog of course, but will take some time to be included.
Currently, it is possible to use variables in the Python code creating the queries, for example:
repo_name = "Hello-World"
schema.query[
_
.repository(owner='octocat', name=repo_name) [
_
.createdAt
]
]
The next release should smooth out some issues with input objects as well. Let me know if you run into other issues :).