mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 12:44:15 +03:00
Fixed Dynamic arguments
This commit is contained in:
parent
f8e636db80
commit
0a80119f5e
|
@ -36,6 +36,10 @@ def to_arguments(args, extra_args):
|
|||
for default_name, arg in iter_arguments:
|
||||
if isinstance(arg, Dynamic):
|
||||
arg = arg.get_type()
|
||||
if arg is None:
|
||||
# If the Dynamic type returned None
|
||||
# then we skip the Argument
|
||||
continue
|
||||
|
||||
if isinstance(arg, UnmountedType):
|
||||
arg = arg.Argument()
|
||||
|
|
|
@ -49,6 +49,7 @@ def test_mutation_execution():
|
|||
class Input:
|
||||
name = String()
|
||||
dynamic = Dynamic(lambda: String())
|
||||
dynamic_none = Dynamic(lambda: None)
|
||||
|
||||
name = String()
|
||||
dynamic = Dynamic(lambda: String())
|
||||
|
|
Loading…
Reference in New Issue
Block a user