Skip to content

Commit

Permalink
docs(graffiti-model): add documentation for graffiti model
Browse files Browse the repository at this point in the history
  • Loading branch information
tothandras committed Oct 12, 2015
1 parent 477105b commit 73ec052
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/model/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Graffiti Model

```javascript
{
Name: {
name: String!,
description: String?,
fields: {
fieldName: {
name: String? // default: key
description: String?,
nonNull: Boolean?, // required?
hidden: Boolean? // included in the GraphQL schema
type: String('String'|'Number'|'Date'|'Buffer'|'Boolean'|'ObjectID'|'Object'|'Array'),
// if type == Array
subtype: String('String'|'Number'|'Date'|'Buffer'|'Boolean'|'ObjectID'|'Object'|'Array'),
// if type == Object
fields: {
// ...
},
// if type == ObjectID
reference: String!
}
}
}
}
```

0 comments on commit 73ec052

Please sign in to comment.