-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use embed for all graphql files sources #2198
Comments
Unfortunately, not all files can be embedded because "embed" doesn't allow embedding files that are not in the package's directory or subdirectories. There's nothing we can do about that. I recommend trying to move the graphql schema files to the same directory as the generated code. |
We should be able to set up It would be similar to what I did in #2262. |
Can you PR please? |
After looking more closely I didn't exactly understand what we were trying to do. I thought this was about the generation step, not the serving step. As @vikstrous said there's no way to do this unless the schema files are in the same directory, at which point they're already being embedded. In terms of the |
@vikstrous Now that I have tried to solve #2196 by myself I have realized that you are only using embed for the first file in the list of possible graphql files of the config
schema
field.Can you try adding another in your project (maybe even using the glob way) and check that it's not just me?
Like my one:
Just as an example, this is an exceprt of the generated.go file after your improvement:
The text was updated successfully, but these errors were encountered: