Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update asset generation to support //go:embed statements listing multiple files #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mortenmj
Copy link
Contributor

@mortenmj mortenmj commented Sep 27, 2024

bb-portal uses gqlgen to generate code for graphql schemas using gqlgen. This tool will write embed statements in this format: //go:embed "schema/scalars.graphql" "schema/ent.graphql" "schema/custom.graphql". This is the offending file: https://github.com/buildbarn/bb-portal/blob/89b62a963a047b852cfc05723452922560611588/internal/graphql/server_gen.go#L1165

Rather than fight with this code generation tool, we can update the "embedded asset generation" workflow step to handle this format. This will just grab the first file that is listed and process that, which is a bit hacky, but it should work for now.

…iple files

bb-portal uses gqlgen to generate code for graphql schemas using gqlgen.
This tool will write embed statements in this format:
//go:embed "schema/scalars.graphql" "schema/ent.graphql" "schema/custom.graphql"

Rather than fight with this code generation tool, we can update the
"embedded asset generation" workflow step to handle this format.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant