Skip to content

328 graphql utilizing dynamic models#817

Draft
mryoho wants to merge 5 commits intoLIF-Initiative:mainfrom
mryoho:328-graphql-utilizing-dynamic-models
Draft

328 graphql utilizing dynamic models#817
mryoho wants to merge 5 commits intoLIF-Initiative:mainfrom
mryoho:328-graphql-utilizing-dynamic-models

Conversation

@mryoho
Copy link
Contributor

@mryoho mryoho commented Jan 28, 2026

This builds on top of the PR I submitted a few days ago, but while that one is basically ready to merge, this one still needs work to get it functioning correctly.

Context

The LIF code as of October/November 2025 parsed the openapi LIF schema using separate code for the graphql api and for the mcp-related semantic search components. A&M did some work to centralize that logic. With the work in this PR, I was trying to pull that centralized schema parsing and dynamic model generation into the LIF code base, but also decompose it into better atomic components that fit with our polylith architecture.

The work in this PR

The work in this PR is to use the dynamic_models component from the abovementioned PR and use it to generate the schema for the LIF graphql API. The work here adds a new graphql polylith component that utilizes the schema and dynamic_models schemas in the other pull request. It also adds an openapi_schema component for the parts that are specific to openapi. Further, since I needed some new utility functions that could be shared in the code base, I added a new utils component, with the intention of folding in and deleting the current string_utils component.

The api_graphql base was then modified to utilize these new components.

There are unit tests in place (mostly copilot generated), but this code is not yet working. As I mentioned above, I think whoever were to finish this work would need to go deep on understanding how the proof of concept code worked to try to figure out the errors that are being thrown.

The proof of concept code primarily comes from this file: https://github.com/bjagg/lif_ai_components/blob/main/lif_server/lif_graphql_server.py

Next steps beyond this PR

As I mentioned above, the centralized dynamic_models component should not only be used for the graphql component, but should also be used in our semantic_search_service. I believe the proof of concept file that should be adapted for that is this one

For posterity

As a reminder, an overview of the code that should still be integrated from the A&M proof of concept can be found in this spreadsheet: https://docs.google.com/spreadsheets/d/1NOAAZaEGcc1BbylRxyCz5fxfl8CBljiDZY0a7gLzwiE/edit?gid=0#gid=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant