Options
All
  • Public
  • Public/Protected
  • All
Menu

Module graphql

Index

Interfaces

Type aliases

Functions

Type aliases

DefaultFragmentOptions

DefaultFragmentOptions: { noIntlFields?: boolean; onlyViewable?: boolean }

Type declaration

  • Optional noIntlFields?: boolean

    If true, fields ending by "_intl" are considered normal strings If false, they are interpreted as fields of type Intl

  • Optional onlyViewable?: boolean

Fragment

Fragment: string | DocumentNode

GraphqlModelDefinition

GraphqlModelDefinition: CreateGraphqlModelOptionsShared

Definition of a model, to be passed to "createGraphqlModel"

RelationDefinition

RelationDefinition: (RelationDefinitionBase & { typeName: string }) | (RelationDefinitionBase & { model: VulcanGraphqlModel })

VulcanGraphqlSchema

VulcanGraphqlSchema: VulcanSchema<VulcanGraphqlFieldSchema>

Functions

Const arrayToGraphQL

  • arrayToGraphQL(fields: any): any
  • Parameters

    • fields: any

    Returns any

Const autocompleteQueryName

  • autocompleteQueryName(__namedParameters: { queryResolverName: string }): string
  • Parameters

    • __namedParameters: { queryResolverName: string }
      • queryResolverName: string

    Returns string

Const autocompleteQueryTemplate

  • autocompleteQueryTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const convertToGraphQL

  • convertToGraphQL(fields: any, indentation: any): any
  • Parameters

    • fields: any
    • indentation: any

    Returns any

Const createClientTemplate

  • createClientTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const createDataInputTemplate

  • createDataInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const createDataInputType

  • createDataInputType(typeName: any, nonNull?: boolean): string
  • Parameters

    • typeName: any
    • nonNull: boolean = false

    Returns string

Const createGraphqlModel

Const createInputTemplate

  • createInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const createInputType

  • createInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const createMutationTemplate

  • createMutationTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const createMutationType

  • createMutationType(typeName: string): string
  • Parameters

    • typeName: string

    Returns string

Const createOperationName

  • Parameters

    Returns string

Const customFilterTemplate

  • customFilterTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const customFilterType

  • customFilterType(typeName: any, filter: any): string
  • Parameters

    • typeName: any
    • filter: any

    Returns string

Const customSortTemplate

  • customSortTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const customSortType

  • customSortType(typeName: any, filter: any): string
  • Parameters

    • typeName: any
    • filter: any

    Returns string

Const deleteClientTemplate

  • deleteClientTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const deleteInputTemplate

  • deleteInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const deleteInputType

  • deleteInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const deleteMutationTemplate

  • deleteMutationTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const deleteMutationType

  • deleteMutationType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const fieldDynamicQueryName

  • fieldDynamicQueryName(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const fieldDynamicQueryTemplate

  • fieldDynamicQueryTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const fieldFilterInputTemplate

  • fieldFilterInputTemplate(__namedParameters: { customFilters?: any[]; customSorts?: any[]; fields: any[]; typeName: string }): string
  • Parameters

    • __namedParameters: { customFilters?: any[]; customSorts?: any[]; fields: any[]; typeName: string }
      • Optional customFilters?: any[]
      • Optional customSorts?: any[]
      • fields: any[]
      • typeName: string

    Returns string

Const fieldSortInputTemplate

  • fieldSortInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const fieldStaticQueryTemplate

  • fieldStaticQueryTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const fieldTemplate

  • fieldTemplate(__namedParameters: Object, indentation?: string): string
  • Parameters

    • __namedParameters: Object
    • indentation: string = ""

    Returns string

Const filterInputType

  • filterInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const getArguments

  • getArguments(args: any): string
  • Parameters

    • args: any

    Returns string

Const getDefaultFragmentName

Const getDefaultFragmentText

  • getDefaultFragmentText(model: VulcanGraphqlModelSkeleton, options?: { noIntlFields: boolean; onlyViewable: boolean }): undefined | string
  • Parameters

    • model: VulcanGraphqlModelSkeleton
    • options: { noIntlFields: boolean; onlyViewable: boolean } = ...
      • noIntlFields: boolean
      • onlyViewable: boolean

    Returns undefined | string

Const getFieldFragment

  • getFieldFragment(__namedParameters: GetFragmentInput): string
  • Parameters

    • __namedParameters: GetFragmentInput

    Returns string

Const getFragmentName

  • getFragmentName(f: DocumentNode): string
  • Parameters

    • f: DocumentNode

    Returns string

Const getModelFragment

  • getModelFragment(__namedParameters: { fragment?: Fragment; fragmentName?: string; model: VulcanGraphqlModel }): { finalFragment: string | DocumentNode; finalFragmentName: string }
  • Get model fragment in safe manner. Priority:

    1. Passed fragment, will autocompute fragment name if passing a DocumentNode (otherwise, pass an explicit fragment name)
    2. Model's defaults
    3. Throw an error if model has no default fragment (it can be empty or have fields that we don't yet support like nested)

    Parameters

    Returns { finalFragment: string | DocumentNode; finalFragmentName: string }

    • finalFragment: string | DocumentNode
    • finalFragmentName: string

Const mainTypeTemplate

  • mainTypeTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const makeAutocomplete

  • makeAutocomplete(field: any, options: { autocompletePropertyName: string; fragmentName?: string; multi?: boolean; queryResolverName?: string; valuePropertyName?: string }): any
  • Parameters

    • field: any
    • options: { autocompletePropertyName: string; fragmentName?: string; multi?: boolean; queryResolverName?: string; valuePropertyName?: string }
      • autocompletePropertyName: string
      • Optional fragmentName?: string
      • Optional multi?: boolean

        Is an array of values to autocomplete

      • Optional queryResolverName?: string

        Will use "multi" query for the model as a default, can be overriden using this option

      • Optional valuePropertyName?: string

        Value of the select

    Returns any

Const makeCheckboxgroup

  • makeCheckboxgroup(field?: Partial<any>): any
  • Parameters

    • field: Partial<any> = {}

    Returns any

Const makeRadiogroup

  • makeRadiogroup(field?: any): any
  • Parameters

    • field: any = {}

    Returns any

Const multiClientTemplate

  • multiClientTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const multiInputTemplate

  • multiInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const multiInputType

  • multiInputType(typeName: any, nonNull?: boolean): string
  • Parameters

    • typeName: any
    • nonNull: boolean = false

    Returns string

Const multiOperationName

  • Get the "multi" query operation name for a given model

    Parameters

    Returns any

Const multiOutputTemplate

  • multiOutputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const multiOutputType

  • multiOutputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const multiQuery

  • multiQuery(__namedParameters: BuildMultiQueryArgs): DocumentNode
  • Graphql Query for getting multiple documents

    Parameters

    • __namedParameters: BuildMultiQueryArgs

    Returns DocumentNode

Const multiQueryTemplate

  • multiQueryTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const multiQueryType

  • multiQueryType(multiTypeName: any): any
  • NOTE: we disallow automated pluralization Plural version must be defined by the user in order to avoid typos, special cases, i18n issues etc.

    Parameters

    • multiTypeName: any

    Returns any

Const mutationOutputTemplate

  • mutationOutputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const mutationOutputType

  • mutationOutputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const selectorInputTemplate

  • selectorInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const selectorInputType

  • selectorInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const selectorUniqueInputTemplate

  • selectorUniqueInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const selectorUniqueInputType

  • selectorUniqueInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const singleClientTemplate

  • singleClientTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const singleInputTemplate

  • singleInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const singleInputType

  • singleInputType(typeName: any, nonNull?: boolean): string
  • Parameters

    • typeName: any
    • nonNull: boolean = false

    Returns string

Const singleOperationName

  • Operation name for the single query

    Parameters

    Returns any

Const singleOutputTemplate

  • singleOutputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const singleOutputType

  • singleOutputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const singleQueryTemplate

  • singleQueryTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const singleQueryType

  • singleQueryType(typeName: any): any
  • Parameters

    • typeName: any

    Returns any

Const sortInputType

  • sortInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const updateClientTemplate

  • updateClientTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const updateDataInputTemplate

  • updateDataInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const updateDataInputType

  • updateDataInputType(typeName: any, nonNull?: boolean): string
  • Parameters

    • typeName: any
    • nonNull: boolean = false

    Returns string

Const updateInputTemplate

  • updateInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const updateInputType

  • updateInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const updateMutationTemplate

  • updateMutationTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const updateMutationType

  • updateMutationType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const updateOperationName

  • Parameters

    Returns string

Const upsertClientTemplate

  • upsertClientTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const upsertInputTemplate

  • upsertInputTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const upsertInputType

  • upsertInputType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Const upsertMutationTemplate

  • upsertMutationTemplate(__namedParameters: Object): string
  • Parameters

    • __namedParameters: Object

    Returns string

Const upsertMutationType

  • upsertMutationType(typeName: any): string
  • Parameters

    • typeName: any

    Returns string

Generated using TypeDoc