houdini
houdini copied to clipboard
[Feature] support graphql-config
Hey,
just thought it would be nice if houdini would support Graphql-config to get the endpoint and, possibly, to configure the path where the schema is pulled to. What do you think?
I think its an interesting idea but I'm a bit wary to introduce/encourage yet another config file, especially one that seems to only work with CommonJS. Is there a specific tool you would like to integrate with?
For me it's the single-source of truth for my graphql-config. Mainly because its natively supported in vscode-graphql.
In which way is it bound to CommonJS? Afaik they are using esbuild and the config itself can be in a variety of formats.
re CommonJS, i just didn't see an esm file in their example but I might have missed it. I'm definitely in favor of adding support as long as we can easily embed the necessary scalar config and the rest of the houdini specifics
Graphql-config file plays well with Houdini.
You can configure a .graphqlrc.yaml with something like:
projects:
default:
schema:
- ./schema.graphql
- ./$houdini/graphql/schema.graphql
documents:
- **/*.gql
- ./$houdini/graphql/documents.gql
And vscode plugin will take is as usual.
@benbender, you would like houdini.config.js to be inside .graphqlrc.yaml with the extension mechanism?
I'm not sure any "main" config could be taken from Graphql-config, so everything would be in the extension.
I understand the wish to have everything graphql in one place.
I just would like a confirmation that this is still a need?
I'm going to close this since its gone very stale. If this is still important to someone, please let me know and I'll gladly reopen the ticket