Skip to content

Conversation

@edmondchuc
Copy link
Contributor

@edmondchuc edmondchuc commented Jan 30, 2026

Summary of changes

This PR adds user docs for the PR #3372.

The preview link is at: https://rdflib--3383.org.readthedocs.build/en/3383/graphdb/

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • If the change adds new features or changes the RDFLib public API:
    • Created an issue to discuss the change and get in-principle agreement.
    • Considered adding an example in ./examples.
  • If the change has a potential impact on users of this project:
    • Added or updated tests that fail without the change.
    • Updated relevant documentation to avoid inaccuracies.
    • Considered adding additional documentation.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@edmondchuc edmondchuc mentioned this pull request Jan 30, 2026
8 tasks

### Creating a client instance

The [`GraphDBClient`][rdflib.contrib.graphdb.client.GraphDBClient] class is the main entry point for interacting with the GraphDB REST API. To create an instance, pass the base URL of the GraphDB server to the constructor and optionally a username and password tuple for basic authentication.

This comment was marked as resolved.

Choose a reason for hiding this comment

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

Not sure about this one, but is the idea to add a link to the class? Currently, this is poorly rendered IMO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is mkdocstring syntax to link to the class doc. Could you clarify what part is poorly rendered?

Choose a reason for hiding this comment

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


```python
from rdflib.contrib.graphdb.client import GraphDBClient

Choose a reason for hiding this comment

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

This example is very confusing. We pass "admin"/"root" twice and have two different clients. Can we provide an example, where we login a user, which is not the admin ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed the login example to a separate user in commit 78b938d

Choose a reason for hiding this comment

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

So, if GraphDB security is enabled, one must use the admin user to create a client in order to login the other user? This looks very fishy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any user who wants to retrieve a GDB token can use this method. How they use the token is up to them, but I’ve provided a simple example showing how it can also be used with the GraphDBClient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the doc example in commit 60e82f4 - hopefully this makes it clearer.

docs/graphdb.md Outdated

```python
size_info = client.repos.size("my-repo")
print(f"Size: {size_info.size}")

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is fixed in bff4aef

docs/graphdb.md Outdated

##### Querying an agent

To send a natural language query to an agent:

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ve updated it (in commit bd4b4a3) to use more general LLM language and specified sparql_query in the example. I’ve avoided re-listing the possible tool types here since they are already documented in the GraphDB docs, and I’d prefer to keep this aligned with the upstream source rather than duplicate it.

Copy link

@nelly-hateva nelly-hateva Jan 30, 2026

Choose a reason for hiding this comment

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

I don't think "To send a query to an agent:" is accurate. I prefer to phrase it as in the GraphDB documents Call agent query method/assistant tool. Also the query in the example must be a valid SPARQL query, for example ask {?s ?p ?o}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great, thanks for the pointers. I've updated the text to reflect your suggestions in 935c91a.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As requested, TTYG is now removed in commit dd1bd30.

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.

2 participants