By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
/* | |
* This work (Modern Encryption of a String C#, by James Tuley), | |
* identified by James Tuley, is free of known copyright restrictions. | |
* https://gist.github.com/4336842 | |
* http://creativecommons.org/publicdomain/mark/1.0/ | |
*/ | |
using System; | |
using System.IO; | |
using System.Text; |
/* | |
Contains the file manager implementation of ServiceStack's REST /files Web Service: | |
Demo: http://www.servicestack.net/RestFiles/ | |
GitHub: https://github.com/ServiceStack/ServiceStack.Examples/ | |
*/ | |
using System; | |
using System.IO; | |
using System.Net; | |
using RestFiles.ServiceInterface.Support; |
#pragma warning disable 420 | |
namespace System.Collections.Concurrent | |
{ | |
using Azure.Framework; | |
using Diagnostics; | |
using Diagnostics.Contracts; | |
using Generic; | |
using Runtime.InteropServices; | |
using Runtime.Serialization; |
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
[TestFixture] | |
public class SpecificationFixture | |
{ | |
[Test, TestCaseSource("GetSpecificationTestCases")] | |
public void Verify(SpecificationToRun spec) | |
{ | |
var runner = new SpecificationRunner(); | |
RunResult result = runner.RunSpecifciation(spec); | |
if (result.Passed) |
public static class DomainSpecificationExtensions | |
{ | |
public static void ShouldHave<T>(this IEnumerable<ISourcedEvent> source, params Predicate<T>[] conditions) where T : class, ISourcedEvent | |
{ | |
T actualEvent = (T) source.FirstOrDefault(x => x is T); | |
if (actualEvent == null) | |
throw new SpecificationException(string.Format("{0} did not happen as expected", typeof (T).Name)); | |
actualEvent.ShouldMatch(conditions); | |
} |