Options
All
  • Public
  • Public/Protected
  • All
Menu

Module remix-graphql/src

Index

Type aliases

Context

Context<Custom>: Custom & { request: Request; redirect?: any }

Type parameters

  • Custom: CustomContext = {}

DeriveStatusCodeFunction

DeriveStatusCodeFunction: typeof deriveStatusCode

Functions

Const formDataAsJson

  • formDataAsJson(args: DataFunctionArgs): Promise<Variables>
  • Converts formData from action loader args to JSON Useful when your mutation variables have a different structure than your form.

    Parameters

    • args: DataFunctionArgs

    Returns Promise<Variables>

getActionFunction

  • getActionFunction(__namedParameters: { context?: CustomContext; deriveStatusCode?: typeof defaultDeriveStatusCode; schema: GraphQLSchema }): ActionFunction
  • Parameters

    • __namedParameters: { context?: CustomContext; deriveStatusCode?: typeof defaultDeriveStatusCode; schema: GraphQLSchema }
      • Optional context?: CustomContext
      • Optional deriveStatusCode?: typeof defaultDeriveStatusCode
      • schema: GraphQLSchema

    Returns ActionFunction

getLoaderFunction

  • getLoaderFunction(__namedParameters: { context: CustomContext; deriveStatusCode?: typeof defaultDeriveStatusCode; schema: GraphQLSchema }): LoaderFunction
  • Parameters

    • __namedParameters: { context: CustomContext; deriveStatusCode?: typeof defaultDeriveStatusCode; schema: GraphQLSchema }
      • context: CustomContext
      • Optional deriveStatusCode?: typeof defaultDeriveStatusCode
      • schema: GraphQLSchema

    Returns LoaderFunction

processRequestWithGraphQL

  • processRequestWithGraphQL(__namedParameters: { args: DataFunctionArgs; context?: CustomContext; deriveStatusCode?: typeof defaultDeriveStatusCode; query: string; schema: GraphQLSchema; variables?: Variables }): Promise<Response>
  • Parameters

    • __namedParameters: { args: DataFunctionArgs; context?: CustomContext; deriveStatusCode?: typeof defaultDeriveStatusCode; query: string; schema: GraphQLSchema; variables?: Variables }
      • args: DataFunctionArgs
      • Optional context?: CustomContext
      • Optional deriveStatusCode?: typeof defaultDeriveStatusCode
      • query: string
      • schema: GraphQLSchema
      • Optional variables?: Variables

    Returns Promise<Response>

sendGraphQLRequest

  • sendGraphQLRequest(__namedParameters: { args: DataFunctionArgs; endpoint: string; headers?: HeadersInit; query: string; variables?: Variables }): Promise<Response>
  • Parameters

    • __namedParameters: { args: DataFunctionArgs; endpoint: string; headers?: HeadersInit; query: string; variables?: Variables }
      • args: DataFunctionArgs

        Mutation variables will be computed based on args.

        If you form input name do not match the variable name, set "variables" explicitely instead.

      • endpoint: string
      • Optional headers?: HeadersInit
      • query: string
      • Optional variables?: Variables

        Optional explicit variables

    Returns Promise<Response>

Generated using TypeDoc