Documentation: http://dev.grakn.ai/docs/client-api/java
Distribution
For Java through Maven
Available through https://repo.grakn.ai
xml
<repositories>
<repository>
<id>repo.grakn.ai</id>
<url>https://repo.grakn.ai/repository/maven/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupid>io.grakn.protocol</groupid>
<artifactid>grakn-session</artifactid>
<version>{version}</version>
</dependency>
<dependency>
<groupid>io.grakn.protocol</groupid>
<artifactid>grakn-keyspace</artifactid>
<version>{version}</version>
</dependency>
</dependencies>
For Python through PyPI
Available through https://pypi.org
pip install grakn-protocol
Or you can upgrade your local installation with:
pip install -U grakn-protocol
For Node.js through NPM
Now officially available through https://npmjs.com
npm install grakn-protocol
Or you can upgrade your local installation with:
npm update grakn-protocol
New Features
- **Retrievable explanations, Restrict explanations to ConceptMaps.**
Explanations can exceed the gRPC message size limits. This change allows retrieving explanations separately from the `ConceptMap` answers themselves, allowing us to break the deep nesting and long messages contained in a single answer.
The paradigm for retriving an explanation is now as follows:
A `ConceptMap` always contains a `pattern` and a boolean flag `hasExplanation`. If the `ConceptMap` has an explanation, a call can be made using message type `Explanation.Req`, returning a list of `ConceptMap` that correspond to to a single layer of the explanation tree.
Unused `Explanation` messages have been removed from answers other than `ConceptMap`.
- **Integrate checking for unused Java dependencies.**
Integrate checking for unused Java dependencies
Bugs Fixed
- **Adapt to latest changes in bazel-distribution.**
graknlabs/bazel-distribution191 changed the way Maven JARs are built. This PR adapts `protocol` to latest changes
Code Refactors
- **Add Void Answer Message type.**
With the end goal of streaming deleted concept IDs, we add a backwards-compatible message type `ConceptSingle` that contains a single concept ID. This means deleted concept IDs can now be streamed rather than be returned in one batch as a `ConceptSet`
Related to https://github.com/graknlabs/grakn/issues/4969
- **Add KGMS console protocol files.**
We try to centralise all required Grakn protocols in one repository. This PR merges the dangling protocol files from KGMS, required by KGMS console for user management, into this repository.
- **Refactor how version is provided to deployment rules.**
Adapt `graknlabs_protocol` to latest changes in bazel-distribution (in particular, graknlabs/bazel-distribution150)
Other Improvements