{"action":"created","issue":{"url":"https://api.github.com/repos/postgraphql/postgraphql/issues/47","repository_url":"https://api.github.com/repos/postgraphql/postgraphql","labels_url":"https://api.github.com/repos/postgraphql/postgraphql/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/postgraphql/postgraphql/issues/47/comments","events_url":"https://api.github.com/repos/postgraphql/postgraphql/issues/47/events","html_url":"https://github.com/postgraphql/postgraphql/issues/47","id":154236740,"number":47,"title":"List query filter improvements","user":{"login":"artem-barmin","id":11332147,"avatar_url":"https://avatars2.githubusercontent.com/u/11332147?v=4","gravatar_id":"","url":"https://api.github.com/users/artem-barmin","html_url":"https://github.com/artem-barmin","followers_url":"https://api.github.com/users/artem-barmin/followers","following_url":"https://api.github.com/users/artem-barmin/following{/other_user}","gists_url":"https://api.github.com/users/artem-barmin/gists{/gist_id}","starred_url":"https://api.github.com/users/artem-barmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artem-barmin/subscriptions","organizations_url":"https://api.github.com/users/artem-barmin/orgs","repos_url":"https://api.github.com/users/artem-barmin/repos","events_url":"https://api.github.com/users/artem-barmin/events{/privacy}","received_events_url":"https://api.github.com/users/artem-barmin/received_events","type":"User","site_admin":false},"labels":[{"id":388983813,"url":"https://api.github.com/repos/postgraphql/postgraphql/labels/enhancement","name":"enhancement","color":"c5def5","default":true},{"id":408989078,"url":"https://api.github.com/repos/postgraphql/postgraphql/labels/pr-wanted","name":"pr-wanted","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-05-11T12:56:20Z","updated_at":"2017-08-18T12:58:24Z","closed_at":null,"body":"# Deprecation of existing list\n\nSome of my applications rely heavily on current implementation. I think removal should be done only after similar mechanism will be developed. Creating procedures for each entity is rather time consuming.\n# New filter syntax suggestion:\n\nOne of the possible solutions is to use Mongo like syntax [http://rest-layer.io/#filtering](http://rest-layer.io/#filtering)\n\n```\nuserNodes(filters:UserFilters,order:UserOrdering,pagination:Pagination)\n\nUserFilters\n{\n  login: StringFilters\n  email: StringFilters\n  birthdate: DateFilters\n}\n\nStringFilters\n{\n eq: String\n like: String\n regex: String\n}\n\nDateFilters\n{\n gt: Date\n ge: Date\n between: [Date,Date]\n}\n```\n\nEach Filter can also be a union type:\n\n```\nStringFilters = String | StringFiltersExtended\n\nStringFiltersExtended\n{\n eq: String\n like: String\n regex: String\n}\n```\n\nBy default equality filters is performed. That allow keep compatibility with previous syntax(in case if all fields will be listed in query itself)\n\nIn this way we will be able to support specific operators for different types. Otherwise this can be parametrized type with (eq,gt,ge,le,etc..) operators \n"},"comment":{"url":"https://api.github.com/repos/postgraphql/postgraphql/issues/comments/323346583","html_url":"https://github.com/postgraphql/postgraphql/issues/47#issuecomment-323346583","issue_url":"https://api.github.com/repos/postgraphql/postgraphql/issues/47","id":323346583,"user":{"login":"benjie","id":129910,"avatar_url":"https://avatars2.githubusercontent.com/u/129910?v=4","gravatar_id":"","url":"https://api.github.com/users/benjie","html_url":"https://github.com/benjie","followers_url":"https://api.github.com/users/benjie/followers","following_url":"https://api.github.com/users/benjie/following{/other_user}","gists_url":"https://api.github.com/users/benjie/gists{/gist_id}","starred_url":"https://api.github.com/users/benjie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjie/subscriptions","organizations_url":"https://api.github.com/users/benjie/orgs","repos_url":"https://api.github.com/users/benjie/repos","events_url":"https://api.github.com/users/benjie/events{/privacy}","received_events_url":"https://api.github.com/users/benjie/received_events","type":"User","site_admin":false},"created_at":"2017-08-18T12:58:24Z","updated_at":"2017-08-18T12:58:24Z","body":"(Just added `not: MyTableCondition` to the above example, may be able to drop a few fields due to that (e.g. `nin: [1,2]` could become `not: {in: [1,2]}`).)\r\n\r\nThanks @mattbretl :)\r\n\r\nI think our solutions are broadly similar. I also agree we should probably go with the longer names @mattbretl suggest because clarity > brevity.\r\n\r\nTo be clear: I am not writing any code for this right now. I might in future, but if someone else wants to step up please do. I'd recommend doing it as an additional arg (e.g. `allFooBars(condition2: FooBarCondition2)`, but probably better named such as 'filter' or whatever) so it can be used side-by-side with the existing implementation to aid migrating."}}
{"actor":{"display_login":"benjie"}}