Closed
Description
- What is the current behavior?
- In graphene-django 3.0.0b8
class Query(ObjectType):
me = graphene.Field(UserNode)
def resolve_me(root, info):
if user.is_anonymous or not user.is_active:
raise GraphQLError("Unauthenticated.")
return user
If I send the query without logging in, I get
"Received incompatible instance "<Promise at 0x7ff118d710b1 rejected with GraphQLError('Unauthenticated.')>"."
However, in 3.0.0b7, if I send the same query without logging in, I get
"Unauthenticated." (And this is the behavior I expected.)
-
Please tell us about your environment:
- Version: graphene-django==3.0.0b8 graphql-core==3.1.7 graphql-relay==3.1.1
- Platform: Ubuntu