FakeResolver

interface FakeResolver

Provides fakes values for Data builders

Functions

Link copied to clipboard
abstract fun resolveLeaf(context: FakeResolverContext): Any

Resolves a leaf (scalar or enum) type. Note that because of list and not-nullable types, the type of context.mergedField is not always the leaf type. You can get the type of the leaf type with:

Link copied to clipboard
abstract fun resolveListSize(context: FakeResolverContext): Int

Resolves the size of a list. Note that lists might be nested. You can use context.path to get the current nesting depth

Link copied to clipboard
abstract fun resolveMaybeNull(context: FakeResolverContext): Boolean
Link copied to clipboard
abstract fun resolveTypename(context: FakeResolverContext): String

Inheritors

Link copied to clipboard