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
var immer = require("immer") | |
var produce = immer.produce; | |
var patches=[]; | |
var state0 = {a:1}; | |
var state1 = produce(state0, function(draft){draft.b=9;}, function(p){patches.push(...p)}); | |
var state2 = produce(state1, function(draft){draft.a=3;}, function(p){patches.push(...p)}); | |
var state3 = produce(state2, function(draft){draft.b=99;}, function(p){patches.push(...p)}); | |
var state4 = produce(state3, function(draft){draft.a=5;}, function(p){patches.push(...p)}); |
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
import spray.json._ | |
import scala.collection.immutable.{ListMap} | |
import scala.io.Source | |
trait SortedPrettyPrinter extends PrettyPrinter { | |
override protected def printObject(members: Map[String, JsValue], sb: java.lang.StringBuilder, indent: Int) { | |
sb.append("{\n") | |
printSeq(ListMap(members.toSeq.sortBy(_._1):_*), sb.append(",\n")) { m => |
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
using GraphQL; | |
using GraphQL.Execution; | |
using GraphQL.Http; | |
using GraphQL.Types; | |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace GraphQLConsole | |
{ |