Simple query
Now that we have our database set up, tables tracked and remote relationship defined, we are ready to start querying. This is where we start to see power of the Hasura integration.
Let's say I wanted to access Resumes
and search over the vectorized near_text
property. I can do this easily with
Hasura's GraphQL API. Head to the API
tab and run this query:
query SimpleQuery {Resume(where: { vector: { near_text: "marketing experience" } }) {application_idcontentvector}}
You should see a list of results come through as a response on the right-hand side of the explorer. The near_text
property is a vectorized field. Vector databases, such as Weaviate, store information as vectors in what are called
embeddings. These embeddings are a mathematical representation of the data. This allows us to perform similarity
searches over the data. In this case, we are searching for resumes that are similar to the phrase "marketing
experience".
Our vector database is literally storing similar information near each other in the database!
- Build apps and APIs 10x faster
- Built-in authorization and caching
- 8x more performant than hand-rolled APIs