{"id":22190925,"url":"https://github.com/yuhexiong/dynamic-schema-graphql-python-django","last_synced_at":"2026-04-14T23:33:20.563Z","repository":{"id":254370660,"uuid":"816558798","full_name":"yuhexiong/dynamic-schema-graphql-python-django","owner":"yuhexiong","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-14T06:22:43.000Z","size":378,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T14:54:56.750Z","etag":null,"topics":["backend","backend-api","django","dynamic-schema","graphql","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/yuhexiong.png","metadata":{"files":{"readme":"README-CH.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":"2024-06-18T01:49:41.000Z","updated_at":"2025-02-14T06:22:47.000Z","dependencies_parsed_at":"2024-11-05T02:23:12.028Z","dependency_job_id":"4c295b05-8382-4b25-9938-6e8364542a8f","html_url":"https://github.com/yuhexiong/dynamic-schema-graphql-python-django","commit_stats":null,"previous_names":["yuhexiong/dynamic-schema-graphql-python-django"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuhexiong/dynamic-schema-graphql-python-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fdynamic-schema-graphql-python-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fdynamic-schema-graphql-python-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fdynamic-schema-graphql-python-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fdynamic-schema-graphql-python-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuhexiong","download_url":"https://codeload.github.com/yuhexiong/dynamic-schema-graphql-python-django/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuhexiong%2Fdynamic-schema-graphql-python-django/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31819776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"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":["backend","backend-api","django","dynamic-schema","graphql","python"],"created_at":"2024-12-02T12:13:25.752Z","updated_at":"2026-04-14T23:33:20.537Z","avatar_url":"https://github.com/yuhexiong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic Schema GraphQL Django\n\n使用 YAML 定義 Doris 表格結構並在 GraphiQL 中取得資料。  \n\n## Overview\n\n- 語言：Python v3.12  \n- 網頁框架：Django v4.1  \n\n### ENV\n\n將 `.env.example` 複製為 `.env`  \n可以更改 `SECRET_KEY`  \n```yaml\nSECRET_KEY='django-insecure-qywaz)eg+ua2q26x$^3*\u0026sr\u0026gh0ca74*n^mm4j-*h)!80#\u0026^9p'\nDEBUG=True\n```\n\n`etc/database.yaml`  \n```yaml\nhost: localhost\nname: database\nuser: root\npassword: password\nport: 9030\n```\n\n`etc/schema.yaml`  \n支援的資料類型：`String`, `Integer`, `Double`, `Date`\n```yaml\ntables:\n  - name: adventure_game_heroes\n    fields:\n      - name: id\n        type: Integer\n      - name: hero_name\n        type: String\n      - name: occupation\n        type: String\n      - name: level\n        type: Integer\n      - name: weapon_name\n        type: String\n      - name: weapon_type\n        type: String\n      - name: weapon_power\n        type: Double\n      - name: equipment_status\n        type: String\n      - name: join_date\n        type: Date\n```\n\n### Example Data\n\n[adventure_game_heroes.sql](adventure_game_heroes.sql)\n\n![image](./images/doris_example.png)\n\n\n## Run\n\n### Run Docker\n```bash\ndocker compose up -d\n```\n\n### Run Local\n\n```bash\npoetry install\n```\n\n啟用 Poetry 環境  \nWindows: 點擊 `.venv/Scripts/activate.bat`  \n\n```bash\npython manage.py runserver\n```\n\n## UI\n```\nlocalhost:8000/graphql  \n```\n\n### Query\n\n\n(i) filter option\n```\n\"equals\": value, \n\"greater_than\": value, \n\"greater_than_or_equals\": value,\n\"less_than\": value, \n\"less_than_or_equals\": value, \n\"between\": {\"start\": value, \"end\": value}\n```\n(ii) limit  \n(iii) offset  \n(iv) order_by: [ {column, order: ASC/DESC} ]  \n\n#### Example  \n```graphql\nquery {\n  adventure_game_heroes (\n    filter: {\n      join_date: {\n        between: {\n          start: \"2023-04-01\",\n          end: \"2023-10-01\"\n        }\n      },\n      occupation: {\n        equals: \"Warrior\"\n      }\n    },\n    limit: 3,\n    offset: 0,\n    order_by: [\n      {\n        column: \"join_date\",\n        order: ASC\n      }\n    ]\n  ) {\n    id,\n    join_date,\n    hero_name,\n    occupation,\n    level,\n    weapon_name,\n    weapon_type,\n    weapon_power,\n    equipment_status\n  }\n}\n```\n![image](./images/ui_example.png)\n\n### Swagger\n```\nlocalhost:8000/swagger-ui  \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhexiong%2Fdynamic-schema-graphql-python-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuhexiong%2Fdynamic-schema-graphql-python-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuhexiong%2Fdynamic-schema-graphql-python-django/lists"}