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

Rule permalinks #49

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Rule permalinks #49

wants to merge 6 commits into from

Conversation

jakearchibald
Copy link
Contributor

@jakearchibald jakearchibald commented Aug 9, 2023

Depends on #48.

#48 and similar changes break rule references. After #48, docs that refer to "rule 22 of the GraphQL design tutorial" will be referring to the wrong rule. This change aims to future-proof the rules by providing permalinks, making reference more stable.

GitHub requires that IDs start with user-content for whatever reason.

Copy link

@gmac gmac left a comment

Choose a reason for hiding this comment

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

@swalkinshaw
Copy link
Contributor

I'm not sure about this as it makes the plain markdown much less readable

@jakearchibald
Copy link
Contributor Author

@swalkinshaw I wonder if a bit of formatting could improve that.

So, instead of:

*<a href="#user-content-use-weaker-types-in-complex-cases"
id="user-content-use-weaker-types-in-complex-cases">Rule:</a> Use weaker types
for inputs (e.g. `String` instead of `Email`) when the format is unambiguous and
client-side validation is complex. This lets the server run all non-trivial
validations at once and return the errors in a single place in a single format,
simplifying the client.*

It could be:

*<a href="#user-content-use-weaker-types-in-complex-cases" id="user-content-use-weaker-types-in-complex-cases">Rule:</a>
Use weaker types for inputs (e.g. `String` instead of `Email`) when the format
is unambiguous and client-side validation is complex. This lets the server run
all non-trivial validations at once and return the errors in a single place in a
single format, simplifying the client.*

@jakearchibald
Copy link
Contributor Author

Alternatively, the rule numbers can just be dropped, without adding the permalinks.

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.

3 participants