A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/modevol-com/gqloom below:

modevol-com/gqloom: Weave GraphQL schema and resolvers using Valibot, Zod, Yup or Drizzle

English | įŽ€äŊ“中文

GQLoom is a Code-First GraphQL Schema Loom used to weave runtime types in the TypeScript/JavaScript ecosystem into GraphQL Schema, helping you build GraphQL server enjoyably and efficiently.

Runtime validation libraries such as Zod, Valibot, and Yup have been widely used in backend application development. Meanwhile, when using ORM libraries like Prisma, MikroORM, and Drizzle, we also pre-define database table structures or entity models that contain runtime types. The responsibility of GQLoom is to weave these runtime types into GraphQL Schema.

When developing backend applications with GQLoom, you only need to write types using the Schema libraries you're familiar with. Modern Schema libraries will infer TypeScript types for you, and GQLoom will weave GraphQL types for you. In addition, the resolver factory of GQLoom can create CRUD interfaces for Prisma, MikroORM, and Drizzle, and supports custom input and adding middleware.

import { resolver, query, weave } from "@gqloom/core"
import { ValibotWeaver } from "@gqloom/valibot"
import * as v from "valibot"

const helloResolver = resolver({
  hello: query(v.string())
    .input({ name: v.nullish(v.string(), "World") })
    .resolve(({ name }) => `Hello, ${name}!`),
})

export const schema = weave(ValibotWeaver, helloResolver)

See Getting Started to learn how to use GQLoom.

Package Description GQLoom Core Core functions of the GraphQL loom GQLoom Drizzle Integration of GQLoom and Drizzle, capable of weaving database tables defined by Drizzle into a GraphQL Schema, and supports quickly creating CRUD interfaces from Drizzle using the resolver factory GQLoom Federation Provides GQLoom's support for Apollo Federation GQLoom Mikro ORM Integration of GQLoom and Mikro ORM, capable of weaving Mikro Entity into a GraphQL Schema, and supports quickly creating CRUD interfaces from Mikro ORM using the resolver factory GQLoom Prisma Integration of GQLoom and Prisma, capable of weaving Prisma model into a GraphQL Schema, and supports quickly creating CRUD interfaces from Prisma using the resolver factory GQLoom Valibot Integration of GQLoom and Valibot, capable of weaving Valibot Schema into a GraphQL Schema GQLoom Yup Integration of GQLoom and Yup, capable of weaving Yup Schema into a GraphQL Schema GQLoom Zod Integration of GQLoom and Zod, capable of weaving Zod Schema into a GraphQL Schema

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4