{"id":15061182,"url":"https://github.com/teamwalnut/graphql-ppx","last_synced_at":"2026-04-06T03:36:12.083Z","repository":{"id":38289758,"uuid":"179522522","full_name":"teamwalnut/graphql-ppx","owner":"teamwalnut","description":"GraphQL language primitives for ReScript/ReasonML written in ReasonML","archived":false,"fork":false,"pushed_at":"2024-05-17T21:39:10.000Z","size":14634,"stargazers_count":258,"open_issues_count":39,"forks_count":54,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T19:08:09.894Z","etag":null,"topics":["bucklescript","graphql","graphql-ppx","ocaml","reason-native","reasonml","rescript"],"latest_commit_sha":null,"homepage":"https://graphql-ppx.com","language":"OCaml","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/teamwalnut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-04-04T15:10:15.000Z","updated_at":"2025-02-02T16:16:30.000Z","dependencies_parsed_at":"2024-01-19T13:50:11.021Z","dependency_job_id":"b2549fa1-d22e-4028-9f08-d55d9895bea7","html_url":"https://github.com/teamwalnut/graphql-ppx","commit_stats":null,"previous_names":["reasonml-community/graphql-ppx","reasonml-community/graphql_ppx"],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamwalnut%2Fgraphql-ppx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamwalnut%2Fgraphql-ppx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamwalnut%2Fgraphql-ppx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teamwalnut%2Fgraphql-ppx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teamwalnut","download_url":"https://codeload.github.com/teamwalnut/graphql-ppx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"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":["bucklescript","graphql","graphql-ppx","ocaml","reason-native","reasonml","rescript"],"created_at":"2024-09-24T23:11:13.253Z","updated_at":"2026-04-06T03:36:07.034Z","avatar_url":"https://github.com/teamwalnut.png","language":"OCaml","funding_links":[],"categories":["OCaml","Reason"],"sub_categories":["Libraries"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg width=\"200\" src=\"https://beta.graphql-ppx.com/img/logo.svg\" alt=\"Logo\"\u003e\n  \t\u003cbr\u003e\u003cbr\u003e\n    Typesafe GraphQL operations and fragments in ReasonML\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/reasonml-community/graphql-ppx/actions\"\u003e\n    \u003cimg src=\"https://github.com/reasonml-community/graphql-ppx/workflows/graphql-ppx-pipeline/badge.svg\" alt=\"Build Status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://badge.fury.io/js/%40reasonml-community%2Fgraphql-ppx.svg\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/%40reasonml-community%2Fgraphql-ppx.svg\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e •\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e •\n  \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e •\n  \u003ca href=\"#acknowledgements\"\u003eAcknowledgements\u003c/a\u003e\n\u003c/p\u003e\n\n## Documentation\n\n[Go to the official documentation](https://beta.graphql-ppx.com)\n\n## Features\n\n- Language level GraphQL primitives\n\n- Building block for GraphQL clients\n\n- 100% type safe\n\n## Installation\n\n### Schema\n\n`graphql-ppx` needs your graphql schema to be available in the form of a\n`graphql_schema.json` file.\n\nThe easiest way to add this to your project is using an\n[introspection query](https://github.com/graphql/graphql-js/blob/master/src/utilities/introspectionQuery.js)\nto your backend. You can do this using `get-graphql-schema`:\n\n```sh\nnpx get-graphql-schema ENDPOINT_URL -j \u003e graphql_schema.json\n```\n\nWith `ENDPOINT_URL` being the URL of your GraphQL endpoint.\n\n### Cache\n\n`graphql-ppx` will generate a `.graphql_ppx_cache` folder alongside your JSON\nschema to optimize parsing performance. If you're using a version control\nsystem, you don't need to check it in.\n\nThe next pages will provide further installation instructions whether you are\nusing `graphql-ppx` with Bucklescript or using Reason Native.\n\n### Bucklescript\n\nFirst, add it to you dependencies using `npm` or `yarn`:\n\n```sh\nyarn add @reasonml-community/graphql-ppx --dev\n# or\nnpm install @reasonml-community/graphql-ppx  --saveDev\n```\n\nSecond, add it to `ppx-flags` and `bs-dependencies` in your `bsconfig.json`:\n\n```json\n\"ppx-flags\": [\"@reasonml-community/graphql-ppx/ppx\"],\n\"bs-dependencies\": [\"@reasonml-community/graphql-ppx\"]\n```\n\n### Native\n\n#### Caution!\n\nThe Bucklescript version of `graphql-ppx` was almost completely rewritten for the\n1.0 release, with many improvements and changes. This documentation will focus\non the API of the bucklescript version. This means that most of the examples\nwon't apply for the Reason Native version. Please take a look at the\n[old documentation](https://github.com/reasonml-community/graphql-ppx/tree/v0.7.1).\nAt the same time we welcome contributions to modernize the Reason Native version\nof `graphql-ppx`\n:::\n\nYou need to provide the following dependency in your `esy.json` file\n\n```json\n{\n  \"dependencies\": {\n    \"graphql-ppx\": \"*\"\n  },\n  \"resolutions\": {\n    \"graphql-ppx\": \"reasonml-community/graphql-ppx:esy.json#\u003cuse latest stable commit from master\u003e\"\n  }\n}\n```\n\nand update your `dune` file:\n\n```\n(preprocess (pps graphql_ppx))\n```\n\n## Usage\n\nMake your first query:\n\n### Reason\n\n```reason\n[%graphql {|\n  query UserQuery {\n    user {\n      id\n      name\n    }\n  }\n|}];\n```\n\n### ReScript\n\n```rescript\n%graphql(`\n  query UserQuery {\n    user {\n      id\n      name\n    }\n  }\n`)\n```\n\n[Open getting started in the docs](https://beta.graphql-ppx.com/docs/getting-started)\n\n## Roadmap\n\nSee our [development board](https://github.com/reasonml-community/graphql-ppx/projects/1) for a list of selected features and issues.\n\n## Contributing\n\nWe'd love your help improving `graphql-ppx`!\n\nTake a look at our [Contributing Guide](https://beta.graphql-ppx.com/docs/contributing) to get started.\n\n## License\n\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.\n\n## Acknowledgements\n\nThanks to everyone who [contributed](https://github.com/reasonml-community/graphql-ppx/graphs/contributors) to `graphql-ppx`!\n\nThis project builds upon [mhallin/graphql_ppx](https://github.com/mhallin/graphql_ppx). It wouldn't be possible without\ngreat work of [mhallin/graphql_ppx contributors](https://github.com/mhallin/graphql_ppx/graphs/contributors).\n1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamwalnut%2Fgraphql-ppx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteamwalnut%2Fgraphql-ppx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamwalnut%2Fgraphql-ppx/lists"}