Skip to main content

Built and signed on GitHub Actions

This module focuses on a comprehensive system offering a structured, typed query language for your APIs. It offers a straightforward way of creating, reading, updating, and deleting data using GraphQL.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
6 months ago (1.0.0)
class GqlField
implements IGqlField<T>

Represents a GraphQL field.

Constructors

new
GqlField(config: GqlFieldConfigType<T>)

Creates a new instance of the GqlField class.

Type Parameters

Properties

abstract
readonly
default: T
readonly
abstract
expose: boolean
readonly
relation: GqlRelationType | null
readonly
type: GqlType
readonly
private
constraints: IConstraint[]
private
name: string | null
private
value: T | null

Methods

get(): T | null

Retrieves the value of the object.

Retrieves the name of the object.

set(value: T): this

Sets the value of the object.

setName(name: string): this

Sets the name of the object.

validate(): ValidationResultType

Validates the constraints of this field.

Add Package

deno add jsr:@ooneex/gql-model

Import symbol

import { GqlField } from "@ooneex/gql-model";

---- OR ----

Import directly with a jsr specifier

import { GqlField } from "jsr:@ooneex/gql-model";

Add Package

npx jsr add @ooneex/gql-model

Import symbol

import { GqlField } from "@ooneex/gql-model";

Add Package

yarn dlx jsr add @ooneex/gql-model

Import symbol

import { GqlField } from "@ooneex/gql-model";

Add Package

pnpm dlx jsr add @ooneex/gql-model

Import symbol

import { GqlField } from "@ooneex/gql-model";

Add Package

bunx jsr add @ooneex/gql-model

Import symbol

import { GqlField } from "@ooneex/gql-model";