We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74d5057 commit 265e613Copy full SHA for 265e613
tests/error/test_graphql_error.py
@@ -47,6 +47,27 @@ def has_a_name_message_extensions_and_stack_trace():
47
assert e.__traceback__ is None
48
assert str(e) == "msg"
49
50
+ def can_pass_positional_and_keyword_arguments():
51
+ e1 = GraphQLError(
52
+ "msg",
53
+ [field_node],
54
+ source,
55
+ [1, 2, 3],
56
+ ["a", "b", "c"],
57
+ Exception("test"),
58
+ {"foo": "bar"},
59
+ )
60
+ e2 = GraphQLError(
61
+ message="msg",
62
+ nodes=[field_node],
63
+ source=source,
64
+ positions=[1, 2, 3],
65
+ path=["a", "b", "c"],
66
+ original_error=Exception("test"),
67
+ extensions={"foo": "bar"},
68
69
+ assert e1 == e2
70
+
71
def formatted_dict_has_only_keys_prescribed_in_the_spec():
72
e = GraphQLError(
73
"msg",
0 commit comments