I am trying to use
const tagqryTypeDefs = require('./src/mongodb/tag/tagGql');
rather than
const tagqryTypeDefs =` returnAlltags: [Tag] `;
In the following function:
const typeDefs = gql`
type Query {
findAllUser: [User]
${tagqryTypeDefs}
}
`
For tagGql it has
const tagqryTypeDefsNewa = " returnAlltagsA: [Tag] ";
module.exports = tagqryTypeDefsNewa;
it always gives me the err “Error: Query.returnAlltags defined in resolvers, but not in schema”
Could you help me with this issue and the reason behind? I have been trapped here for quite some time.
Any ideas or solution that allow me to import variables into gql“
New contributor
Gan Hong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.