{"id":13726901,"url":"https://github.com/graphql-editor/graphql-js-tree","last_synced_at":"2025-08-20T18:32:21.538Z","repository":{"id":44742921,"uuid":"397167378","full_name":"graphql-editor/graphql-js-tree","owner":"graphql-editor","description":"Simpler structure for GraphQL AST","archived":false,"fork":false,"pushed_at":"2024-12-04T12:26:56.000Z","size":149,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-11T10:37:20.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/graphql-editor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-17T08:16:22.000Z","updated_at":"2024-12-04T12:27:00.000Z","dependencies_parsed_at":"2024-06-18T18:52:51.266Z","dependency_job_id":"591bc47e-29e1-41af-81ad-7fad4549a6ad","html_url":"https://github.com/graphql-editor/graphql-js-tree","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"206d7199995edff725de479beb5f89ee73f32c78"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-editor%2Fgraphql-js-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-editor%2Fgraphql-js-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-editor%2Fgraphql-js-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-editor%2Fgraphql-js-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-editor","download_url":"https://codeload.github.com/graphql-editor/graphql-js-tree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445926,"owners_count":18227060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-03T01:03:30.628Z","updated_at":"2024-12-19T14:06:49.973Z","avatar_url":"https://github.com/graphql-editor.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"![](images/zeus.gif)\n\n[![npm](https://img.shields.io/npm/v/graphql-js-tree.svg?style=flat-square)](https://www.npmjs.com/package/graphql-js-tree) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/) [![npm downloads](https://img.shields.io/npm/dt/graphql-js-tree.svg?style=flat-square)](https://www.npmjs.com/package/graphql-js-tree)\n\nSimplier approach to GraphQL parsing. Using graphql-js library and parsing AST to simplier types. It is a backbone of `graphql-zeus` and `graphql-editor`\n\n## How it works\n\n### SDL GraphQL\n\nIt creates very simple `ParserTree` from GraphQL schema\n\n```js\nimport { Parser, TreeToGraphQL } from 'graphql-js-tree';\n\nconst schemaFileContents = `\ntype Query{\n    hello: String!\n}\nschema{\n    query: Query\n}\n`;\n\nconst parsedSchema = Parser.parse(schemaFileContents);\n\n// Backwards\n\nconst graphqlString = TreeToGraphQL.parse(parsedSchema);\n```\n\n### GQL\n\n```js\nimport { parseGql } from 'graphql-js-tree';\n\nconst schemaFileContents = `\ntype Query{\n    hello: String!\n}\nschema{\n    query: Query\n}\n`;\n\nconst gqlQuery = `\n    query MyQuery{\n        hello\n    }\n`;\n\nconst parsedTrees = parseGql(gqlQuery, schemaFileContents);\n\n// Backwards\n\nconst gqlString = parseGqlTrees(parsedTrees);\n```\n\n## Table of contents\n\n- [How it works](#how-it-works)\n  - [SDL GraphQL](#sdl-graphql)\n  - [GQL](#gql)\n- [Table of contents](#table-of-contents)\n- [License](#license)\n- [Support](#support)\n- [Contribute](#contribute)\n\n## License\n\nMIT\n\n## Support\n\n[Join our GraphQL Editor Channel](https://join.slack.com/t/graphqleditor/shared_invite/enQtNDkwOTgyOTM5OTc1LWI4YjU3N2U5NGVkNzQ2NzY5MGUxMTJiNjFlZDM1Zjc2OWRmNTI0NDM3OWUxYTk4Yjk3MzZlY2QwOWUzZmM2NDI)\n\nLeave a star ;)\n\n## Contribute\n\nFor a complete guide to contributing to GraphQL Editor, see the [Contribution Guide](CONTRIBUTING.md).\n\n1.  Fork this repo\n2.  Create your feature branch: git checkout -b feature-name\n3.  Commit your changes: git commit -am 'Add some feature'\n4.  Push to the branch: git push origin my-new-feature\n5.  Submit a pull request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-editor%2Fgraphql-js-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-editor%2Fgraphql-js-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-editor%2Fgraphql-js-tree/lists"}