Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tracing): Warn if resolvers is not defined in ApolloServer config #5850

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

onurtemizkan
Copy link
Collaborator

@onurtemizkan onurtemizkan commented Sep 28, 2022

ref #5808

This PR actually doesn't solve the source of #5808 (supporting ApolloServer instances configured by a pre-constructed schema).

But logs a warning instead of breaking the application when resolvers array is not defined in the ApolloServer configuration.

return function (this: { config: { resolvers?: ApolloModelResolvers[]; schema?: unknown; modules?: unknown } }) {
if (!this.config.resolvers) {
if (this.config.schema) {
logger.warn(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the debug logging flag here!

@onurtemizkan onurtemizkan enabled auto-merge (squash) September 28, 2022 20:15
@AbhiPrasad AbhiPrasad merged commit 76f87f0 into master Sep 29, 2022
@AbhiPrasad AbhiPrasad deleted the onur/apollo-resolver-undefined branch September 29, 2022 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants