{"id":41999375,"url":"https://github.com/hyperwindmill/morphql","last_synced_at":"2026-05-27T00:02:03.395Z","repository":{"id":333274886,"uuid":"1135324389","full_name":"Hyperwindmill/morphql","owner":"Hyperwindmill","description":"Transform data with queries","archived":false,"fork":false,"pushed_at":"2026-05-26T22:31:41.000Z","size":5279,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-26T23:22:39.194Z","etag":null,"topics":["cli","csv","edi","edifact","etl","json","openapi","plaintext","server","swagger","transformation","xml"],"latest_commit_sha":null,"homepage":"https://hyperwindmill.github.io/morphql/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hyperwindmill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-16T00:08:24.000Z","updated_at":"2026-05-26T22:31:50.000Z","dependencies_parsed_at":"2026-02-28T03:04:41.255Z","dependency_job_id":null,"html_url":"https://github.com/Hyperwindmill/morphql","commit_stats":null,"previous_names":["hyperwindmill/query-morph","hyperwindmill/morphql"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/Hyperwindmill/morphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyperwindmill%2Fmorphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyperwindmill%2Fmorphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyperwindmill%2Fmorphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyperwindmill%2Fmorphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hyperwindmill","download_url":"https://codeload.github.com/Hyperwindmill/morphql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyperwindmill%2Fmorphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33543973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","csv","edi","edifact","etl","json","openapi","plaintext","server","swagger","transformation","xml"],"created_at":"2026-01-26T01:13:54.860Z","updated_at":"2026-05-27T00:02:03.386Z","avatar_url":"https://github.com/Hyperwindmill.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./morphql.png\" alt=\"MorphQL\" width=\"400\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Hyperwindmill/morphql/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/Hyperwindmill/morphql/ci.yml?label=CI\u0026logo=github\" alt=\"CI\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@morphql/core\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@morphql/core?label=%40morphql%2Fcore\" alt=\"npm core version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@morphql/cli\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@morphql/cli?label=%40morphql%2Fcli\" alt=\"npm cli version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@morphql/server\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@morphql/server?label=%40morphql%2Fserver\" alt=\"npm server version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/morphql/morphql\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/morphql/morphql?label=morphql-php\" alt=\"Packagist version\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dm/@morphql/core?label=downloads\" alt=\"npm downloads\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TypeScript-5.9-blue?logo=typescript\u0026logoColor=white\" alt=\"TypeScript\" /\u003e\n  \u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eTransform Data with Declarative Queries\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  A high-performance engine that compiles transformation queries into optimized JavaScript functions.\n  \u003cbr /\u003e\n  \u003cstrong\u003eIsomorphic · Type-Safe · Fast\u003c/strong\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#the-problem\"\u003eThe Problem\u003c/a\u003e •\n  \u003ca href=\"#the-solution\"\u003eThe Solution\u003c/a\u003e •\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"https://hyperwindmill.github.io/morphql/\"\u003e\u003cstrong\u003eDOCUMENTATION\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## The Problem\n\nIn modern software development, data transformation is everywhere. Whether you're shaping API responses, processing ETL pipelines, or integrating third-party services, you inevitably face:\n\n- **Complex mapping logic** scattered across your codebase.\n- **Performance bottlenecks** when processing large datasets.\n- **Format juggling** between JSON, XML, CSV, UN/EDIFACT, Plaintext, and native Objects.\n- **Inconsistent transformations** across different microservices.\n- **Debugging nightmares** with deeply nested, imperative mapping code.\n\nAnd if you rely on AI or LLMs to generate transformations, the problems multiply: verbose JavaScript consumes tokens, and imperative loops create countless \"valid but wrong\" states for models to hallucinate.\n\n---\n\n## The Solution\n\n**MorphQL** (Morph Query Language) flips the script. Instead of writing _how_ to transform data, you declare _what_ you want.\n\n```morphql\nfrom json to json\ntransform\n  set fullName = firstName + \" \" + lastName\n  set isAdult = age \u003e= 18\n```\n\nThis declarative query is then **compiled into a specialized JavaScript function** that runs at native speed. Compile once, execute millions of times.\n\n### Why MorphQL?\n\n| Feature                | Benefit                                                                                       |\n| :--------------------- | :-------------------------------------------------------------------------------------------- |\n| **Declarative DSL**    | Write _what_ you want, not _how_ to loop and assign. Queries are self-documenting.            |\n| **Native Performance** | Queries compile to optimized JavaScript. No runtime interpretation overhead.                  |\n| **Format Agnostic**    | Built-in conversion across JSON, XML, CSV, EDIFACT, Plaintext, and Objects in a single query. |\n| **Centralized Logic**  | Keep transformation logic separate and portable.                                              |\n| **Inspectable Code**   | The generated code is readable JavaScript—debug it if needed.                                 |\n| **LLM Efficient**      | Constrained DSL reduces token cost and hallucinations compared to generating imperative JS.   |\n\n### What MorphQL is NOT\n\nTo set the right expectations:\n\n- **Not an iPaaS** — MorphQL doesn't manage connectors, orchestration, or SaaS integrations. It's a transformation engine, not a platform.\n- **Not low-code** — There's no drag-and-drop UI. You write queries in a DSL designed for developers.\n- **Not for business users** — This is a tool for engineers who need precise control over data shaping.\n\nIf you're looking for a point-and-click integration builder, this isn't it. If you need a fast, embeddable transformation engine you can control—keep reading.\n\n---\n\n## Quick Start\n\n### As a library\n\n```bash\nnpm install @morphql/core\n```\n\n```javascript\nimport { compile, morphQL } from \"@morphql/core\";\n\nconst engine = await compile(morphQL`\n  from object to json\n  transform\n    set greeting = \"Hello, \" + name + \"!\"\n    set isAdult = age \u003e= 18\n`);\n\nengine({ name: \"Alice\", age: 25 });\n// → '{\"greeting\":\"Hello, Alice!\",\"isAdult\":true}'\n```\n\n\u003e 💡 **Tip**: Use the `morphQL` tagged template for syntax highlighting in VSCode and JetBrains IDEs , download the extension from the [release page](https://github.com/hyperwindmill/morphql/releases).\n\n### From the command line\n\n```bash\nnpm install -g @morphql/cli\n```\n\n```bash\n# Inline transformation\necho '{\"name\":\"Alice\"}' | morphql -q \"from json to xml\"\n\n# File-to-file\nmorphql --from data.json --to output.xml -q \"from json to xml\"\n\n# Batch: process an entire directory\nmorphql batch -q \"from xml to json\" --in ./invoices/ --out ./converted/ --pattern \"*.xml\"\n\n# Watch: monitor a directory for new files\nmorphql watch -q \"from csv to json\" --in ./incoming/ --out ./processed/\n```\n\n### From PHP\n\n```bash\ncomposer require morphql/morphql\n```\n\n```php\nuse MorphQL\\MorphQL;\n\n$result = MorphQL::execute(\n    'from json to json transform set greeting = \"Hello, \" + name',\n    '{\"name\": \"Alice\"}'\n);\n// → '{\"greeting\":\"Hello, Alice\"}'\n```\n\n---\n\n## Use Cases\n\n### 🔄 API Response Shaping\n\nTransform backend responses into frontend-friendly formats without cluttering your application code.\n\n```morphql\nfrom json to json\ntransform\n  set id = orderId\n  set customer = billing.customerName\n  section multiple items(\n    set name = productName\n    set price = number(unitPrice)\n  ) from lineItems\n```\n\n### 📦 High-Throughput ETL\n\nCompile transformations once and process millions of records at native JavaScript speed.\n\n```javascript\nconst transform = await compile(morphQL`from xml to json`);\ndata.map(transform); // process millions of records\n```\n\n### 🔧 Format Conversion\n\nOne line. No boilerplate.\n\n```bash\nmorphql --from data.xml --to data.json -q \"from xml to json\"\n```\n\n### 🧩 Nested Data Processing\n\nHandle complex structures with subqueries that can even parse embedded formats (e.g., XML inside a JSON field).\n\n```morphql\nfrom json to object\ntransform\n  set orderId = id\n  section metadata(\n    from xml to object\n    transform set supplier = root.vendor.name\n  ) from embeddedXmlField\n```\n\n---\n\n## Available Tools\n\nMorphQL is available in multiple forms to fit your workflow:\n\n| Package                                               | Description                                                                              |\n| :---------------------------------------------------- | :--------------------------------------------------------------------------------------- |\n| **[@morphql/core](./packages/core)**                  | Core engine. Embed in Node.js or browser apps. Compile once, execute fast.               |\n| **[@morphql/cli](./packages/cli)**                    | Terminal tool. Batch transforms, directory watching, Unix piping, `--delete` and more.   |\n| **[@morphql/server](./packages/server)**              | REST API with Redis caching and Staged Queries for pre-defined transformation endpoints. |\n| **[@morphql/playground](./packages/playground)**      | Interactive web editor. Experiment with queries in the browser with live feedback.       |\n| **[morphql/morphql](./packages/php)**                 | PHP wrapper. Bundled engine, PHP 5.6+, `composer require morphql/morphql`.               |\n| **[morphql/morphql-symfony](./packages/php-symfony)** | Symfony Bundle. Twig-style file convention, autowiring, YAML config, PHP 8.1+.           |\n\n\u003e 💬 _\"So with the server package and a custom adapter, I could create APIs on my data directly?\"_\n\u003e\n\u003e **Yes, you could.** Define a transformation, point it at your data source, and you have a live API endpoint—no boilerplate, no middleware sprawl.\n\n---\n\n## Supported Formats\n\n| Format        | Read | Write | Notes                                               |\n| :------------ | :--: | :---: | :-------------------------------------------------- |\n| **JSON**      |  ✅  |  ✅   | Native parsing and serialization.                   |\n| **XML**       |  ✅  |  ✅   | Fast XML with configurable options.                 |\n| **CSV**       |  ✅  |  ✅   | Via PapaParse. Headers auto-detected.               |\n| **EDIFACT**   |  ✅  |  ✅   | UN/EDIFACT message parsing.                         |\n| **Plaintext** |  ✅  |  ✅   | Line-based splitting and joining.                   |\n| **Object**    |  ✅  |  ✅   | In-memory JS objects (no serialization).            |\n| **Custom**    |  ✅  |  ✅   | Register your own adapters via `registerAdapter()`. |\n\n---\n\n## Learn More\n\n👉 **[Full Documentation](https://hyperwindmill.github.io/morphql/)** — Language reference, architecture guides, and advanced patterns.\n\n---\n\n## Contributing\n\nMorphQL is actively evolving. If you have feedback on real-world integration scenarios or problems you're trying to solve, I'd love to hear from you.\n\n- 🐛 [Open an issue](https://github.com/Hyperwindmill/morphql/issues)\n- 💬 [Join the discussion](https://github.com/Hyperwindmill/morphql/discussions)\n\n---\n\n## License\n\nMIT © 2026\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperwindmill%2Fmorphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperwindmill%2Fmorphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperwindmill%2Fmorphql/lists"}