info contain slugs only
This commit is contained in:
parent
dc2f62d300
commit
50d2845c23
|
@ -32,11 +32,12 @@ nginx -s reload
|
|||
|
||||
poetry install
|
||||
poetry run python server.py
|
||||
poetry run python server.py inbox
|
||||
```
|
||||
|
||||
## Data prepare
|
||||
|
||||
Notice: you need db.sqlite3 file in your root folder or you have to migrate some data to see.
|
||||
Also, you'll need to migrate some data
|
||||
|
||||
```
|
||||
poetry run python migrate.py all
|
||||
|
|
|
@ -25,7 +25,7 @@ def _get_user_subscribed_topic_slugs(slug):
|
|||
|
||||
def _get_user_subscribed_authors(slug):
|
||||
with local_session() as session:
|
||||
authors = session.query(User).\
|
||||
authors = session.query(User.slug).\
|
||||
join(AuthorSubscription, User.slug == AuthorSubscription.author).\
|
||||
where(AuthorSubscription.subscriber == slug)
|
||||
return authors
|
||||
|
|
|
@ -9,7 +9,7 @@ type Result {
|
|||
type CurrentUserInfo {
|
||||
totalUnreadMessages: Int
|
||||
userSubscribedTopics: [String]!
|
||||
userSubscribedAuthors : [User]!
|
||||
userSubscribedAuthors: [String]!
|
||||
userSubscribedCommunities: [String]!
|
||||
}
|
||||
|
||||
|
@ -135,8 +135,8 @@ type Mutation {
|
|||
updateCommunity(community: CommunityInput!): Community!
|
||||
deleteCommunity(id: Int!): Result!
|
||||
|
||||
subscribe(subscription : SubscriptionType!, slug: String!): Result!
|
||||
unsubscribe(subscription : SubscriptionType!, slug: String!): Result!
|
||||
subscribe(what: SubscriptionType!, slug: String!): Result!
|
||||
unsubscribe(what: SubscriptionType!, slug: String!): Result!
|
||||
}
|
||||
|
||||
################################### Query
|
||||
|
|
Loading…
Reference in New Issue
Block a user