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

286 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 answers

0
Pro 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
          }
        }
      }
    }
  }
}