Skip to content

Commit 445b9d9

Browse files
committed
Modified README to reflect adding app_text in subscription resolver
Necessary for flask-sqlalchemy versions > 2.1
1 parent 7a73f11 commit 445b9d9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,9 @@ class Subscription(graphene.ObjectType):
161161
# mutation oject that was published will be passed as
162162
# root_value of subscription
163163
def resolve_users(self, args, context, info):
164-
query = User.get_query(context)
165-
return query.filter_by(id=info.root_value.get('id'))
164+
with app.app_context():
165+
query = User.get_query(context)
166+
return query.filter_by(id=info.root_value.get('id'))
166167
```
167168

168169
#### Client (using Apollo Client library):

0 commit comments

Comments
 (0)