Oh, ok! Gotcha!
So Graphql is basically a language to specify how you want to query things. The cool feature of it is that you can specify what you want to do and what exact properties you want to get retrieved.
So if you have 100 properties, and only want 2 of them, you can specify that when requesting, and avoid retrieving all the other 98 properties you don’t want.
Weaviate has Graphql implemented in some endpoints (mostly for querying), which means you can pass a graphql query and weaviate will run the results for you.
Now, if you want to call a graphql query using the python client, for example, you can do, using python v4:
my_graphql_query = '''{
Get {
Q1: MyClass(tenant: "rep-1") {
name
}
Q2: MyClass(tenant: "rep-2") {
name
}
}
}'''
client.graphql_raw_query(my_graphql_query)
So, as expected, you can do all sorts of things in graphql, like a neartext, rerank, etc, considering you have those properly configured for your collection.
If you want to do a near text, using graphql directly, you can always check our documentation. There will be a graphql tab, showing how to accomplish that, like in here:
for instance:
{
Get {
JeopardyQuestion(
limit: 2
nearText: {
concepts: ["animals in movies"]
}
) {
question
answer
_additional {
distance
}
}
}
}
If you are not sure how to build you graphql query, check our console. One of the other cool feature of graphql is that it has all the options exposed “inside” the endpoint, which allows graphql clients to build auto complete features:
or, you can navigate in it’s documentation, and check all the available options:
You can learn more about Weaviate’s graphql api here:
Let me know if this helps 