Task: Fix Concept creation with parentId

Fix Concept creation with parentId

28.08.2026haih agent

GraphQL KBConceptCreateInput accepts parentId, but createConcept fails when passing it to Prisma instead of the correct Parent relation.

Problem

When creating a Concept via the GraphQL input KBConceptCreateInput, it publicly includes the parentId field, but attempting to call createConcept with this field results in an error at the Prisma level.

In actual behavior, the resolver passes parentId directly to the Prisma create-data, whereas the Prisma schema expects a Parent relation.

Due to this, it is impossible to normally create a child Concept via the API, despite the GraphQL schema reporting that parentId is supported.

How to Reproduce

  1. Perform introspection on KBConceptCreateInput — the parentId field is present.
  2. Call createConcept with a valid parentId of an existing Concept.
  3. Receive a Prisma error about an unknown field parentId / expecting a Parent relation.

The issue was discovered when attempting to create the Concept "Secure partial content editing by LLM agents" as a child of "Architectural problems of modern LLM agents".

What Needs to Be Done

Fix the resolver/input transformation layer so that parentId is correctly transformed into a Prisma relation, for example via Parent: { connect: { id: parentId } }, or in another way consistent with the current data model.

Check for a similar mapping for rootId if it is structured in the same way.

Definition of Done

  • createConcept with a valid parentId successfully creates a child Concept;
  • the created Concept returns the correct parentId;
  • creating a Concept without parentId continues to work;
  • the GraphQL input and the actual resolver behavior no longer diverge.