I'm running client:codegen on apollo/2.1.2 darwin-x64 node-v10.13.0
(iMac)
The endpoint is successfully reached but codegen can't seem to find any files that are specified using the --queries option. The files do exist though. I get the same error if I use --localSchemaFile=schema.json instead of --endpoint. See the 2 commands run below:
$ apollo client:codegen --target=typescript --endpoint=http://localhost:8080/graphql --queries="./src/app/graphqlPublic/*.graphql"
✔ Loading Apollo Project
✖ Generating query files with 'typescript' target
→ No operations or fragments found to generate code for.
Error: No operations or fragments found to generate code for.
at write (/.npm-global/lib/node_modules/apollo/lib/commands/client/codegen.js:58:39)
at Task.task (/.npm-global/lib/node_modules/apollo/lib/commands/client/codegen.js:83:46)
$ cat ./src/app/graphqlPublic/page-visit.graphql
query PageVisit($page: String!){
pageVisit(page:$page)
}
I'm running client:codegen on apollo/2.1.2 darwin-x64 node-v10.13.0
(iMac)
The endpoint is successfully reached but codegen can't seem to find any files that are specified using the --queries option. The files do exist though. I get the same error if I use --localSchemaFile=schema.json instead of --endpoint. See the 2 commands run below:
$ apollo client:codegen --target=typescript --endpoint=http://localhost:8080/graphql --queries="./src/app/graphqlPublic/*.graphql"
✔ Loading Apollo Project
✖ Generating query files with 'typescript' target
→ No operations or fragments found to generate code for.
Error: No operations or fragments found to generate code for.
at write (
/.npm-global/lib/node_modules/apollo/lib/commands/client/codegen.js:58:39)/.npm-global/lib/node_modules/apollo/lib/commands/client/codegen.js:83:46)at Task.task (
$ cat ./src/app/graphqlPublic/page-visit.graphql
query PageVisit($page: String!){
pageVisit(page:$page)
}