BootNodeDev / dAppBooster

A modern blockchain boilerplate built to quickly get you started with your next project.
https://dappbooster.dev
MIT License
5 stars 1 forks source link

feat(subgraphs): render conditionally #172

Closed fernandomg closed 4 months ago

fernandomg commented 4 months ago

Description:

This gives more flexibility if the user fails to set up locally the subgraph.

The postinstall script will run subgraph-codegen. If it fails; it will exit with error code 1, which will fail in CI. Locally can be discarded and continue without major issue.

The failing config has a silent: true flag, to prevent throwing errors when the config is invalid, but that will only work if the codegen-cli script is not executed from a package.json script:

e.g.:

# this will work and exit silently
$ pnpm graphql-codegen --config ./src/subgraphs/codegen.ts

# this will exit with error code 1
$ pnpm subgraph-codegen

Steps:

(Required steps to reproduce or test the fix / feature)

Type of change:

How Has This Been Tested?

Remember to check that:

Screenshots

https://github.com/user-attachments/assets/4e281fda-3ffd-4023-bfb8-b385590aa446

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
dappbooster ✅ Ready (Inspect) Visit Preview Jul 19, 2024 4:52pm