Skip to main content

GraphQL console

Overview

The WCS GraphQL console is a browser-based GraphQL IDE that allows you to interactively query your Weaviate instance, whether it is a WCS instance or not.

The console is based on the GraphiQL library, and as such provides many helpful features for using GraphQL, such as:

  • Syntax highlighting
  • Intelligent type ahead of fields, arguments, types, and more
  • Real-time error highlighting and reporting for queries and variables
  • Automatic query and variables completion

The image below shows an example Get query on a dataset of wine reviews:

WCS console example query

Note that here, the console handily highlights the query as well as the response.

Using the console

Log in

You can find the GraphQL console by navigating to your WCS Dashboard, logging in and clicking on the button highlighted below:

WCS console button

This will open the GraphQL console, from which you can build a GraphQL query, using context-aware query and variables completion.

Select an instance

The GraphQL console can connect to any Weaviate instance, including external instances, as long as it is connected through the WCS Dashboard.

In this example, the WCS Dashboard is connected to an external instance as well as the two WCS instances.

Connected instances

Here, the GraphQL console can be used to query any of the three instances.

Clicking the Query button for any of the associated instances will open a console window for that particular instance.

Alternatively, the query window includes a drop-down menu at the top of the screen which can be used to choose the desired instance.

Instance selection dropdown

Authentication

If you are querying a WCS instance that you own through the WCS console, your queries will automatically include the appropriate authentication information in the header.

This is the case for both WCS sandboxes as well as managed clusters.

Inference key(s)

If you need to provide any inference service API keys for modules such as text2vec-cohere, text2vec-cohere, or text2vec-openai, you can do so through the "Header" tab located towards the bottom of the query screen. An example is shown below, where the X-OpenAI-Api-Key header has been set with the OpenAI API key (actual value hidden).

How to add an API inference key to a WCS console query

The header can contain multiple keys if needed (e.g. if text2vec-cohere is used with generative-openai).

The image below shows the syntax to do so (you must provide the actual values).

How to add multiple API inference keys to a WCS console query
Check your Weaviate version

If you are having any issues providing additional headers on a WCS instance, check that your Weaviate server version is 1.18.3 or higher. We added a fix in v1.18.3 which might affect this capability.

More resources