Args

sangria.schema.Args
See theArgs companion object
case class Args(raw: Map[String, Any], argsWithDefault: Set[String], optionalArgs: Set[String], undefinedArgs: Set[String], defaultInfo: Cache[String, Any])

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def arg[T](arg: Argument[T]): T
def arg[T](name: String): T

Retrieve a mandatory (non-optional) argument. If an optional argument without a default is specified an IllegalArgumentException will be thrown

Retrieve a mandatory (non-optional) argument. If an optional argument without a default is specified an IllegalArgumentException will be thrown

Value parameters

name

the name of the argument

Attributes

Returns

the argument value

Throws
IllegalArgumentException

when an optional argument without a default is specified

def argOpt[T](name: String): Option[T]

Retrieve an optional argument. If a non-optional argument is specified an error will be thrown

Retrieve an optional argument. If a non-optional argument is specified an error will be thrown

Value parameters

name

the name of the argument

Attributes

Returns

An Option containing the argument if present, or None if absent

def argOpt[T](arg: Argument[T]): Option[T]
def withArgs[A1, R](arg1: Argument[A1])(fn: A1 => R): R
def withArgs[A1, A2, R](arg1: Argument[A1], arg2: Argument[A2])(fn: (A1, A2) => R): R
def withArgs[A1, A2, A3, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3])(fn: (A1, A2, A3) => R): R
def withArgs[A1, A2, A3, A4, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4])(fn: (A1, A2, A3, A4) => R): R
def withArgs[A1, A2, A3, A4, A5, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5])(fn: (A1, A2, A3, A4, A5) => R): R
def withArgs[A1, A2, A3, A4, A5, A6, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5], arg6: Argument[A6])(fn: (A1, A2, A3, A4, A5, A6) => R): R
def withArgs[A1, A2, A3, A4, A5, A6, A7, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5], arg6: Argument[A6], arg7: Argument[A7])(fn: (A1, A2, A3, A4, A5, A6, A7) => R): R
def withArgs[A1, A2, A3, A4, A5, A6, A7, A8, R](arg1: Argument[A1], arg2: Argument[A2], arg3: Argument[A3], arg4: Argument[A4], arg5: Argument[A5], arg6: Argument[A6], arg7: Argument[A7], arg8: Argument[A8])(fn: (A1, A2, A3, A4, A5, A6, A7, A8) => R): R

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product