@coderich/autograph
AutoGraph
Last updated 2 days ago by richard.livolsi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @coderich/autograph 
SYNC missed versions from official npm registry.

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
arg type description
id String Specify database id field name (default: id)
meta String Define a model
alias String Specify database table name (default models's name)
scope AutoGraphScopeEnum Access scope for this model (default protected)
driver String Specify database driver (default default)
namespace String Define a custom namespace
createdAt String TBD
updatedAt String TBD
@field
arg type description
alias String Specify database field name (default field's name)
scope AutoGraphScopeEnum Access scope for this field (default protected)
enforce [AutoGraphEnforceEnum!] List of Rules to enforce
noRepeat Boolean TBD
onDelete AutoGraphOnDeleteEnum Specify onDelete behavior
transform [AutoGraphTransformEnum!] List of Transformers to apply
materializeBy String Define a virtual field
@index
arg type description
on [String!]! The field names to use for this index
type AutoGraphIndexEnum! The type of index to create
name String The 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');

Current Tags

  • 0.1.2                                ...           latest (2 days ago)

26 Versions

  • 0.1.2                                ...           2 days ago
  • 0.1.1                                ...           6 days ago
  • 0.1.0                                ...           7 days ago
  • 0.0.23                                ...           8 days ago
  • 0.0.22                                ...           9 days ago
  • 0.0.21                                ...           10 days ago
  • 0.0.20                                ...           11 days ago
  • 0.0.19                                ...           20 days ago
  • 0.0.18                                ...           20 days ago
  • 0.0.17                                ...           21 days ago
  • 0.0.16                                ...           21 days ago
  • 0.0.15                                ...           a month ago
  • 0.0.14                                ...           a month ago
  • 0.0.13                                ...           a month ago
  • 0.0.12                                ...           a month ago
  • 0.0.11                                ...           a month ago
  • 0.0.10                                ...           3 months ago
  • 0.0.9                                ...           3 months ago
  • 0.0.8                                ...           3 months ago
  • 0.0.7                                ...           4 months ago
  • 0.0.6                                ...           5 months ago
  • 0.0.5                                ...           5 months ago
  • 0.0.4                                ...           5 months ago
  • 0.0.3                                ...           5 months ago
  • 0.0.2                                ...           5 months ago
  • 0.0.1                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 6
This Month 152
Last Day 0
Last Week 78
Last Month 47
Dependencies (15)
Dev Dependencies (9)

Copyright 2014 - 2016 © taobao.org |