{"id":18115497,"url":"https://github.com/d12/graphqlvalidator","last_synced_at":"2026-04-24T16:31:54.839Z","repository":{"id":90400605,"uuid":"100880572","full_name":"d12/GraphQLValidator","owner":"d12","description":"A Ruby lib for validating a GraphQL query given the schema.","archived":false,"fork":false,"pushed_at":"2019-09-28T16:02:30.000Z","size":65,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T09:41:43.038Z","etag":null,"topics":["graphql","parser","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/d12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2017-08-20T18:22:19.000Z","updated_at":"2019-09-28T16:02:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa12de2d-4073-4fe7-99d5-a7bc69f8bb5f","html_url":"https://github.com/d12/GraphQLValidator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d12/GraphQLValidator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d12%2FGraphQLValidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d12%2FGraphQLValidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d12%2FGraphQLValidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d12%2FGraphQLValidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d12","download_url":"https://codeload.github.com/d12/GraphQLValidator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d12%2FGraphQLValidator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: 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":["graphql","parser","ruby"],"created_at":"2024-11-01T03:10:08.668Z","updated_at":"2026-04-24T16:31:54.822Z","avatar_url":"https://github.com/d12.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQLValidator\n\nThis validator checks the format and type-correctness of a GraphQL query, given a JSON schema.\n\nIt ensures:\n1. No syntax errors\n2. Fields exist in the context they're used in\n3. Field args exist and are given the correct type\n4. All objects have selections\n5. There are no naming conflicts (TODO)\n\n## Example\n\n```Ruby\nschema = JSON.parse(File.read(\"schema.json\"))\nquery = \"\n  query {\n    viewer {\n      repositories(first: 5) {\n        totalCount\n        bar\n      }\n    }\n  }\n\"\n\nvalidator = QueryValidator.new(schema)\nvalidator.validate(query)\n```\n```\n=\u003e bar not present on RepositoryConnection (Context::ValidationException)\n```\n\n## Performance\n\nGenerating a schema and validating a 29 line query gives this benchmark:\n\n```\n                    user     system      total        real\nCreating validator  0.010000   0.000000   0.010000 (  0.007621)\nValidating a query  0.000000   0.000000   0.000000 (  0.000593)\n```\n\n[Script used to create benchmark](https://gist.github.com/nwoodthorpe/f9885a78f837bf96eed274e2ff81ebac)\n\n## TODO\n\n - Everything in the issues list\n - Possibly redo the parser with Biston/LALR instead of implementing my own tokenization/parsing from scratch\n - Make this into an actual useful thing (A packaged gem with a proper interface?)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd12%2Fgraphqlvalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd12%2Fgraphqlvalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd12%2Fgraphqlvalidator/lists"}