public ExplorerQuery(IBlockChainContext <T> chainContext)
        {
            ChainContext = chainContext;
            Field <BlockQuery <T> >("blockQuery", resolve: context => new { });
            Field <TransactionQuery <T> >("transactionQuery", resolve: context => new { });
            Field <NonNullGraphType <NodeStateType <T> > >(
                "nodeState",
                resolve: context => chainContext
                );

            Name = "ExplorerQuery";
        }
Exemple #2
0
        public Query(IBlockChainContext <T> chainContext)
        {
            Field <BlockQuery <T> >("blockQuery", resolve: context => new { });
            Field <TransactionQuery <T> >("transactionQuery", resolve: context => new { });
            Field <NonNullGraphType <NodeStateType <T> > >(
                "nodeState",
                resolve: context => chainContext
                );

            _chain = chainContext.BlockChain;
            _store = chainContext.Store;
            Name   = "Query";
        }
 public static Schema GetSchema <T>(this IBlockChainContext <T> context)
     where T : IAction, new()
 {
     return(_schemaObjects.GetValue(
                context,
                (_) =>
     {
         var s = new Schema {
             Query = new Query <T>(context.BlockChain)
         };
         return s;
     }
                ));
 }
 public ExplorerController(IBlockChainContext <T> context)
 {
     _context = context;
     _schema  = context.GetSchema();
 }