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

GraphQL connector #561

Closed
chaffeqa opened this issue May 22, 2024 · 3 comments
Closed

GraphQL connector #561

chaffeqa opened this issue May 22, 2024 · 3 comments

Comments

@chaffeqa
Copy link

I apologize, I haven't looked closely at how tied to SQL wrenai is, but when I read about it I immediately thought a GraphQL data source may be a good target:

  • already has connections defined
  • simpler than SQL query language
  • similar "column" primitives

Thought I'd at least ask

@goldmedal
Copy link
Collaborator

Interesting, it's a cool idea. Thanks @chaffeqa
I think there're some challenge to support a GraphQL data source:

  • WrenAI convert the text to a SQL, then submit it to the engine.
  • Wren engine is a semantic layer engine based on the AST tree analysis. We haven't explain more in this part. I just explain roughly in the discord discussion. We will have more post for it soon.
  • The main challenge is how to cover SQL to GraphQL. I'm not so familiar with GraphQL. I'm not sure whether it's easy or not. The flow may be
text -> wren sql -> modeling sql -> graphQL -> data source

That's I can think currently.

@chaffeqa
Copy link
Author

Yeah after diving in, I realized that WrenAI is very much tied to SQL conversion. I was hoping maybe there was some separation between the sql -> data source that would allow other sources other than SQL. GraphQL is basically a standardized "graph" of data, which already does the mapping from the "data engine" (SQL, mongo, external API, ect) into a graph that is query-able via JSON API.

To be clear: I don't think that is something Wren should try to support. Maybe down the road some of the logic could be extracted to another "engine" that could do that, but I'd bet that would be a bunch of work that isn't really in scope.

Thanks for the info!

@goldmedal
Copy link
Collaborator

Thanks @chaffeqa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants