Right now when you define a resolver but have no types in the schema for it graphql-tools throws an error like "Found resolver post.getExcerpt, but no type definition for it".
It'd be great if this existed the other way around too, when you have a type defined on Query/Mutation/Subscription that doesn't have a resolver!
@mxstbr we actually used to have that, but most people didn't want it, because they used the default resolver in a lot of places, so we ended up getting rid of it.
makeExecutableSchema has a resolverValidationOptions option in which you can change that default so it throws errors if resolvers are missing:
makeExecutableSchema({ typeDefs, resolverValidationOptions: { requireResolversForAllFields: true } });
I hope that's what you were looking for! 馃檪
Most helpful comment
@mxstbr we actually used to have that, but most people didn't want it, because they used the default resolver in a lot of places, so we ended up getting rid of it.
makeExecutableSchemahas aresolverValidationOptionsoption in which you can change that default so it throws errors if resolvers are missing:makeExecutableSchema({ typeDefs, resolverValidationOptions: { requireResolversForAllFields: true } });I hope that's what you were looking for! 馃檪