{"id":15396923,"url":"https://github.com/luizfonseca/graphql-v","last_synced_at":"2025-04-16T00:21:30.193Z","repository":{"id":195393329,"uuid":"692827682","full_name":"luizfonseca/graphql-v","owner":"luizfonseca","description":"GraphQL for V","archived":false,"fork":false,"pushed_at":"2024-05-04T01:02:31.000Z","size":126,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T03:11:54.530Z","etag":null,"topics":["graphql","vlang"],"latest_commit_sha":null,"homepage":"","language":"V","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/luizfonseca.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":"2023-09-17T17:48:03.000Z","updated_at":"2024-05-27T12:59:56.000Z","dependencies_parsed_at":"2024-05-04T01:45:17.091Z","dependency_job_id":null,"html_url":"https://github.com/luizfonseca/graphql-v","commit_stats":null,"previous_names":["luizfonseca/graphql-v"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizfonseca%2Fgraphql-v","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizfonseca%2Fgraphql-v/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizfonseca%2Fgraphql-v/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luizfonseca%2Fgraphql-v/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luizfonseca","download_url":"https://codeload.github.com/luizfonseca/graphql-v/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249174240,"owners_count":21224680,"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":["graphql","vlang"],"created_at":"2024-10-01T15:35:21.739Z","updated_at":"2025-04-16T00:21:30.156Z","avatar_url":"https://github.com/luizfonseca.png","language":"V","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL for the V language\n\n## Current state\n\nWork in progress.\n\n- [x] Language Parser (lexer, parser implementation)\n- [x] Fixtures are covered 100% (GH, Simple)\n- [ ] Integration tests\n- [ ] Schema execute\n- [ ] Publish to VPM\n- [ ] Documentation\n\n## Usage\n\n### Parsing a .graphql definition file\n\nYou can parse any string/file using the `.parse` function.\nIt returns a [DocumentNode](./src/graphql/src.graphql.md#documentnode) with al the definitions that were parsed, in a tree structure.\n\n```v\nimport luizfonseca.graphql\nimport os\n\nfn main() {\n    // For files\n    file := os.read_file('path-to-file.graphql')\n\n    // For string inputs\n    // input := 'query {\n    // myQuery(id: 1) {\n    //  name\n    //  age\n    // }\n    //}'\n\n    // max_tokens: number of tokens to parse.\n    // Increasing this means supporting longer queries/schema definitions\n    doc := graphql.parse(file, graphql.ParserOptions{ max_tokens: 25_000 })\n\n    dump(doc.token_count)\n    dump(doc.definitions)\n}\n```\n\n## Links\n\n- [The V programming language](https://vlang.io/)\n- [GraphQL](https://graphql.org/)\n\n## Notes\n\n- This package is inspired by the work of the GraphQL.js package and as such is not yet perfected for the V lang.\n\n## Contributing\n\n- Feedbacks/PRs are welcome, but keep in mind this is still a **work in progress**.\n\n## Credits\n\n- [GraphQL](https://graphql.org/)\n- [GraphQL.js](https://graphql.org/graphql-js/)\n- “GraphQL” is a trademark managed by the [GraphQL Foundation](https://graphql.org/foundation/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizfonseca%2Fgraphql-v","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluizfonseca%2Fgraphql-v","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluizfonseca%2Fgraphql-v/lists"}