Skip to content

Remove argument hashing from field aliases#209

Open
GrandLarseny wants to merge 3 commits intomaticzav:mainfrom
GrandLarseny:main
Open

Remove argument hashing from field aliases#209
GrandLarseny wants to merge 3 commits intomaticzav:mainfrom
GrandLarseny:main

Conversation

@GrandLarseny
Copy link
Copy Markdown

@GrandLarseny GrandLarseny commented Dec 11, 2024

Swift will use a randomizing hash function as part of the standard library. This is great for cryptographic purposes, but during my use of the swift-graphql library I have need to be able to mock data with local JSON files. Because the field keys are random with every query (due to using Swift's standard hashing function), I cannot mock data with static JSON file.

This pull request pulls out the randomized hash. I might be missing the original purpose of having a hashed value of the arguments, but I do not see any benefit to having the field name aliases include a random value in every query.

@GrandLarseny GrandLarseny changed the title Use stable hashing for arguments Remove argument hashing from field aliases Dec 13, 2024
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.

1 participant