grapher/lib/query/nodes/fieldNode.js
2016-09-16 19:22:23 +03:00

14 lines
No EOL
255 B
JavaScript

export default class FieldNode {
constructor(name, body) {
this.name = name;
this.body = body;
}
isGlobal() {
return this.name === '$all';
}
applyFields(fields) {
fields[this.name] = this.body;
}
}