Table of documentation contents

Javascript (beta)

A Javascript library

Basics

  • A javascript weaviate client makes using the Weaviate API easier.
  • This package is still in beta, please leave issues or feature requests here.

Install

The package can be easily installed using npm.

npm install weaviate-client -S

You can now include Weaviate like:

const weaviate = require('weaviate-client')({
    scheme: 'https',
    host: 'www.host.com',
    headers: { // <== headers are optional
        Authorization: 'Bearer ' + token
    }
});

Query

The client allows to send simple GraphQL queries in the form of strings. You can learn how to format your GraphQL queries here.

weaviate
    .graphql(`{
        Get {
            Things {
                Article {
                    title
                    url
                    wordCount
                }
            }
        }
    }`)
    .then(function (result) {
        console.log(result.data)
    })`

More Resources

If you can’t find the answer to your question here, please use the:

  1. Knowledge base of old issues. Or,
  2. For questions: Stackoverflow. Or,
  3. For issues: Github.
  4. For Frequently Asked Questions.
Tags
  • Javascript
  • Library