{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-python/graphene-sqlalchemy/issues/110","repository_url":"https://api.github.com/repos/graphql-python/graphene-sqlalchemy","labels_url":"https://api.github.com/repos/graphql-python/graphene-sqlalchemy/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/graphql-python/graphene-sqlalchemy/issues/110/comments","events_url":"https://api.github.com/repos/graphql-python/graphene-sqlalchemy/issues/110/events","html_url":"https://github.com/graphql-python/graphene-sqlalchemy/issues/110","id":293284817,"number":110,"title":"How to filter the child of the main query?","user":{"login":"aleks-fr","id":11881389,"avatar_url":"https://avatars0.githubusercontent.com/u/11881389?v=4","gravatar_id":"","url":"https://api.github.com/users/aleks-fr","html_url":"https://github.com/aleks-fr","followers_url":"https://api.github.com/users/aleks-fr/followers","following_url":"https://api.github.com/users/aleks-fr/following{/other_user}","gists_url":"https://api.github.com/users/aleks-fr/gists{/gist_id}","starred_url":"https://api.github.com/users/aleks-fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleks-fr/subscriptions","organizations_url":"https://api.github.com/users/aleks-fr/orgs","repos_url":"https://api.github.com/users/aleks-fr/repos","events_url":"https://api.github.com/users/aleks-fr/events{/privacy}","received_events_url":"https://api.github.com/users/aleks-fr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-31T19:36:52Z","updated_at":"2018-02-22T09:39:28Z","closed_at":null,"author_association":"NONE","body":"I'm a relative newcomer to Graphene, I'm trying to make a query like this\r\nQuery example\r\n```\r\n{\r\n   user(username: \"Jon\") { \r\n     name\r\n     last_lame\r\n     username\r\n     posts(in_draft : true) { \r\n       title\r\n       text\r\n       in_draft\r\n       update_at      \r\n     }\r\n   }\r\n}\r\n```\r\nFilter the posts that are in draft. Is this possible?\r\n\r\nQuery:\r\n```\r\nclass Query(graphene.ObjectType):\r\n\r\n    user = graphene.Field(lambda: User, username=graphene.String())\r\n    def resolve_user(self, info, username):\r\n       query = User.get_query(info)\r\n       return query.filter(UserModel.username == username).first()\r\n\r\n\r\n   posts = graphene.List(lambda: Post, in_draft=graphene.Boolean())\r\n   def resolve_posts(self, info, in_draft):\r\n      query = Post.get_query(info)\r\n      return query.filter(PostModel.in_draft == in_draft).all()\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/graphql-python/graphene-sqlalchemy/issues/comments/367622755","html_url":"https://github.com/graphql-python/graphene-sqlalchemy/issues/110#issuecomment-367622755","issue_url":"https://api.github.com/repos/graphql-python/graphene-sqlalchemy/issues/110","id":367622755,"user":{"login":"AdiFahmi","id":12567342,"avatar_url":"https://avatars2.githubusercontent.com/u/12567342?v=4","gravatar_id":"","url":"https://api.github.com/users/AdiFahmi","html_url":"https://github.com/AdiFahmi","followers_url":"https://api.github.com/users/AdiFahmi/followers","following_url":"https://api.github.com/users/AdiFahmi/following{/other_user}","gists_url":"https://api.github.com/users/AdiFahmi/gists{/gist_id}","starred_url":"https://api.github.com/users/AdiFahmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdiFahmi/subscriptions","organizations_url":"https://api.github.com/users/AdiFahmi/orgs","repos_url":"https://api.github.com/users/AdiFahmi/repos","events_url":"https://api.github.com/users/AdiFahmi/events{/privacy}","received_events_url":"https://api.github.com/users/AdiFahmi/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T09:39:28Z","updated_at":"2018-02-22T09:39:28Z","author_association":"NONE","body":"Hi, any update on this?\r\nI also need to achieve same thing"}}
{"actor":{"display_login":"AdiFahmi"}}