Skip to content

Commit

Permalink
Reactor LangNodes to GraphQLNodes
Browse files Browse the repository at this point in the history
  • Loading branch information
VerachadW committed Oct 2, 2016
1 parent b67b896 commit 9489cbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions core/src/main/kotlin/com/taskworld/kraph/Kraph.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ class Kraph(f: Kraph.() -> Unit) {
document = DocumentNode(OperationNode(OperationType.MUTATION, fields = MutationBuilder().apply(builder).mutations, name = name))
}

private fun selectionSet(f: FieldBuilder.() -> Unit): SelectionSetNode {
val builder = FieldBuilder().apply(f)
return SelectionSetNode(builder.fields)
}

override fun toString(): String {
return document.print()
}
Expand Down Expand Up @@ -51,12 +56,6 @@ class Kraph(f: Kraph.() -> Unit) {
}
fields += FieldNode(name, arguments = argNode, selectionSet = selectionSet)
}

}

private fun selectionSet(f: FieldBuilder.() -> Unit): SelectionSetNode {
val builder = FieldBuilder().apply(f)
return SelectionSetNode(builder.fields)
}

}
Expand Down

0 comments on commit 9489cbd

Please sign in to comment.