Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add request data to invalidRequestWasReceived lifecycle event #7886

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

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

Conversation

Copy link

@Masadow Masadow commented Jun 10, 2024

Hi,

I want to log all request made to my API and I'm not satisfied by the didEncounterErrors because it discards Bad Request event and such.

By adding more the request object to invalidRequestWasReceived, I will be able to log information regarding the malformed request such as body and headers that will help me trouble shoot issues.

To give a concrete example, I currently have my API that is consumed by several client but one of them is intermittently spawning a lot of Bad Request issue. By having the ability to log all requests along with their headers and body content, I will be capable of identify the client that's causing the Bad Request.

dmateiu reacted with thumbs up emoji
Copy link

@Masadow: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

Copy link

netlify bot commented Jun 10, 2024
edited
Loading

👷 Deploy request for apollo-server-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5a042f3

Copy link

codesandbox-ci bot commented Jun 10, 2024
edited
Loading

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Member

glasser commented Jul 4, 2025

This looks like a good improvement. It is backwards-compatible, so I'm not going to rush to get it in before releasing v5. It needs docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /