{"html_url": "https://github.com/simonw/datasette/issues/915#issuecomment-671073223", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/915", "id": 671073223, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTA3MzIyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-09T16:35:20Z", "updated_at": "2020-08-09T16:36:10Z", "author_association": "OWNER", "body": "`datasette-graphql` uses the logic from `TableView` right now. It wasn't too unpleasant, but I do worry about the two of them being coupled together in this way.\r\n\r\nhttps://github.com/simonw/datasette-graphql/blob/cc65ec294b0bf8e26213fc68bb5487066de9caab/datasette_graphql/utils.py#L412-L417\r\n\r\n```python\r\n request = Request.fake(path_with_query_string)\r\n\r\n view = TableView(DatasetteSpecialConfig(datasette))\r\n data, _, _ = await view.data(\r\n request, database=database_name, hash=None, table=table_name, _next=after\r\n )\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671763164, "label": "Refactor TableView class so things like datasette-graphql can reuse the logic"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/915#issuecomment-675746544", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/915", "id": 675746544, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc0NjU0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:14:41Z", "updated_at": "2020-08-18T22:14:41Z", "author_association": "OWNER", "body": "I'm actually pretty happy with how `datasette-graphql` works now - maybe the trick here is to redesign the JSON format in #782 such that it can be used as a documented interface by things like `datasette-graphql` and then ensure Datasette has a documented mechanism for dispatching internal requests.\r\n\r\nI just did a horrible hack here that simulates an internal request, so supporting them as a feature would definitely make sense: https://github.com/natbat/tidepools_near_me/commit/ec102c6da5a5d86f17628740d90b6365b671b5e1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671763164, "label": "Refactor TableView class so things like datasette-graphql can reuse the logic"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/915#issuecomment-675751136", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/915", "id": 675751136, "node_id": "MDEyOklzc3VlQ29tbWVudDY3NTc1MTEzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-18T22:28:36Z", "updated_at": "2020-08-18T22:28:36Z", "author_association": "OWNER", "body": "I'm closing this in favour of an internal requests mechanism in #943.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 671763164, "label": "Refactor TableView class so things like datasette-graphql can reuse the logic"}, "performed_via_github_app": null}