You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@coderich/autograph

Package Overview
Dependencies
Maintainers
1
Versions
313
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coderich/autograph

AutoGraph

0.12.3
latest
Source
npmnpm
Version published
Weekly downloads
129
-54.74%
Maintainers
1
Weekly downloads
 
Created
Source

AutoGraph

Instantly Build Relay-Compliant GraphQL APIs

AutoGraph is a powerful framework to instantly build Relay-Compliant GraphQL APIs that adhere to standards and best practice. It provides a robust set of directives that encapsulates data access, validation, transformations, and so much more!

Features

  • Instantly Connected Relay-Compliant GraphQL APIs
  • Extensible Validation & Transformation Logic
  • Unified Data Access / Abstraction Layer
  • Memoized Caching (via DataLoader)
  • Transactions, Pagination, and more!

Installation

npm i @coderich/autograph --save

Schema API

Custom Types

scalar AutoGraphMixed
enum AutoGraphScopeEnum { private protected public restricted }
enum AutoGraphOnDeleteEnum { cascade nullify restrict }
enum AutoGraphIndexEnum { unique }

Custom Directives

@model
argtypedescription
idStringSpecify database id field name (default: id)
metaStringDefine a model
aliasStringSpecify database table name (default models's name)
scopeAutoGraphScopeEnumAccess scope for this model (default protected)
driverStringSpecify database driver (default default)
namespaceStringDefine a custom namespace
createdAtStringTBD
updatedAtStringTBD
@field
argtypedescription
aliasStringSpecify database field name (default field's name)
scopeAutoGraphScopeEnumAccess scope for this field (default protected)
enforce[AutoGraphEnforceEnum!]List of Rules to enforce
noRepeatBooleanTBD
onDeleteAutoGraphOnDeleteEnumSpecify onDelete behavior
transform[AutoGraphTransformEnum!]List of Transformers to apply
materializeByStringDefine a virtual field
@index
argtypedescription
on[String!]!The field names to use for this index
typeAutoGraphIndexEnum!The type of index to create
nameStringThe name of the index

Data API

Data Access

Data Validation

Data Transformation

Each Resolver treats your schema definition as a graph of connected nodes. To begin a query or mutation, you must first identify a node in the graph as your starting point.

.match

Identify a node, returns a QueryBuilder.

const queryBuilder = resolver.match('Person');
.transaction

Identify a node, returns a Transaction.

const txn = resolver.transaction('Person');

Keywords

graphql

FAQs

Package last updated on 11 Jun 2025

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