Skip to content

fix: save links with the anime's name on every path - #6

Closed
bludot wants to merge 1 commit into
mainfrom
fix/save-link-name
Closed

bludot wants to merge 1 commit into
mainfrom
fix/save-link-name

Conversation

@bludot

@bludot bludot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

What

Saving a TheTVDB link from the seasonal-linking view failed with:

Variable "$input" got invalid value {"animeID":…,"thetvdbID":"480909","season":1}; Field "name" of required type "String!" was not provided.

mutateSaveLink already takes a name, but the auto-linker's result entry spreads prev[anime.id], which may never have carried animeTitle, so name was undefined, JSON dropped the key, and scraper-api rejected the input.

  • The three save paths (single, bulk, manual) now resolve the name through nameFor(animeId): the loaded anime list first, then the result's own titles, then the TheTVDB title for a manual link.
  • mutateSaveLink refuses an empty name before the request, with the anime id in the message, instead of the schema error.

Checked

yarn build (tsc + vite) passes. No unit test setup exists in this repo.

🤖 Generated with Claude Code

SaveLinkInput.name is required by scraper-api. The auto-linker's result
spreads a previous entry that may never have carried animeTitle, so the
mutation sent name as undefined, which JSON drops, and the save failed
with "Field name of required type String! was not provided". The name
now comes from the loaded anime list first, then the result's titles, on
the single, bulk and manual save paths; an empty name fails before the
request with a message that says which anime.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bludot

bludot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing: the failure was a signed-out session, not the client; the server-side error message just happened to match. The name fallback is not needed.

@bludot bludot closed this Oct 5, 2026
@bludot
bludot deleted the fix/save-link-name branch October 5, 2026 20:46
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