public static IServiceCollection AddAzureFunctionsGraphQL(
            this IServiceCollection serviceCollection,
            IAzureFunctionsMiddlewareOptions options)
        {
            serviceCollection.AddSingleton <IAzureFunctionsMiddlewareOptions>(options);

            serviceCollection.AddSingleton <IGraphQLFunctions, GraphQLFunctions>();

            return(serviceCollection);
        }
        public GraphQLFunctions(IQueryExecutor executor, IDocumentCache documentCache,
                                IDocumentHashProvider documentHashProvider, IAzureFunctionsMiddlewareOptions azureFunctionsOptions /*JsonQueryResultSerializer jsonQueryResultSerializer*/)
        {
            Executor              = executor;
            DocumentCache         = documentCache;
            DocumentHashProvider  = documentHashProvider;
            AzureFunctionsOptions = azureFunctionsOptions;

            _jsonQueryResultSerializer = new JsonQueryResultSerializer();

            _requestParser = new RequestHelper(
                DocumentCache,
                DocumentHashProvider,
                AzureFunctionsOptions.MaxRequestSize,
                AzureFunctionsOptions.ParserOptions);
        }