Interface RecordFieldResolver

RecordFieldResolver defines a custom search resolver struct for managing Record model search fields.

Usually used together with search.Provider. Example:

  resolver := resolvers.NewRecordFieldResolver(
app,
myCollection,
&models.RequestInfo{...},
true,
)
provider := search.NewProvider(resolver)
...

Hierarchy

  • RecordFieldResolver

Methods

  • Resolve implements search.FieldResolver interface.

    Example of some resolvable fieldName formats:

     id
    someSelect.each
    project.screen.status
    screen.project_via_prototype.name
    @request.context
    @request.method
    @request.query.filter
    @request.headers.x_token
    @request.auth.someRelation.name
    @request.body.someRelation.name
    @request.body.someField
    @request.body.someSelect:each
    @request.body.someField:isset
    @collection.product.name

    Parameters

    • fieldName: string

    Returns ResolverResult

  • UpdateQuery implements search.FieldResolver interface.

    Conditionally updates the provided search query based on the resolved fields (eg. dynamically joining relations).

    Parameters

    Returns void

Generated using TypeDoc