New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

marbre

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marbre

Pure code first GraphQL server

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Marbre

A GraphQL server with pure Code-First approach out of the box.

Stack:

  • Typescript
  • Fastify
  • Apollo Server
  • Nexus

The server is built using a simple Fastify application and Apollo server is consumed as a middleware in order to keep the maximum flexibility.

The GraphQL layer embraces the "code first" approach using Nexus.

Features

  • code first approach
  • strong type-safety
  • declarative configuration
  • flexibility, you have access to the Fastify app
  • configuration fully documented (TSDoc)

Usage

import { join } from 'path';
import { v4 as uuid } from 'uuid';
import Marbre from 'marbre';
import { context } from './api';
import { PORT } from './env';
import * as types from './graphql';

const marbre = new Marbre({
  types,
  context,
  contextType: {
    module: join(__dirname, 'api/context.ts'),
    name: 'GqlContext',
  },
  sourceTypes: join(__dirname, 'api/sourceTypes.ts'),
  outputDir: join(__dirname, 'api/generated/'),
  port: PORT,
  fastify: {
    genReqId: () => uuid(),
  },
});

(async () => {
  await marbre.start();
})();

License

Mozilla Public License v2.0

Keywords

graphql

FAQs

Package last updated on 11 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts