Skip to content

Commit 6f9340c

Browse files
committed
docs: Updated README
1 parent f726096 commit 6f9340c

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ data class Entity(
3535
)
3636

3737
val EntityObjectType: GraphQLObjectType<Entity> = GraphQLObjectType {
38-
name("Entity")
39-
description { "Some entity." }
38+
name = "Entity"
39+
description = "Some entity."
4040

4141
field(Entity::name) {
42+
description = "The name of the entity."
4243
type { GraphQLStringType }
43-
description { "The name of the entity." }
4444
}
4545

4646
field("nameWithCustomVar") {
47+
description = "The name of the entity with the customVar in the context."
4748
type { GraphQLStringType.Nullable }
48-
description { "The name of the entity with the customVar in the context." }
4949

5050
get {
5151
it.name + context["myCustomVar"]
@@ -58,8 +58,8 @@ val EntitiesFlow = MutableSharedFlow<Entity>()
5858
fun Application.configureGraphQL() {
5959
// you can choose any of these IDEs
6060
// graphiql()
61-
// sandbox()
62-
playground() // recommended
61+
// apolloSandbox()
62+
graphqlPlayground() // recommended
6363

6464
graphql {
6565
// add import org.cufy.graphkt.java.`graphql-java`
@@ -73,30 +73,30 @@ fun Application.configureGraphQL() {
7373

7474
schema {
7575
query {
76-
description { "The root query." }
76+
description = "The root query."
7777

7878
field("getEntityWithName") {
79+
description = "Get an entity instance."
7980
type { EntityObjectType }
80-
description { "Get an entity instance." }
8181

8282
val nameArg = argument<String>("name") {
83+
description = "The name of the entity."
8384
type { GraphQLStringType }
84-
description { "The name of the entity." }
8585
}
8686

8787
get { Entity(nameArg()) }
8888
}
8989
}
9090
mutation {
91-
description { "The root mutation" }
91+
description = "The root mutation"
9292

9393
field("pushEntity") {
94+
description = "Push an entity to subscribers"
9495
type { EntityObjectType }
95-
description { "Push an entity to subscribers" }
9696

9797
val nameArg = argument<String>("name") {
98+
description = "The name of the entity."
9899
type { GraphQLStringType }
99-
description { "The name of the entity." }
100100
}
101101

102102
get {
@@ -107,11 +107,11 @@ fun Application.configureGraphQL() {
107107
}
108108
}
109109
subscription {
110-
description { "The root subscription" }
110+
description = "The root subscription"
111111

112112
field("subscribeToEntities") {
113+
description = "Subscribe to pushed entities"
113114
type { EntityObjectType }
114-
description { "Subscribe to pushed entities" }
115115

116116
getFlow { EntitiesFlow }
117117
}

0 commit comments

Comments
 (0)