I am having an issue when using the mutation_jwt_required
decorator, when taking in the mutate function of graphene.Mutation class as the callback function.
It's possibly something to do with cls
being invoked to call AuthInfoField. Could it be the case that this needs to be omitted and be similar to how the query_jwt_required decorator handles an exception?
Traceback (most recent call last):
File "/opt/pattoo-daemon/.python/flask_graphql_auth/decorators.py", line 199, in wrapper
verify_jwt_in_argument(token)
File "/opt/pattoo-daemon/.python/flask_graphql_auth/decorators.py", line 66, in verify_jwt_in_argument
jwt_data = get_jwt_data(token, "access")
File "/opt/pattoo-daemon/.python/flask_graphql_auth/decorators.py", line 44, in get_jwt_data
jwt_data = decode_jwt(
File "/opt/pattoo-daemon/.python/flask_graphql_auth/decorators.py", line 21, in decode_jwt
data = jwt.decode(encoded_token, secret, algorithms=[algorithm])
File "/opt/pattoo-daemon/.python/jwt/api_jwt.py", line 104, in decode
self._validate_claims(payload, merged_options, **kwargs)
File "/opt/pattoo-daemon/.python/jwt/api_jwt.py", line 134, in _validate_claims
self._validate_exp(payload, now, leeway)
File "/opt/pattoo-daemon/.python/jwt/api_jwt.py", line 175, in _validate_exp
raise ExpiredSignatureError('Signature has expired')
jwt.exceptions.ExpiredSignatureError: Signature has expired
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/pattoo-daemon/.python/graphql/execution/executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "/opt/pattoo-daemon/.python/graphql/execution/executors/sync.py", line 16, in execute
return fn(*args, **kwargs)
File "/opt/pattoo-daemon/.python/flask_graphql_auth/decorators.py", line 201, in wrapper
return cls(AuthInfoField(message=str(e)))
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "/opt/pattoo-daemon/.python/graphql/execution/executor.py", line 452, in resolve_or_error
return executor.execute(resolve_fn, source, info, **args)
File "/opt/pattoo-daemon/.python/graphql/execution/executors/sync.py", line 16, in execute
return fn(*args, **kwargs)
File "/opt/pattoo-daemon/.python/flask_graphql_auth/decorators.py", line 201, in wrapper
return cls(AuthInfoField(message=str(e)))
graphql.error.located_error.GraphQLLocatedError: 'NoneType' object is not callable