-
-
Notifications
You must be signed in to change notification settings - Fork 4
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: enable bypassing persisted operations #4
Conversation
…persistedOperation`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent start 🙌
Added several space in the postgraphile option example Co-authored-by: Benjie Gillam <[email protected]>
Co-authored-by: Benjie Gillam <[email protected]>
@benjie PR suggestions Co-authored-by: Benjie Gillam <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good; almost there 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. I'll need to test it before I can merge it. What do you think about enabling it to receive a boolean as well as a function?
@benjie I added the option to pass directly a boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great; I think I might want to revise the type of payload
from any
to something a bit tighter; but other than that this looks solid 👍
Leave it with me now.
Thanks, you are awesome ! 💯 |
(I haven't forgotten about this.) |
No problem take your time |
Hey @leo91000 can you grant me permission to push to this branch? |
I am not sure how to achieve that 🤔. I invited you to the repository, is this the way ? |
That works; in future you can just check a checkbox in the right sidebar "Allow edits from maintainers": |
Release in v0.1.0 🎉 |
Yay 🎉 ! Thank you for taking time for this ! |
Thanks for writing it; it was the remaining thing stopping me from moving it to 0.x from 0.0.x 😁 |
Description
This PR is a feature originally discussed in #2
It allows for an additional postgraphile option
allowUnpersistedQueries (req: any): boolean
for bypassing persisted queries (you usually want that in development environment).Performance impact
This feature adds code that is executed if the query hash is not found. It does the following :
Security impact
Maybe we should add a warning for developpers to inform that an unpersisted query has been sent ?
Checklist
yarn lint:fix
passes.yarn test
passes.RELEASE_NOTES.md
file (if one exists).