{"id":15091449,"url":"https://github.com/tyktechnologies/graphql-translator","last_synced_at":"2025-10-05T18:07:37.477Z","repository":{"id":228334289,"uuid":"773691098","full_name":"TykTechnologies/graphql-translator","owner":"TykTechnologies","description":"graphql-translator is a library that takes OpenAPI and AsyncAPI documents and translates them into GraphQL documents.","archived":false,"fork":false,"pushed_at":"2025-09-23T10:48:25.000Z","size":123,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-10-04T14:46:28.491Z","etag":null,"topics":["asyncapi","golang","graphql","oas","oas3","openapi"],"latest_commit_sha":null,"homepage":"https://tyk.io","language":"Go","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/TykTechnologies.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-03-18T08:18:39.000Z","updated_at":"2025-09-23T10:48:30.000Z","dependencies_parsed_at":"2024-04-19T14:07:13.435Z","dependency_job_id":null,"html_url":"https://github.com/TykTechnologies/graphql-translator","commit_stats":null,"previous_names":["tyktechnologies/graphql-translator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TykTechnologies/graphql-translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TykTechnologies%2Fgraphql-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TykTechnologies%2Fgraphql-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TykTechnologies%2Fgraphql-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TykTechnologies%2Fgraphql-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TykTechnologies","download_url":"https://codeload.github.com/TykTechnologies/graphql-translator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TykTechnologies%2Fgraphql-translator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278494644,"owners_count":25996414,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["asyncapi","golang","graphql","oas","oas3","openapi"],"created_at":"2024-09-25T10:41:12.051Z","updated_at":"2025-10-05T18:07:37.461Z","avatar_url":"https://github.com/TykTechnologies.png","language":"Go","readme":"# graphql-translator\n\ngraphql-translator is a library that takes OpenAPI and AsyncAPI documents and translates them into GraphQL documents.\n\nThis library uses [graphql-go-tools](https://github.com/TykTechnologies/graphql-go-tools) library for GraphQL handling.\n\n## OpenAPI\n\nSupported OpenAPI versions:\n\n* 3.0.0\n\n### How to translate OpenAPI to GraphQL\n\n```go\ndoc, report := ImportOpenAPIDocumentString(openapiDocument)\nif report.HasErrors() {\n\treturn report\n}\n\n// Now, we can pretty-print the resulting abstract syntax tree.\nw := \u0026bytes.Buffer{}\nerr = astprinter.PrintIndent(doc, nil, []byte(\"  \"), w)\nif err != nil {\n\treturn err\n}\n\n// This will print the GraphQL document.\nfmt.Println(w.String())\n```\n\n`openapi` package also provides `ImportOpenAPIDocumentByte`, `ParseOpenAPIDocument` and `ImportParsedOpenAPIv3Document` \nmethods. You can check the package documents to see how they work.\n\n## AsyncAPI\n\nSupported AsyncAPI versions:\n\n* 2.0.0\n* 2.1.0\n* 2.2.0\n* 2.3.0\n* 2.4.0\n\n### How to translate AsyncAPI to GraphQL\n\n```go\ndoc, report := ImportAsyncAPIDocumentString(string(asyncapiDoc))\nif report.HasErrors() {\n\treturn err\n}\n\n// Now, we can pretty-print the resulting abstract syntax tree.\nw := \u0026bytes.Buffer{}\nerr = astprinter.PrintIndent(doc, nil, []byte(\"  \"), w)\nif err != nil {\n\treturn err\n}\n\n// This will print the GraphQL document.\nfmt.Println(w.String())\n```\n\n`asyncapi` package also provides `ImportAsyncAPIDocumentByte`, `ParseAsyncAPIDocument` and `ImportParsedAsyncAPIDocument`\nmethods. You can check the package documents to see how they work.\n\n## License\n\nMIT License - see LICENSE for more details.\n\n## Contributing\n\nFeel free to file an issue in case of bugs. We're open to your ideas to enhance the repository.\n\nYou are open to contribute via PR's. Please open an issue to discuss your idea before implementing it, \nso we can have a discussion. Make sure to comply with the linting rules. You must not add untested code.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyktechnologies%2Fgraphql-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyktechnologies%2Fgraphql-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyktechnologies%2Fgraphql-translator/lists"}