Skip to content

Commit

Permalink
chore(deps): use graphene's updated data types
Browse files Browse the repository at this point in the history
  • Loading branch information
fugal-dy authored and winged committed Dec 20, 2021
1 parent 2df3db8 commit 25fad25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions caluma/caluma_core/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ def get_mutation_params(info):
def _parse_ast_value(arg, info): # pragma: no cover
raise RuntimeError(f"Unknown arg {arg}")

@_parse_ast_value.register(ast.ObjectValue)
@_parse_ast_value.register(ast.ObjectValueNode)
def _(arg, info):
return {
field.name.value: _parse_ast_value(field.value, info)
for field in arg.fields
}

@_parse_ast_value.register(ast.ListValue)
@_parse_ast_value.register(ast.ListValueNode)
def _(arg, info):
return [_parse_ast_value(val, info) for val in arg.values]

@_parse_ast_value.register(ast.StringValue)
@_parse_ast_value.register(ast.StringValueNode)
def _(arg, info):
return arg.value

@_parse_ast_value.register(ast.Variable)
@_parse_ast_value.register(ast.VariableNode)
def _(arg, info):
return info.variable_values[arg.name.value]

Expand All @@ -54,7 +54,7 @@ def _(arg, info):
for sel in info.operation.selection_set.selections
if sel.name.value == info.field_name
# if aliases are used, we need to compare them as well
and (sel.alias is None or sel.alias.value == info.path[0])
and (sel.alias is None or sel.alias.value == info.path.key)
][0]

return {
Expand Down
1 change: 0 additions & 1 deletion xfails.list
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@
"caluma.caluma_form.tests.test_filter_by_answer.test_query_all_questions[multiple_choice-search_value0-matching-ICONTAINS]",
"caluma.caluma_workflow.tests.test_work_item.test_complete_work_item_with_next[[info.case.created_by_group, info.work_item.created_by_group]-False-ready-None-simple-work_item__controlling_groups0-work-item-creating-group-case-creating-group]",
"caluma.caluma_form.tests.test_filter_by_answer.test_query_all_questions[datetime-2018-05-09T14:54:51.728786-matching-ISNULL]",
"caluma.caluma_core.tests.test_mutation_params.test_get_mutation_params_inline",
"caluma.caluma_form.tests.test_document.test_save_document_answer[textarea-question__configuration13-None-question__format_validators13-Test-None-SaveDocumentStringAnswer-True-option-slug-False-False]",
"caluma.caluma_form.tests.test_question.test_save_choice_question[choice-False]",
"caluma.caluma_form.tests.test_format_validators.test_base_format_validators[question__format_validators3-+411234567890-True-text]",
Expand Down

0 comments on commit 25fad25

Please sign in to comment.