Skip to content

Conversation

ronjalh
Copy link
Member

@ronjalh ronjalh commented Oct 16, 2026

Summary

The search argument of searchCatalog in backend/src/schema.graphql now describes the rules of the search text:

  • at most 80 characters and 8 words, otherwise BAD_USER_INPUT
  • text that has no searchable words (such as "ø" or "%") finds nothing, while empty text or only spaces means no text filter
  • a client should limit its input field to 80 characters

The schema is what the clients read, so these rules should be in it, and not only in docs/API.md. It is a comment change: no field, type or behaviour is changed.

Why

From the review of the search (PR #52): the search function in #52 limits the text and returns nothing for text without words, but the schema did not say so. 642 of 836 catalog descriptions have more than 8 words, and 255 have more than 80 characters, so someone who pastes a description gets BAD_USER_INPUT. The interface should cap its input field.

Order

The rules are implemented in #52. This PR only documents them, so merge it together with or after #52. There is no GraphQL server yet, so nothing depends on the order.

Testing

The schema still parses (graphql buildSchema). Only one comment block changed, and the file is not reformatted: Prettier would rewrite every one-line description in schema.graphql as a block, so it was not run on this file.

🤖 Generated with Claude Code

The search argument now says: at most 80 characters and 8 words, text without searchable words finds nothing, and clients should limit their input field.
@ronjalh ronjalh requested a review from a team as a code owner October 16, 2026 09:38
@ronjalh ronjalh self-assigned this Oct 16, 2026
Copy link
Member

@xeniag xeniag left a comment

Choose a reason for hiding this comment

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

LGTM!

@xeniag xeniag merged commit 5027777 into dev Oct 16, 2026
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants