Options
All
  • Public
  • Public/Protected
  • All
Menu

Module react-hooks

Index

Functions

Const buildCreateQuery

  • buildCreateQuery(__namedParameters: { fragment?: Fragment; fragmentName?: string; model: VulcanGraphqlModel }): DocumentNode
  • Parameters

    • __namedParameters: { fragment?: Fragment; fragmentName?: string; model: VulcanGraphqlModel }
      • Optional fragment?: Fragment
      • Optional fragmentName?: string
        deprecated

        Prefer passing a fragment using gql tag, name will be computed automatically

      • model: VulcanGraphqlModel

    Returns DocumentNode

Const buildSingleQuery

  • buildSingleQuery(__namedParameters: { extraQueries?: string; fragment?: Fragment; fragmentName?: string; model: VulcanGraphqlModel }): DocumentNode
  • GraphQL query for a single query

    Parameters

    • __namedParameters: { extraQueries?: string; fragment?: Fragment; fragmentName?: string; model: VulcanGraphqlModel }
      • Optional extraQueries?: string
      • Optional fragment?: Fragment
      • Optional fragmentName?: string
        deprecated

        Prefer passing a fragment using gql tag, name will be computed automatically

      • model: VulcanGraphqlModel

    Returns DocumentNode

Const buildUpdateQuery

  • buildUpdateQuery(__namedParameters: { fragment?: Fragment; fragmentName?: string; model: VulcanGraphqlModel }): DocumentNode
  • Parameters

    • __namedParameters: { fragment?: Fragment; fragmentName?: string; model: VulcanGraphqlModel }
      • Optional fragment?: Fragment
      • Optional fragmentName?: string
      • model: VulcanGraphqlModel

    Returns DocumentNode

Const useCreate

  • useCreate<TModel>(options: UseCreateOptions<any, CreateVariables<any>>): UseCreateResult<TModel, any>
  • Type parameters

    • TModel = any

    Parameters

    Returns UseCreateResult<TModel, any>

Const useDelete

  • useDelete<TModel>(options: UseDeleteOptions): UseDeleteResult<TModel, any>
  • Type parameters

    • TModel

    Parameters

    • options: UseDeleteOptions

    Returns UseDeleteResult<TModel, any>

Const useMulti

  • useMulti<TModel, TData>(options: UseMultiOptions<TModel, TData, MultiVariables<any>>, props?: {}): MultiQueryResult<TModel, TData>
  • Type parameters

    • TModel = any

    • TData = any

    Parameters

    • options: UseMultiOptions<TModel, TData, MultiVariables<any>>
    • props: {} = {}

    Returns MultiQueryResult<TModel, TData>

Const useSingle

  • useSingle<TModel, TData>(options: UseSingleOptions<TModel, any, any>, props?: {}): SingleResult<TModel, any>
  • Fetch a single, known document

    Type parameters

    • TModel = any

    • TData = any

    Parameters

    Returns SingleResult<TModel, any>

Const useUpdate

  • useUpdate<TModel>(options: UseUpdateOptions<any>): UseUpdateResult<TModel>
  • const [updateFoo] = useUpdate({model: Foo}) ... await updateFoo({input: { id: "1234", data: myNewFoo }})

    Type parameters

    • TModel = any

    Parameters

    • options: UseUpdateOptions<any>

    Returns UseUpdateResult<TModel>

Const useUpsert

  • useUpsert<TModel>(options: UseUpsertOptions<any>): UseUpsertResult<TModel, any>
  • Type parameters

    • TModel = any

    Parameters

    • options: UseUpsertOptions<any>

    Returns UseUpsertResult<TModel, any>

Generated using TypeDoc