{"id":21222465,"url":"https://github.com/dbsystel/datalake-graphql-wrapper","last_synced_at":"2025-07-10T13:33:10.626Z","repository":{"id":186904279,"uuid":"610770880","full_name":"dbsystel/datalake-graphql-wrapper","owner":"dbsystel","description":"The DataLake GraphQL Wrapper provides a GraphQL API for presto/trino.","archived":false,"fork":false,"pushed_at":"2023-04-17T06:25:02.000Z","size":301,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-05T14:11:18.309Z","etag":null,"topics":["boilerplate","cli","datalake","generator","graphql","pothos","presto","prestodb","prestosql","template","trino","trinodb","typescript","wrapper-api","yoga-graphql"],"latest_commit_sha":null,"homepage":"","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/dbsystel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/Apache-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null}},"created_at":"2023-03-07T12:58:53.000Z","updated_at":"2024-08-27T21:12:51.000Z","dependencies_parsed_at":"2023-08-08T07:36:13.050Z","dependency_job_id":null,"html_url":"https://github.com/dbsystel/datalake-graphql-wrapper","commit_stats":null,"previous_names":["dbsystel/datalake-graphql-wrapper"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/dbsystel/datalake-graphql-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbsystel%2Fdatalake-graphql-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbsystel%2Fdatalake-graphql-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbsystel%2Fdatalake-graphql-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbsystel%2Fdatalake-graphql-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbsystel","download_url":"https://codeload.github.com/dbsystel/datalake-graphql-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbsystel%2Fdatalake-graphql-wrapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264585372,"owners_count":23632647,"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":["boilerplate","cli","datalake","generator","graphql","pothos","presto","prestodb","prestosql","template","trino","trinodb","typescript","wrapper-api","yoga-graphql"],"created_at":"2024-11-20T22:44:29.423Z","updated_at":"2025-07-10T13:33:10.184Z","avatar_url":"https://github.com/dbsystel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2023 DB Systel GmbH\n\nSPDX-License-Identifier: Apache-2.0\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\n    DataLake GraphQL Wrapper\n    \u003cbr /\u003e\n    \u003cspan style=\"font-size:12px\"\u003eMade with ❤️ by DB Systel GmbH\u003c/span\u003e\n  \u003c/h1\u003e\n\u003c/div\u003e\n\nThe `DataLake GraphQL Wrapper` provides a GraphQL API for presto/trino.\n\n[![REUSE status](https://api.reuse.software/badge/github.com/dbsystel/datalake-graphql-wrapper)](https://api.reuse.software/info/github.com/dbsystel/datalake-graphql-wrapper)\n\n\n## Features\n\n- Automatic endpoint generation via interactive cli\n  - Generates the interfaces and available endpoint fields based on the fetched database schema\n  - Generates the filter fields for all root fields\n  - Sorting\n  - Pagination\n- Support for nested fields\n- date/time transformation\n- Written in TypeScript\n- Easy to extend\n- Using only Open Source Software\n- It's free\n\n## Installation\n\n```bash\ngit clone git@github.com:dbsystel/datalake-graphql-wrapper.git\ncd datalake-graphql-wrapper\nnpm i\ncp .env.example .env\n```\n\n## Run the dev server\n\n```bash\n# Generate the index file to have all schemas available\nnpm run cli:index\n\n# Start the dev server\nnpm run dev\n```\n\n## Configuration\n\nTo get started, you have to update the `.env` file.\n\n| Variable        | Required | Description                                                                                                                                         |\n| --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ENGINE_TYPE     | Yes      | Changes the header variable to switch between presto and trino. The value will be used in the sql client.\u003cbr /\u003eValid values are: `trino` / `presto` |\n| ENGINE_HOST     | Yes      | Presto/Trino coordinator hostname or address                                                                                                        |\n| ENGINE_PORT     | Yes      | Presto/Trino coordinator port                                                                                                                       |\n| ENGINE_CATALOG  | Yes      | Presto/Trino catalog name                                                                                                                           |\n| ENGINE_USERNAME | Yes      | User which will be used to login                                                                                                                    |\n| ENGINE_PASSWORD | Yes      | Password for the user                                                                                                                               |\n| ENGINE_SOURCE   | No       | Source name which will be used for the query. Default is `nodejs-client`                                                                            |\n\n## Command Line Interface\n\n### Available commands\n\n```\n# Start the interactive endpoint generation\nnpm run cli\n\n# Generate only the index.ts with all generated schemata\nnpm run cli:index\n```\n\nThe following args are available for `npm run cli`\n\n| Arg         | Description                                                                                                                                                                     | Example                                                                                     |\n| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |\n| `--schema`  | Sets the schema name and skips the cli prompt                                                                                                                                   | `npm run cli -- --schema\u003cschemaname\u003e`                                                       |\n| --table     | Sets the table and skips the cli prompt.\u003cbr /\u003eYou can define multiple tables.\u003cbr /\u003eShould be only used if you use `--schema`                                                    | `npm run cli -- --schema\u003cschemaname\u003e --table \u003ctable1_in_schema\u003e --table \u003ctable2_in_schema\u003e` |\n| --lint      | Disable lint.\u003cbr /\u003eHelpful if you want to run the code generator multiple times.\u003cbr /\u003e( e.g. for different schemas )                                                            | `npm run cli -- --lint false`                                                               |\n| --index     | Disable index file generation.\u003cbr /\u003eHelpful if you want to run the code generator multiple times.\u003cbr /\u003e( e.g. for different schemas )                                           | `npm run cli -- --index false`                                                              |\n| --indexonly | Skips the questions for schema/table and generates only the\u003cbr /\u003e `src/schema/index.ts` file based on the existing endpoints. \u003cbr /\u003e( helpful if you created your own endpoint) | `npm run cli -- --onlyindex true` / Alias: `npm run cli:index`                              |\n\n### Generate Endpoints\n\nTo start the code generator you have to run the following command.\n\n```bash\nnpm run cli\n```\n\nOr if you know the schema and tablename, you can also use this command:\n\n```bash\nnpm run cli -- --schema \u003cschemaname\u003e --table \u003ctablename\u003e\n```\n\n### Generate only the `src/schema/index.ts`\n\n```bash\nnpm run cli:index\n```\n\n### Start the server\n\nTo run the server in development mode:\n\n```bash\nnpm run dev\n```\n\nOtherwise, use:\n\n```bash\nnpm run start\n```\n\n## Compliance\n\nWe're using [REUSE](https://reuse.software/) to ensure everything is compliant.\n\nTo install it locally, please ensure that you have `python` installed.\n\nRun the following command to install it:\n\n```bash\npip install -r requirements.txt\n```\n\nTo run the linter:\n\n```bash\nreuse lint\n```\n\n## Todos\n\n- [ ] Add tests\n- [ ] More documentation\n- [ ] Add/Create some HowTos\n  - [ ] Manual endpoint creation\n  - [ ] Authorization\n\n## Credits\n\n- [https://pothos-graphql.dev](https://pothos-graphql.dev)\n- [https://the-guild.dev/graphql/yoga-server](https://the-guild.dev/graphql/yoga-server)\n- [https://github.com/tagomoris/presto-client-node](https://github.com/tagomoris/presto-client-node)\n\n## License\n\nThis project is licensed under [Apache-2.0](LICENSES/Apache-2.0.txt)\n\n## Contribute\n\nSee how to [contribute](CONTRIBUTING.md)\n\n---\n\nTrino is open source software licensed under the Apache License 2.0 and supported by the [Trino Software Foundation](https://trino.io/foundation.html).\n\nPresto is a registered trademark of [LF Projects, LLC](https://lfprojects.org/policies/trademark-policy/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbsystel%2Fdatalake-graphql-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbsystel%2Fdatalake-graphql-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbsystel%2Fdatalake-graphql-wrapper/lists"}