feat: add Python GraphQL category (Strawberry)#148
Merged
Conversation
Add pythonGraphql as a new category in the Python ecosystem with Strawberry as the initial option. Strawberry uses Python dataclasses and type hints for a code-first GraphQL schema approach. - Schema: PythonGraphqlSchema with "strawberry" and "none" values - Templates: graphql_schema.py.hbs with Book query/mutation example - Framework integration: FastAPI (GraphQLRouter), Flask (GraphQLView), Django (GraphQLView), Litestar (make_graphql_controller) - Dependencies: strawberry-graphql with framework-specific extras ([fastapi], [flask], [django], [litestar]) - Full CLI, web builder, MCP, and smoke test wiring
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pythonGraphqlas a new category in the Python ecosystem with Strawberry as the initial optionstrawberry-graphql[fastapi],[flask],[django],[litestar]Files changed (33 files)
Types (4 files)
packages/types/src/schemas.ts—PythonGraphqlSchema = z.enum(["strawberry", "none"])packages/types/src/types.ts—PythonGraphqltypepackages/types/src/option-metadata.ts— category metadata, label overridespackages/types/src/compatibility.ts—CompatibilityCategory,CompatibilityInput, display nameTemplates (3 files)
packages/template-generator/templates/python-base/src/app/graphql_schema.py.hbs— new Book query/mutation schemapackages/template-generator/templates/python-base/pyproject.toml.hbs— conditional strawberry-graphql dependencypackages/template-generator/templates/python-base/src/app/main.py.hbs— GraphQL route mounting per frameworkCLI (9 files)
apps/cli/src/index.ts— schema import, router input, createVirtual configapps/cli/src/constants.ts— default valueapps/cli/src/prompts/python-ecosystem.ts—getPythonGraphqlChoice()promptapps/cli/src/prompts/config-prompts.ts— prompt wiringapps/cli/src/mcp.ts— 6 spots (import, SCHEMA_MAP, ECOSYSTEM_CATEGORIES, buildProjectConfig, buildCompatibilityInput)apps/cli/src/utils/bts-config.ts— field mappingapps/cli/src/utils/config-processing.ts— flag processingapps/cli/src/utils/generate-reproducible-command.ts—--python-graphqlflagapps/cli/src/helpers/core/command-handlers.ts— error fallback configWeb (8 files)
apps/web/src/lib/constant.ts— TECH_OPTIONS entry, category order, preset templatesapps/web/src/lib/preview-config.ts— stackToConfig mappingapps/web/src/lib/stack-defaults.ts— StackState type + defaultapps/web/src/lib/stack-url-keys.ts— URL keypgqlapps/web/src/lib/stack-url-state.ts— 3 spots (load, serialize, search)apps/web/src/lib/stack-utils.ts— category order + command generationapps/web/src/lib/tech-icons.ts— icon entryapps/web/src/lib/tech-resource-links.ts— docs/GitHub URLsapps/web/src/lib/stack-option-normalization.ts— normalization mappingTests (5 files)
apps/cli/test/generate-reproducible-command.test.ts— updated makeConfig + expected commandsapps/cli/test/add-history-commands.test.ts— updated CLI args + expected commandapps/cli/test/template-snapshots.test.ts— added pythonGraphql to all Python snapshot configsSmoke tests (4 files)
testing/lib/presets.ts— base config + preset overridestesting/lib/generate-combos/options.ts— import, sampleScalar, base configtesting/lib/generate-combos/types.ts— fingerprint keytesting/lib/generate-combos/render.ts— fingerprint + flag renderingTest plan
bun test apps/cli/test/cli-builder-sync.test.ts— 358 pass (auto-detects schema/builder/CLI parity)bun test apps/cli/test/generate-reproducible-command.test.ts— 5 passbun test apps/cli/test/template-snapshots.test.ts -u— 66 pass (snapshots updated)bun test apps/cli/test/python-language.test.ts— 112 passbun run --cwd apps/cli check-types— cleanbun run --cwd apps/web typecheck— cleanbun run --cwd apps/web validate:tech-links— cleanpython3 -m compileallon each — all cleanpythonGraphql: none— no graphql files generated