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

Prepare for fastify v5 #129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonnydgreen
Copy link
Collaborator

This includes the following changes

  • Updated package.json to prepare for Fastify v5
  • Reworked the error handling to ensure errors are passed through correctly
  • Updated tests to account for deduplication of federated request entities

app.graphql.addHook('preExecution', filterGraphQLSchemaHook.bind(app))
if (!err) {
app.graphql.addHook('preExecution', filterGraphQLSchemaHook.bind(app))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure about this? Isn't it swallowing the error?

Copy link
Collaborator Author

@jonnydgreen jonnydgreen Sep 17, 2024

Choose a reason for hiding this comment

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

Yeah I thought the same and it's related to the issue I was coming up against! If I leave as it, app.ready() rejects with the expected error but then the error is thrown again within this callback and causes unhandled rejection issues.

Even though we're swallowing the error here, it's still being thrown, as shown and caught in this test here: https://github.com/mercurius-js/auth/blob/main/test/introspection-filter.js#L359

wdyt? Reckon it's worth looking for a better solution?

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