home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1385807684

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/262#issuecomment-1385807684 https://api.github.com/repos/simonw/datasette/issues/262 1385807684 IC_kwDOBm6k_c5Smb9E 9599 2023-01-17T17:51:54Z 2023-01-19T23:20:59Z OWNER

In most cases, the ?_extra=xxx name exactly corresponds to the additional key that is added to the JSON.

?_facet=... is one example of a query string argument that causes an extra key - "facet_results" - to be added to the JSON even though it wasn't requested by name in a ?_extra=.

Am I OK with that? I think so.

Related issue: - #1558

Actually there's an edge-case here that's worth considering: it's possible to use metadata to set default facets for a table. If you do this for a table, then .json for that table will always calculate and return those facets - which may be an expensive and unnecessary operation.

So maybe we don't include facet_results in the JSON unless explicitly asked for in that case, but have a rule that ?_facet implies ?_extra=facet_results.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
323658641  
Powered by Datasette · Queries took 1.058ms · About: github-to-sqlite