Skip to content

client.data.checker() returns a function instead of a boolean #63

Open
@dandv

Description

@dandv
const client = weaviate.client({
  scheme: 'https',
  host: 'edu-demo.weaviate.network',
  apiKey: new weaviate.ApiKey('learn-weaviate'),
});

const id = '00ff6900-e64f-5d94-90db-c8cfa3fc851b';

result = await client.data
  .checker()
  .withClassName('JeopardyQuestion')
  .withId(id)
  .do();

console.log(typeof result, `result: ${result}`, JSON.stringify(result));

The output will be this,

function result: t=>{if(t.status>=400)return t.text().then(e=>{let r;try{r=JSON.stringify(JSON.parse(e))}catch{r=e}return Promise.reject(new Error(usage error (${t.status}): ${r}))});if(i)return t.json()} undefined

The object does exist,

result = await client.data
  .getterById()
  .withClassName('JeopardyQuestion')
  .withId(id)
  .do();

console.log(JSON.stringify(result, null, 2));

BTW the tests for checker() lack .withClassName(), which results in a warning, "Usage of objects paths without className is deprecated in Weaviate 1.19.6. Please provide className parameter".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions