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

feat: use sha256 instead of md5 for hashing the queryId #2593

Conversation

jasonbahl
Copy link
Collaborator

@jasonbahl jasonbahl commented Oct 25, 2022

What does this implement/fix? Explain your changes.

This changes the hash for the queryId to use sha256 by default instead of md5.

The algorithm is filterable to support any algorithm compatible with the php hash() function.

This plays nicer with the existing "standard" set by Apollo's Automated Persisted Queries functionality

Does this close any currently open issues?

closes #2584

Any other comments?

Before (md5)

CleanShot 2022-10-25 at 06 50 08

After (sha256)

CleanShot 2022-10-25 at 06 51 11

…to allow it to be changed to any algorithm compatible with the php hash() function.
@jasonbahl jasonbahl self-assigned this Oct 25, 2022
@jasonbahl jasonbahl requested a review from markkelnar October 25, 2022 12:42
@codeclimate
Copy link

codeclimate bot commented Oct 25, 2022

Code Climate has analyzed commit 8ba4782 and detected 0 issues on this pull request.

View more on Code Climate.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 82.184% when pulling 8ba4782 on jasonbahl:feature/#2584-use-sha256-instead-of-md5 into fffa851 on wp-graphql:develop.

Copy link
Contributor

@markkelnar markkelnar left a comment

Choose a reason for hiding this comment

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

👌

@jasonbahl jasonbahl merged commit 6338f30 into wp-graphql:develop Nov 2, 2022
@jasonbahl jasonbahl mentioned this pull request Nov 3, 2022
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.

use sha256 instead of md5 for X-GraphQL-Query-ID
3 participants