object TypedDocument
- Alphabetic
- By Inheritance
- TypedDocument
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
Api(operations: List[Operation], interfaces: List[Interface], types: List[Type], original: Document) extends Product with Serializable
The API based on one or more GraphQL query documents using a given schema.
The API based on one or more GraphQL query documents using a given schema.
It includes only the operations, interfaces and input/output types referenced in the query documents.
- operations
all operations
- interfaces
defined interfaces
- types
all types that are not operations related. This includes predefined types (e.g. ID) and input variable types.
-
case class
CodeGen(useType: String) extends TypedDocument with Product with Serializable
- useType
use this type instead and don't generate any code
- case class Enum(name: String, values: List[String]) extends Type with Product with Serializable
-
case class
Field(name: String, tpe: sangria.schema.Type, selection: Option[Selection] = None, union: List[UnionSelection] = List.empty, codeGen: Option[CodeGen] = None) extends TypedDocument with Product with Serializable
Selected GraphQL field
Selected GraphQL field
The class contains a variety of information on a selected field to allow an source code generators to define different behaviours.
- name
- the field name
- tpe
- the field type extraced from the schema
- selection
- is None for scalar types (String, Option, List, etc.)
- union
contains a list of union types that are selected with the spread operator
...UnionTypeName
- case class Interface(name: String, fields: List[Field]) extends Type with Product with Serializable
- case class Object(name: String, fields: List[Field]) extends Type with Product with Serializable
-
case class
Operation(name: Option[String], variables: List[Field], selection: Selection, original: OperationDefinition) extends TypedDocument with Product with Serializable
Operations represent API calls and are the entry points to the API.
Operations represent API calls and are the entry points to the API.
- name
the operation name
- variables
input variables
- selection
the selected fields
- original
the original sangria OperationDefinition
-
case class
Selection(fields: List[Field], interfaces: List[String] = List.empty) extends TypedDocument with Product with Serializable
A Selection represents a list of selected fields with additional meta information.
A Selection represents a list of selected fields with additional meta information.
Based on the meta information (interfaces, fragment) code generators can decide what code needs to be generated.
## Interfaces
The generated code may inherit the specified interfaces for this selection.
## Fragment
If a fragment is the source for this selection the fragment code could be generated in a separate place and referenced here by name and or type of the fragment.
- fields
the fields that are part of the selection
- interfaces
the interfaces that apply to this selection
-
sealed
trait
Type extends TypedDocument
Marker trait for GraphQL input and output types.
- case class TypeAlias(name: String, tpe: String) extends Type with Product with Serializable
- case class Union(name: String, types: List[Object]) extends Type with Product with Serializable
- case class UnionSelection(tpe: ObjectType[_, _], selection: Selection) extends TypedDocument with Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- object Selection extends Serializable