Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ResolveAsDefinition

Hierarchy

  • ResolveAsDefinition

Index

Properties

Optional addOriginalField

addOriginalField: boolean

Whether keeping the field or not

example

if field is "userId" and resolved field is "user", set to true to keep "userId" in the document

Optional arguments

arguments: string

Graphql arguments of the resolver, as comma separated string, if it takes some params TODO: not sure if this, or an array of "name, type"?

example

arguments: "foobar: string,hello: string" resolver: async (document, {foobar, hello}, context, info) => {...}

Optional description

description: string

Graphql description (helper text in your graphql schema)

fieldName

fieldName: string

Resolved field name

example

if field is "userId", resolved fieldName should be "user"

TODO: it as not mandatory in earlier versions of Vulcan?

Optional resolver

resolver: QueryResolver

The resolver function

NOTE: your function will be wrapped with a permission checker, based on the field "canRead" permissions

Optional type

type: string

Alias for typeName

deprecated

Optional typeName

typeName: string

Return type of the resolver

NOTE: it's an alias for "type"

Generated using TypeDoc