mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-13 10:00:39 +03:00
Added context to sqlalchemy connectionfield
This commit is contained in:
parent
83c2cb1b27
commit
5a949ce209
|
@ -21,11 +21,11 @@ class SQLAlchemyConnectionField(ConnectionField):
|
||||||
def model(self):
|
def model(self):
|
||||||
return self.type._meta.model
|
return self.type._meta.model
|
||||||
|
|
||||||
def from_list(self, connection_type, resolved, args, info):
|
def from_list(self, connection_type, resolved, args, context, info):
|
||||||
if resolved is DefaultQuery:
|
if resolved is DefaultQuery:
|
||||||
resolved = get_query(self.model, info)
|
resolved = get_query(self.model, info)
|
||||||
query = maybe_query(resolved)
|
query = maybe_query(resolved)
|
||||||
return super(SQLAlchemyConnectionField, self).from_list(connection_type, query, args, info)
|
return super(SQLAlchemyConnectionField, self).from_list(connection_type, query, args, context, info)
|
||||||
|
|
||||||
|
|
||||||
class ConnectionOrListField(Field):
|
class ConnectionOrListField(Field):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user