Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thoughts on rewriting the search function #195

Open
cboulanger opened this issue Jun 4, 2018 · 0 comments
Open

Thoughts on rewriting the search function #195

cboulanger opened this issue Jun 4, 2018 · 0 comments
Labels
type:idea Idea for discussion, not ready for implementation

Comments

@cboulanger
Copy link
Owner

cboulanger commented Jun 4, 2018

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

@cboulanger cboulanger added the type:idea Idea for discussion, not ready for implementation label Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:idea Idea for discussion, not ready for implementation
Projects
None yet
Development

No branches or pull requests

1 participant