Skip to content

Task: Support schema importer#65

Open
roneli wants to merge 3 commits intomasterfrom
support-schema-importer
Open

Task: Support schema importer#65
roneli wants to merge 3 commits intomasterfrom
support-schema-importer

Conversation

@roneli
Copy link
Owner

@roneli roneli commented Dec 13, 2025

This pull request introduces a new CLI command for importing GraphQL schemas from PostgreSQL databases, improves directive handling consistency throughout the codebase, and adds comprehensive examples and test schemas for JSON field support. It also includes minor adjustments to existing commands to support new parameters and improves maintainability by centralizing directive name usage.

New CLI command and schema import functionality:

  • Added a new import command (importCmd in cmd/import.go) that allows users to introspect a PostgreSQL database and generate a GraphQL schema file, with options for schema name, tables, output file, and query/filter generation. This command is now registered in the CLI root. [1] [2]

Directive handling improvements:

  • Replaced hardcoded directive names throughout the SQL builder and related code with constants from the schema package for directives such as relation, typename, table, and isInterfaceFilter, improving maintainability and reducing risk of typos. [1] [2] [3] [4] [5] [6]

Schema and example enhancements:

  • Added a new example GraphQL schema (examples/json/graph/schema.graphql) and a test schema (pkg/execution/builders/sql/testdata/schema_json.graphql) that demonstrate support for typed and dynamic JSON fields, including filter input types and relevant directives. [1] [2]

Command improvements:

  • Updated the generate and init commands to accept an additional parameter for specifying the output server file name, improving flexibility in code generation. [1] [2]

Documentation and agent configuration:

  • Introduced a new .claude/agents/golang-reviewer.md file describing an agent for reviewing Go code according to best practices and major Go style guides, including detailed review methodology and output format.

@vercel
Copy link

vercel bot commented Dec 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
fastgql-by75 Ready Ready Preview, Comment Jan 10, 2026 2:08pm

@roneli roneli force-pushed the support-schema-importer branch from ccde34a to e1362a7 Compare December 27, 2025 19:42
@roneli roneli marked this pull request as ready for review December 27, 2025 19:43
@roneli roneli self-assigned this Dec 27, 2025
@roneli roneli added the enhancement New feature or request label Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant