I have the following situation to address: - In on...
# general
h
I have the following situation to address: • In one repo, we have a Python application. It uses Strawberry to generate a GraphQL schema from some models. • In another repo, we have a React application. It uses Apollo to codegen GraphQL code from a schema. Right now, it gets the schema from a running version of the Python code. I’d like to unify the repos, have the Python build process store the GraphQL schema as a static file (that gets checked in), and have the React/Apollo build use that file for the codegen. My understanding is that Pants is a good fit for the Python part, but, doesn’t have JS support yet, so I’m wondering what folks here would recommend as a best-practice way to address this.
w
I think as of Pants 2.17, we have experimental JS support - but possibly not documented yet. Alternatively, there is the adhoc_tool that you could check out https://www.pantsbuild.org/docs/reference-adhoc_tool
👀 1
🙏 1
h
I’ll check out the experimental JS support. The adhoc tool, the idea would be to essentially run npm at some point? (or some JS-ish monorepo tool?)
w
Yep, sec - let me find my pnpm example
https://gist.github.com/sureshjoshi/98fb09f2a340f7c1dad270c4887865a0 That's running pnpm on a sveltekit project + doing a few other things.
h
Got it — thank you!