I have backend on Express with Apollo Graph.
In my client React app im do next:
apollo codegen:generate --excludes=node_modules/* --includes=**/*.tsx --target typescript --tagName gql --outputFlat generate
I wait for folder generated, but this command gives me next error:
Error: There are multiple definitions for the herewas operation.
All operations in a project must have unique names.
If generating types, only the types for the first definition
found will be generated.at GraphQLClientProject.checkForDuplicateOperations
(....\node_modules\apollo\node_modules\apollo-language-server\lib\project\base.js:129:31)
.........
.........
Generating query files with 'typescript' target
> Apollo does not support anonymous operations
Also i have apollo.config.js:
module.exports = {
client: {
service: {
url: "http://localhost:4000/graphql"
}
}
}
I do not understand where to dig, the code took from Google search