Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

GraphQL Schema Memory for AI Coding Agents: Building a GraphQL SDL Connector for Cognee

Описание и применение

Подключение SDL GraphQL в Cognee позволяет ИИ‑агентам получать точные схемы API, уменьшая ошибки при генерации запросов.

Задача

AI coding agents often generate GraphQL queries that reference nonexistent fields or incorrect argument names, leading to validation failures and wasted effort.

Результат

Ingesting GraphQL SDL into Cognee allows AI agents to access accurate schema definitions, reducing hallucinations and improving the correctness of generated queries and mutations.

Рабочий процесс

  • Install cognee and cognee-community-connector-graphql via pip
  • Place schema.graphql and a Python script in the same directory
  • Create index_schema.py that imports cognee and the connector
  • Use the connector to parse the SDL and ingest entities into Cognee
  • Query Cognee with natural language to retrieve relevant schema parts
  • Provide retrieved schema context to the AI coding agent before query generation

Доказательства

GraphQL schema hallucination

Источник

The goal is to make GraphQL Schema Definition Language (SDL) files accessible through Cognee's knowledge and retrieval workflow

Источник

Install Dependencies pip install cognee cognee-community-connector-graphql

Источник

  • Дата записи: 2026-10-26T08:26:08.441Z