Skip to content

0.10.0: Drop Faraday/graphlient, fix nil GraphQL args, add proxy and collections - #72

Merged
andreibondarev merged 3 commits into
mainfrom
fix-open-issues
Oct 21, 2026
Merged

andreibondarev merged 3 commits into
mainfrom
fix-open-issues

Conversation

@andreibondarev

@andreibondarev andreibondarev commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes all open issues.

Changes

  • Drop the faraday dependency #56 Drop faraday and graphlient (which depends on Faraday) in favor of a minimal Net::HTTP client (Weaviate::Connection, Weaviate::GraphQL). The only runtime dependency is now logger.
  • interface conversion: interface {} is nil #63 query.get failed with interface conversion: interface {} is nil, not int on Weaviate >= 1.26.4 because after/limit/offset were always sent as GraphQL variables, even when null. Queries now include only the arguments that are passed. Reproduced against Weaviate 1.38.22 on main and verified fixed on this branch.
  • [Feature Request] Add support for Faraday proxy #55 New proxy: option on Weaviate::Client.new. Defaults to the http_proxy/https_proxy env vars.
  • Rename schema to collection #69 New client.collections / Weaviate::Collections. client.schema / Weaviate::Schema remain as aliases.
  • Does it supports query using distance or certainty? #42 README example for distance/certainty with near_* arguments.
  • Use PATCH not PUT for updating objects #36 Already fixed in 0.9.0 (update sends PATCH, replace sends PUT). Re-verified against a real server.
  • API keys are filtered out of request logs.
  • Fixes found by running every gem method against Weaviate 1.38.22 and checking requests against its OpenAPI spec:
    • collections.update returned a 422 on immutable settings. PUT replaces the whole definition, so changes are now deep-merged into the current one.
    • objects.exists? raised on a missing object instead of returning false.
    • objects.batch_create(tenant:) had no effect, because tenant is not a batch-level field. It is now set on each object.
    • query.explore no longer sends after, which Explore does not support.
  • Version bumped to 0.10.0.

Breaking

  • HTTP errors are raised as Weaviate::HTTPError subclasses (ResourceNotFound, ServerError, ...) instead of Faraday::Error. Network failures raise Weaviate::ConnectionFailed / Weaviate::TimeoutError. GraphQL errors raise Weaviate::GraphQLError.
  • client.connection / client.graphql return the gem's own objects instead of Faraday/Graphlient clients.
  • The adapter: option is deprecated and ignored, with a warning.

Testing

  • Live run of every public method against Weaviate 1.38.22 (backup-filesystem enabled): 63/67 pass on this branch vs 45/66 on main. The 4 remaining are expected raises: oidc 404 with auth disabled, get on a missing collection, an invalid GraphQL field, and Explore, which the server disables when multiple vectorizer modules are loaded (the case on a default 1.38 install and, per the docs, on Weaviate Cloud). On main, every GraphQL Get/Aggregate call fails against 1.38.
  • 64 specs pass on Ruby 2.7, 3.3, 3.4 and 4.0. standardrb passes on 2.7 and 3.3.
  • End-to-end run against Weaviate 1.38.22 in Docker covering collections, objects (CRUD, batch, PATCH/PUT), tenants, Get/Aggregate queries, after cursor paging, distance filtering, error classes and proxy handling.

Supersedes #70 and #39.

Closes #36
Closes #42
Closes #55
Closes #56
Closes #63
Closes #69

…add proxy and collections

- Replace faraday and graphlient with a minimal Net::HTTP client (#56)
- Only send GraphQL arguments that are passed, fixing "interface conversion:
  interface {} is nil, not int" on Weaviate >= 1.26.4 (#63)
- Add proxy: option to Weaviate::Client (#55)
- Add client.collections / Weaviate::Collections, keeping schema as an alias (#69)
- Document distance/certainty filtering (#42)
- Filter API keys out of request logs
…ore after

Found by running every gem method against Weaviate 1.38.22 and checking
requests against its OpenAPI spec:

- collections.update: PUT replaces the whole definition, so merge the
  changes into the current one instead of sending a partial body (422)
- objects.exists?: return false on 404 instead of raising
- objects.batch_create: tenant is not a batch-level field, set it per object
- query.explore: don't send after, which Explore does not support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant