Options
All
  • Public
  • Public/Protected
  • All
Menu

StitchAppClient

The StitchAppClient is the interface to a MongoDB Stitch App backend.

It is created by the Stitch singleton.

The StitchAppClient holds a StitchAuth object for managing the login state of the client.

It provides clients for Stitch Services including the RemoteMongoClient for database and collection access.

Finally, the StitchAppClient can execute Stitch Functions.

Example

import { Stitch } from "mongodb-stitch-server-sdk"

const client = Stitch.initializeDefaultAppClient('example-stitch-app-id')

See Also

Hierarchy

  • StitchAppClient

Index

Properties

auth

The StitchAuth object representing the authentication state of this client. Includes methods for logging in and logging out.

Methods

callFunction

  • callFunction(name: string, args: any[]): Promise<any>
  • Calls the MongoDB Stitch function with the provided name and arguments, and returns the result as decoded extended JSON.

    Parameters

    • name: string

      The name of the function to call.

    • args: any[]

      The arguments to the function.

    Returns Promise<any>

close

  • close(): any

getGeneralServiceClient

  • Retrieves a general-purpose service client for the Stitch service associated with the specified name. Use this for services which do not have a well-defined interface in the SDK.

    Parameters

    • serviceName: string

      The name of the desired service in MongoDB Stitch.

    Returns StitchServiceClient

getServiceClient

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc