This file contains hidden or 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
namespace FSharp.Data.GraphQL | |
open System | |
[<Struct>] | |
type AsyncVal<'T> = | |
val Value : 'T | |
val Async : Async<'T> | |
new (value: 'T) = { Value = value; Async = Unchecked.defaultof<Async<'T>> } | |
new (async: Async<'T>) = { Value = Unchecked.defaultof<'T>; Async = async } |
This file contains hidden or 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
public class ModulesActor : ReceiveActor, IUnboundedStash | |
{ | |
private Dictionary<string, Tuple<Props, ModuleState>> _moduleRecipes; | |
public Stash Stash { get; set; } | |
public ModulesActor() | |
{ | |
Ready(); | |
} |
This file contains hidden or 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
2016-06-01 09:00:19.722 ERROR 14028 --- [ thrift-io-0] c.f.nifty.core.NiftyExceptionLogger : Exception triggered on channel connected to /0:0:0:0:0:0:0:1:33153 | |
org.jboss.netty.handler.codec.frame.TooLongFrameException: Maximum frame size of 67108864 exceeded | |
at com.facebook.nifty.codec.DefaultThriftFrameDecoder.tryDecodeFramedMessage(DefaultThriftFrameDecoder.java:102) [nifty-core-0.18.0.jar!/:nifty-parent-0.18.0] | |
at com.facebook.nifty.codec.DefaultThriftFrameDecoder.decode(DefaultThriftFrameDecoder.java:68) [nifty-core-0.18.0.jar!/:nifty-parent-0.18.0] | |
at com.facebook.nifty.codec.DefaultThriftFrameDecoder.decode(DefaultThriftFrameDecoder.java:33) [nifty-core-0.18.0.jar!/:nifty-parent-0.18.0] | |
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425) [netty-3.10.5.Final.jar!/:na] | |
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) [netty-3.10.5.Final.jar!/:na] | |
at org.jboss.netty.channel.S |
This file contains hidden or 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
org.jboss.netty.handler.codec.frame.TooLongFrameException: Maximum frame size of 67108864 exceeded | |
at com.facebook.nifty.codec.DefaultThriftFrameDecoder.tryDecodeFramedMessage(DefaultThriftFrameDecoder.java:102) [nifty-core-0.18.0.jar!/:nifty-parent-0.18.0] | |
at com.facebook.nifty.codec.DefaultThriftFrameDecoder.decode(DefaultThriftFrameDecoder.java:68) [nifty-core-0.18.0.jar!/:nifty-parent-0.18.0] | |
at com.facebook.nifty.codec.DefaultThriftFrameDecoder.decode(DefaultThriftFrameDecoder.java:33) [nifty-core-0.18.0.jar!/:nifty-parent-0.18.0] | |
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425) [netty-3.10.5.Final.jar!/:na] | |
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) [netty-3.10.5.Final.jar!/:na] | |
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [netty-3.10.5.Final.jar!/:na] | |
at com.facebook.nifty.codec.DefaultThriftFrameCode |
This file contains hidden or 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
open System | |
open Akka.Actor | |
open Akka.FSharp | |
open Akka.TestKit | |
open Akka.TestKit.Xunit2 | |
type Tck = TestKit | |
/// <summary> | |
/// Runs a test case function in context of TestKit aware actor system. |
This file contains hidden or 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
// wrapper function over TestKit.ActorOfAsTestActorRef | |
let spawnAsTestRef (tck:Tck) (props: Props<'T>) : IActorRef<'T> = | |
typed (tck.ActorOfAsTestActorRef<FunActor<'T>>(props.ToProps(), tck.TestActor) :> IActorRef) | |
[<Fact>] | |
let ``Parent should create child`` () = testDefault <| fun tck -> | |
// child actor definition | |
let child (ctx: Actor<_>) msg = ctx.Sender() <! "hello" |> ignored | |
// parent actor defintion | |
let rec parent (ctx: Actor<_>) = |
This file contains hidden or 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
/// These are all of the possible kinds of types | |
type GraphQLType = | |
interface | |
end | |
/// These types may be used as input types for arguments and directives | |
and InputType<'Inner> = | |
interface | |
end |
This file contains hidden or 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
public class CustomException : Exception { } | |
public class Boom { } | |
public class Grandpa : ReceiveActor | |
{ | |
public Grandpa() | |
{ | |
var parent = Context.ActorOf(Props.Create<Parent>(), "parent"); | |
ReceiveAny(x => parent.Forward(x)); | |
} |
This file contains hidden or 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
open System | |
open Akka | |
open Akka.Actor | |
open Akka.FSharp | |
open Akka.Persistence.FSharp | |
let system = System.create "persistence-sys" <| Configuration.parse """ | |
akka { | |
persistence { | |
journal { |
This file contains hidden or 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
public static class EnumerablePatterns | |
{ | |
public static IEnumerable<T> Query<T>(this ICanTell self, object message = null) | |
{ | |
var provider = ResolveProvider(self); | |
if (provider == null) | |
throw new NotSupportedException("Unable to resolve the target Provider"); | |
var enumerable = new BlockingCollection<T>(); | |
var path = provider.TempPath(); |