328 graphql utilizing dynamic models#817
Draft
mryoho wants to merge 5 commits intoLIF-Initiative:mainfrom
Draft
Conversation
added 5 commits
January 26, 2026 13:07
…phql, openapi_schema, and utils polylith components.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_modelscomponent from the abovementioned PR and use it to generate the schema for the LIF graphql API. The work here adds a newgraphqlpolylith component that utilizes theschemaanddynamic_modelsschemas in the other pull request. It also adds anopenapi_schemacomponent 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 newutilscomponent, with the intention of folding in and deleting the currentstring_utilscomponent.The
api_graphqlbase 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_modelscomponent should not only be used for the graphql component, but should also be used in oursemantic_search_service. I believe the proof of concept file that should be adapted for that is this oneFor 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