fix: page_by_*_in order default + README first-screen restructure - #139
Merged
Conversation
… front First screen now answers "what is this" in reader-known terms: Python library for SQLModel apps, input→output slogan, the "You declare → nexusx generates" table moved up from line 235, and a "What it removes" contrast against typical per-transport re-declaration. Reorder: Why nexusx (five-stage narrative + mermaid) moved before Quick start; Quick start shows entities + handler only, full runnable file folded into <details>. The old slogan and semantic-level isomorphism lines moved to the "Three ideas" intro where they land after context. Feedback-driven: readers could not tell what the library was for. Co-Authored-By: Claude <noreply@anthropic.com>
…body The synthesized page_by_<key>_in root claimed ``order`` was optional in SDL (enum types render without ``!``) but the function body hard-read kwargs["order"] — KeyError for any SDL-direct caller that omits it. The mounter always sent ``order`` explicitly (path B), so federation e2e tests never exercised the omission path. - body: kwargs.get + is None fallback to page_config.default_order (is None, not truthiness, keeps invalid strings hitting the Unknown-order-profile check; GraphQL null lands as None too) - __signature__: order Parameter now carries default= so introspection sees the real contract, matching direction/limit/offset Regression test: SDL-direct query omitting order returns the package sorted by default_order — the exact path that crashed before. Note: SDL output is unchanged by this commit (enum args render without "!" either way); rendering parameter defaults into SDL is a separate follow-up. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups on top of #138 (that PR closed before these two commits landed).
fix(federation): default_order flows into page_by_*_in signature and body
Root cause (note 37): the synthesized
page_by_<key>_inroot claimedorderwas optional in SDL, but the function body hard-readkwargs["order"]—KeyErrorfor any SDL-direct caller that omits it.The mounter always sent
orderexplicitly, so federation e2e tests neverexercised the omission path.
kwargs.get+is Nonefallback topage_config.default_order(
is None, not truthiness — invalid strings still hit theUnknown-order-profile check; GraphQL
nulllands asNonetoo)__signature__:orderParameter carriesdefault=, matchingdirection/limit/offset
orderreturns the packagesorted by
default_order(crashed before)SDL output is unchanged; rendering parameter defaults into SDL is a
separate follow-up.
docs(readme): first-screen restructure
Feedback: readers could not tell what the library was from the README.
First screen now leads with the category anchor ("Python library for
SQLModel applications"), an input→output slogan, the
"You declare → nexusx generates" table moved up from line 235, and the
full Quick start folded into
<details>; positioning slogans moved to"Three ideas".
🤖 Generated with Claude Code