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

Allow modification of persisted queries but not the query string itself #259

Open
ChrisWiegman opened this issue Sep 12, 2023 · 1 comment

Comments

@ChrisWiegman
Copy link
Member

GitHub

Description

Currently, one can modify a persisted query and change both the meta data as well as the query string itself. A query shouldn’t be able to change. Enforce that users can change the meta data but not modify the query string.

Acceptance Criteria

...

Technical Details

...

References

...

Open Questions

What is the editor behavior?

What is the mutation behavior?

If the query is ‘published’ and content is different on save, do not save the content change? Instead return an error. In admin editor this shows at the top of page. For mutation, this would be a return error.

Suggest to the user in the error message to convert the published post to draft to edit it and save? Then publish again? This would result in different md5 hash id to the query string. The other md5 hash of the query string would be removed, ie, queries for that query_id would fail.

What about a ‘clone’ or ‘save as new’ ability? When see error message in admin editor, there is a check box to ‘save as new’ on publish. If selected, the old/existing post is saved to a new post type? Then the save of the existing query is processed with the new content string.

@ChrisWiegman
Copy link
Member Author

PR #255

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

No branches or pull requests

3 participants