Skip to main content
Home

Built and signed on GitHub Actions

Works with
This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score100%
Downloads3/wk
Published2 months ago (0.0.26)

Joy Automataion common cli tools

function createApp
createApp<Context extends object>(
name: string,
info: string,
env_prefix: string,
argDictionary: { [key: string]: ArgDictionaryItem; },
addSubscriptions: boolean,
addMutations: boolean,
default_port: number,
default_host: string,
log: Log,
appendSchema?: (
builder: ReturnType<getBuilder>,
args: Args,
) => ReturnType<getBuilder> | Promise<ReturnType<getBuilder>>
,
beforeServe?: (args: Args) => void | Promise<void>,
context?: Context,
): ReturnType<createMain>

Creates a GraphQL application by combining server and CLI functionality.

Type Parameters

Context extends object
  • The type of the context object used in the GraphQL schema

Parameters

name: string
  • The name of the application
info: string
  • Description or information about the application
env_prefix: string
  • Prefix for environment variables
argDictionary: { [key: string]: ArgDictionaryItem; }
addSubscriptions: boolean
  • Whether to enable GraphQL subscriptions
addMutations: boolean
  • Whether to enable GraphQL mutations
default_port: number
  • Default port number for the GraphQL server
default_host: string
  • Default hostname for the GraphQL server
log: Log
  • Logger instance
optional
appendSchema: (
builder: ReturnType<getBuilder>,
args: Args,
) => ReturnType<getBuilder> | Promise<ReturnType<getBuilder>>
  • Optional function to extend the GraphQL schema
optional
beforeServe: (args: Args) => void | Promise<void>
  • Optional function to run before starting the server
optional
context: Context = {}
  • Optional context object for GraphQL resolvers

Return Type

ReturnType<createMain>

A function that starts the application when called

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@joyautomation/conch

Import symbol

import { createApp } from "@joyautomation/conch";
or

Import directly with a jsr specifier

import { createApp } from "jsr:@joyautomation/conch";

Add Package

pnpm i jsr:@joyautomation/conch
or (using pnpm 10.8 or older)
pnpm dlx jsr add @joyautomation/conch

Import symbol

import { createApp } from "@joyautomation/conch";

Add Package

yarn add jsr:@joyautomation/conch
or (using Yarn 4.8 or older)
yarn dlx jsr add @joyautomation/conch

Import symbol

import { createApp } from "@joyautomation/conch";

Add Package

vlt install jsr:@joyautomation/conch

Import symbol

import { createApp } from "@joyautomation/conch";

Add Package

npx jsr add @joyautomation/conch

Import symbol

import { createApp } from "@joyautomation/conch";

Add Package

bunx jsr add @joyautomation/conch

Import symbol

import { createApp } from "@joyautomation/conch";