Friday, 1 November 2019

Spring boot: GraphQL: Query type


Each GraphQL service has a query type. Query types define an entry point of every GraphQL query.

Example
type Query {
    employees: [Employee]
}

Complete GraphQL schema looks like below

type Query {
    employees: [Employee]
}

type Employee {
    id: Int
    firstName: String
    lastName: String
    email: String
    permanentAddress: Address
    temporaryAddress: Address
    department: Department
}

type Address {
  id: Int
  city: String
  state: String
  country: String
}

type Department{
  id: Int
  departmentName: String
}



Previous                                                    Next                                                    Home

Kafka cli: delete a topic


Below command is used to delete a topic.
kafka-topics.sh --bootstrap-server {bootStratServerDetails} --topic {topicName} --delete

Example
kafka-topics.sh --bootstrap-server localhost:9092 --topic mySecondTopic --delete

$kafka-topics.sh --bootstrap-server localhost:9092 --list
myFirstTopic
mySecondTopic
$
$kafka-topics.sh --bootstrap-server localhost:9092 --topic mySecondTopic --delete
$
$kafka-topics.sh --bootstrap-server localhost:9092 --list
myFirstTopic


Previous                                                    Next                                                    Home

Kafka cli: Describe topic


Below command give more information about the topic.

kafka-topics.sh --bootstrap-server {bootStratServerDetails} --topic {topicName} --describe

$kafka-topics.sh --bootstrap-server localhost:9092 --list
myFirstTopic
$
$kafka-topics.sh --bootstrap-server localhost:9092 --topic myFirstTopic --describe
Topic:myFirstTopic PartitionCount:3 ReplicationFactor:1 Configs:segment.bytes=1073741824
 Topic: myFirstTopic Partition: 0 Leader: 0 Replicas: 0 Isr: 0
 Topic: myFirstTopic Partition: 1 Leader: 0 Replicas: 0 Isr: 0
 Topic: myFirstTopic Partition: 2 Leader: 0 Replicas: 0 Isr: 0



Previous                                                    Next                                                    Home