mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-11 12:16:58 +03:00
Allow empty list in SQLAlchemyConnectionField.
Custom resolve()'s empty list return value should take precedence over SQLAlchemyConnectionField default query.
This commit is contained in:
parent
70b6cbdf22
commit
653e67de97
|
@ -17,7 +17,7 @@ class SQLAlchemyConnectionField(ConnectionField):
|
|||
return self.type._meta.model
|
||||
|
||||
def get_query(self, resolved_query, args, info):
|
||||
return resolved_query or get_query(self.model, info)
|
||||
return resolved_query if resolved_query is not None else get_query(self.model, info)
|
||||
|
||||
def from_list(self, connection_type, resolved, args, info):
|
||||
query = self.get_query(resolved, args, info)
|
||||
|
|
Loading…
Reference in New Issue
Block a user