simonw / datasette

An open source multi-tool for exploring and publishing data
https://datasette.io
Apache License 2.0
9.22k stars 660 forks source link

Add GraphQL endpoint #176

Open yozlet opened 6 years ago

yozlet commented 6 years ago

Would make it much easier to build React & similar frontends. Maybe with https://github.com/graphql-python/sanic-graphql ?

wulfmann commented 6 years ago

This project probably would not be the place for that. This is a layer for sqllite specifically. It solves a similar problem as graphql, so adding that here wouldn't make sense.

Here's an example i found from google that uses micro to run a graphql microservice. you'd just then need to connect your db. https://github.com/timneutkens/micro-graphql

yozlet commented 6 years ago

@wulfmann I think I disagree, except I'm not entirely sure what you mean by that first paragraph. The JSON API that Datasette currently exposes is quite different to GraphQL.

Furthermore, there's no "just" about connecting micro-graphql to a DB; at least, no more "just" than adding any other API. You still need to configure the schema, which is exactly the kind of thing that Datasette does for JSON API. This is why I think that GraphQL's a good fit here.

wulfmann commented 6 years ago

@yozlet Yes I think that I was confused when I posted my original comment. I see your main point now and am in agreement.

gijs commented 6 years ago

👍 I'd like this too!

wuhland commented 6 years ago

great idea!

eads commented 5 years ago

I'd like this as well. It would let me access Datasette-driven projects from GatsbyJS the same way I can access Postgres DBs via Hasura. While I don't see SQLite replacing Postgres for the 50m row datasets I sometimes have to work with, there's a whole class of smaller datasets that are great with Datasette but currently would find another option.

eads commented 4 years ago

👋 I'd be interested in building this out in Q1 or Q2 of 2020 if nobody has tackled it by then. I would love to integrate Datasette into @thechicagoreporter's practice, but we're also fully committed to GraphQL moving forward.

nkirsch commented 4 years ago

@eads I'm interested in helping, if there's still a need...