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 integration #501

Open
rafaparadela opened this issue Oct 19, 2023 · 0 comments
Open

GraphQL integration #501

rafaparadela opened this issue Oct 19, 2023 · 0 comments

Comments

@rafaparadela
Copy link
Contributor

We are interested in creating a new module to integrate GraphQL as another data source. Some requirements:

Tabular data model (Created in the ticket #500)

  • Define a data model to represent tabular query results very generically.
    • No matter the nature of the query, the result should be expressed in terms of this new model.
    • It should contain a list of columns with name and type
    • It should contain a list of rows where each row matches the columns' specifications.

GraphQL Interaction

  • Expose an operation that receives a query in string format, performs it, and returns the result in the tabular format mentioned above.
  • Uses Apollo Kotlin to instantiate the GraphQL clients.

LLM Interaction

  • Expose an operation that receives these arguments:

    • GraphQL endpoint
    • Existing conversation
    • Involved Schema in SDL format (with models, aggregations, connections, queries, etc) (a string) including the descriptions of the nature of some fields to provide more context. Like the possible values if they are enumerations, etc (a string)
    • The user input
  • And performs:

    • Inject the relevant schema and description of the fields in a new Prompt
    • Run the call to the LLM to infer the output.
  • And finally returns an object that includes:

    • The GraphQL query that satisfies the input
    • A friendly response for the user (with wildcards like XXX to replace the final values in the response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant