From 25fad25bd19c20857cc5ee7de98222a318c22fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Birrer?= Date: Fri, 17 Sep 2021 13:34:03 +0200 Subject: [PATCH] chore(deps): use graphene's updated data types issue #814 --- caluma/caluma_core/mutation.py | 10 +++++----- xfails.list | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/caluma/caluma_core/mutation.py b/caluma/caluma_core/mutation.py index 55c725f65..85257a5da 100644 --- a/caluma/caluma_core/mutation.py +++ b/caluma/caluma_core/mutation.py @@ -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] @@ -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 { diff --git a/xfails.list b/xfails.list index be402d1cc..cf1bab372 100644 --- a/xfails.list +++ b/xfails.list @@ -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]",