Skip to content

Commit

Permalink
Allow field args to be defined in one step, fix devknoll#6
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlvenn committed Sep 22, 2015
1 parent 0a9c40e commit d063e05
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/baseObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ export default class BaseObject {

return this;
}

args(args) {
invariant(
this.__field,
`args(...) must appear under a field`
);

this.__field.args = args;
}

arg(name, type, defaultValue, description) {
if (!description) {
Expand Down

0 comments on commit d063e05

Please sign in to comment.