Closed cargan closed 5 years ago
Hi, I think it's mistake of Flask-GraphQL module whats has strange graphene context. It's request object (why? 🙄). Main guide says that the context is of type dict. Also aiohttp-graphql has the correct context type.
I fixed that in a new version in any case.
Thanks, that was quick!
Hi, I am getting this error with
FilterableConnectionField
, however with originalSQLAlchemyConnectionField
it works. I have tried with my own model as well as with dummy User model used in the example. Using Flask.An error occurred while resolving field Query.allPreds Traceback (most recent call last): File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphql/execution/executor.py", line 450, in resolve_or_error return executor.execute(resolve_fn, source, info, args) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphql/execution/executors/sync.py", line 16, in execute return fn(*args, kwargs) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy/fields.py", line 74, in connection_resolver return on_resolve(resolved) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy/fields.py", line 47, in resolve_connection resolved = cls.get_query(model, info, args) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy_filter/connection_field.py", line 32, in get_query query = filter_set.filter(info, query, request_filters) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy_filter/filters.py", line 446, in filter info.context[cls._filter_aliases] = {} File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/werkzeug/local.py", line 351, in setitem self._get_current_object()[key] = value TypeError: 'Request' object does not support item assignment Traceback (most recent call last): File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphql/execution/executor.py", line 450, in resolve_or_error return executor.execute(resolve_fn, source, info, *args) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphql/execution/executors/sync.py", line 16, in execute return fn(args, kwargs) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy/fields.py", line 74, in connection_resolver return on_resolve(resolved) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy/fields.py", line 47, in resolve_connection resolved = cls.get_query(model, info, **args) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy_filter/connection_field.py", line 32, in get_query query = filter_set.filter(info, query, request_filters) File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/graphene_sqlalchemy_filter/filters.py", line 446, in filter info.context[cls._filter_aliases] = {} File "/home/datas/predictions-api/venv/lib/python3.6/site-packages/werkzeug/local.py", line 351, in setitem self._get_current_object()[key] = value graphql.error.located_error.GraphQLLocatedError: 'Request' object does not support item assignment
query
{ allPreds (filters:{shopId: 134}) { edges { node { id } } } }