{"id":15288342,"url":"https://github.com/rocket-connect/gqlpt","last_synced_at":"2025-04-06T07:12:55.456Z","repository":{"id":65741714,"uuid":"596512052","full_name":"rocket-connect/gqlpt","owner":"rocket-connect","description":"Leverage AI to generate GraphQL queries from plain text.","archived":false,"fork":false,"pushed_at":"2025-03-03T03:25:53.000Z","size":9634,"stargazers_count":52,"open_issues_count":11,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-30T06:06:20.774Z","etag":null,"topics":["ai","anthropic","artificial-intelligence","autogenerated","chatgpt","codegen","graphql","openai","plaintext","prompt","query","text","text-to-sql","translate","translation","turn"],"latest_commit_sha":null,"homepage":"https://apipt.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocket-connect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":null,"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":"2023-02-02T10:48:59.000Z","updated_at":"2025-03-11T19:06:35.000Z","dependencies_parsed_at":"2023-12-05T09:31:04.810Z","dependency_job_id":"0b429216-c8e6-4d1c-bf14-f0c66920162a","html_url":"https://github.com/rocket-connect/gqlpt","commit_stats":{"total_commits":236,"total_committers":4,"mean_commits":59.0,"dds":0.0847457627118644,"last_synced_commit":"6f4060571c6db19aea35effaa0ed234444749a1d"},"previous_names":["rocket-connect/gqlpt","danstarns/gqlpt"],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocket-connect%2Fgqlpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocket-connect%2Fgqlpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocket-connect%2Fgqlpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocket-connect%2Fgqlpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocket-connect","download_url":"https://codeload.github.com/rocket-connect/gqlpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445671,"owners_count":20939958,"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":["ai","anthropic","artificial-intelligence","autogenerated","chatgpt","codegen","graphql","openai","plaintext","prompt","query","text","text-to-sql","translate","translation","turn"],"created_at":"2024-09-30T15:47:24.930Z","updated_at":"2025-04-06T07:12:55.427Z","avatar_url":"https://github.com/rocket-connect.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"text-align: center;\"\u003e\n\n\u003cimg src=\"https://github.com/rocket-connect/gqlpt/raw/main/apps/docs/static/img/logo.svg\" width=\"20%\" alt=\"GQLPT\"\u003e\n\n\u003ch1\u003eGQLPT\u003c/h1\u003e\n\n\u003cp\u003eLeverage AI to generate GraphQL queries from plain text.\u003c/p\u003e\n\n[gqlpt.dev/docs](https://www.gqlpt.dev/docs)\n\n[![npm version](https://badge.fury.io/js/gqlpt.svg)](https://badge.fury.io/js/gqlpt) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n[![](https://github.com/rocket-connect/gqlpt/raw/main/docs/screenshot.png)](https://www.gqlpt.dev/)\n\nImage showing the online playground for [gqlpt.dev](https://www.gqlpt.dev/). GQLPT is a npm package that allows you to generate GraphQL queries from plain text using AI.\n\n\u003c/div\u003e\n\n## Installation\n\nhttps://www.npmjs.com/package/gqlpt\n\n```bash\nnpm install gqlpt @gqlpt/adapter-openai\n```\n\n## Usage\n\n```ts\nimport { AdapterOpenAI } from \"@gqlpt/adapter-openai\";\n\nimport { GQLPTClient } from \"gqlpt\";\n\nconst typeDefs = /* GraphQL */ `\n  type User {\n    id: ID!\n    name: String!\n  }\n\n  type Query {\n    user(id: ID!): User\n  }\n`;\n\nconst client = new GQLPTClient({\n  typeDefs,\n  adapter: new AdapterOpenAI({\n    apiKey: process.env.OPENAI_API_KEY,\n  }),\n});\n\nasync function main() {\n  await client.connect();\n\n  const query = \"Find users by id 1\";\n\n  const response = await client.generateQueryAndVariables(query);\n\n  console.log(response);\n  /*\n    {\n        query: 'query ($id: ID!) {\\n  user(id: $id) {\\n    id\\n    name\\n  }\\n}',\n        variables: { id: '1' }\n    }\n  */\n}\n\nmain();\n```\n\n## License\n\nMIT - Rocket Connect - https://github.com/rocket-connect\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocket-connect%2Fgqlpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocket-connect%2Fgqlpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocket-connect%2Fgqlpt/lists"}