ukwa / ukwa-access-api

An application to wrap up APIs for accessing UKWA content.
Apache License 2.0
1 stars 2 forks source link

Expose search as GraphQL API #12

Open anjackson opened 3 years ago

anjackson commented 3 years ago

The SearchKit toolkit has been refactored use a GraphQL API which gives me an idea.

Rather than coding directly against the Solr API, we could use the same conventions as SearchKit and expose a compatible GraphQL API.

There's good support for that kind of thing, eg https://graphene-python.org which can be integrated with Flask.

We could even using the solr-sqlalchemy adapter and do something like https://medium.com/swlh/python-flask-with-graphql-server-with-sqlalchemy-and-graphene-and-sqlite-ac9fcc9d3d83 but two APIs might be overkill!