Pro
Pro

Reputation: 91

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

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

Upvotes: 1

Views: 393

Answers (1)

Pro
Pro

Reputation: 91

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

Upvotes: 2

Related Questions