{"id":22034849,"url":"https://github.com/cmmartti/fractal-style-schema","last_synced_at":"2025-10-09T07:33:57.447Z","repository":{"id":264399766,"uuid":"135654137","full_name":"cmmartti/fractal-style-schema","owner":"cmmartti","description":"An example of a Graphene-Python GraphQL schema where each entity is in its own module.","archived":false,"fork":false,"pushed_at":"2018-08-18T03:43:44.000Z","size":13,"stargazers_count":24,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-05T10:52:53.736Z","etag":null,"topics":["graphene-python","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/cmmartti.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":"2018-06-01T01:47:48.000Z","updated_at":"2023-09-21T18:55:37.000Z","dependencies_parsed_at":"2024-11-24T02:17:31.664Z","dependency_job_id":null,"html_url":"https://github.com/cmmartti/fractal-style-schema","commit_stats":null,"previous_names":["cmmartti/fractal-style-schema"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmmartti/fractal-style-schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmartti%2Ffractal-style-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmartti%2Ffractal-style-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmartti%2Ffractal-style-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmartti%2Ffractal-style-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmmartti","download_url":"https://codeload.github.com/cmmartti/fractal-style-schema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmmartti%2Ffractal-style-schema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000960,"owners_count":26082973,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["graphene-python","graphql","python"],"created_at":"2024-11-30T10:14:15.316Z","updated_at":"2025-10-09T07:33:57.429Z","avatar_url":"https://github.com/cmmartti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fractal-Style GraphQL Schema\n\nThis is an example of a fractal style GraphQL schema for [Graphene-Python](http://graphene-python.org/), where each entity is in its own module. Within each module are `mutation`, `type`, `query`, `subscription`, `resolvers` etc. files that contain all of the types, queries, mutations, etc. for that entity. This organisation method avoids the issue of overly-long schema files that contain dozens or hundreds of types and resolvers.\n\nThis specific example is a simple read-only query API for video games and characters.\n\nThe `graphql_api.auto.schema_operations_builder` function assembles each part into a whole Query/Mutation, which can then be passed to `graphene.Schema` to create a schema.\n\nCircular dependencies are met using Graphene's [`lazy_import`](https://github.com/graphql-python/graphene/blob/master/graphene/utils/module_loading.py) utility function.\n\n\n## Setup\n\nThis GraphQL API is built on Django. Follow the steps below to run it on your machine:\n\n1. Create a Python virtual environment:\n\n    Python2: `virtualenv venv`\n\n    Python3: `python venv venv`\n\n2. Activate the virtual environment:\n\n    Windows: `venv\\Scripts\\activate`\n\n    *nix: `source venv/bin/activate`\n\n3. Install dependencies:\n\n    `pip install -r requirements.txt`\n\n4. Start the dev server:\n\n    `python manage.py runserver`\n\n5. Open your browser to localhost:8000/graphql to view the GraphiQL IDE.\n\n---\n\nBased on code examples by [ahopkins](https://github.com/graphql-python/graphene/issues/545#issuecomment-329630141) (Adam Hopkins) and [ProjectCheshire](https://github.com/graphql-python/graphene/issues/714#issuecomment-391211693) (Jessamyn Hodge).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmmartti%2Ffractal-style-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmmartti%2Ffractal-style-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmmartti%2Ffractal-style-schema/lists"}