Skip to content

Comments

328 graphql utilizing dynamic models#817

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

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

@bjagg
Copy link
Contributor

bjagg commented Feb 20, 2026

Closing this PR — it builds on #813 (also closed) and the existing openapi_to_graphql component (fixed in PR #863) already covers the GraphQL schema generation pipeline.

Key reasons:

  • Self-described as non-functional ("this one still needs work to get it functioning correctly")
  • Removes API key authentication — a security regression from the current codebase
  • Mutations commented out — only queries work in the new build_schema()
  • Silent MDR fallback contradicts the project's documented "fail loudly" schema loading policy
  • ~200 lines of dead code (build_schema_old()), unused modules (type_registry.py, utils/strings.py), stray print() statements

The existing pipeline (openapi_to_graphql + mdr_client + LIFSchemaConfig) handles all of this. Useful patterns (Backend protocol, selection path extraction) are noted in the triage doc for future reference.

See docs/proposals/contractor-pr-triage.md for the full assessment.

@bjagg bjagg closed this Feb 20, 2026
@github-project-automation github-project-automation bot moved this from Backlog to Done in Current Community Efforts Feb 20, 2026
bjagg added a commit to bjagg/lif-core that referenced this pull request Feb 20, 2026
…ng_utils tests

Cherry-picked from contractor PRs LIF-Initiative#813/LIF-Initiative#817 (now closed):
- safe_identifier: collapse consecutive underscores produced by CamelCase
  boundary splitting combined with special characters
- Replace placeholder test with 19 real tests covering all string_utils functions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants