I am starting working on GraphQL and as I am from python background I am using GraphQL with Python. I followed the steps provided here Link but I am still facing issues.
JavaScript
x
15
15
1
An error occurred while resolving field Query.hello
2
Traceback (most recent call last):
3
File "/usr/local/lib/python3.5/dist-packages/graphql/execution/executor.py", line 311, in resolve_or_error
4
return executor.execute(resolve_fn, source, info, **args)
5
File "/usr/local/lib/python3.5/dist-packages/graphql/execution/executors/sync.py", line 7, in execute
6
return fn(*args, **kwargs)
7
TypeError: resolve_hello() missing 2 required positional arguments: 'context' and 'info'
8
Traceback (most recent call last):
9
File "/usr/local/lib/python3.5/dist-packages/graphql/execution/executor.py", line 330, in complete_value_catching_error
10
exe_context, return_type, field_asts, info, result)
11
File "/usr/local/lib/python3.5/dist-packages/graphql/execution/executor.py", line 383, in complete_value
12
raise GraphQLLocatedError(field_asts, original_error=result)
13
graphql.error.located_error.GraphQLLocatedError: resolve_hello() missing 2 required positional arguments: 'context' and 'info'
14
None
15
Please, help me resolve the issue.
Advertisement
Answer
You are not giving much information here, maybe the code that triggers the error would be helpful, but googling I found some related posts
https://github.com/graphql-python/graphene/issues/601
https://github.com/graphql-python/graphene-django/issues/282
Maybe check the versions that you are using as they mention on the first link