Skip to content

Commit

Permalink
Merge pull request #75 from scala-steward/update/scalafmt-core-3.0.0
Browse files Browse the repository at this point in the history
Update scalafmt-core to 3.0.0
  • Loading branch information
sh0hei authored Aug 20, 2021
2 parents 4be40b6 + 23c2319 commit b3b6897
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 2.7.5
version = 3.0.0

style = default

Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/sangria/marshalling/ArrayMapBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import scala.annotation.tailrec
import scala.collection.immutable.{ListMap, VectorBuilder}
import scala.collection.mutable.{Set => MutableSet}

/** GraphQL `Map` builder that knows keys in advance and able to preserve an original fields sort order
/** GraphQL `Map` builder that knows keys in advance and able to preserve an original fields sort
* order
*/
class ArrayMapBuilder[T](keys: Seq[String]) extends Iterable[(String, T)] {
private val elements = new Array[(String, T)](keys.size)
Expand Down
11 changes: 7 additions & 4 deletions src/main/scala/sangria/marshalling/InputUnmarshaller.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ trait InputUnmarshaller[Node] {
def isEnumNode(node: Node): Boolean
def isVariableNode(node: Node): Boolean

/** @return Scalar values are Scala String, Int, Double, Boolean and Enum values defined in the schema
* as well as ast nodes if appropriate.
/** @return
* Scalar values are Scala String, Int, Double, Boolean and Enum values defined in the schema
* as well as ast nodes if appropriate.
*
* TODO: find better approach. Ideally the should be only one `getScalarValue` method witch returns normal scala values
* TODO: find better approach. Ideally the should be only one `getScalarValue` method witch
* returns normal scala values
*/
def getScalarValue(node: Node): Any

Expand All @@ -40,7 +42,8 @@ trait InputUnmarshaller[Node] {
* - scala.BigInt
* - scala.BigDecimal
*
* @return Only normal scala scalar values
* @return
* Only normal scala scalar values
*/
def getScalaScalarValue(node: Node): Any

Expand Down
12 changes: 8 additions & 4 deletions src/main/scala/sangria/marshalling/ResultMarshaller.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ trait ResultMarshaller {
* - scala.BigInt
* - scala.BigDecimal
*
* Implementation may also support additional scala types if underlying data format supports them (like Dates, or BLOBs).
* Implementation may also support additional scala types if underlying data format supports them
* (like Dates, or BLOBs).
*
* @param value coerced scalar value
* @return marshaled node
* @param value
* coerced scalar value
* @return
* marshaled node
*/
def scalarNode(value: Any, typeName: String, info: Set[ScalarValueInfo]): Node

Expand Down Expand Up @@ -60,7 +63,8 @@ object ResultMarshaller {
scalaMarshalling.scalaResultMarshaller
}

/** Alters the behaviour of the executor and marshals raw (in-scala coerced representation) or scalar values and enums.
/** Alters the behaviour of the executor and marshals raw (in-scala coerced representation) or
* scalar values and enums.
*/
trait RawResultMarshaller extends ResultMarshaller {
def rawScalarNode(rawValue: Any): Node
Expand Down

0 comments on commit b3b6897

Please sign in to comment.