-
Notifications
You must be signed in to change notification settings - Fork 829
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
Required/NonNull parameters do not work #1394
Comments
I am seeing the same behavior. |
…thon#1394) and update function from_global_id exception handling (graphql-python/graphql-relay-py@b217aef)
fix: default value for argument should be Undefined (Issue graphql-python#1394)
fix: default value for argument should be Undefined (Issue graphql-python#1394)
Same behavior here. Shameless bump. |
was solved by PR #6 |
@tcleonard just a heads up. I think this PR link is pointing to wrong stuff (2015/2017 discussion). I had the same bug as the people above as well, here's my setup:
I'm changing to graphene from EDIT: Problem is fixed installing straight from master, commit hash |
This was released in graphene >=3.1 so it's normal you still get it if you are using versions below that |
Required=True and NonNull parameters do not work in Query.
I have tried 3 following ways:
hello2 = String(name=String(required=True))
hello2 = String(name=NonNull(String))
hello2 = String(name=Argument(String, required=True))
with following resolver:
def resolve_hello2(root, info, name):
return f"Hello {name}!"
And in any of these ways, when I do not provide name, I do not get any error:
Although playground seems to recognize that 'hello2' need some parameters, because it is underlined, where 'hello' is not (it does not have any mandatory parameters):
Graphene version:
graphene 3.0
graphql-core 3.1.6
graphql-relay 3.1.0
Running API using starlette_graphene3:
starlette-graphene3 0.5.1
Also tested running API using starlette.graphql - the same behavior.
Python: 3.8.10
The text was updated successfully, but these errors were encountered: