Welcome to the Strimzi UI
{showVersion && isComplete &&
{`Version: ${version}`}
}
+ {loading || !data ? (
+
Loading...
+ ) : (
+
{`Number of topics: ${data.topics.length}`}
+ )}
{children}
);
diff --git a/client/Queries/Topics/index.ts b/client/Queries/Topics/index.ts
new file mode 100644
index 00000000..82224588
--- /dev/null
+++ b/client/Queries/Topics/index.ts
@@ -0,0 +1,15 @@
+/*
+ * Copyright Strimzi authors.
+ * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).
+ */
+import gql from 'graphql-tag';
+
+export const GET_TOPICS = gql`
+ query {
+ topics {
+ name
+ partitions
+ replicas
+ }
+ }
+`;