Class StitchServer

Hierarchy

  • StitchServer

Constructors

  • Parameters

    • __namedParameters: {
          cache?: boolean;
          cachePath?: string;
          ignore?: string[];
          logLevel?: "error" | "warn" | "info" | "debug" | "silent" | "verbose";
          plugins: ContentHandler<any>[];
          port?: number;
      }
      • Optional cache?: boolean

        Global cache option. Overrides plugin's cache option.

      • Optional cachePath?: string

        By default the cache is writte to ./.cache.json

      • Optional ignore?: string[]

        A list of globs to ignore. Will always include .git and node_modules.

      • Optional logLevel?: "error" | "warn" | "info" | "debug" | "silent" | "verbose"

        Set the log level.

      • plugins: ContentHandler<any>[]

        A list of plugins/handlers, see ContentHandler

      • Optional port?: number

        The port for the apollo server.

    Returns StitchServer

Properties

port: number

Methods

  • Creates a filter which will filter entries to at least have the property passed defined.

    Parameters

    • exists: undefined | InputMaybe<string[]>

    Returns ContentFilter

  • Creates a filter which will filter entries based on their main properties to be equal to or contain (in the case of arrays) the filter properties passed.

    Parameters

    • filter: undefined | InputMaybe<Filter>

    Returns ContentFilter

  • Similar to entriesFilter but value must be an exact match. And the property can be any property, not just known properties.

    Should be passed to the server in the form:

    "extra.some.prop" : true
    

    Parameters

    • matches: undefined | InputMaybe<Record<string, any>>

    Returns ContentFilter

  • Starts the database scanning and processing files.

    Does not need to be awaited before starting the server since the server will check it's ready before processing requests.

    Returns Promise<void>

  • Start the apollo graphql server.

    Returns Promise<ServerInfo>

Generated using TypeDoc