I am trying to setup an apollo project to learn a bit how it works.
I downloaded graphQL nodeJS template from node-graphql-server
I setup a simple angular9 application using apollo-angular
I run the server, and I wanted to autogenerate the type in my angular app.
I ran the code command
apollo codegen:generate --endpoint=http://localhost:500/ --target=typescript --globalTypesFile=./src/app/__generated__/globalTypes.ts
× 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 (C:/Users/feder/AppData/Roaming/npm-cache/_npx/3188/node_modules/apollo/lib/commands/client/codegen.js:72:39)
at Task.task (C:/Users/feder/AppData/Roaming/npm-cache/_npx/3188/node_modules/apollo/lib/commands/client/codegen.js:98:46)
I tried to setup some
But I keep getting apollo.config.js
module.exports = {
client: {
includes: [__dirname+'/src/graphql/**'],
service: {
name: "localhost",
url: "https://localhost:500",
}
}
}
and played with the command, but I keep getting the same error over and over.
How can I generate the server types ?