grapher/lib/query/nodes/fieldNode.js

14 lines
255 B
JavaScript
Raw Normal View History

2016-09-14 16:04:08 +03:00
export default class FieldNode {
constructor(name, body) {
this.name = name;
this.body = body;
}
2016-09-16 19:22:12 +03:00
isGlobal() {
return this.name === '$all';
}
2016-09-14 16:04:08 +03:00
applyFields(fields) {
fields[this.name] = this.body;
}
}