public GraphQLController() { _executer = new DocumentExecuter(); _container = new SimpleContainer(); _container.Singleton(new StarWarsData()); _container.Register<StarWarsQuery>(); _container.Register<HumanType>(); _container.Register<DroidType>(); _container.Register<CharacterInterface>(); _container.Singleton(() => new StarWarsSchema(type => (GraphType) _container.Get(type))); _schema = _container.Get<StarWarsSchema>(); }
public GraphQLController( IDocumentExecuter executer, IDocumentWriter writer, StarWarsSchema schema) { _executer = executer; _writer = writer; _schema = schema; _namedQueries = new Dictionary<string, string> { ["a-query"] = @"query foo { hero { name } }" }; }
public GraphQLController(IDocumentExecuter documentExecuter, ISchema schema) { _documentExecuter = documentExecuter; _schema = schema; }
public GraphQlController(ISchema schema, IDocumentExecuter executer) { this.schema = schema; this.executer = executer; }
public GraphQLController(IDocumentExecuter documentExecuter, ISchema schema) { this.documentExecuter = documentExecuter; this.schema = schema; }
public RequestExecutor(IDocumentExecuter executer, IDocumentWriter writer) { _executer = executer; _writer = writer; }
public ConfigController(ISchema schema, IDocumentExecuter documentExecuter, IConfiguration configuration) : base(schema, documentExecuter, configuration) { }
public GraphQLController(IDocumentExecuter executer, ISchema schema, DataLoaderDocumentListener dataLoaderDocumentListener = null) { this.executer = executer; this.schema = schema; this.dataLoaderDocumentListener = dataLoaderDocumentListener; }
public MainController(ISchema schema, IDocumentExecuter documentExecuter) { _schema = schema; _documentExecuter = documentExecuter; }
public ApplicationExecuter(IServiceProvider serviceProvider, TSchema schema, IDocumentExecuter documentExecuter, IOptions <GraphQLOptions> options, IEnumerable <IDocumentExecutionListener> listeners, IEnumerable <IValidationRule> validationRules) : base(schema, documentExecuter, options, listeners, validationRules) { _serviceProvider = serviceProvider; }
public GraphQLController(IDocumentExecuter documentExecuter, ISchema schema, IDocumentWriter writer) { _documentExecuter = documentExecuter; _schema = schema; _writer = writer; }
public GraphQLController(ISchema schema, IDocumentExecuter documentExecuter) { this._documentExecuter = documentExecuter; this._schema = schema; }
public GraphQLController(GraphQLQuery GraphQLQuery, IDocumentExecuter DocumentExecuter, ISchema Schema) { graphQLQuery = GraphQLQuery; documentExecuter = DocumentExecuter; schema = Schema; }
public GraphQLController(ISchema schema, IDocumentExecuter executer, IDocumentWriter writer) { this.schema = schema; this.executer = executer; this.writer = writer; }
public TestBase() { var services = new ServiceCollection(); // Services services.AddMvc(); // GraphQL services.AddSingleton <IDependencyResolver>(s => new FuncDependencyResolver(s.GetRequiredService)); _executer = new DocumentExecuter(); _writer = new DocumentWriter(indent: true); services.AddGraphQL(o => { o.ExposeExceptions = true; o.ComplexityConfiguration = new GraphQL.Validation.Complexity.ComplexityConfiguration { MaxDepth = 15 }; }) .AddGraphTypes(ServiceLifetime.Singleton); services.AddSingleton <ISchema, RootSchema>(); services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); // Database _db = new DatabaseContext(DatabaseContextMock <DatabaseContext> .InMemoryDatabase()); // Global objects _jobClientMock = new Mock <IBackgroundJobClient>(); _jobClientMock.Setup(x => x.Create(It.IsAny <Job>(), It.IsAny <EnqueuedState>())); _fixture = new Fixture(); _fixture.Behaviors.OfType <ThrowingRecursionBehavior>().ToList() .ForEach(b => _fixture.Behaviors.Remove(b)); _fixture.Behaviors.Add(new OmitOnRecursionBehavior()); IContainer container = new Container(cfg => { cfg.For <IBackgroundJobClient>().Use(_jobClientMock.Object); cfg.For <ISchema>().Use <RootSchema>(); cfg.For <DatabaseContext>().Use(_db); cfg.For(typeof(ILogger <>)).Use(typeof(NullLogger <>)); cfg.Populate(services); }); _schema = container.GetInstance <ISchema>(); _jsonSerializerSettings = new JsonSerializerSettings { ContractResolver = new DefaultContractResolver { NamingStrategy = new CamelCaseNamingStrategy() }, Formatting = Formatting.Indented }; }
public GraphQLController(IDocumentExecuter documentExecuter, ISchema schema, IEnumerable <IValidationRule> validationRules) { _documentExecuter = documentExecuter; _schema = schema; _validationRules = validationRules; }
public CalendarGraphQLController(IDocumentExecuter documentExecuter, ICalendarSchema schema) { _documentExecuter = documentExecuter; _schema = schema; }
public CustomerController(ISchema schema, IDocumentExecuter executer) { _schema = schema; _executer = executer; }
public GraphQLController(IDocumentExecuter documentExecuter, LiveScoreSchema schema, IServiceProvider provider) { _provider = provider; _documentExecuter = documentExecuter; _schema = schema; }
public GraphQLController(ISchema schema, IDocumentExecuter documentExecuter, ILogService logService, IConfiguration configuration) : base(schema, documentExecuter, logService, configuration) { }
public GraphQlController(GraphQLQuery graphQLQuery, IDocumentExecuter documentExecuter, ISchema schema) { _graphQLQuery = graphQLQuery; _documentExecuter = documentExecuter; _schema = schema; }
public GraphQLController(IDocumentExecuter executer, IDocumentWriter writer) { _executer = executer; _writer = writer; }
public GraphQueryExecuter(IDocumentExecuter documentExecuter, ISchema schemaQ) { executer = documentExecuter; schema = schemaQ; }
public GraphQLMiddleware(RequestDelegate next, GraphQLSettings settings, IDocumentWriter writer, IDocumentExecuter executor) { _next = next; _settings = settings; _writer = writer; _executor = executor; }
public GraphQLExecutor(ISchema schema, IDocumentExecuter executor) { _schema = schema; _executor = executor; }
public GraphQLController(ISchema schema, IDocumentExecuter executer) { _schema = schema; _executer = executer; }
public GraphQLController(ISchema schema, IDocumentExecuter documentExecuter) : base() { _schema = schema; _documentExecuter = documentExecuter; }
public MarketingController(IDocumentExecuter documentExecuter, ISchema schema) { _documentExecuter = documentExecuter; _schema = schema; }
public GraphQLMiddleware(RequestDelegate next, GraphQLSettings settings, IDocumentExecuter executer, IDocumentWriter writer) => (_next, _settings, _executer, _writer) = (next, settings, executer, writer);
public GraphQLController(IDocumentExecuter documentExecuter, ISchema schema, ILogger logger) { _documentExecuter = documentExecuter; _schema = schema; _logger = logger; }
public GraphQLController(ISchema schema, IDocumentExecuter documentExecuter) { m_schema = schema; m_documentExecuter = documentExecuter; }
public GraphQLController(IDocumentExecuter documentExecuter, ISchema schema, DataLoaderDocumentListener dataLoaderListener) { _dataLoaderListener = dataLoaderListener; _documentExecuter = documentExecuter; _schema = schema; }
public GraphQLController() { _schema = Startup.Schema; _executer = new DocumentExecuter(); }