Basic counter in Angular 2.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="UTF-8"> | |
<style> | |
.node circle { | |
fill: #fff; | |
stroke: steelblue; | |
stroke-width: 3px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Angular imports | |
import { isArray, isBlank, isDate, isNumber, isStringMap, isPresent, isString } from 'angular2/src/facade/lang' | |
export class GraphQLUtils { | |
static createMutation(data: Object, dataDefinition: Object, method: string, mutationName?: string): string { | |
if (!method || !data) { return null } | |
let mutation: string = (mutationName || method) + '{' + method | |
mutation += '(' + GraphQLUtils.flattenObject(data) + ')' |