apollo supergraph from folder
I have a go application that uses ent and graphql and I want to merge different graphql files into one using apollo rover but I don't want to list all the names of these files, how can I read these files from a specific folder?
You could create your config.yml with a script which will read files from folder and generate the input.
Little example for your use case a script generate_config.sh:
for file in $1
do
echo " $file:" >> 2
echo " routing_url: https://localhost:8888" >> $2
echo " schema:" >> $2
echo " file: ./$file" >> $2
done
and you run ./generate_config.sh *.graphql config.yml it'll generate a config file you can use for composing your supergraph.
Currently experiencing this - Would Rover consider supporting a glob syntax or directory for the schema file attribute? Something like:
subgraphs:
person:
routing_url: https://my-person-service.com
schema:
file: ../persona-api/src/schemas/*.graphql