{"id":13499527,"url":"https://github.com/graphql-elixir/graphql_parser","last_synced_at":"2026-02-19T20:30:51.964Z","repository":{"id":57503324,"uuid":"44303880","full_name":"graphql-elixir/graphql_parser","owner":"graphql-elixir","description":"Elixir binding for libgraphqlparser","archived":false,"fork":false,"pushed_at":"2023-07-02T19:05:19.000Z","size":21,"stargazers_count":23,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-13T02:00:16.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/graphql-elixir.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}},"created_at":"2015-10-15T08:28:24.000Z","updated_at":"2025-09-09T10:31:44.000Z","dependencies_parsed_at":"2023-07-12T15:45:50.270Z","dependency_job_id":null,"html_url":"https://github.com/graphql-elixir/graphql_parser","commit_stats":null,"previous_names":["aarvay/graphql_parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/graphql-elixir/graphql_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphql-elixir","download_url":"https://codeload.github.com/graphql-elixir/graphql_parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphql-elixir%2Fgraphql_parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29630829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T18:02:07.722Z","status":"ssl_error","status_checked_at":"2026-02-19T18:01:46.144Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-07-31T22:00:34.238Z","updated_at":"2026-02-19T20:30:51.948Z","avatar_url":"https://github.com/graphql-elixir.png","language":"Elixir","readme":"# GraphQL.Parser\n\nAn Elixir binding for [libgraphqlparser](https://github.com/graphql/libgraphqlparser)\nimplemented as a NIF for parsing [GraphQL](http://graphql.org).\n\n## Introduction\n\nGraphQL is a query language designed to build client applications by providing\nan intuitive and flexible syntax and system for describing their data requirements\nand interactions.\n\nThis library is an Elixir interface for the query language parser and not a full\nimplementation of GraphQL. It takes a query string as input and outputs the AST\nin a format suitable for performing pattern matching. Use this library directly\nonly if you want to write your own implementation of GraphQL or you want to work\nwith AST for something else. For the full Elixir implementation, checkout\n[graphql-elixir](https://github.com/joshprice/graphql-elixir). Head\n[here](https://facebook.github.io/graphql) if you are looking out for the full\nGraphQL specification.\n\n## Requirements\n\nA C++ compiler that supports C++11, cmake, and make, for building and installing\nlibgraphqlparser. It also requires Mac OS X or Linux.\n\n## Installation\n\nTo get started quickly, add GraphQL.Parser to your deps in `mix.exs`:\n\n```elixir\ndefp deps do\n  [{:graphql_parser, \"~\u003e 0.0.3\"}]\nend\n```\n\nthen, update your deps:\n\n```sh\n$ mix deps.get\n```\n\n### Installing libgraphqlparser\nYou need to install libgraphqlparser before attemting to compile \u0026 run this\nlibrary. If you're on a mac, you could do `brew install libgraphqlparser`.\n\nBut I'd recommend building and installing from source, because the library is\nconstantly updated with critical bug fixes. It's in pretty early stages, so\nthis is the most recommended approach. To install from source :\n\n```sh\n$ cd libgraphqlparser/\n$ cmake .\n$ make\n$ make install\n```\n\nOnce libgraphqlparser is successfully installed, do a `mix compile` to compile the NIF and you're good to go!\n\n## Examples\n\n```elixir\niex\u003e GraphQL.Parser.parse \"{ hello }\"\n{:ok,\n %{definitions: [%{directives: nil, kind: \"OperationDefinition\",\n      loc: %{end: 10, start: 1}, name: nil, operation: \"query\",\n      selectionSet: %{kind: \"SelectionSet\", loc: %{end: 10, start: 1},\n        selections: [%{alias: nil, arguments: nil, directives: nil,\n           kind: \"Field\", loc: %{end: 8, start: 3},\n           name: %{kind: \"Name\", loc: %{end: 8, start: 3}, value: \"hello\"},\n           selectionSet: nil}]}, variableDefinitions: nil}], kind: \"Document\",\n   loc: %{end: 10, start: 1}}}\n\niex\u003e GraphQL.Parser.parse! \"{ hello }\"\n%{definitions: [%{directives: nil, kind: \"OperationDefinition\",\n     loc: %{end: 10, start: 1}, name: nil, operation: \"query\",\n     selectionSet: %{kind: \"SelectionSet\", loc: %{end: 10, start: 1},\n       selections: [%{alias: nil, arguments: nil, directives: nil,\n          kind: \"Field\", loc: %{end: 8, start: 3},\n          name: %{kind: \"Name\", loc: %{end: 8, start: 3}, value: \"hello\"},\n          selectionSet: nil}]}, variableDefinitions: nil}], kind: \"Document\",\n  loc: %{end: 10, start: 1}}\n\niex\u003e GraphQL.Parser.parse! \" hello }\"\n** (GraphQL.Parser.SyntaxError) 1.2-6: syntax error, unexpected IDENTIFIER, expecting fragment or mutation or query or { on line\n    lib/graphql/parser.ex:20: GraphQL.Parser.parse!/1\n```\n\n## License\n\nCopyright (c) 2015 Vignesh Rajagopalan\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","funding_links":[],"categories":["Libraries","Framework Components","Implementations"],"sub_categories":["Elixir Libraries","Elixir"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-elixir%2Fgraphql_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphql-elixir%2Fgraphql_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphql-elixir%2Fgraphql_parser/lists"}