[
  {
    "path": ".github/workflows/dotnetcore.yml",
    "content": "name: .NET Core\n\non: [push, pull_request]\njobs:\n  build:\n\n    name: Github Actions Build\n    # runs-on: ubuntu-latest\n    runs-on: windows-latest\n\n    steps:\n    - uses: actions/checkout@v1\n    - name: Setup .NET Core\n      uses: actions/setup-dotnet@v1\n      with:\n        dotnet-version: 3.1.100\n    - name: Build Reason\n      run: echo ${{github.ref}} and ${{github.event_name}}\n    - name: Build with dotnet\n      run: dotnet build --configuration Release --nologo\n    - name: Run tests\n      run: dotnet test tests/GraphiQl.Tests/ --configuration Release --nologo\n    # - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || contains(github.ref, 'tags'))\n    #   name: Push CI\n    #   run: ./push.sh ${{ secrets.FEEDZ_KEY }}\nenv:\n  DOTNET_CLI_TELEMETRY_OPTOUT: 1"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n*.suo\n*.user\n*.sln.docstates\n.vs\n.vscode\n.idea\n\n# Build results\n\n[Dd]ebug/\n[Rr]elease/\nx64/\nbuild/\npackage/\n[Bb]in/\n[Oo]bj/\n#dist/\n\n# Enable \"build/\" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets\n!packages/*/build/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n*_i.c\n*_p.c\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.log\n*.scc\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opensdf\n*.sdf\n*.cachefile\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# NCrunch\n*.ncrunch*\n.*crunch*.local.xml\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.Publish.xml\n\n# NuGet Packages Directory\npackages/\n!packages/repositories.config\n\n# Windows Azure Build Output\ncsx\n*.build.csdef\n\n# Windows Store app package directory\nAppPackages/\n\n# Others\nsql/\n*.Cache\nClientBin/\n[Ss]tyle[Cc]op.*\n~$*\n*~\n*.dbmdl\n*.[Pp]ublish.xml\n*.pfx\n*.publishsettings\nnode_modules/\nbower_components/\ntmp/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file to a newer\n# Visual Studio version. Backup files are not needed, because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n\n# SQL Server files\nApp_Data/*.mdf\nApp_Data/*.ldf\n\n\n#LightSwitch generated files\nGeneratedArtifacts/\n_Pvt_Extensions/\nModelManifest.xml\n\n# =========================\n# Windows detritus\n# =========================\n\n# Windows image file caches\nThumbs.db\nehthumbs.db\n\n# Folder config file\nDesktop.ini\n\n# Recycle Bin used on file shares\n$RECYCLE.BIN/\n\n# Mac desktop service store files\n.DS_Store\n\nbower_components/\nnode_modules/\n**/wwwroot/lib/\n**/wwwroot/img/media/\n.settings\n**/PublishProfiles/\n**/PublishScripts/\n\n# Angular 2\n# compiled output\nAdminApp/dist\nAdminApp/tmp\n\n# dependencies\nAdminApp/node_modules\nAdminApp/bower_components\n\n# IDEs and editors\nAdminApp/.idea\n\n# misc\nAdminApp/.sass-cache\nAdminApp/connect.lock\nAdminApp/coverage/*\nAdminApp/libpeerconnection.log\nAdminApp/AdminApp/npm-debug.log\nAdminApp/testem.log\nAdminApp/typings\n\n# e2e\nAdminApp/e2e/*.js\nAdminApp/e2e/*.map\n\n#System Files\n.DS_Store\nThumbs.db"
  },
  {
    "path": "GraphiQl.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26124.0\nMinimumVisualStudioVersion = 15.0.26124.0\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"GraphiQl\", \"src\\GraphiQl\\GraphiQl.csproj\", \"{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"GraphiQl.Tests\", \"tests\\GraphiQl.Tests\\GraphiQl.Tests.csproj\", \"{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"GraphiQl.Demo\", \"tests\\GraphiQl.Demo\\GraphiQl.Demo.csproj\", \"{6482AE1A-896B-45A4-93D2-1DEA62120365}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tDebug|x64 = Debug|x64\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease|x64 = Release|x64\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Release|x64.Build.0 = Release|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{7DECE8E2-141A-4A14-A460-A7985C3AA2E8}.Release|x86.Build.0 = Release|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Release|x64.Build.0 = Release|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{0C2E2EB0-8FA2-4AB9-8642-72E50A830DBA}.Release|x86.Build.0 = Release|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Release|x64.Build.0 = Release|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{6482AE1A-896B-45A4-93D2-1DEA62120365}.Release|x86.Build.0 = Release|Any CPU\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2017 Joseph Woodward\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "![](https://raw.githubusercontent.com/JosephWoodward/graphiql-dotnet/master/assets/logo_128_128.png)\n\n# GraphiQL.NET\n\n![.NET Core](https://github.com/JosephWoodward/graphiql-dotnet/workflows/.NET%20Core/badge.svg)\n\nGraphiQL middleware for ASP.NET Core - try the [live demo here](http://graphql.org/swapi-graphql/).\n\n## What is GraphiQL.NET?\n\nGraphiQL.NET is a piece of .NET Core middleware that bundles graphiql into it saving you from managing additional frontend dependencies, whilst also giving you control over the routes it's avaialble on any provide you with a means of authentication. \n\nGraphiQL.NET features include:\n\n- The full GraphiQl experience\n- Customisation of GraphiQL routes\n- Authentication\n\n![GraphiQL for ASP.NET Core](https://raw.githubusercontent.com/JosephWoodward/graphiql-dotnet/master/assets/screenshot.png)\n\n\n## Setup\n\nThe GraphiQL.NET middleware can be [found on NuGet here](https://www.nuget.org/packages/graphiql/)\n\nYou can install GraphiQL.NET by copying and pasting the following command into your Package Manager Console within Visual Studio (Tools > NuGet Package Manager > Package Manager Console).\n\n```\nInstall-Package graphiql\n```\n\nAlternatively you can install it using the .NET Core CLI using the following command:\n\n```\ndotnet add package graphiql\n```\n\n## Getting Started\n\nOnce installed you can add GraphiQL.NET to your ASP.NET Core application by adding the `app.UseGraphiQl()` middleware to the `Configure` method within your `Startup.cs` file.\n\n**Note: Be sure to call `UseGraphiQl()` before `UseMvc()`.**\n\n```csharp\n\npublic void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)\n{\n    // Adding this makes graphiql UI available at /graphql \n    app.UseGraphiQl();\n\n    app.UseMvc();\n}\n```\n\n## Configuration\n---\n### Configure Graphiql route\n\nBy default GraphiQL lives on the `/graphql` endpoint, however this can be changed by passing your chosen path to the `app.UseGraphiQl();` entry point method:\n\n```csharp\napp.UseGraphiQl('/whatever/graphiql');\n```\n\n\n### Configure Graphql API address\n\nYou can also specify GraphiQl endpoint independent of your GraphQL API, this is especially useful if you're hosting in IIS in a virtual application (ie `myapp.com/1.0/...`) or hosting API and documentation separately.\n\n```csharp\npublic void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)\n{\n    app.UseGraphiQl(\"/graphql\", \"/v1/yourapi\");\n\n    app.UseMvc();\n}\n```\n\nNow navigating to `/graphql` will display the GraphiQL UI, but your GraphQL API will live under the `/v1/yourapi` route.\n\n### Configuration via `IServiceCollection`\n\nAlternatively you can configure the aforementioned routes via `IServiceCollection` within `ConfigureServices` or your `Startup.cs` file:\n\n```csharp\n//Startup.cs\n\npublic void ConfigureServices(IServiceCollection services)\n{\n    ...\n\n\tservices.AddGraphiQl(x =>\n\t{\n\t\tx.GraphiQlPath = \"/graphiql-ui\";\n\t\tx.GraphQlApiPath = \"graphql\";\n\t});\n\n    ...\n}\n\npublic void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)\n{\n\tapp.UseGraphiQl();\n\t...\n}\n```\n\n### Configuration via `ConfigureOptions<T>`\n\nYou can also use the `IConfigureOptions<T>` interface:\n\n```csharp\n// GraphiQlTestOptionsSetup.cs\n\ninternal class GraphiQlTestOptionsSetup : IConfigureOptions<GraphiQlOptions>\n{\n    public void Configure(GraphiQlOptions options)\n    {\n        options.GraphiQlPath = \"/graphiql-ui\";\n        options.GraphQlApiPath = \"graphql\";\n    }\n}\n\n```\nThen you just have to register it with your Ioc Container:\n```csharp\n//Startup.cs\n\npublic void ConfigureServices(IServiceCollection services)\n{\n    ...\n    services.AddTransient<IConfigureOptions<GraphiQlOptions>, GraphiQlTestOptionsSetup>();z\n    ...\n}\n---\n"
  },
  {
    "path": "package.sh",
    "content": "#!/usr/bin/env bash\n\nrm -rf ./package\ndotnet pack ./src/GraphiQl/GraphiQl.csproj  -o ./package/ -c release"
  },
  {
    "path": "src/GraphiQl/AssetProvider.cs",
    "content": "using System;\nusing Microsoft.Extensions.FileProviders;\nusing Microsoft.Extensions.Primitives;\n\nnamespace GraphiQl\n{\n    internal class AssetProvider : IFileProvider\n    {\n        private readonly EmbeddedFileProvider _provider;\n\n        public AssetProvider(EmbeddedFileProvider provider)\n            => _provider = provider;\n\n        public IFileInfo GetFileInfo(string subpath)\n        {\n            // Embedded resource renames hypphens in directory to underscore, this tells file provider where to find it.\n            if (subpath.Equals(\"/es6-promise/es6-promise.min.js\", StringComparison.OrdinalIgnoreCase))\n            {\n                subpath = \"/es6_promise/es6-promise.min.js\";\n            }\n            \n            return _provider.GetFileInfo(subpath);\n        }\n\n        public IDirectoryContents GetDirectoryContents(string subpath) \n            => _provider.GetDirectoryContents(subpath);\n\n        public IChangeToken Watch(string filter)\n            => _provider.Watch(filter);\n    }\n}"
  },
  {
    "path": "src/GraphiQl/GraphiQl.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n  <PropertyGroup>\n    <AssemblyName>GraphiQL</AssemblyName>\n    <PackageId>GraphiQL</PackageId>\n    <PackageTags>graphql,graphiql,asp.net core,.net core</PackageTags>\n    <title>GraphiQL ASP.NET Core Middleware</title>\n    <TargetFrameworks>netstandard2.0;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>\n    <Authors>JosephWoodward</Authors>\n    <Description>GraphiQL available as middleware for ASP.NET Core</Description>\n    <PackageIconUrl>https://raw.githubusercontent.com/JosephWoodward/graphiql-dotnet/master/assets/logo_128_128.png</PackageIconUrl>\n    <PackageProjectUrl>https://github.com/JosephWoodward/graphiql-dotnet</PackageProjectUrl>\n    <PackageLicenseExpression>MIT</PackageLicenseExpression>\n    <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>\n    <PackageIcon>logo_128_128.png</PackageIcon>\n    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\n    <PublishRepositoryUrl>true</PublishRepositoryUrl>\n    <MinVerVerbosity>diag</MinVerVerbosity>\n    <MinVerTagPrefix>v</MinVerTagPrefix>\n    <OutputType>Library</OutputType>\n    <MinVerSkip Condition=\"'$(Configuration)' == 'Debug'\">true</MinVerSkip>\n  </PropertyGroup>\n  <ItemGroup>\n    <None Include=\"../../assets/logo_128_128.png\" Pack=\"true\" PackagePath=\"/\" />\n  </ItemGroup>\n  <ItemGroup>\n    <PackageReference Include=\"MinVer\" Version=\"2.1.0\">\n      <PrivateAssets>all</PrivateAssets>\n    </PackageReference>\n    <PackageReference Include=\"Microsoft.SourceLink.GitHub\" Version=\"1.0.0\" PrivateAssets=\"All\">\n      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>\n    </PackageReference>\n  </ItemGroup>\n  <ItemGroup Condition=\" '$(TargetFramework)' == 'netstandard2.0' \">\n    <PackageReference Include=\"Microsoft.AspNetCore.Mvc\" Version=\"2.0.1\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.StaticFiles\" Version=\"2.1.1\" />\n    <PackageReference Include=\"Microsoft.Extensions.FileProviders.Embedded\" Version=\"2.1.1\" />\n  </ItemGroup>\n  <ItemGroup Condition=\" '$(TargetFramework)' == 'netcoreapp3.0' \">\n    <FrameworkReference Include=\"Microsoft.AspNetCore.App\" />\n    <PackageReference Include=\"Microsoft.Extensions.FileProviders.Embedded\" Version=\"3.0.2\" />\n  </ItemGroup>\n  <ItemGroup Condition=\" '$(TargetFramework)' == 'netcoreapp3.1' \">\n    <FrameworkReference Include=\"Microsoft.AspNetCore.App\" />\n    <PackageReference Include=\"Microsoft.Extensions.FileProviders.Embedded\" Version=\"3.1.1\" />\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"./assets/**/*.*\" />\n  </ItemGroup>\n</Project>\n"
  },
  {
    "path": "src/GraphiQl/GraphiQlExtensions.cs",
    "content": "﻿using System;\nusing System.Reflection;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.StaticFiles;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.DependencyInjection.Extensions;\nusing Microsoft.Extensions.FileProviders;\nusing Microsoft.Extensions.Options;\n\nnamespace GraphiQl\n{\n    public static class GraphiQlExtensions\n    {\n        /*\n        public static IServiceCollection AddGraphiQl(this IServiceCollection services)\n            => services.AddGraphiQl(null);\n            */\n\n        public static IServiceCollection AddGraphiQl(this IServiceCollection services, Action<GraphiQlOptions> configure)\n        {\n            if (configure != null)\n            {\n                services.Configure(configure);\n            }\n\n            services.TryAdd(ServiceDescriptor.Transient<IConfigureOptions<GraphiQlOptions>, GraphiQlOptionsSetup>());\n\n            return services;\n        }\n\n        public static IApplicationBuilder UseGraphiQl(this IApplicationBuilder app)\n            => app.UseGraphiQl(null);\n\n        public static IApplicationBuilder UseGraphiQl(this IApplicationBuilder app, string path)\n            => app.UseGraphiQl(path, null);\n\n        public static IApplicationBuilder UseGraphiQl(this IApplicationBuilder app, string path, string apiPath)\n            => app.UseGraphiQlImp(path, apiPath);\n\n        private static IApplicationBuilder UseGraphiQlImp(this IApplicationBuilder app, string path, string apiPath )\n        {\n            if (app == null)\n            {\n                throw new ArgumentNullException(nameof(app));\n            }\n\n            var options = app.ApplicationServices.GetService<IOptions<GraphiQlOptions>>().Value;\n\n            var graphiQlPath = !string.IsNullOrWhiteSpace(path) ? path : options.GraphiQlPath;\n            var graphQlApiPath = !string.IsNullOrWhiteSpace(apiPath) ? apiPath : options.GraphQlApiPath;\n\n            var fileServerOptions = new FileServerOptions\n            {\n                RequestPath = graphiQlPath,\n                FileProvider = new AssetProvider(new EmbeddedFileProvider(typeof(GraphiQlExtensions).GetTypeInfo().Assembly, \"GraphiQl.assets\")),\n                EnableDefaultFiles = true,\n                StaticFileOptions = {ContentTypeProvider = new FileExtensionContentTypeProvider()}\n            };\n\n            app.UseMiddleware<GraphiQlMiddleware>();\n\n            app.Map($\"{graphiQlPath.TrimEnd('/')}/graphql-path.js\", x => WritePathJavaScript(x, graphQlApiPath));\n            app.UseFileServer(fileServerOptions);\n\n            return app;\n        }\n\n        private static void WritePathJavaScript(IApplicationBuilder app, string path)\n            => app.Run(h =>\n            {\n                h.Response.ContentType = \"application/javascript\";\n                return h.Response.WriteAsync($\"var graphqlPath='{path}';\");\n            });\n    }\n}"
  },
  {
    "path": "src/GraphiQl/GraphiQlMiddleware.cs",
    "content": "using System;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Options;\n\nnamespace GraphiQl\n{\n    public class GraphiQlMiddleware\n    {\n        private readonly RequestDelegate _next;\n        private readonly GraphiQlOptions _options;\n\n        public GraphiQlMiddleware(RequestDelegate next, IOptions<GraphiQlOptions> options)\n        {\n            _next = next;\n            _options = options.Value;\n        }\n\n        public async Task Invoke(HttpContext context)\n        {\n            if (context.Request.Path.Equals(_options.GraphiQlPath, StringComparison.OrdinalIgnoreCase)\n                && _options.IsAuthenticated != null\n                && !await _options.IsAuthenticated.Invoke(context))\n            {\n                return;\n            }\n\n            await _next(context);\n        }\n    }\n}"
  },
  {
    "path": "src/GraphiQl/GraphiQlOptions.cs",
    "content": "using System;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Options;\n\nnamespace GraphiQl\n{\n    public class GraphiQlOptions\n    {\n        public string GraphiQlPath { get; set; }\n\n        public string GraphQlApiPath { get; set; }\n\n        public Func<HttpContext, Task<bool>> IsAuthenticated { get; set; }\n\n        public GraphiQlOptions()\n        {\n            GraphiQlPath = \"/graphql\";\n            GraphQlApiPath = \"/graphql\";\n        }\n    }\n\n    public class GraphiQlOptionsSetup : IConfigureOptions<GraphiQlOptions>\n    {\n        public void Configure(GraphiQlOptions options)\n        {\n            if (options.GraphiQlPath == null)\n            {\n                options.GraphiQlPath = \"/graphql\";\n            }\n\n            if (options.GraphQlApiPath == null)\n            {\n                options.GraphQlApiPath = \"/graphql\";\n            }\n        }\n    }\n}"
  },
  {
    "path": "src/GraphiQl/assets/graphiql.css",
    "content": ".graphiql-container,\n.graphiql-container button,\n.graphiql-container input {\n  color: #141823;\n  font-family:\n          system,\n          -apple-system,\n          'San Francisco',\n          '.SFNSDisplay-Regular',\n          'Segoe UI',\n          Segoe,\n          'Segoe WP',\n          'Helvetica Neue',\n          helvetica,\n          'Lucida Grande',\n          arial,\n          sans-serif;\n  font-size: 14px;\n}\n\n.graphiql-container {\n  display: flex;\n  flex-direction: row;\n  height: 100%;\n  margin: 0;\n  overflow: hidden;\n  width: 100%;\n}\n\n.graphiql-container .editorWrap {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  overflow-x: hidden;\n}\n\n.graphiql-container .title {\n  font-size: 18px;\n}\n\n.graphiql-container .title em {\n  font-family: georgia;\n  font-size: 19px;\n}\n\n.graphiql-container .topBarWrap {\n  display: flex;\n  flex-direction: row;\n}\n\n.graphiql-container .topBar {\n  align-items: center;\n  background: linear-gradient(#f7f7f7, #e2e2e2);\n  border-bottom: 1px solid #d0d0d0;\n  cursor: default;\n  display: flex;\n  flex-direction: row;\n  flex: 1;\n  height: 34px;\n  overflow-y: visible;\n  padding: 7px 14px 6px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.graphiql-container .toolbar {\n  overflow-x: visible;\n  display: flex;\n}\n\n.graphiql-container .docExplorerShow,\n.graphiql-container .historyShow {\n  background: linear-gradient(#f7f7f7, #e2e2e2);\n  border-radius: 0;\n  border-bottom: 1px solid #d0d0d0;\n  border-right: none;\n  border-top: none;\n  color: #3B5998;\n  cursor: pointer;\n  font-size: 14px;\n  margin: 0;\n  padding: 2px 20px 0 18px;\n}\n\n.graphiql-container .docExplorerShow {\n  border-left: 1px solid rgba(0, 0, 0, 0.2);\n}\n\n.graphiql-container .historyShow {\n  border-right: 1px solid rgba(0, 0, 0, 0.2);\n  border-left: 0;\n}\n\n.graphiql-container .docExplorerShow:before {\n  border-left: 2px solid #3B5998;\n  border-top: 2px solid #3B5998;\n  content: '';\n  display: inline-block;\n  height: 9px;\n  margin: 0 3px -1px 0;\n  position: relative;\n  transform: rotate(-45deg);\n  width: 9px;\n}\n\n.graphiql-container .editorBar {\n  display: flex;\n  flex-direction: row;\n  flex: 1;\n}\n\n.graphiql-container .queryWrap {\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n}\n\n.graphiql-container .resultWrap {\n  border-left: solid 1px #e0e0e0;\n  display: flex;\n  flex-direction: column;\n  flex: 1;\n  flex-basis: 1em;\n  position: relative;\n}\n\n.graphiql-container .docExplorerWrap,\n.graphiql-container .historyPaneWrap {\n  background: white;\n  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);\n  position: relative;\n  z-index: 3;\n}\n\n.graphiql-container .historyPaneWrap {\n  min-width: 230px;\n  z-index: 5;\n}\n\n.graphiql-container .docExplorerResizer {\n  cursor: col-resize;\n  height: 100%;\n  left: -5px;\n  position: absolute;\n  top: 0;\n  width: 10px;\n  z-index: 10;\n}\n\n.graphiql-container .docExplorerHide {\n  cursor: pointer;\n  font-size: 18px;\n  margin: -7px -8px -6px 0;\n  padding: 18px 16px 15px 12px;\n  background: 0;\n  border: 0;\n  line-height: 14px;\n}\n\n.graphiql-container div .query-editor {\n  flex: 1;\n  position: relative;\n}\n\n.graphiql-container .variable-editor {\n  display: flex;\n  flex-direction: column;\n  height: 30px;\n  position: relative;\n}\n\n.graphiql-container .variable-editor-title {\n  background: #eeeeee;\n  border-bottom: 1px solid #d6d6d6;\n  border-top: 1px solid #e0e0e0;\n  color: #777;\n  font-variant: small-caps;\n  font-weight: bold;\n  letter-spacing: 1px;\n  line-height: 14px;\n  padding: 6px 0 8px 43px;\n  text-transform: lowercase;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.graphiql-container .codemirrorWrap {\n  flex: 1;\n  height: 100%;\n  position: relative;\n}\n\n.graphiql-container .result-window {\n  flex: 1;\n  height: 100%;\n  position: relative;\n}\n\n.graphiql-container .footer {\n  background: #f6f7f8;\n  border-left: 1px solid #e0e0e0;\n  border-top: 1px solid #e0e0e0;\n  margin-left: 12px;\n  position: relative;\n}\n\n.graphiql-container .footer:before {\n  background: #eeeeee;\n  bottom: 0;\n  content: \" \";\n  left: -13px;\n  position: absolute;\n  top: -1px;\n  width: 12px;\n}\n\n/* No `.graphiql-container` here so themes can overwrite */\n.result-window .CodeMirror {\n  background: #f6f7f8;\n}\n\n.graphiql-container .result-window .CodeMirror-gutters {\n  background-color: #eeeeee;\n  border-color: #e0e0e0;\n  cursor: col-resize;\n}\n\n.graphiql-container .result-window .CodeMirror-foldgutter,\n.graphiql-container .result-window .CodeMirror-foldgutter-open:after,\n.graphiql-container .result-window .CodeMirror-foldgutter-folded:after {\n  padding-left: 3px;\n}\n\n.graphiql-container .toolbar-button {\n  background: #fdfdfd;\n  background: linear-gradient(#f9f9f9, #ececec);\n  border: 0;\n  border-radius: 3px;\n  box-shadow:\n          inset 0 0 0 1px rgba(0,0,0,0.20),\n          0 1px 0 rgba(255,255,255, 0.7),\n          inset 0 1px #fff;\n  color: #555;\n  cursor: pointer;\n  display: inline-block;\n  margin: 0 5px;\n  padding: 3px 11px 5px;\n  text-decoration: none;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  max-width: 150px;\n}\n\n.graphiql-container .toolbar-button:active {\n  background: linear-gradient(#ececec, #d5d5d5);\n  box-shadow:\n          0 1px 0 rgba(255, 255, 255, 0.7),\n          inset 0 0 0 1px rgba(0,0,0,0.10),\n          inset 0 1px 1px 1px rgba(0, 0, 0, 0.12),\n          inset 0 0 5px rgba(0, 0, 0, 0.1);\n}\n\n.graphiql-container .toolbar-button.error {\n  background: linear-gradient(#fdf3f3, #e6d6d7);\n  color: #b00;\n}\n\n.graphiql-container .toolbar-button-group {\n  margin: 0 5px;\n  white-space: nowrap;\n}\n\n.graphiql-container .toolbar-button-group > * {\n  margin: 0;\n}\n\n.graphiql-container .toolbar-button-group > *:not(:last-child) {\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.graphiql-container .toolbar-button-group > *:not(:first-child) {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  margin-left: -1px;\n}\n\n.graphiql-container .execute-button-wrap {\n  height: 34px;\n  margin: 0 14px 0 28px;\n  position: relative;\n}\n\n.graphiql-container .execute-button {\n  background: linear-gradient(#fdfdfd, #d2d3d6);\n  border-radius: 17px;\n  border: 1px solid rgba(0,0,0,0.25);\n  box-shadow: 0 1px 0 #fff;\n  cursor: pointer;\n  fill: #444;\n  height: 34px;\n  margin: 0;\n  padding: 0;\n  width: 34px;\n}\n\n.graphiql-container .execute-button svg {\n  pointer-events: none;\n}\n\n.graphiql-container .execute-button:active {\n  background: linear-gradient(#e6e6e6, #c3c3c3);\n  box-shadow:\n          0 1px 0 #fff,\n          inset 0 0 2px rgba(0, 0, 0, 0.2),\n          inset 0 0 6px rgba(0, 0, 0, 0.1);\n}\n\n.graphiql-container .toolbar-menu,\n.graphiql-container .toolbar-select {\n  position: relative;\n}\n\n.graphiql-container .execute-options,\n.graphiql-container .toolbar-menu-items,\n.graphiql-container .toolbar-select-options {\n  background: #fff;\n  box-shadow:\n          0 0 0 1px rgba(0,0,0,0.1),\n          0 2px 4px rgba(0,0,0,0.25);\n  margin: 0;\n  padding: 6px 0;\n  position: absolute;\n  z-index: 100;\n}\n\n.graphiql-container .execute-options {\n  min-width: 100px;\n  top: 37px;\n  left: -1px;\n}\n\n.graphiql-container .toolbar-menu-items {\n  left: 1px;\n  margin-top: -1px;\n  min-width: 110%;\n  top: 100%;\n  visibility: hidden;\n}\n\n.graphiql-container .toolbar-menu-items.open {\n  visibility: visible;\n}\n\n.graphiql-container .toolbar-select-options {\n  left: 0;\n  min-width: 100%;\n  top: -5px;\n  visibility: hidden;\n}\n\n.graphiql-container .toolbar-select-options.open {\n  visibility: visible;\n}\n\n.graphiql-container .execute-options > li,\n.graphiql-container .toolbar-menu-items > li,\n.graphiql-container .toolbar-select-options > li {\n  cursor: pointer;\n  display: block;\n  margin: none;\n  max-width: 300px;\n  overflow: hidden;\n  padding: 2px 20px 4px 11px;\n  white-space: nowrap;\n}\n\n.graphiql-container .execute-options > li.selected,\n.graphiql-container .toolbar-menu-items > li.hover,\n.graphiql-container .toolbar-menu-items > li:active,\n.graphiql-container .toolbar-menu-items > li:hover,\n.graphiql-container .toolbar-select-options > li.hover,\n.graphiql-container .toolbar-select-options > li:active,\n.graphiql-container .toolbar-select-options > li:hover,\n.graphiql-container .history-contents > li:hover,\n.graphiql-container .history-contents > li:active {\n  background: #e10098;\n  color: #fff;\n}\n\n.graphiql-container .toolbar-select-options > li > svg {\n  display: inline;\n  fill: #666;\n  margin: 0 -6px 0 6px;\n  pointer-events: none;\n  vertical-align: middle;\n}\n\n.graphiql-container .toolbar-select-options > li.hover > svg,\n.graphiql-container .toolbar-select-options > li:active > svg,\n.graphiql-container .toolbar-select-options > li:hover > svg {\n  fill: #fff;\n}\n\n.graphiql-container .CodeMirror-scroll {\n  overflow-scrolling: touch;\n}\n\n.graphiql-container .CodeMirror {\n  color: #141823;\n  font-family:\n          'Consolas',\n          'Inconsolata',\n          'Droid Sans Mono',\n          'Monaco',\n          monospace;\n  font-size: 13px;\n  height: 100%;\n  left: 0;\n  position: absolute;\n  top: 0;\n  width: 100%;\n}\n\n.graphiql-container .CodeMirror-lines {\n  padding: 20px 0;\n}\n\n.CodeMirror-hint-information .content {\n  box-orient: vertical;\n  color: #141823;\n  display: flex;\n  font-family: system, -apple-system, 'San Francisco', '.SFNSDisplay-Regular', 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', helvetica, 'Lucida Grande', arial, sans-serif;\n  font-size: 13px;\n  line-clamp: 3;\n  line-height: 16px;\n  max-height: 48px;\n  overflow: hidden;\n  text-overflow: -o-ellipsis-lastline;\n}\n\n.CodeMirror-hint-information .content p:first-child {\n  margin-top: 0;\n}\n\n.CodeMirror-hint-information .content p:last-child {\n  margin-bottom: 0;\n}\n\n.CodeMirror-hint-information .infoType {\n  color: #CA9800;\n  cursor: pointer;\n  display: inline;\n  margin-right: 0.5em;\n}\n\n.autoInsertedLeaf.cm-property {\n  animation-duration: 6s;\n  animation-name: insertionFade;\n  border-bottom: 2px solid rgba(255, 255, 255, 0);\n  border-radius: 2px;\n  margin: -2px -4px -1px;\n  padding: 2px 4px 1px;\n}\n\n@keyframes insertionFade {\n  from, to {\n    background: rgba(255, 255, 255, 0);\n    border-color: rgba(255, 255, 255, 0);\n  }\n\n  15%, 85% {\n    background: #fbffc9;\n    border-color: #f0f3c0;\n  }\n}\n\ndiv.CodeMirror-lint-tooltip {\n  background-color: white;\n  border-radius: 2px;\n  border: 0;\n  color: #141823;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n  font-size: 13px;\n  line-height: 16px;\n  max-width: 430px;\n  opacity: 0;\n  padding: 8px 10px;\n  transition: opacity 0.15s;\n  white-space: pre-wrap;\n}\n\ndiv.CodeMirror-lint-tooltip > * {\n  padding-left: 23px;\n}\n\ndiv.CodeMirror-lint-tooltip > * + * {\n  margin-top: 12px;\n}\n\n/* COLORS */\n\n.graphiql-container .CodeMirror-foldmarker {\n  border-radius: 4px;\n  background: #08f;\n  background: linear-gradient(#43A8FF, #0F83E8);\n  box-shadow:\n          0 1px 1px rgba(0, 0, 0, 0.2),\n          inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n  color: white;\n  font-family: arial;\n  font-size: 12px;\n  line-height: 0;\n  margin: 0 3px;\n  padding: 0px 4px 1px;\n  text-shadow: 0 -1px rgba(0, 0, 0, 0.1);\n}\n\n.graphiql-container div.CodeMirror span.CodeMirror-matchingbracket {\n  color: #555;\n  text-decoration: underline;\n}\n\n.graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket {\n  color: #f00;\n}\n\n/* Comment */\n.cm-comment {\n  color: #999;\n}\n\n/* Punctuation */\n.cm-punctuation {\n  color: #555;\n}\n\n/* Keyword */\n.cm-keyword {\n  color: #B11A04;\n}\n\n/* OperationName, FragmentName */\n.cm-def {\n  color: #D2054E;\n}\n\n/* FieldName */\n.cm-property {\n  color: #1F61A0;\n}\n\n/* FieldAlias */\n.cm-qualifier {\n  color: #1C92A9;\n}\n\n/* ArgumentName and ObjectFieldName */\n.cm-attribute {\n  color: #8B2BB9;\n}\n\n/* Number */\n.cm-number {\n  color: #2882F9;\n}\n\n/* String */\n.cm-string {\n  color: #D64292;\n}\n\n/* Boolean */\n.cm-builtin {\n  color: #D47509;\n}\n\n/* EnumValue */\n.cm-string-2 {\n  color: #0B7FC7;\n}\n\n/* Variable */\n.cm-variable {\n  color: #397D13;\n}\n\n/* Directive */\n.cm-meta {\n  color: #B33086;\n}\n\n/* Type */\n.cm-atom {\n  color: #CA9800;\n}\n/* BASICS */\n\n.CodeMirror {\n  /* Set height, width, borders, and global font properties here */\n  color: black;\n  font-family: monospace;\n  height: 300px;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n  padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n  padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n  border-right: 1px solid #ddd;\n  background-color: #f7f7f7;\n  white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n  color: #999;\n  min-width: 20px;\n  padding: 0 3px 0 5px;\n  text-align: right;\n  white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror .CodeMirror-cursor {\n  border-left: 1px solid black;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n  border-left: 1px solid silver;\n}\n.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {\n  background: #7e7;\n  border: 0;\n  width: auto;\n}\n.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {\n  z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n  animation: blink 1.06s steps(1) infinite;\n  border: 0;\n  width: auto;\n}\n@keyframes blink {\n  0% { background: #7e7; }\n  50% { background: none; }\n  100% { background: #7e7; }\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\ndiv.CodeMirror-overwrite div.CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-ruler {\n  border-left: 1px solid #ccc;\n  position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n   the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n  background: white;\n  overflow: hidden;\n  position: relative;\n}\n\n.CodeMirror-scroll {\n  height: 100%;\n  /* 30px is the magic margin used to hide the element's real scrollbars */\n  /* See overflow: hidden in .CodeMirror */\n  margin-bottom: -30px; margin-right: -30px;\n  outline: none; /* Prevent dragging from highlighting the element */\n  overflow: scroll !important; /* Things will break if this is overridden */\n  padding-bottom: 30px;\n  position: relative;\n}\n.CodeMirror-sizer {\n  border-right: 30px solid transparent;\n  position: relative;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n   before actual scrolling happens, thus preventing shaking and\n   flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n  display: none;\n  position: absolute;\n  z-index: 6;\n}\n.CodeMirror-vscrollbar {\n  overflow-x: hidden;\n  overflow-y: scroll;\n  right: 0; top: 0;\n}\n.CodeMirror-hscrollbar {\n  bottom: 0; left: 0;\n  overflow-x: scroll;\n  overflow-y: hidden;\n}\n.CodeMirror-scrollbar-filler {\n  right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n  left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n  min-height: 100%;\n  position: absolute; left: 0; top: 0;\n  z-index: 3;\n}\n.CodeMirror-gutter {\n  display: inline-block;\n  height: 100%;\n  margin-bottom: -30px;\n  vertical-align: top;\n  white-space: normal;\n  /* Hack to make IE7 behave */\n  *zoom:1;\n  *display:inline;\n}\n.CodeMirror-gutter-wrapper {\n  background: none !important;\n  border: none !important;\n  position: absolute;\n  z-index: 4;\n}\n.CodeMirror-gutter-background {\n  position: absolute;\n  top: 0; bottom: 0;\n  z-index: 4;\n}\n.CodeMirror-gutter-elt {\n  cursor: default;\n  position: absolute;\n  z-index: 4;\n}\n.CodeMirror-gutter-wrapper {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.CodeMirror-lines {\n  cursor: text;\n  min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n  -webkit-tap-highlight-color: transparent;\n  /* Reset some styles that the rest of the page might have set */\n  background: transparent;\n  border-radius: 0;\n  border-width: 0;\n  color: inherit;\n  font-family: inherit;\n  font-size: inherit;\n  font-variant-ligatures: none;\n  line-height: inherit;\n  margin: 0;\n  overflow: visible;\n  position: relative;\n  white-space: pre;\n  word-wrap: normal;\n  z-index: 2;\n}\n.CodeMirror-wrap pre {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  word-break: normal;\n}\n\n.CodeMirror-linebackground {\n  position: absolute;\n  left: 0; right: 0; top: 0; bottom: 0;\n  z-index: 0;\n}\n\n.CodeMirror-linewidget {\n  overflow: auto;\n  position: relative;\n  z-index: 2;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-code {\n  outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n  box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n  height: 0;\n  overflow: hidden;\n  position: absolute;\n  visibility: hidden;\n  width: 100%;\n}\n\n.CodeMirror-cursor { position: absolute; }\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n  position: relative;\n  visibility: hidden;\n  z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n  visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n  visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n  background: #ffa;\n  background: rgba(255, 255, 0, .4);\n}\n\n/* IE7 hack to prevent it from returning funny offsetTops on the spans */\n.CodeMirror span { *vertical-align: text-bottom; }\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n  /* Hide the cursor when printing */\n  .CodeMirror div.CodeMirror-cursors {\n    visibility: hidden;\n  }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n\n.CodeMirror-dialog {\n  background: inherit;\n  color: inherit;\n  left: 0; right: 0;\n  overflow: hidden;\n  padding: .1em .8em;\n  position: absolute;\n  z-index: 15;\n}\n\n.CodeMirror-dialog-top {\n  border-bottom: 1px solid #eee;\n  top: 0;\n}\n\n.CodeMirror-dialog-bottom {\n  border-top: 1px solid #eee;\n  bottom: 0;\n}\n\n.CodeMirror-dialog input {\n  background: transparent;\n  border: 1px solid #d3d6db;\n  color: inherit;\n  font-family: monospace;\n  outline: none;\n  width: 20em;\n}\n\n.CodeMirror-dialog button {\n  font-size: 70%;\n}\n.graphiql-container .doc-explorer {\n  background: white;\n}\n\n.graphiql-container .doc-explorer-title-bar,\n.graphiql-container .history-title-bar {\n  cursor: default;\n  display: flex;\n  height: 34px;\n  line-height: 14px;\n  padding: 8px 8px 5px;\n  position: relative;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.graphiql-container .doc-explorer-title,\n.graphiql-container .history-title {\n  flex: 1;\n  font-weight: bold;\n  overflow-x: hidden;\n  padding: 10px 0 10px 10px;\n  text-align: center;\n  text-overflow: ellipsis;\n  -webkit-user-select: text;\n  -moz-user-select: text;\n  -ms-user-select: text;\n  user-select: text;\n  white-space: nowrap;\n}\n\n.graphiql-container .doc-explorer-back {\n  color: #3B5998;\n  cursor: pointer;\n  margin: -7px 0 -6px -8px;\n  overflow-x: hidden;\n  padding: 17px 12px 16px 16px;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  background: 0;\n  border: 0;\n  line-height: 14px;\n}\n\n.doc-explorer-narrow .doc-explorer-back {\n  width: 0;\n}\n\n.graphiql-container .doc-explorer-back:before {\n  border-left: 2px solid #3B5998;\n  border-top: 2px solid #3B5998;\n  content: '';\n  display: inline-block;\n  height: 9px;\n  margin: 0 3px -1px 0;\n  position: relative;\n  transform: rotate(-45deg);\n  width: 9px;\n}\n\n.graphiql-container .doc-explorer-rhs {\n  position: relative;\n}\n\n.graphiql-container .doc-explorer-contents,\n.graphiql-container .history-contents {\n  background-color: #ffffff;\n  border-top: 1px solid #d6d6d6;\n  bottom: 0;\n  left: 0;\n  overflow-y: auto;\n  padding: 20px 15px;\n  position: absolute;\n  right: 0;\n  top: 47px;\n}\n\n.graphiql-container .doc-explorer-contents {\n  min-width: 300px;\n}\n\n.graphiql-container .doc-type-description p:first-child ,\n.graphiql-container .doc-type-description blockquote:first-child {\n  margin-top: 0;\n}\n\n.graphiql-container .doc-explorer-contents a {\n  cursor: pointer;\n  text-decoration: none;\n}\n\n.graphiql-container .doc-explorer-contents a:hover {\n  text-decoration: underline;\n}\n\n.graphiql-container .doc-value-description > :first-child {\n  margin-top: 4px;\n}\n\n.graphiql-container .doc-value-description > :last-child {\n  margin-bottom: 4px;\n}\n\n.graphiql-container .doc-type-description code,\n.graphiql-container .doc-type-description pre,\n.graphiql-container .doc-category code,\n.graphiql-container .doc-category pre {\n  --saf-0: rgba(var(--sk_foreground_low,29,28,29),0.13);\n  font-size: 12px;\n  line-height: 1.50001;\n  font-variant-ligatures: none;\n  white-space: pre;\n  white-space: pre-wrap;\n  word-wrap: break-word;\n  word-break: normal;\n  -webkit-tab-size: 4;\n  -moz-tab-size: 4;\n  tab-size: 4;\n}\n\n.graphiql-container .doc-type-description code,\n.graphiql-container .doc-category code {\n  padding: 2px 3px 1px;\n  border: 1px solid var(--saf-0);\n  border-radius: 3px;\n  background-color: rgba(var(--sk_foreground_min,29,28,29),.04);\n  color: #e01e5a;\n  background-color: white;\n}\n\n.graphiql-container .doc-category {\n  margin: 20px 0;\n}\n\n.graphiql-container .doc-category-title {\n  border-bottom: 1px solid #e0e0e0;\n  color: #777;\n  cursor: default;\n  font-size: 14px;\n  font-variant: small-caps;\n  font-weight: bold;\n  letter-spacing: 1px;\n  margin: 0 -15px 10px 0;\n  padding: 10px 0;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.graphiql-container .doc-category-item {\n  margin: 12px 0;\n  color: #555;\n}\n\n.graphiql-container .keyword {\n  color: #B11A04;\n}\n\n.graphiql-container .type-name {\n  color: #CA9800;\n}\n\n.graphiql-container .field-name {\n  color: #1F61A0;\n}\n\n.graphiql-container .field-short-description {\n  color: #999;\n  margin-left: 5px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n.graphiql-container .enum-value {\n  color: #0B7FC7;\n}\n\n.graphiql-container .arg-name {\n  color: #8B2BB9;\n}\n\n.graphiql-container .arg {\n  display: block;\n  margin-left: 1em;\n}\n\n.graphiql-container .arg:first-child:last-child,\n.graphiql-container .arg:first-child:nth-last-child(2),\n.graphiql-container .arg:first-child:nth-last-child(2) ~ .arg {\n  display: inherit;\n  margin: inherit;\n}\n\n.graphiql-container .arg:first-child:nth-last-child(2):after {\n  content: ', ';\n}\n\n.graphiql-container .arg-default-value {\n  color: #43A047;\n}\n\n.graphiql-container .doc-deprecation {\n  background: #fffae8;\n  box-shadow: inset 0 0 1px #bfb063;\n  color: #867F70;\n  line-height: 16px;\n  margin: 8px -8px;\n  max-height: 80px;\n  overflow: hidden;\n  padding: 8px;\n  border-radius: 3px;\n}\n\n.graphiql-container .doc-deprecation:before {\n  content: 'Deprecated:';\n  color: #c79b2e;\n  cursor: default;\n  display: block;\n  font-size: 9px;\n  font-weight: bold;\n  letter-spacing: 1px;\n  line-height: 1;\n  padding-bottom: 5px;\n  text-transform: uppercase;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.graphiql-container .doc-deprecation > :first-child {\n  margin-top: 0;\n}\n\n.graphiql-container .doc-deprecation > :last-child {\n  margin-bottom: 0;\n}\n\n.graphiql-container .show-btn {\n  -webkit-appearance: initial;\n  display: block;\n  border-radius: 3px;\n  border: solid 1px #ccc;\n  text-align: center;\n  padding: 8px 12px 10px;\n  width: 100%;\n  box-sizing: border-box;\n  background: #fbfcfc;\n  color: #555;\n  cursor: pointer;\n}\n\n.graphiql-container .search-box {\n  border-bottom: 1px solid #d3d6db;\n  display: block;\n  font-size: 14px;\n  margin: -15px -15px 12px 0;\n  position: relative;\n}\n\n.graphiql-container .search-box-icon {\n  cursor: pointer;\n  display: block;\n  font-size: 24px;\n  position: absolute;\n  top: -2px;\n  transform: rotate(-45deg);\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.graphiql-container .search-box .search-box-clear {\n  background-color: #d0d0d0;\n  border-radius: 12px;\n  color: #fff;\n  cursor: pointer;\n  font-size: 11px;\n  padding: 1px 5px 2px;\n  position: absolute;\n  right: 3px;\n  top: 8px;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n  border: 0;\n}\n\n.graphiql-container .search-box .search-box-clear:hover {\n  background-color: #b9b9b9;\n}\n\n.graphiql-container .search-box > input {\n  border: none;\n  box-sizing: border-box;\n  font-size: 14px;\n  outline: none;\n  padding: 6px 24px 8px 20px;\n  width: 100%;\n}\n\n.graphiql-container .error-container {\n  font-weight: bold;\n  left: 0;\n  letter-spacing: 1px;\n  opacity: 0.5;\n  position: absolute;\n  right: 0;\n  text-align: center;\n  text-transform: uppercase;\n  top: 50%;\n  transform: translate(0, -50%);\n}\n.CodeMirror-foldmarker {\n  color: blue;\n  cursor: pointer;\n  font-family: arial;\n  line-height: .3;\n  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;\n}\n.CodeMirror-foldgutter {\n  width: .7em;\n}\n.CodeMirror-foldgutter-open,\n.CodeMirror-foldgutter-folded {\n  cursor: pointer;\n}\n.CodeMirror-foldgutter-open:after {\n  content: \"\\25BE\";\n}\n.CodeMirror-foldgutter-folded:after {\n  content: \"\\25B8\";\n}\n.graphiql-container .history-contents {\n  font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;\n}\n\n.graphiql-container .history-contents {\n  margin: 0;\n  padding: 0;\n}\n\n.graphiql-container .history-contents li {\n  align-items: center;\n  display: flex;\n  font-size: 12px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  margin: 0;\n  padding: 8px;\n  border-bottom: 1px solid #e0e0e0;\n}\n\n.graphiql-container .history-contents li button:not(.history-label) {\n  display: none;\n  margin-left: 10px;\n}\n\n.graphiql-container .history-contents li:hover button:not(.history-label),\n.graphiql-container .history-contents li:focus-within button:not(.history-label) {\n  display: inline-block;\n}\n\n.graphiql-container .history-contents input,\n.graphiql-container .history-contents button {\n  padding: 0;\n  background: 0;\n  border: 0;\n  font-size: inherit;\n  font-family: inherit;\n  line-height: 14px;\n  color: inherit;\n}\n\n.graphiql-container .history-contents input {\n  flex-grow: 1;\n}\n\n.graphiql-container .history-contents input::-webkit-input-placeholder {\n  color: inherit;\n}\n\n.graphiql-container .history-contents input:-ms-input-placeholder {\n  color: inherit;\n}\n\n.graphiql-container .history-contents input::-ms-input-placeholder {\n  color: inherit;\n}\n\n.graphiql-container .history-contents input::placeholder {\n  color: inherit;\n}\n\n.graphiql-container .history-contents button {\n  cursor: pointer;\n  text-align: left;\n}\n\n.graphiql-container .history-contents .history-label {\n  flex-grow: 1;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.CodeMirror-info {\n  background: white;\n  border-radius: 2px;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n  box-sizing: border-box;\n  color: #555;\n  font-family:\n          system,\n          -apple-system,\n          'San Francisco',\n          '.SFNSDisplay-Regular',\n          'Segoe UI',\n          Segoe,\n          'Segoe WP',\n          'Helvetica Neue',\n          helvetica,\n          'Lucida Grande',\n          arial,\n          sans-serif;\n  font-size: 13px;\n  line-height: 16px;\n  margin: 8px -8px;\n  max-width: 400px;\n  opacity: 0;\n  overflow: hidden;\n  padding: 8px 8px;\n  position: fixed;\n  transition: opacity 0.15s;\n  z-index: 50;\n}\n\n.CodeMirror-info :first-child {\n  margin-top: 0;\n}\n\n.CodeMirror-info :last-child {\n  margin-bottom: 0;\n}\n\n.CodeMirror-info p {\n  margin: 1em 0;\n}\n\n.CodeMirror-info .info-description {\n  color: #777;\n  line-height: 16px;\n  margin-top: 1em;\n  max-height: 80px;\n  overflow: hidden;\n}\n\n.CodeMirror-info .info-deprecation {\n  background: #fffae8;\n  box-shadow: inset 0 1px 1px -1px #bfb063;\n  color: #867F70;\n  line-height: 16px;\n  margin: -8px;\n  margin-top: 8px;\n  max-height: 80px;\n  overflow: hidden;\n  padding: 8px;\n}\n\n.CodeMirror-info .info-deprecation-label {\n  color: #c79b2e;\n  cursor: default;\n  display: block;\n  font-size: 9px;\n  font-weight: bold;\n  letter-spacing: 1px;\n  line-height: 1;\n  padding-bottom: 5px;\n  text-transform: uppercase;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.CodeMirror-info .info-deprecation-label + * {\n  margin-top: 0;\n}\n\n.CodeMirror-info a {\n  text-decoration: none;\n}\n\n.CodeMirror-info a:hover {\n  text-decoration: underline;\n}\n\n.CodeMirror-info .type-name {\n  color: #CA9800;\n}\n\n.CodeMirror-info .field-name {\n  color: #1F61A0;\n}\n\n.CodeMirror-info .enum-value {\n  color: #0B7FC7;\n}\n\n.CodeMirror-info .arg-name {\n  color: #8B2BB9;\n}\n\n.CodeMirror-info .directive-name {\n  color: #B33086;\n}\n.CodeMirror-jump-token {\n  text-decoration: underline;\n  cursor: pointer;\n}\n/* The lint marker gutter */\n.CodeMirror-lint-markers {\n  width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n  background-color: infobackground;\n  border-radius: 4px 4px 4px 4px;\n  border: 1px solid black;\n  color: infotext;\n  font-family: monospace;\n  font-size: 10pt;\n  max-width: 600px;\n  opacity: 0;\n  overflow: hidden;\n  padding: 2px 5px;\n  position: fixed;\n  transition: opacity .4s;\n  white-space: pre-wrap;\n  z-index: 100;\n}\n\n.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {\n  background-position: left bottom;\n  background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-error {\n  background-image:\n          url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==\")\n;\n}\n\n.CodeMirror-lint-mark-warning {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {\n  background-position: center center;\n  background-repeat: no-repeat;\n  cursor: pointer;\n  display: inline-block;\n  height: 16px;\n  position: relative;\n  vertical-align: middle;\n  width: 16px;\n}\n\n.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {\n  background-position: top left;\n  background-repeat: no-repeat;\n  padding-left: 18px;\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=\");\n}\n\n.CodeMirror-lint-marker-multiple {\n  background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC\");\n  background-position: right bottom;\n  background-repeat: no-repeat;\n  width: 100%; height: 100%;\n}\n.graphiql-container .spinner-container {\n  height: 36px;\n  left: 50%;\n  position: absolute;\n  top: 50%;\n  transform: translate(-50%, -50%);\n  width: 36px;\n  z-index: 10;\n}\n\n.graphiql-container .spinner {\n  animation: rotation .6s infinite linear;\n  border-bottom: 6px solid rgba(150, 150, 150, .15);\n  border-left: 6px solid rgba(150, 150, 150, .15);\n  border-radius: 100%;\n  border-right: 6px solid rgba(150, 150, 150, .15);\n  border-top: 6px solid rgba(150, 150, 150, .8);\n  display: inline-block;\n  height: 24px;\n  position: absolute;\n  vertical-align: middle;\n  width: 24px;\n}\n\n@keyframes rotation {\n  from { transform: rotate(0deg); }\n  to { transform: rotate(359deg); }\n}\n.CodeMirror-hints {\n  background: white;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);\n  font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace;\n  font-size: 13px;\n  list-style: none;\n  margin-left: -6px;\n  margin: 0;\n  max-height: 14.5em;\n  overflow-y: auto;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  z-index: 10;\n}\n\n.CodeMirror-hint {\n  border-top: solid 1px #f7f7f7;\n  color: #141823;\n  cursor: pointer;\n  margin: 0;\n  max-width: 300px;\n  overflow: hidden;\n  padding: 2px 6px;\n  white-space: pre;\n}\n\nli.CodeMirror-hint-active {\n  background-color: #08f;\n  border-top-color: white;\n  color: white;\n}\n\n.CodeMirror-hint-information {\n  border-top: solid 1px #c0c0c0;\n  max-width: 300px;\n  padding: 4px 6px;\n  position: relative;\n  z-index: 1;\n}\n\n.CodeMirror-hint-information:first-child {\n  border-bottom: solid 1px #c0c0c0;\n  border-top: none;\n  margin-bottom: -1px;\n}\n\n.CodeMirror-hint-deprecation {\n  background: #fffae8;\n  box-shadow: inset 0 1px 1px -1px #bfb063;\n  color: #867F70;\n  font-family:\n          system,\n          -apple-system,\n          'San Francisco',\n          '.SFNSDisplay-Regular',\n          'Segoe UI',\n          Segoe,\n          'Segoe WP',\n          'Helvetica Neue',\n          helvetica,\n          'Lucida Grande',\n          arial,\n          sans-serif;\n  font-size: 13px;\n  line-height: 16px;\n  margin-top: 4px;\n  max-height: 80px;\n  overflow: hidden;\n  padding: 6px;\n}\n\n.CodeMirror-hint-deprecation .deprecation-label {\n  color: #c79b2e;\n  cursor: default;\n  display: block;\n  font-size: 9px;\n  font-weight: bold;\n  letter-spacing: 1px;\n  line-height: 1;\n  padding-bottom: 5px;\n  text-transform: uppercase;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  -ms-user-select: none;\n  user-select: none;\n}\n\n.CodeMirror-hint-deprecation .deprecation-label + * {\n  margin-top: 0;\n}\n\n.CodeMirror-hint-deprecation :last-child {\n  margin-bottom: 0;\n}"
  },
  {
    "path": "src/GraphiQl/assets/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\" />\n  <meta name=\"robots\" content=\"noindex\" />\n  <meta name=\"referrer\" content=\"origin\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n  <title>GraphQL API</title>\n  <style>\n    body {\n      height: 100vh;\n      margin: 0;\n      overflow: hidden;\n    }\n    #splash {\n      color: #333;\n      display: flex;\n      flex-direction: column;\n      font-family: system, -apple-system, \"San Francisco\", \".SFNSDisplay-Regular\", \"Segoe UI\", Segoe, \"Segoe WP\", \"Helvetica Neue\", helvetica, \"Lucida Grande\", arial, sans-serif;\n      height: 100vh;\n      justify-content: center;\n      text-align: center;\n    }\n  </style>\n  <link rel=\"icon\" href=\"favicon.ico\">\n  <link type=\"text/css\" href=\"./graphiql.css\" rel=\"stylesheet\" />\n</head>\n<body>\n<div id=\"splash\">\n  Loading&hellip;\n</div>\n\n<script src=\"./es6-promise/es6-promise.min.js\"></script>\n<script src=\"./react/react.min.js\"></script>\n<script src=\"./react/react-dom.min.js\"></script>\n<script src=\"./graphiql.min.js\"></script>\n<script src=\"./graphql-path.js\"></script>\n<script>\n  // Parse the search string to get url parameters.\n  var search = window.location.search;\n  var parameters = {};\n  search.substr(1).split('&').forEach(function (entry) {\n    var eq = entry.indexOf('=');\n    if (eq >= 0) {\n      parameters[decodeURIComponent(entry.slice(0, eq))] =\n              decodeURIComponent(entry.slice(eq + 1));\n    }\n  });\n\n  // if variables was provided, try to format it.\n  if (parameters.variables) {\n    try {\n      parameters.variables =\n              JSON.stringify(JSON.parse(parameters.variables), null, 2);\n    } catch (e) {\n      // Do nothing, we want to display the invalid JSON as a string, rather\n      // than present an error.\n    }\n  }\n\n  // When the query and variables string is edited, update the URL bar so\n  // that it can be easily shared\n  function onEditQuery(newQuery) {\n    parameters.query = newQuery;\n    updateURL();\n  }\n  function onEditVariables(newVariables) {\n    parameters.variables = newVariables;\n    updateURL();\n  }\n  function onEditOperationName(newOperationName) {\n    parameters.operationName = newOperationName;\n    updateURL();\n  }\n  function updateURL() {\n    var newSearch = '?' + Object.keys(parameters).filter(function (key) {\n      return Boolean(parameters[key]);\n    }).map(function (key) {\n      return encodeURIComponent(key) + '=' +\n              encodeURIComponent(parameters[key]);\n    }).join('&');\n    history.replaceState(null, null, newSearch);\n  }\n\n  function graphQLFetcher(graphQLParams) {\n    // This example expects a GraphQL server at the path /graphql.\n    // Change this to point wherever you host your GraphQL server.\n    return fetch(graphqlPath, {\n      method: 'post',\n      headers: {\n        'Accept': 'application/json',\n        'Content-Type': 'application/json'\n      },\n      body: JSON.stringify(graphQLParams),\n    }).then(function (response) {\n      return response.text();\n    }).then(function (responseBody) {\n      try {\n        return JSON.parse(responseBody);\n      } catch (error) {\n        return responseBody;\n      }\n    });\n  }\n\n  // Render <GraphiQL /> into the body.\n  ReactDOM.render(\n          React.createElement(GraphiQL, {\n            fetcher: graphQLFetcher,\n            query: parameters.query,\n            variables: parameters.variables,\n            operationName: parameters.operationName,\n            onEditQuery: onEditQuery,\n            onEditVariables: onEditVariables,\n            onEditOperationName: onEditOperationName\n          }),\n          document.body,\n  );\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "tests/GraphiQl.Demo/.bowerrc",
    "content": "{\n  \"directory\": \"wwwroot/lib\"\n}\n"
  },
  {
    "path": "tests/GraphiQl.Demo/Controllers/GraphQlController.cs",
    "content": "using System.Threading.Tasks;\nusing GraphiQl.Demo.GraphQl;\nusing GraphiQl.Demo.GraphQl.Models;\nusing GraphQL;\nusing GraphQL.Types;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace GraphiQl.Demo.Controllers\n{\n    [Route(Startup.GraphQlPath)]\n    [Route(Startup.CustomGraphQlPath)]\n    public class GraphQlController : Controller\n    {\n        [HttpPost]\n        public async Task<IActionResult> Post([FromBody] GraphQlQuery query)\n        {\n            var schema = new Schema {Query = new StarWarsQuery()};\n            \n            var result = await new DocumentExecuter().ExecuteAsync(x =>\n            {\n                x.Schema = schema;\n                x.Query = query.Query;\n                x.Inputs = query.Variables;\n            });\n    \n            if (result.Errors?.Count > 0)\n            {\n                return BadRequest();\n            }\n    \n            return Ok(result);\n        }\n    }\n}\n"
  },
  {
    "path": "tests/GraphiQl.Demo/GraphQl/Droid.cs",
    "content": "﻿namespace GraphiQl.Demo.GraphQl\n{\n    public class Droid\n    {\n        public int Id { get; set; }\n        public string Name { get; set; }\n    }\n\n    public class Person\n    {\n        public int Id { get; set; }\n        public string Name { get; set; }\n        public int Age { get; set; }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Demo/GraphQl/GraphQlQuery.cs",
    "content": "﻿using GraphQL;\n\nnamespace GraphiQl.Demo.GraphQl\n{\n    public class GraphQlQuery\n    {\n        public string OperationName { get; set; }\n        public string NamedQuery { get; set; }\n        public string Query { get; set; }\n        public Inputs Variables { get; set; }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Demo/GraphQl/Models/DroidType.cs",
    "content": "﻿using GraphQL.Types;\n\nnamespace GraphiQl.Demo.GraphQl.Models\n{\n    public class DroidType : ObjectGraphType<Droid>\n    {\n        public DroidType()\n        {\n            Field(x => x.Id).Description(\"The Id of the Droid.\");\n            Field(x => x.Name, nullable: true).Description(\"The name of the Droid.\");\n        }\n    }\n\n    public class PersonType : ObjectGraphType<Person>\n    {\n        public PersonType()\n        {\n            // Field(x => x.FirstName).Resolve((x) => {\n            //     return \"Hello!\";\n            // }).Description(\"Perso's First Name\");\n\n            Field(x => x.Id).Description(\"Peron's Id\");\n            Field(x => x.Name).Description(\"Person's name\");\n            Field(x => x.Age).Resolve(x => {\n                return 25;\n            }).Description(\"A person's age\");\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Demo/GraphQl/Models/StarWarsQuery.cs",
    "content": "﻿using GraphQL.Types;\n\nnamespace GraphiQl.Demo.GraphQl.Models\n{\n    public class StarWarsQuery : ObjectGraphType\n    {\n        public StarWarsQuery()\n        {\n            Field<DroidType>(\"hero\", resolve: context => new Droid { Id = 1, Name = \"R2-D2\" });\n            Field<PersonType>(\"person\", resolve: context => new Person { Id = 1, Name = \"Mr Happy\", Age = 32 });\n            \n            // Field<PersonType>(\"person\", resolve: context => new Person { Id = 5, FirstName = \"Joe\", Surname = \"Woodward\", Age = 32 });\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Demo/GraphiQl.Demo.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n  <PropertyGroup>\n    <TargetFramework>netcoreapp3.1</TargetFramework>\n  </PropertyGroup>\n  <ItemGroup>\n    <PackageReference Include=\"GraphQL\" Version=\"2.4.0\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.Mvc.NewtonsoftJson\" Version=\"3.1.1\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\..\\src\\GraphiQl\\GraphiQl.csproj\" />\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "tests/GraphiQl.Demo/Program.cs",
    "content": "﻿using Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\n\nnamespace GraphiQl.Demo\n{\n    public class Program\n    {\n        public static void Main(string[] args)\n        {\n            BuildWebHost(args).Run();\n        }\n\n        public static IWebHost BuildWebHost(string[] args) =>\n            WebHost.CreateDefaultBuilder(args)\n                .UseStartup<Startup>()\n                .Build();\n    }\n}\n"
  },
  {
    "path": "tests/GraphiQl.Demo/Properties/launchSettings.json",
    "content": "{\n  \"profiles\": {\n    \"GraphiQl.Demp\": {\n      \"commandName\": \"Project\",\n      \"launchBrowser\": true,\n      \"launchUrl\": \"graphql\",\n      \"environmentVariables\": {\n        \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n      },\n      \"applicationUrl\": \"http://localhost:5000\"\n    }\n  }\n}"
  },
  {
    "path": "tests/GraphiQl.Demo/Startup.cs",
    "content": "﻿using Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Logging;\nusing Newtonsoft.Json;\n\nnamespace GraphiQl.Demo\n{\n\tpublic class Startup\n\t{\n\t\tpublic const string GraphQlPath = \"/graphql\";\n\t\tpublic const string CustomGraphQlPath = \"/custom-path\";\n\n\t\tpublic Startup(IConfiguration configuration)\n\t\t{\n\t\t\tConfiguration = configuration;\n\t\t}\n\n\t\tpublic IConfiguration Configuration { get; }\n\n\t\tpublic virtual void ConfigureGraphQl(IServiceCollection services) {}\n\n\t\tpublic void ConfigureServices(IServiceCollection services)\n\t\t{\n\t\t\tservices\n\t\t\t\t.AddMvc()\n\t\t\t\t.AddNewtonsoftJson(\n\t\t\t\t\toptions => options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore\n\t\t\t\t);\n\n\t\t\tConfigureGraphQl(services);\n\t\t}\n\n\t\tpublic void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)\n\t\t{\n\t\t\tapp.UseGraphiQl();\n\t\t\tapp.UseRouting().UseEndpoints(\n\t\t\t\trouting => routing.MapControllers()\n\t\t\t);\n\t\t}\n\t}\n}"
  },
  {
    "path": "tests/GraphiQl.Demo/appsettings.Development.json",
    "content": "﻿{\n  \"Logging\": {\n    \"IncludeScopes\": false,\n    \"LogLevel\": {\n      \"Default\": \"Debug\",\n      \"System\": \"Information\",\n      \"Microsoft\": \"Information\"\n    }\n  }\n}\n"
  },
  {
    "path": "tests/GraphiQl.Demo/appsettings.json",
    "content": "﻿{\n  \"Logging\": {\n    \"IncludeScopes\": false,\n    \"LogLevel\": {\n      \"Default\": \"Warning\"\n    }\n  }\n}\n"
  },
  {
    "path": "tests/GraphiQl.Tests/AuthenticationTest/ConfigureOptionsSetup.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing GraphiQl.Demo;\nusing Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\nusing Shouldly;\nusing Xunit;\n\nnamespace GraphiQl.Tests.AuthenticationTest\n{\n    public class ConfigureOptionsSetup : SeleniumTest, IAsyncLifetime\n    {\n        private readonly IWebHost _host;\n\n        public ConfigureOptionsSetup()\n        {\n            _host = WebHost.CreateDefaultBuilder()\n                .ConfigureServices(x => { x.AddTransient<IConfigureOptions<GraphiQlOptions>,GraphiQlTestOptionsSetup>(); })\n                .UseStartup<Startup>()\n                .UseKestrel()\n                .UseUrls(\"http://*:5001\")\n                .Build();\n        }\n\n        [Fact]\n        public void RequiresAuthentication()\n        {\n            // Arrange + Act\n            var result = string.Empty;\n            RunTest(driver =>\n            {\n                driver.Navigate().GoToUrl(\"http://localhost:5001/graphql\");\n\n                driver.Manage()\n                    .Timeouts()\n                    .ImplicitWait = TimeSpan.FromSeconds(2);\n\n                result = driver.PageSource;\n            });\n\n            // Assert\n            result.ShouldContain(\"This page requires authentication\");\n        }\n\n        public async Task InitializeAsync()\n            => await _host.StartAsync().ConfigureAwait(false);\n\n        public Task DisposeAsync()\n        {\n            _host.Dispose();\n            return Task.CompletedTask;\n        }\n\n        internal class GraphiQlTestOptionsSetup : IConfigureOptions<GraphiQlOptions>\n        {\n            public void Configure(GraphiQlOptions options)\n            {\n                options.IsAuthenticated = context =>\n                {\n                    context.Response.Clear();\n                    context.Response.StatusCode = 400;\n                    context.Response.WriteAsync(\"This page requires authentication\");\n\n                    return Task.FromResult(false);\n                };\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/AuthenticationTest/DelegateSetup.cs",
    "content": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing GraphiQl.Demo;\nusing Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Shouldly;\nusing Xunit;\n\nnamespace GraphiQl.Tests.AuthenticationTest\n{\n    public class CustomStartup : Startup\n    {\n        public CustomStartup(IConfiguration configuration) : base(configuration) {}\n\n        public override void ConfigureGraphQl(IServiceCollection services)\n            => services.AddGraphiQl(x => x.IsAuthenticated = context =>\n            {\n                context.Response.Clear();\n                context.Response.StatusCode = 400;\n                context.Response.WriteAsync(\"This page requires authentication\");\n\n                return Task.FromResult(false);\n            });\n    }\n\n    public class DelegateSetup : SeleniumTest, IAsyncLifetime\n    {\n        private readonly IWebHost _host;\n\n        public DelegateSetup()\n        {\n            _host = WebHost.CreateDefaultBuilder()\n                .UseStartup<CustomStartup>()\n                .UseKestrel()\n                .UseUrls(\"http://*:5001\")\n                .Build();\n        }\n\n        [Fact]\n        public void RequiresAuthentication()\n        {\n            // Arrange + Act\n            var result = string.Empty;\n            RunTest(driver =>\n            {\n                driver.Navigate().GoToUrl(\"http://localhost:5001/graphql\");\n\n                driver.Manage()\n                    .Timeouts()\n                    .ImplicitWait = TimeSpan.FromSeconds(2);\n\n                result = driver.PageSource;\n            });\n\n            // Assert\n            result.ShouldContain(\"This page requires authentication\");\n        }\n\n        public async Task InitializeAsync()\n            => await _host.StartAsync().ConfigureAwait(false);\n\n        public Task DisposeAsync()\n        {\n            _host.Dispose();\n            return Task.CompletedTask;\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/BasicTest.cs",
    "content": "using System;\nusing System.Text.Json;\nusing System.Threading;\nusing GraphiQl.Tests.Fixtures;\nusing Shouldly;\nusing Xunit;\n\nnamespace GraphiQl.Tests\n{\n    public class BasicTest : SeleniumTest, IClassFixture<HostFixture>\n    {\n        private readonly HostFixture _fixture;\n\n        public BasicTest(HostFixture fixture)\n        {\n            _fixture = fixture;\n        }\n\n        [Fact]\n        public void CanQueryGraphQl()\n        {\n            // TODO: Use PageModel\n\n            // Arrange\n            var result = string.Empty;\n            var query = @\"{hero{id,name}}\";\n                \n            // Act\n            RunTest( driver =>\n            {\n                driver.Navigate().GoToUrl(_fixture.GraphiQlUri + Uri.EscapeDataString(query));\n                var button = driver.FindElementByClassName(\"execute-button\");\n                button?.Click();\n                \n                //TODO: https://www.selenium.dev/documentation/en/webdriver/waits/\n                Thread.Sleep(2000);\n\n                // UGH!\n                result = driver.FindElementByClassName(\"result-window\").Text\n                    .Replace(\"\\n\", \"\")\n                    .Replace(\" \", \"\");\n            });\n\n            // Assert\n            using var channelResponse = JsonDocument.Parse(result);\n            var data = channelResponse.RootElement.GetProperty(\"data\");\n\n            data.GetProperty(\"hero\").GetProperty(\"name\").GetString().ShouldBe(\"R2-D2\");\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/Fixtures/GraphQlFixture.cs",
    "content": "using System.Threading.Tasks;\nusing GraphiQl;\nusing GraphiQl.Demo;\nusing GraphiQl.Demo.Controllers;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.Mvc.ApplicationParts;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Hosting;\nusing Newtonsoft.Json;\n\nnamespace graphiql.Tests.Fixtures\n{\n    public class GraphQlFixture\n    {\n        public static IHostBuilder CreateHostBuilder(string[] args) =>\n            Host.CreateDefaultBuilder(args)\n                .ConfigureWebHostDefaults(webBuilder =>\n                {\n                    webBuilder.UseKestrel();\n                    webBuilder.UseUrls(\"http://*:5000\");\n                    webBuilder.UseStartup<Startup>();\n                });\n        \n        public async Task CreateKestrel()\n        {\n            var x = new WebHostBuilder();\n            var host = CreateHostBuilder(null).Build();\n            await host.RunAsync();\n        }\n        \n        public IWebHost CreateWebHostOld()\n        {\n            var config = new ConfigurationBuilder().Build();\n            var host = new WebHostBuilder()\n                .UseConfiguration(config)\n                .ConfigureServices(s =>\n                {\n                    s.AddMvc()\n                        .AddNewtonsoftJson(o =>\n                            o.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore);\n                    s.AddControllers()\n                        .PartManager.ApplicationParts.Add(new AssemblyPart(typeof(GraphQlController).Assembly));\n                })\n                .Configure(app =>\n                {\n                    app.UseGraphiQl();\n                    app.UseRouting().UseEndpoints(routing => routing.MapControllers());\n                });\n\n            return host.Build();\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/Fixtures/HostFixture.cs",
    "content": "using System.Threading.Tasks;\nusing GraphiQl.Demo;\nusing Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\nusing Xunit;\n\nnamespace GraphiQl.Tests.Fixtures\n{\n    public class HostFixture : IAsyncLifetime\n    {\n        private readonly IWebHost _host;\n\n        public string GraphiQlUri { get; } = \"http://localhost:5001/graphql?query=\";\n\n        public HostFixture()\n        {\n            _host = WebHost.CreateDefaultBuilder()\n                .UseStartup<Startup>()\n                .UseKestrel()\n                .UseUrls(\"http://*:5001\")\n                .Build();\n        }\n\n        public async Task InitializeAsync()\n            => await _host.StartAsync().ConfigureAwait(false);\n\n        public async Task DisposeAsync()\n        {\n            await _host.StopAsync().ConfigureAwait(false);\n            _host.Dispose();\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/GraphiQl.Tests.csproj",
    "content": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n  <PropertyGroup>\n    <TargetFramework>netcoreapp3.1</TargetFramework>\n    <IsPackable>false</IsPackable>\n    <AssemblyName>GraphiQl.Tests</AssemblyName>\n    <RootNamespace>GraphiQl.Tests</RootNamespace>\n  </PropertyGroup>\n\n  <ItemGroup>\n    <PackageReference Include=\"Microsoft.AspNetCore.TestHost\" Version=\"3.1.2\" />\n    <PackageReference Include=\"Selenium.WebDriver\" Version=\"3.141.0\" />\n    <PackageReference Include=\"Selenium.WebDriver.ChromeDriver\" Version=\"80.0.3987.10600\" />\n    <PackageReference Include=\"Shouldly\" Version=\"3.0.2\" />\n    <PackageReference Include=\"xunit\" Version=\"2.4.1\" />\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.4.1\" />\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"16.5.0\" />\n    <PackageReference Include=\"Microsoft.AspNetCore.Mvc.Testing\" Version=\"3.1.2\" />\n  </ItemGroup>\n\n  <ItemGroup>\n    <ProjectReference Include=\"..\\GraphiQl.Demo\\GraphiQl.Demo.csproj\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "tests/GraphiQl.Tests/OverrideGraphQlPathTests/ConfigureOptionsSetup.cs",
    "content": "using System;\nusing System.Text.Json;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing GraphiQl.Demo;\nusing Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\nusing Shouldly;\nusing Xunit;\n\nnamespace GraphiQl.Tests.OverrideGraphQlPathTests\n{\n    public class ConfigureOptionsSetup : SeleniumTest, IAsyncLifetime\n    {\n        private readonly IWebHost _host;\n\n        public ConfigureOptionsSetup()\n        {\n            _host = WebHost.CreateDefaultBuilder()\n                .ConfigureServices(serviceCollection =>\n                {\n                    serviceCollection.AddTransient<IConfigureOptions<GraphiQlOptions>, GraphiQlTestOptionsSetup>();\n                })\n                .UseStartup<Startup>()\n                .UseKestrel()\n                .UseUrls(\"http://*:5001\")\n                .Build();\n        }\n\n        public async Task InitializeAsync()\n            => await _host.StartAsync().ConfigureAwait(false);\n\n        [Fact]\n        public void CanOverrideGraphQlPath()\n        {\n            // TODO: Use PageModel\n\n            // Arrange\n            var result = string.Empty;\n            var query = @\"{hero{id,name}}\";\n                \n            // Act\n            RunTest( driver =>\n            {\n                driver.Navigate().GoToUrl($\"http://localhost:5001/graphql?query=\" + Uri.EscapeDataString(query));\n                var button = driver.FindElementByClassName(\"execute-button\");\n                button?.Click();\n\n                Thread.Sleep(2000);\n\n                /*\n                var x = Driver.FindElement(B)\n                var foo = new WebDriverWait(driver, TimeSpan.FromSeconds(3))\n                    .Until(drv => drv.FindElement(By.Name(\"q\")));\n                    */\n                \n                // UGH!\n                result = driver\n                    .FindElementByClassName(\"result-window\").Text\n                    .Replace(\"\\n\", \"\")\n                    .Replace(\" \", \"\");\n            });\n\n            // Assert\n            using var channelResponse = JsonDocument.Parse(result);\n            var data = channelResponse.RootElement.GetProperty(\"data\");\n\n            data.GetProperty(\"hero\").GetProperty(\"name\").GetString().ShouldBe(\"R2-D2\");\n        }\n\n        public async Task DisposeAsync()\n        {\n            await _host.StopAsync();\n            _host.Dispose();\n        }\n\n        internal class GraphiQlTestOptionsSetup : IConfigureOptions<GraphiQlOptions>\n        {\n            public void Configure(GraphiQlOptions options)\n            {\n                options.GraphQlApiPath = Startup.CustomGraphQlPath;\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/OverrideGraphQlPathTests/DelegateSetup.cs",
    "content": "using System;\nusing System.Text.Json;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing GraphiQl.Demo;\nusing Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Shouldly;\nusing Xunit;\n\nnamespace GraphiQl.Tests.OverrideGraphQlPathTests\n{\n    public class CustomStartup : Startup\n    {\n        public CustomStartup(IConfiguration configuration) : base(configuration) {}\n\n        public override void ConfigureGraphQl(IServiceCollection services) \n            => services.AddGraphiQl(x => x.GraphQlApiPath = CustomGraphQlPath);\n    }\n\n    public class DelegateSetup : SeleniumTest, IAsyncLifetime\n    {\n        private readonly IWebHost _host;\n\n        public DelegateSetup()\n        {\n            _host = WebHost.CreateDefaultBuilder()\n                .UseStartup<CustomStartup>()\n                .UseKestrel()\n                .UseUrls(\"http://*:5001\")\n                .Build();\n        }\n\n        public async Task InitializeAsync()\n            => await _host.StartAsync().ConfigureAwait(false);\n\n        [Fact]\n        public void CanOverrideGraphQlPath()\n        {\n            // TODO: Use PageModel\n\n            // Arrange\n            var result = string.Empty;\n            var query = @\"{hero{id,name}}\";\n                \n            // Act\n            RunTest( driver =>\n            {\n                driver.Navigate().GoToUrl(\"http://localhost:5001/graphql?query=\" + Uri.EscapeDataString(query));\n                var button = driver.FindElementByClassName(\"execute-button\");\n                button?.Click();\n\n                Thread.Sleep(2000);\n\n                // UGH!\n                result = driver\n                    .FindElementByClassName(\"result-window\").Text\n                    .Replace(\"\\n\", \"\")\n                    .Replace(\" \", \"\");\n            });\n\n            // Assert\n            using var channelResponse = JsonDocument.Parse(result);\n            var data = channelResponse.RootElement.GetProperty(\"data\");\n\n            data.GetProperty(\"hero\").GetProperty(\"name\").GetString().ShouldBe(\"R2-D2\");\n        }\n\n        public async Task DisposeAsync()\n        {\n            await _host.StopAsync();\n            _host.Dispose();\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/OverrideGraphiQlPathTests/ConfigureOptionsSetup.cs",
    "content": "using System;\nusing System.Text.Json;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing GraphiQl.Demo;\nusing Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\nusing Shouldly;\nusing Xunit;\n\nnamespace GraphiQl.Tests.OverrideGraphiQlPathTests\n{\n    public class ConfigureOptionsSetup : SeleniumTest, IAsyncLifetime\n    {\n        private readonly IWebHost _host;\n\n        public ConfigureOptionsSetup()\n        {\n            _host = WebHost.CreateDefaultBuilder()\n                .ConfigureServices(serviceCollection =>\n                {\n                    serviceCollection.AddTransient<IConfigureOptions<GraphiQlOptions>, GraphiQlTestOptionsSetup>();\n                })\n                .UseStartup<Startup>()\n                .UseKestrel()\n                .UseUrls(\"http://*:5001\")\n                .Build();\n        }\n\n        public async Task InitializeAsync()\n            => await _host.StartAsync().ConfigureAwait(false);\n\n        [Fact]\n        public void CanOverrideGraphiQlPath()\n        {\n            // TODO: Use PageModel\n\n            // Arrange\n            var result = string.Empty;\n            var query = @\"{hero{id,name}}\";\n                \n            // Act\n            RunTest( driver =>\n            {\n                driver.Navigate().GoToUrl($\"http://localhost:5001{Startup.CustomGraphQlPath}?query=\" + Uri.EscapeDataString(query));\n                var button = driver.FindElementByClassName(\"execute-button\");\n                button?.Click();\n                \n                Thread.Sleep(2000);\n\n                // UGH!\n                result = driver\n                    .FindElementByClassName(\"result-window\").Text\n                    .Replace(\"\\n\", \"\")\n                    .Replace(\" \", \"\");\n            });\n\n            // Assert\n            using var channelResponse = JsonDocument.Parse(result);\n            var data = channelResponse.RootElement.GetProperty(\"data\");\n\n            data.GetProperty(\"hero\").GetProperty(\"name\").GetString().ShouldBe(\"R2-D2\");\n        }\n\n        public async Task DisposeAsync()\n        {\n            await _host.StopAsync();\n            _host.Dispose();\n        }\n\n        internal class GraphiQlTestOptionsSetup : IConfigureOptions<GraphiQlOptions>\n        {\n            public void Configure(GraphiQlOptions options)\n            {\n                options.GraphiQlPath = Startup.CustomGraphQlPath;\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/OverrideGraphiQlPathTests/DelegateSetup.cs",
    "content": "using System;\nusing System.Text.Json;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing GraphiQl.Demo;\nusing Microsoft.AspNetCore;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\nusing Shouldly;\nusing Xunit;\n\nnamespace GraphiQl.Tests.OverrideGraphiQlPathTests\n{\n    public class CustomStartup : Startup\n    {\n        public CustomStartup(IConfiguration configuration) : base(configuration) {}\n\n        public override void ConfigureGraphQl(IServiceCollection services) \n            => services.AddGraphiQl(x => x.GraphiQlPath = CustomGraphQlPath);\n    }\n\n    public class DelegateSetup : SeleniumTest, IAsyncLifetime\n    {\n        private readonly IWebHost _host;\n\n        public DelegateSetup()\n        {\n            _host = WebHost.CreateDefaultBuilder()\n                .UseStartup<CustomStartup>()\n                .UseKestrel()\n                .UseUrls(\"http://*:5001\")\n                .Build();\n        }\n\n        public async Task InitializeAsync()\n            => await _host.StartAsync().ConfigureAwait(false);\n\n        [Fact]\n        public void CanOverrideGraphiQlPath()\n        {\n            // TODO: Use PageModel\n\n            // Arrange\n            var result = string.Empty;\n            var query = @\"{hero{id,name}}\";\n                \n            // Act\n            RunTest( driver =>\n            {\n                driver.Navigate().GoToUrl($\"http://localhost:5001{Startup.CustomGraphQlPath}?query=\" + Uri.EscapeDataString(query));\n                var button = driver.FindElementByClassName(\"execute-button\");\n                button?.Click();\n\n                driver.Manage()\n                    .Timeouts()\n                    .ImplicitWait = TimeSpan.FromSeconds(2);\n\n                // UGH!\n                result = driver\n                    .FindElementByClassName(\"result-window\").Text\n                    .Replace(\"\\n\", \"\")\n                    .Replace(\" \", \"\");\n            });\n\n            // Assert\n            using var channelResponse = JsonDocument.Parse(result);\n            var data = channelResponse.RootElement.GetProperty(\"data\");\n\n            data.GetProperty(\"hero\").GetProperty(\"name\").GetString().ShouldBe(\"R2-D2\");\n        }\n\n        public async Task DisposeAsync()\n        {\n            await _host.StopAsync();\n            _host.Dispose();\n        }\n\n        internal class GraphiQlTestOptionsSetup : IConfigureOptions<GraphiQlOptions>\n        {\n            public void Configure(GraphiQlOptions options)\n            {\n                options.GraphiQlPath = Startup.CustomGraphQlPath;\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/SeleniumTest.cs",
    "content": "using System;\nusing OpenQA.Selenium;\nusing OpenQA.Selenium.Chrome;\n\nnamespace GraphiQl.Tests\n{\n    public abstract class SeleniumTest\n    {\n        private ChromeDriver Driver { get; }\n        protected bool RunHeadless { get; set;  } = false;\n\n        protected SeleniumTest()\n        {\n            var options = new ChromeOptions();\n            options.AddArgument(\"--disable-dev-shm-usage\");\n            options.AddArgument(\"--no-sandbox\");\n    \n            if (RunHeadless)\n                options.AddArgument(\"--headless\");\n            \n            Driver = new ChromeDriver(options);\n        }\n\n        protected void RunTest(Action<ChromeDriver> execute)\n        {\n            try\n            {\n                execute(Driver);\n            }\n            catch (Exception ex)\n            {\n                throw ex;\n            }\n            finally\n            {\n                Driver.Quit();\n            }\n        }\n    }\n}"
  },
  {
    "path": "tests/GraphiQl.Tests/xunit.runner.json",
    "content": "{\n  \"$schema\": \"https://xunit.net/schema/current/xunit.runner.schema.json\",\n  \"parallelizeTestCollections\": false\n}"
  }
]