GraphQL API (Astra DB) - the list of existing tables and fields

318 Views Asked by At

What is the query syntax for getting the list of all previously created tables? And how can I then view selected table fields?

1

There are 1 best solutions below

0
On

Get a description of the tables in your "sample_keyspace":

query GetTables {
  keyspace(name: "sample_keyspace") {
    name
    tables {
      name
      columns {
        name
        kind
        type {
          basic
          info {
            name
          }
        }
      }
    }
  }
}