Repository navigation
0.10.0: Drop Faraday/graphlient, fix nil GraphQL args, add proxy and collections - #72
Merged
Merged
Conversation
…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
# Conflicts: # README.md
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.
Fixes all open issues.
Changes
faradaydependency #56 Dropfaradayandgraphlient(which depends on Faraday) in favor of a minimalNet::HTTPclient (Weaviate::Connection,Weaviate::GraphQL). The only runtime dependency is nowlogger.query.getfailed withinterface conversion: interface {} is nil, not inton Weaviate >= 1.26.4 becauseafter/limit/offsetwere always sent as GraphQL variables, even when null. Queries now include only the arguments that are passed. Reproduced against Weaviate 1.38.22 onmainand verified fixed on this branch.proxy:option onWeaviate::Client.new. Defaults to thehttp_proxy/https_proxyenv vars.client.collections/Weaviate::Collections.client.schema/Weaviate::Schemaremain as aliases.distance/certaintywithnear_*arguments.PATCHnotPUTfor updating objects #36 Already fixed in 0.9.0 (updatesends PATCH,replacesends PUT). Re-verified against a real server.collections.updatereturned 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 returningfalse.objects.batch_create(tenant:)had no effect, becausetenantis not a batch-level field. It is now set on each object.query.exploreno longer sendsafter, which Explore does not support.Breaking
Weaviate::HTTPErrorsubclasses (ResourceNotFound,ServerError, ...) instead ofFaraday::Error. Network failures raiseWeaviate::ConnectionFailed/Weaviate::TimeoutError. GraphQL errors raiseWeaviate::GraphQLError.client.connection/client.graphqlreturn the gem's own objects instead of Faraday/Graphlient clients.adapter:option is deprecated and ignored, with a warning.Testing
main. The 4 remaining are expected raises:oidc404 with auth disabled,geton a missing collection, an invalid GraphQL field, andExplore, 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). Onmain, every GraphQLGet/Aggregatecall fails against 1.38.standardrbpasses on 2.7 and 3.3.aftercursor paging, distance filtering, error classes and proxy handling.Supersedes #70 and #39.
Closes #36
Closes #42
Closes #55
Closes #56
Closes #63
Closes #69