cboulanger/bibliograph

Thoughts on rewriting the search function

Opened this issue · 0 comments

The current implementation of executing queries is a highly confusing patchwork of ad-hoc solutions. A new implementation should be built on standards.

One idea could be the following steps of parsing and translating the query

Client: 

String query 
-> GraphQL query  (to determine how the response model should look like)
-> JSON for transport

Server:  
JSON 
|  |--> actual query --> NLQ parser --> CQL parser --> SQL "where"
|                                                           |
|                                                           V
|--> GraphQL Parser --->SQL "select" ------------------> SQL query ----> JSON 

Integrating a GraphQL server in the yii2 backend would probably be a first step

Resources

https://graphql.org/
https://code.facebook.com/posts/1691455094417024
https://scaphold.io/community/blog/querying-relational-data-with-graphql/
https://medium.com/codingthesmartway-com-blog/rest-vs-graphql-418eac2e3083
https://github.com/stems/join-monster
https://github.com/chentsulin/awesome-graphql
https://webonyx.github.io/graphql-php/
https://github.com/tsingsun/yii2-graphql