Skip to content

Add GraphQL schema generation script and seed schema file#1390

Merged
shangyian merged 2 commits intoDataJunction:mainfrom
shangyian:graphql-schema
May 27, 2025
Merged

Add GraphQL schema generation script and seed schema file#1390
shangyian merged 2 commits intoDataJunction:mainfrom
shangyian:graphql-schema

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented May 26, 2025

Summary

This PR adds a script to save the GraphQL schema used by the DataJunction server into a .graphql file, and seeds the initial generated schema. This supports downstream consumers that rely on a stable .graphql schema file.

Changes include:

  • A Python script (scripts/graphql_schema.py) that generates the schema from the Strawberry GraphQL app and writes it to a graphql file.
  • The initial generated schema at datajunction_server/api/graphql/schema.graphql.
  • A pre-commit hook to ensure the schema stays up-to-date

Test Plan

Locally

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

N/A

@netlify
Copy link
Copy Markdown

netlify bot commented May 26, 2025

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit e6d371f
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/683497699ff2d00008f08bf8

@shangyian shangyian marked this pull request as ready for review May 26, 2025 19:24
Copy link
Copy Markdown
Member

@agorajek agorajek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@shangyian shangyian merged commit 5c2776a into DataJunction:main May 27, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants