├── docs └── example.png ├── .gitattributes ├── package.json ├── SitecoreQL ├── App_Config │ └── Include │ │ ├── z.SitecoreQL │ │ └── SitecoreQL.DependencyConfigurator.config │ │ └── z.Jabberwocky │ │ ├── 1.Jabberwocky.DependencyInjection.Sc.config │ │ └── 1.Jabberwocky.WebApi.Sc.config ├── Types │ ├── KeyValuePairType.cs │ ├── SortDirectionGraphType.cs │ ├── ItemArrayType.cs │ ├── ItemPathType.cs │ ├── ItemStatisticsType.cs │ ├── SearchQueryType.cs │ ├── FilterGraphType.cs │ ├── SortGraphType.cs │ ├── ItemType.cs │ └── SearchItemType.cs ├── Schema │ └── SitecoreSchema.cs ├── Converters │ ├── IArgumentToExpressionConverter.cs │ └── ArgumentToExpressionConverter.cs ├── Web.Debug.config ├── Web.Release.config ├── Controllers │ └── SitecoreQLController.cs ├── Properties │ └── AssemblyInfo.cs ├── App_Start │ └── DependencyConfigurator.cs ├── Web.config ├── Repositories │ └── IReadOnlyRepository.cs ├── Query │ └── ItemQuery.cs ├── packages.config ├── SitecoreQL.html ├── SitecoreQL.csproj └── assets │ └── graphiql.css ├── SitecoreQL.sln ├── README.md └── .gitignore /docs/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kmazzoni/SitecoreQL/HEAD/docs/example.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Do not adjust line endings on Sitecore .item files 5 | *.item -text 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "An example using SitecoreQL", 3 | "scripts": {}, 4 | "dependencies": { 5 | "graphiql": "^0.11.3" 6 | }, 7 | "optionalDependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /SitecoreQL/App_Config/Include/z.SitecoreQL/SitecoreQL.DependencyConfigurator.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SitecoreQL/Types/KeyValuePairType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using GraphQL.Types; 3 | 4 | namespace SitecoreQL.Types 5 | { 6 | public class KeyValuePairType : ObjectGraphType> 7 | { 8 | public KeyValuePairType() 9 | { 10 | Field(x => x.Key); 11 | Field(x => x.Value); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /SitecoreQL/Schema/SitecoreSchema.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using GraphQL.Types; 3 | using SitecoreQL.Query; 4 | 5 | namespace SitecoreQL.Schema 6 | { 7 | public class SitecoreSchema : GraphQL.Types.Schema 8 | { 9 | public SitecoreSchema(Func resolveType) 10 | : base(resolveType) 11 | { 12 | Query = (ItemQuery)resolveType(typeof(ItemQuery)); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /SitecoreQL/Types/SortDirectionGraphType.cs: -------------------------------------------------------------------------------- 1 | using GraphQL.Types; 2 | 3 | namespace SitecoreQL.Types 4 | { 5 | public class SortDirectionGraphType : EnumerationGraphType 6 | { 7 | public SortDirectionGraphType() 8 | { 9 | Name = "SortDirection"; 10 | Description = "Direction to sort results (asc/desc)"; 11 | AddValue("ASC", "Ascending", 1); 12 | AddValue("DESC", "Descending", 2); 13 | } 14 | } 15 | 16 | public enum SortDirection 17 | { 18 | ASC = 1, 19 | DESC = 2 20 | } 21 | } -------------------------------------------------------------------------------- /SitecoreQL/Types/ItemArrayType.cs: -------------------------------------------------------------------------------- 1 | using GraphQL.Types; 2 | using Sitecore.Data.Items; 3 | 4 | namespace SitecoreQL.Types 5 | { 6 | public class ItemArrayType : ObjectGraphType 7 | { 8 | public ItemArrayType() 9 | { 10 | Name = "ItemArray"; 11 | 12 | Field("count", "The number of items returned from the xpath query.", resolve: context => context.Source.Length); 13 | Field>("items", "The items matching the xpath query.", resolve: context => context.Source); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /SitecoreQL/App_Config/Include/z.Jabberwocky/1.Jabberwocky.DependencyInjection.Sc.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SitecoreQL/Types/ItemPathType.cs: -------------------------------------------------------------------------------- 1 | using GraphQL.Types; 2 | using Sitecore.Data; 3 | 4 | namespace SitecoreQL.Types 5 | { 6 | public class ItemPathType : ObjectGraphType 7 | { 8 | public ItemPathType() 9 | { 10 | Name = "ItemPath"; 11 | 12 | Field(x => x.ContentPath); 13 | Field(x => x.FullPath); 14 | Field(x => x.IsContentItem); 15 | Field(x => x.IsFullyQualified); 16 | Field(x => x.IsMasterPart); 17 | Field(x => x.IsMediaItem); 18 | Field(x => x.MediaPath); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /SitecoreQL/Types/ItemStatisticsType.cs: -------------------------------------------------------------------------------- 1 | using GraphQL.Types; 2 | using Sitecore.Data.Items; 3 | 4 | namespace SitecoreQL.Types 5 | { 6 | public class ItemStatisticsType : ObjectGraphType 7 | { 8 | public ItemStatisticsType() 9 | { 10 | Field(x => x.Created, true).Description("The date the item was created."); 11 | Field(x => x.CreatedBy, true).Description("The username of the person who created the item."); 12 | Field(x => x.Updated, true).Description("The date the item was last updated."); 13 | Field(x => x.UpdatedBy, true).Description("The username of the person who last updated the item."); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /SitecoreQL/Converters/IArgumentToExpressionConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using SitecoreQL.Query; 6 | 7 | namespace SitecoreQL.Converters 8 | { 9 | public interface IArgumentToExpressionConverter 10 | { 11 | Expression> ConvertToFilter(IDictionary arguments); 12 | Func, IOrderedQueryable> ConvertToOrderBy(IDictionary arguments); 13 | IEnumerable>> ConvertToFacets(IEnumerable arguments); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /SitecoreQL/App_Config/Include/z.Jabberwocky/1.Jabberwocky.WebApi.Sc.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SitecoreQL/Types/SearchQueryType.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using GraphQL.Types; 3 | using Sitecore.ContentSearch.Linq; 4 | using SitecoreQL.Query; 5 | 6 | namespace SitecoreQL.Types 7 | { 8 | public class SearchQueryType : ObjectGraphType> 9 | { 10 | public SearchQueryType() 11 | { 12 | Name = "SearchQueryResult"; 13 | Description = "Search results."; 14 | 15 | Field(x => x.TotalSearchResults).Name("totalCount").Description("Total number of items matching the search criteria."); 16 | Field>("items", "The items returned from the search.", resolve: context => 17 | { 18 | return context.Source.Select(x => x.Document); 19 | }); 20 | Field>("facets", "The set of requested facets and their values/counts.", resolve: context => context.Source.Facets.Categories); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /SitecoreQL.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SitecoreQL", "SitecoreQL\SitecoreQL.csproj", "{1561109E-2D00-46AB-9D95-5E60347F4C07}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1561109E-2D00-46AB-9D95-5E60347F4C07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {1561109E-2D00-46AB-9D95-5E60347F4C07}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {1561109E-2D00-46AB-9D95-5E60347F4C07}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {1561109E-2D00-46AB-9D95-5E60347F4C07}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SitecoreQL 2 | GraphQL implementation for Sitecore. 3 | 4 | Query against Sitecore's Content Search API: 5 | 6 | ![SitecoreQL Example](/docs/example.png) 7 | 8 | ## Getting Started 9 | 10 | Want to play around? 11 | 12 | 1. Fork this repo 13 | 2. Install an instance of Sitecore 8.2 ([Use SIM!](https://github.com/Sitecore/Sitecore-Instance-Manager)) 14 | 3. Open Visual Studio and publish the SitecoreQL project to your Sitecore instance. 15 | 4. Load SitecoreQL.html in your browser and test it out. 16 | 17 | ## GraphQL 18 | [GraphQL](http://graphql.org/) is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. 19 | 20 | ## GraphQL for .NET 21 | Facebook's GraphQL implementation for .NET. [https://github.com/graphql-dotnet/graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet) 22 | -------------------------------------------------------------------------------- /SitecoreQL/Types/FilterGraphType.cs: -------------------------------------------------------------------------------- 1 | using GraphQL.Types; 2 | 3 | namespace SitecoreQL.Types 4 | { 5 | public class FilterGraphType : InputObjectGraphType 6 | { 7 | public FilterGraphType() 8 | { 9 | Name = "Filter"; 10 | 11 | Field("id", "The item's unique ID."); 12 | Field("name", "The name of the item."); 13 | Field("language", "The language the item was created in."); 14 | Field("databaseName", "The name of the database the item was searched from."); 15 | Field("templateId", "The ID of the item's template."); 16 | Field("templateName", "The name of the item's template."); 17 | Field("parentId", "The ID of the item's parent."); 18 | Field("createdBy", "The username of the person who created the item."); 19 | Field("updatedBy", "The username of the person who last updated the item."); 20 | Field("isLatestVersion", "True/False whether this is the latest version of the item."); 21 | Field("site", "The name of the site the item belongs to."); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /SitecoreQL/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /SitecoreQL/Types/SortGraphType.cs: -------------------------------------------------------------------------------- 1 | using GraphQL.Types; 2 | using Sitecore.ContentSearch.Linq; 3 | 4 | namespace SitecoreQL.Types 5 | { 6 | public class SortGraphType : InputObjectGraphType 7 | { 8 | public SortGraphType() 9 | { 10 | Name = "Sort"; 11 | Description = "Specify the field to sort on and direction."; 12 | Field("field", "The Sitecore field to sort all results by."); 13 | Field("dir", "The direction the results should be ordered by (ASC/DESC)."); 14 | } 15 | } 16 | 17 | public class FacetsGraphType : ObjectGraphType 18 | { 19 | public FacetsGraphType() 20 | { 21 | Name = "Facets"; 22 | 23 | Field(x => x.Name).Description("The facet's name."); 24 | Field(x => x.Values, type:typeof(ListGraphType)).Description("The valid values for this facet."); 25 | } 26 | } 27 | 28 | public class FacetValueGraphType : ObjectGraphType 29 | { 30 | public FacetValueGraphType() 31 | { 32 | Name = "FacetValues"; 33 | 34 | Field(x => x.Name).Description("The facet value's name."); 35 | Field(x => x.AggregateCount).Name("count").Description("The number of item's whose field value matches this facet value's name."); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /SitecoreQL/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /SitecoreQL/Controllers/SitecoreQLController.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using System.Threading.Tasks; 3 | using System.Web.Http; 4 | using System.Web.Http.Results; 5 | using GraphQL; 6 | using GraphQL.Types; 7 | using Newtonsoft.Json; 8 | 9 | namespace SitecoreQL.Controllers 10 | { 11 | public class SitecoreQLController : ApiController 12 | { 13 | private readonly ISchema _schema; 14 | private readonly IDocumentExecuter _executer; 15 | 16 | public SitecoreQLController(IDocumentExecuter executer, 17 | ISchema schema) 18 | { 19 | _executer = executer; 20 | _schema = schema; 21 | } 22 | 23 | [HttpPost] 24 | public async Task Post(GraphQlModel query) 25 | { 26 | var result = await _executer.ExecuteAsync(_ => 27 | { 28 | _.Schema = _schema; 29 | _.Query = query.Query; 30 | _.OperationName = query.OperationName ?? string.Empty; 31 | _.Inputs = query.Variables.ToInputs(); 32 | }); 33 | 34 | return new JsonResult(result, new JsonSerializerSettings(), Encoding.UTF8, this); 35 | } 36 | } 37 | 38 | public class GraphQlModel 39 | { 40 | public string OperationName { get; set; } 41 | public string NamedQuery { get; set; } 42 | public string Query { get; set; } 43 | public string Variables { get; set; } 44 | } 45 | } -------------------------------------------------------------------------------- /SitecoreQL/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SitecoreQL")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SitecoreQL")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1561109e-2d00-46ab-9d95-5e60347f4c07")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /SitecoreQL/App_Start/DependencyConfigurator.cs: -------------------------------------------------------------------------------- 1 | using GraphQL; 2 | using GraphQL.Types; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Sitecore.DependencyInjection; 5 | using SitecoreQL.Controllers; 6 | using SitecoreQL.Converters; 7 | using SitecoreQL.Query; 8 | using SitecoreQL.Repositories; 9 | using SitecoreQL.Schema; 10 | using SitecoreQL.Types; 11 | 12 | namespace SitecoreQL.App_Start 13 | { 14 | public class DependencyConfigurator : IServicesConfigurator 15 | { 16 | public void Configure(IServiceCollection serviceCollection) 17 | { 18 | serviceCollection.AddSingleton(); 19 | serviceCollection.AddTransient(); 20 | serviceCollection.AddTransient(); 21 | serviceCollection.AddTransient(); 22 | serviceCollection.AddTransient(); 23 | serviceCollection.AddTransient(); 24 | serviceCollection.AddTransient(); 25 | serviceCollection.AddTransient(); 26 | serviceCollection.AddTransient(); 27 | serviceCollection.AddTransient(); 28 | serviceCollection.AddTransient(); 29 | serviceCollection.AddTransient(); 30 | serviceCollection.AddTransient(); 31 | serviceCollection.AddTransient(); 32 | serviceCollection.AddTransient, ItemRepository>(); 33 | serviceCollection.AddTransient(); 34 | serviceCollection.AddTransient(d => new SitecoreSchema(type => (GraphType)d.GetService(type))); 35 | serviceCollection.AddTransient(); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /SitecoreQL/Types/ItemType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using GraphQL.Types; 5 | using Sitecore.Data.Items; 6 | using Sitecore.Links; 7 | 8 | namespace SitecoreQL.Types 9 | { 10 | public class ItemType : ObjectGraphType 11 | { 12 | public ItemType() 13 | { 14 | Name = "SitecoreItem"; 15 | Description = "Sitecore item."; 16 | 17 | Field("id", "The item's unique ID.", resolve: context => context?.Source?.ID?.Guid.ToString() ?? Guid.Empty.ToString()); 18 | Field(x => x.Name).Description("The name of the item."); 19 | Field("language", "The language the item was created in.", resolve: context => context.Source.Language.Name); 20 | Field("database", "The name of the database the item was searched from.", resolve: context => context.Source.Database.Name); 21 | Field("paths", "The Sitecore item path."); 22 | Field("url", "The item's relative URL.", resolve: context => LinkManager.GetItemUrl(context.Source)); 23 | Field("version", "The version number of the item", resolve: context => context.Source.Version.Number); 24 | Field>("fields", "The item's custom fields.", resolve: context => 25 | { 26 | return context.Source?.Fields?.Select(f => new KeyValuePair(f.Key, f.Value as string)) ?? Enumerable.Empty>(); 27 | }); 28 | Field("template", "The template of the item.", resolve: context => context.Source.Template.InnerItem); 29 | Field("parent", "The item's parent.", resolve: context => context.Source.Parent); 30 | Field>("children", "The direction children of the item.", resolve: context => context.Source.Children.ToArray()); 31 | Field("statistics", "The Sitecore item statistics."); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /SitecoreQL/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /SitecoreQL/Types/SearchItemType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using GraphQL.Types; 5 | using SitecoreQL.Query; 6 | using SitecoreQL.Repositories; 7 | 8 | namespace SitecoreQL.Types 9 | { 10 | public class SearchItemType : ObjectGraphType 11 | { 12 | public SearchItemType(IReadOnlyRepository repo) 13 | { 14 | Name = "SearchResultItem"; 15 | Description = "Sitecore item."; 16 | 17 | Field("id", "The item's unique ID.", resolve: context => context?.Source?.ItemId?.Guid.ToString() ?? Guid.Empty.ToString()); 18 | Field(x => x.Name, true).Description("The name of the item."); 19 | Field(x => x.Language, true).Description("The language the item was created in."); 20 | Field(x => x.DatabaseName, true).Description("The name of the database the item was searched from."); 21 | Field(x => x.Path, true).Description("The Sitecore item path."); 22 | Field(x => x.Url, true).Description("The item's relative URL."); 23 | Field(x => x.CreatedDate, true).Description("The date the item was created."); 24 | Field(x => x.CreatedBy, true).Description("The username of the person who created the item."); 25 | Field(x => x.Updated, true).Description("The date the item was last updated."); 26 | Field(x => x.UpdatedBy, true).Description("The username of the person who last updated the item."); 27 | Field(x => x.Version, true).Description("The version number of the item"); 28 | 29 | var fieldArguments = new QueryArguments 30 | { 31 | new QueryArgument> { Name = "keys", DefaultValue = new string[] { }} 32 | }; 33 | Field>("fields", "The item's custom fields.", fieldArguments, context => 34 | { 35 | var keys = context.GetArgument>("keys"); 36 | return context.Source?.Fields?.Where(f => !keys.Any() || keys.Contains(f.Key)).Select(f => new KeyValuePair(f.Key, f.Value as string)) ?? Enumerable.Empty>(); 37 | }); 38 | Field("template", "The template of the item.", resolve: context => repo.GetById(context.Source.TemplateId.Guid)); 39 | Field("parent", "The item's parent.", resolve: context => repo.GetById(context.Source.Parent.Guid)); 40 | Field>("children", "The direction children of the item.", resolve: context => repo.GetMany(x => x.Parent == context.Source.ItemId).Select(h => h.Document)); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __MACOSX 2 | node_modules 3 | npm-debug.log 4 | .idea 5 | .DS_Store 6 | Thumbs.db 7 | .sass-cache 8 | 9 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) 10 | [Bb]in/ 11 | [Oo]bj/ 12 | 13 | # mstest test results 14 | TestResults 15 | 16 | ## Ignore Visual Studio temporary files, build results, and 17 | ## files generated by popular Visual Studio add-ons. 18 | 19 | # User-specific files 20 | *.suo 21 | *.user 22 | *.sln.docstates 23 | .vs 24 | 25 | # Build results 26 | [Dd]ebug/ 27 | [Rr]elease/ 28 | x64/ 29 | *_i.c 30 | *_p.c 31 | *.ilk 32 | *.meta 33 | *.obj 34 | *.pch 35 | *.pdb 36 | *.pgc 37 | *.pgd 38 | *.rsp 39 | *.sbr 40 | *.tlb 41 | *.tli 42 | *.tlh 43 | *.tmp 44 | *.log 45 | *.vspscc 46 | *.vssscc 47 | .builds 48 | 49 | # Visual C++ cache files 50 | ipch/ 51 | *.aps 52 | *.ncb 53 | *.opensdf 54 | *.sdf 55 | 56 | # Visual Studio profiler 57 | *.psess 58 | *.vsp 59 | *.vspx 60 | 61 | # Visual Studio IDE settings 62 | *.sln.ide/ 63 | 64 | # Visual Studio Web Service References 65 | *.svcinfo 66 | *.disco 67 | *.xsd 68 | *.wsdl 69 | *.datasource 70 | 71 | # Guidance Automation Toolkit 72 | *.gpState 73 | 74 | # ReSharper is a .NET coding add-in 75 | _ReSharper* 76 | 77 | # NCrunch 78 | *.ncrunch* 79 | .*crunch*.local.xml 80 | *_NCrunch_* 81 | 82 | # Installshield output folder 83 | [Ee]xpress 84 | 85 | # DocProject is a documentation generator add-in 86 | DocProject/buildhelp/ 87 | DocProject/Help/*.HxT 88 | DocProject/Help/*.HxC 89 | DocProject/Help/*.hhc 90 | DocProject/Help/*.hhk 91 | DocProject/Help/*.hhp 92 | DocProject/Help/Html2 93 | DocProject/Help/html 94 | 95 | # Publish Web Output 96 | *.Publish.xml 97 | 98 | # NuGet Packages Directory 99 | packages/* 100 | 101 | # Windows Azure Build Output 102 | csx 103 | *.build.csdef 104 | 105 | # Windows Store app package directory 106 | AppPackages/ 107 | 108 | # Others 109 | #[Bb]in 110 | [Oo]bj 111 | sql 112 | TestResults 113 | [Tt]est[Rr]esult* 114 | *.Cache 115 | ClientBin 116 | [Ss]tyle[Cc]op.* 117 | ~$* 118 | *.dbmdl 119 | Generated_Code #added for RIA/Silverlight projects 120 | 121 | # Backup & report files from converting an old project file to a newer 122 | # Visual Studio version. Backup files are not needed, because we have git ;-) 123 | _UpgradeReport_Files/ 124 | Backup*/ 125 | UpgradeLog*.XML 126 | 127 | # GhostDoc 128 | *.GhostDoc* 129 | 130 | # Sitecore 131 | src/**/code/App_Config/Include/**/*.example 132 | src/Feature/Analytics/code/App_Config/Include/**/*.config 133 | src/Feature/Social/code/App_Config/Include/**/*.config 134 | !src/Project/TBF/code/App_Config/Include/zTBF/TBF.Project.TBF.config.example 135 | src/Project/TBF/code/App_Config/Include/**/*.config 136 | src/Project/Migration/code/App_Config/Include/**/*.config 137 | src/Project/Microsites/code/App_Config/Include/**/*.config 138 | src/**/code/App_Config/Include/**/*.disabled 139 | src/**/code/App_Config/Include/**/*.exclude 140 | src/**/code/App_Data/MediaCache/* 141 | src/**/codetemp/* 142 | 143 | 144 | # Frontend 145 | .vs/config/applicationhost.config 146 | UpgradeLog.htm 147 | 148 | 149 | #Web Deploy 150 | *.pubxml 151 | publishsettings.targets 152 | -------------------------------------------------------------------------------- /SitecoreQL/Repositories/IReadOnlyRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using Sitecore.ContentSearch; 6 | using Sitecore.ContentSearch.Linq; 7 | using Sitecore.Data; 8 | using SitecoreQL.Query; 9 | 10 | namespace SitecoreQL.Repositories 11 | { 12 | public interface IReadOnlyRepository 13 | { 14 | T GetById(Guid id); 15 | SearchResults GetAll(); 16 | SearchResults GetMany(Expression> predicate, Func, IOrderedQueryable> orderBy = null, IEnumerable>> facetOn = null, int take = 0, int skip = 0); 17 | } 18 | 19 | public class ItemRepository : IReadOnlyRepository, IDisposable 20 | { 21 | private readonly IProviderSearchContext _searchContext; 22 | 23 | public ItemRepository() 24 | { 25 | ISearchIndex index = ContentSearchManager.GetIndex($"sitecore_{Sitecore.Context.Database.Name}_index"); 26 | _searchContext = index.CreateSearchContext(); 27 | } 28 | 29 | public ItemQuery.GraphQLSearchResultItem GetById(Guid id) 30 | { 31 | var queryable = _searchContext.GetQueryable(); 32 | 33 | var queryId = new ID(id); 34 | queryable = queryable.Where(x => x.ItemId == queryId) 35 | .Where(x => x.Language == Sitecore.Context.Language.Name) 36 | .Where(x => x.IsLatestVersion); 37 | 38 | return queryable.GetResults().Select(x => x.Document).FirstOrDefault(); 39 | } 40 | 41 | public SearchResults GetAll() 42 | { 43 | return GetMany(null); 44 | } 45 | 46 | public SearchResults GetMany(Expression> predicate, Func, IOrderedQueryable> orderBy = null, IEnumerable>> facetOn = null, int take = 0, int skip = 0) 47 | { 48 | var queryable = _searchContext.GetQueryable(); 49 | 50 | if (predicate != null) 51 | { 52 | queryable = queryable.Where(predicate); 53 | } 54 | 55 | var sortedQuery = orderBy?.Invoke(queryable); 56 | if (sortedQuery != null) 57 | { 58 | queryable = sortedQuery; 59 | } 60 | 61 | if (facetOn != null) 62 | { 63 | queryable = facetOn.Aggregate(queryable, (current, facetExp) => current.FacetOn(facetExp, 1)); 64 | } 65 | 66 | queryable = queryable.Skip(skip); 67 | 68 | if (take > 0) 69 | { 70 | queryable = queryable.Take(take); 71 | } 72 | 73 | return queryable.GetResults(); 74 | } 75 | 76 | public void Dispose() 77 | { 78 | _searchContext?.Dispose(); 79 | } 80 | } 81 | 82 | 83 | } -------------------------------------------------------------------------------- /SitecoreQL/Query/ItemQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using GraphQL.Types; 4 | using Sitecore.ContentSearch; 5 | using Sitecore.ContentSearch.SearchTypes; 6 | using SitecoreQL.Converters; 7 | using SitecoreQL.Repositories; 8 | using SitecoreQL.Types; 9 | 10 | namespace SitecoreQL.Query 11 | { 12 | public class ItemQuery : ObjectGraphType 13 | { 14 | public ItemQuery(IReadOnlyRepository repository, IArgumentToExpressionConverter argumentsConverter) 15 | { 16 | Name = "Query"; 17 | Description = "Query for Sitecore items"; 18 | 19 | var queryArguments = new QueryArguments 20 | { 21 | new QueryArgument {Name = "filter", DefaultValue = new Dictionary()}, 22 | new QueryArgument {Name = "first", DefaultValue = 0}, 23 | new QueryArgument {Name = "offset", DefaultValue = 0}, 24 | new QueryArgument {Name = "sort", DefaultValue = new Dictionary()}, 25 | new QueryArgument> { Name = "facets", DefaultValue = new string[] { } } 26 | }; 27 | 28 | Field("search", 29 | "Search against all Sitecore items by providing various filter/sort/faceting options.", 30 | queryArguments, 31 | context => 32 | { 33 | var filter = context.GetArgument>("filter"); 34 | var first = context.GetArgument("first"); 35 | var offset = context.GetArgument("offset"); 36 | var sort = context.GetArgument>("sort"); 37 | var facets = context.GetArgument>("facets"); 38 | 39 | var filterExpression = argumentsConverter.ConvertToFilter(filter); 40 | var orderByExpression = argumentsConverter.ConvertToOrderBy(sort); 41 | var facetOnExpression = argumentsConverter.ConvertToFacets(facets); 42 | 43 | return repository.GetMany(filterExpression, orderByExpression, facetOnExpression, first, offset); 44 | }); 45 | 46 | Field("item", 47 | "Lookup a single Sitecore item by it's ID.", 48 | new QueryArguments(new QueryArgument(typeof(StringGraphType)) { Name = "id" }), 49 | context => repository.GetById(new Guid(context.GetArgument("id")))); 50 | 51 | Field("xpath", 52 | "Lookup Sitecore items via xpath query", 53 | new QueryArguments(new QueryArgument(typeof(StringGraphType)) { Name = "query" }), 54 | context => 55 | { 56 | var query = context.GetArgument("query"); 57 | 58 | return Sitecore.Context.Database.SelectItems(query); 59 | }); 60 | } 61 | 62 | public class GraphQLSearchResultItem : SearchResultItem 63 | { 64 | [IndexField("_latestversion")] 65 | public bool IsLatestVersion { get; set; } 66 | 67 | [IndexField("_group")] 68 | public virtual Guid Id { get; set; } 69 | 70 | [IndexField("_parent")] 71 | public virtual Guid ParentId { get; set; } 72 | 73 | [IndexField("site")] 74 | public virtual IEnumerable Site { get; set; } 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /SitecoreQL/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /SitecoreQL/SitecoreQL.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 |
Loading...
39 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /SitecoreQL/Converters/ArgumentToExpressionConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using System.Reflection; 6 | using GraphQL; 7 | using Sitecore.ContentSearch; 8 | using Sitecore.ContentSearch.Linq.Extensions; 9 | using Sitecore.ContentSearch.Linq.Utilities; 10 | using Sitecore.ContentSearch.SearchTypes; 11 | using Sitecore.Data; 12 | using SitecoreQL.Query; 13 | using SitecoreQL.Types; 14 | 15 | namespace SitecoreQL.Converters 16 | { 17 | public class ArgumentToExpressionConverter : IArgumentToExpressionConverter 18 | { 19 | public Expression> ConvertToFilter(IDictionary arguments) 20 | { 21 | ParameterExpression parameterExpression = Expression.Parameter(typeof(ItemQuery.GraphQLSearchResultItem), "item"); 22 | 23 | var predicate = PredicateBuilder.True(); 24 | foreach (var argument in arguments.Where(a => a.Value != null)) 25 | { 26 | var propertyInfo = GetProperty(argument.Key); 27 | 28 | if(propertyInfo == null) continue; 29 | 30 | var @where = GetWhereClause(parameterExpression, propertyInfo, argument.Value); 31 | 32 | predicate = predicate.And(@where); 33 | } 34 | 35 | return predicate; 36 | } 37 | 38 | public Func, IOrderedQueryable> ConvertToOrderBy(IDictionary arguments) 39 | { 40 | SortOption sortOption = arguments.ToObject(); 41 | 42 | return q => 43 | { 44 | Expression> expression = GenerateMemberExpression(sortOption.Field); 45 | 46 | if (expression != null) 47 | { 48 | return sortOption.Dir == SortDirection.DESC ? q.OrderByDescending(expression) : q.OrderBy(expression); 49 | } 50 | 51 | return null; 52 | }; 53 | } 54 | 55 | public IEnumerable>> ConvertToFacets(IEnumerable arguments) 56 | { 57 | var p = Expression.Parameter(typeof(ItemQuery.GraphQLSearchResultItem), "i"); 58 | 59 | foreach (string argument in arguments) 60 | { 61 | yield return GenerateMemberExpression(argument); 62 | } 63 | } 64 | 65 | private Expression> GenerateMemberExpression(string propertyName) 66 | { 67 | if (string.IsNullOrEmpty(propertyName)) return null; 68 | 69 | var propertyInfo = GetProperty(propertyName); 70 | 71 | if (propertyInfo == null) return null; 72 | 73 | var entityParam = Expression.Parameter(typeof(ItemQuery.GraphQLSearchResultItem), "e"); 74 | 75 | var columnExpr = GetPropertyExpression(entityParam, propertyInfo); 76 | 77 | return Expression.Lambda>(columnExpr, entityParam); 78 | } 79 | 80 | public Expression> GetWhereClause(ParameterExpression parameterExpression, PropertyInfo propertyInfo, 81 | object argumentValue) 82 | { 83 | var fieldExpression = GetPropertyExpression(parameterExpression, propertyInfo); 84 | var valueExpression = GetValueExpression(propertyInfo, argumentValue); 85 | 86 | Expression binaryExpression = Expression.Equal(fieldExpression, valueExpression); 87 | if (propertyInfo.PropertyType == typeof(IEnumerable<>)) 88 | { 89 | binaryExpression = Expression.Call(fieldExpression, "Contains", null, valueExpression); 90 | } 91 | 92 | return Expression.Lambda>(binaryExpression, 93 | parameterExpression); 94 | } 95 | 96 | public Expression GetPropertyExpression(ParameterExpression parameterExpression, PropertyInfo propertyInfo) 97 | { 98 | return Expression.Property(parameterExpression, parameterExpression.Type, propertyInfo.Name); 99 | } 100 | 101 | public Expression GetValueExpression(PropertyInfo propertyInfo, object value) 102 | { 103 | if (propertyInfo.PropertyType == typeof(string)) 104 | { 105 | return Expression.Constant((string)value); 106 | } 107 | 108 | if (propertyInfo.PropertyType == typeof(Guid)) 109 | { 110 | Guid guid = Guid.Parse(value.ToString()); 111 | 112 | return Expression.Constant(guid); 113 | } 114 | 115 | if (propertyInfo.PropertyType == typeof(ID)) 116 | { 117 | Guid guid = Guid.Parse(value.ToString()); 118 | 119 | return Expression.Constant(new ID(guid)); 120 | } 121 | 122 | if (propertyInfo.PropertyType == typeof(int)) 123 | { 124 | int i = int.Parse(value.ToString()); 125 | 126 | return Expression.Constant(i); 127 | } 128 | 129 | if (propertyInfo.PropertyType == typeof(DateTime)) 130 | { 131 | DateTime date = DateTime.Parse(value.ToString()); 132 | 133 | return Expression.Constant(date); 134 | } 135 | 136 | if (propertyInfo.PropertyType == typeof(bool)) 137 | { 138 | bool boolean = bool.Parse(value.ToString()); 139 | 140 | return Expression.Constant(boolean); 141 | } 142 | 143 | return Expression.Constant((string) value); 144 | } 145 | 146 | public PropertyInfo GetProperty(string fieldName) where T : SearchResultItem 147 | { 148 | var propertyInfo = typeof(T).GetProperties() 149 | .Where(p => p.GetCustomAttributes(typeof(IndexFieldAttribute), false).Any()) 150 | .FirstOrDefault(p => p.Name.Equals(fieldName, StringComparison.InvariantCultureIgnoreCase)); 151 | 152 | // custom case 153 | if (propertyInfo == null && fieldName.Equals("id", StringComparison.InvariantCultureIgnoreCase)) 154 | { 155 | propertyInfo = typeof(T).GetProperties() 156 | .FirstOrDefault(p => p.Name.Equals("itemid", StringComparison.InvariantCultureIgnoreCase)); 157 | } 158 | 159 | return propertyInfo; 160 | } 161 | } 162 | 163 | public class SortOption 164 | { 165 | public string Field { get; set; } 166 | public SortDirection Dir { get; set; } 167 | } 168 | } -------------------------------------------------------------------------------- /SitecoreQL/SitecoreQL.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Debug 8 | AnyCPU 9 | 10 | 11 | 2.0 12 | {1561109E-2D00-46AB-9D95-5E60347F4C07} 13 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 14 | Library 15 | Properties 16 | SitecoreQL 17 | SitecoreQL 18 | v4.5.2 19 | true 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | true 31 | full 32 | false 33 | bin\ 34 | DEBUG;TRACE 35 | prompt 36 | 4 37 | 38 | 39 | pdbonly 40 | true 41 | bin\ 42 | TRACE 43 | prompt 44 | 4 45 | 46 | 47 | 48 | ..\packages\GraphQL.0.17.2\lib\net45\GraphQL.dll 49 | True 50 | 51 | 52 | ..\packages\GraphQL-Parser.2.0.0\lib\net45\GraphQL-Parser.dll 53 | True 54 | 55 | 56 | ..\packages\Jabberwocky.Core.2.0.0\lib\net452\Jabberwocky.Core.dll 57 | True 58 | 59 | 60 | ..\packages\Jabberwocky.DependencyInjection.2.0.0\lib\net452\Jabberwocky.DependencyInjection.dll 61 | True 62 | 63 | 64 | ..\packages\Jabberwocky.DependencyInjection.Sc.2.0.0\lib\net452\Jabberwocky.DependencyInjection.Sc.dll 65 | True 66 | 67 | 68 | ..\packages\Jabberwocky.WebApi.2.0.0\lib\net452\Jabberwocky.WebApi.dll 69 | True 70 | 71 | 72 | ..\packages\Jabberwocky.WebApi.Sc.2.0.0\lib\net452\Jabberwocky.WebApi.Sc.dll 73 | True 74 | 75 | 76 | ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll 77 | True 78 | 79 | 80 | 81 | ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll 82 | True 83 | 84 | 85 | ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll 86 | True 87 | 88 | 89 | ..\packages\Sitecore.ContentSearch.NoReferences.8.2.170728\lib\NET452\Sitecore.ContentSearch.dll 90 | True 91 | 92 | 93 | ..\packages\Sitecore.ContentSearch.Linq.NoReferences.8.2.170728\lib\NET452\Sitecore.ContentSearch.Linq.dll 94 | True 95 | 96 | 97 | ..\packages\Sitecore.Kernel.NoReferences.8.2.170728\lib\NET452\Sitecore.Kernel.dll 98 | True 99 | 100 | 101 | 102 | 103 | 104 | ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll 105 | True 106 | 107 | 108 | 109 | ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.0.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll 110 | True 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll 120 | True 121 | 122 | 123 | ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll 124 | True 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | Web.config 138 | 139 | 140 | Web.config 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 10.0 175 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | True 185 | True 186 | 46233 187 | / 188 | http://localhost:46233/ 189 | False 190 | False 191 | 192 | 193 | False 194 | 195 | 196 | 197 | 198 | 199 | 200 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 201 | 202 | 203 | 204 | 205 | 212 | -------------------------------------------------------------------------------- /SitecoreQL/assets/graphiql.css: -------------------------------------------------------------------------------- 1 | .graphiql-container, 2 | .graphiql-container button, 3 | .graphiql-container input { 4 | color: #141823; 5 | font-family: 6 | system, 7 | -apple-system, 8 | 'San Francisco', 9 | '.SFNSDisplay-Regular', 10 | 'Segoe UI', 11 | Segoe, 12 | 'Segoe WP', 13 | 'Helvetica Neue', 14 | helvetica, 15 | 'Lucida Grande', 16 | arial, 17 | sans-serif; 18 | font-size: 14px; 19 | } 20 | 21 | .graphiql-container { 22 | display: -webkit-box; 23 | display: -ms-flexbox; 24 | display: flex; 25 | -webkit-box-orient: horizontal; 26 | -webkit-box-direction: normal; 27 | -ms-flex-direction: row; 28 | flex-direction: row; 29 | height: 100%; 30 | margin: 0; 31 | overflow: hidden; 32 | width: 100%; 33 | } 34 | 35 | .graphiql-container .editorWrap { 36 | display: -webkit-box; 37 | display: -ms-flexbox; 38 | display: flex; 39 | -webkit-box-orient: vertical; 40 | -webkit-box-direction: normal; 41 | -ms-flex-direction: column; 42 | flex-direction: column; 43 | -webkit-box-flex: 1; 44 | -ms-flex: 1; 45 | flex: 1; 46 | } 47 | 48 | .graphiql-container .title { 49 | font-size: 18px; 50 | } 51 | 52 | .graphiql-container .title em { 53 | font-family: georgia; 54 | font-size: 19px; 55 | } 56 | 57 | .graphiql-container .topBarWrap { 58 | display: -webkit-box; 59 | display: -ms-flexbox; 60 | display: flex; 61 | -webkit-box-orient: horizontal; 62 | -webkit-box-direction: normal; 63 | -ms-flex-direction: row; 64 | flex-direction: row; 65 | } 66 | 67 | .graphiql-container .topBar { 68 | -webkit-box-align: center; 69 | -ms-flex-align: center; 70 | align-items: center; 71 | background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2)); 72 | background: linear-gradient(#f7f7f7, #e2e2e2); 73 | border-bottom: 1px solid #d0d0d0; 74 | cursor: default; 75 | display: -webkit-box; 76 | display: -ms-flexbox; 77 | display: flex; 78 | -webkit-box-orient: horizontal; 79 | -webkit-box-direction: normal; 80 | -ms-flex-direction: row; 81 | flex-direction: row; 82 | -webkit-box-flex: 1; 83 | -ms-flex: 1; 84 | flex: 1; 85 | height: 34px; 86 | padding: 7px 14px 6px; 87 | -webkit-user-select: none; 88 | -moz-user-select: none; 89 | -ms-user-select: none; 90 | user-select: none; 91 | } 92 | 93 | .graphiql-container .toolbar { 94 | overflow-x: visible; 95 | display: -webkit-box; 96 | display: -ms-flexbox; 97 | display: flex; 98 | } 99 | 100 | .graphiql-container .docExplorerShow, 101 | .graphiql-container .historyShow { 102 | background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#e2e2e2)); 103 | background: linear-gradient(#f7f7f7, #e2e2e2); 104 | border-bottom: 1px solid #d0d0d0; 105 | border-right: none; 106 | border-top: none; 107 | color: #3B5998; 108 | cursor: pointer; 109 | font-size: 14px; 110 | margin: 0; 111 | outline: 0; 112 | padding: 2px 20px 0 18px; 113 | } 114 | 115 | .graphiql-container .docExplorerShow { 116 | border-left: 1px solid rgba(0, 0, 0, 0.2); 117 | } 118 | 119 | .graphiql-container .historyShow { 120 | border-right: 1px solid rgba(0, 0, 0, 0.2); 121 | border-left: 0; 122 | } 123 | 124 | .graphiql-container .docExplorerShow:before { 125 | border-left: 2px solid #3B5998; 126 | border-top: 2px solid #3B5998; 127 | content: ''; 128 | display: inline-block; 129 | height: 9px; 130 | margin: 0 3px -1px 0; 131 | position: relative; 132 | -webkit-transform: rotate(-45deg); 133 | transform: rotate(-45deg); 134 | width: 9px; 135 | } 136 | 137 | .graphiql-container .editorBar { 138 | display: -webkit-box; 139 | display: -ms-flexbox; 140 | display: flex; 141 | -webkit-box-orient: horizontal; 142 | -webkit-box-direction: normal; 143 | -ms-flex-direction: row; 144 | flex-direction: row; 145 | -webkit-box-flex: 1; 146 | -ms-flex: 1; 147 | flex: 1; 148 | } 149 | 150 | .graphiql-container .queryWrap { 151 | display: -webkit-box; 152 | display: -ms-flexbox; 153 | display: flex; 154 | -webkit-box-orient: vertical; 155 | -webkit-box-direction: normal; 156 | -ms-flex-direction: column; 157 | flex-direction: column; 158 | -webkit-box-flex: 1; 159 | -ms-flex: 1; 160 | flex: 1; 161 | } 162 | 163 | .graphiql-container .resultWrap { 164 | border-left: solid 1px #e0e0e0; 165 | display: -webkit-box; 166 | display: -ms-flexbox; 167 | display: flex; 168 | -webkit-box-orient: vertical; 169 | -webkit-box-direction: normal; 170 | -ms-flex-direction: column; 171 | flex-direction: column; 172 | -webkit-box-flex: 1; 173 | -ms-flex: 1; 174 | flex: 1; 175 | position: relative; 176 | } 177 | 178 | .graphiql-container .docExplorerWrap, 179 | .graphiql-container .historyPaneWrap { 180 | background: white; 181 | -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15); 182 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.15); 183 | position: relative; 184 | z-index: 3; 185 | } 186 | 187 | .graphiql-container .historyPaneWrap { 188 | min-width: 230px; 189 | z-index: 5; 190 | } 191 | 192 | .graphiql-container .docExplorerResizer { 193 | cursor: col-resize; 194 | height: 100%; 195 | left: -5px; 196 | position: absolute; 197 | top: 0; 198 | width: 10px; 199 | z-index: 10; 200 | } 201 | 202 | .graphiql-container .docExplorerHide { 203 | cursor: pointer; 204 | font-size: 18px; 205 | margin: -7px -8px -6px 0; 206 | padding: 18px 16px 15px 12px; 207 | } 208 | 209 | .graphiql-container div .query-editor { 210 | -webkit-box-flex: 1; 211 | -ms-flex: 1; 212 | flex: 1; 213 | position: relative; 214 | } 215 | 216 | .graphiql-container .variable-editor { 217 | display: -webkit-box; 218 | display: -ms-flexbox; 219 | display: flex; 220 | -webkit-box-orient: vertical; 221 | -webkit-box-direction: normal; 222 | -ms-flex-direction: column; 223 | flex-direction: column; 224 | height: 29px; 225 | position: relative; 226 | } 227 | 228 | .graphiql-container .variable-editor-title { 229 | background: #eeeeee; 230 | border-bottom: 1px solid #d6d6d6; 231 | border-top: 1px solid #e0e0e0; 232 | color: #777; 233 | font-variant: small-caps; 234 | font-weight: bold; 235 | letter-spacing: 1px; 236 | line-height: 14px; 237 | padding: 6px 0 8px 43px; 238 | text-transform: lowercase; 239 | -webkit-user-select: none; 240 | -moz-user-select: none; 241 | -ms-user-select: none; 242 | user-select: none; 243 | } 244 | 245 | .graphiql-container .codemirrorWrap { 246 | -webkit-box-flex: 1; 247 | -ms-flex: 1; 248 | flex: 1; 249 | height: 100%; 250 | position: relative; 251 | } 252 | 253 | .graphiql-container .result-window { 254 | -webkit-box-flex: 1; 255 | -ms-flex: 1; 256 | flex: 1; 257 | height: 100%; 258 | position: relative; 259 | } 260 | 261 | .graphiql-container .footer { 262 | background: #f6f7f8; 263 | border-left: 1px solid #e0e0e0; 264 | border-top: 1px solid #e0e0e0; 265 | margin-left: 12px; 266 | position: relative; 267 | } 268 | 269 | .graphiql-container .footer:before { 270 | background: #eeeeee; 271 | bottom: 0; 272 | content: " "; 273 | left: -13px; 274 | position: absolute; 275 | top: -1px; 276 | width: 12px; 277 | } 278 | 279 | /* No `.graphiql-container` here so themes can overwrite */ 280 | .result-window .CodeMirror { 281 | background: #f6f7f8; 282 | } 283 | 284 | .graphiql-container .result-window .CodeMirror-gutters { 285 | background-color: #eeeeee; 286 | border-color: #e0e0e0; 287 | cursor: col-resize; 288 | } 289 | 290 | .graphiql-container .result-window .CodeMirror-foldgutter, 291 | .graphiql-container .result-window .CodeMirror-foldgutter-open:after, 292 | .graphiql-container .result-window .CodeMirror-foldgutter-folded:after { 293 | padding-left: 3px; 294 | } 295 | 296 | .graphiql-container .toolbar-button { 297 | background: #fdfdfd; 298 | background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec)); 299 | background: linear-gradient(#f9f9f9, #ececec); 300 | border-radius: 3px; 301 | -webkit-box-shadow: 302 | inset 0 0 0 1px rgba(0,0,0,0.20), 303 | 0 1px 0 rgba(255,255,255, 0.7), 304 | inset 0 1px #fff; 305 | box-shadow: 306 | inset 0 0 0 1px rgba(0,0,0,0.20), 307 | 0 1px 0 rgba(255,255,255, 0.7), 308 | inset 0 1px #fff; 309 | color: #555; 310 | cursor: pointer; 311 | display: inline-block; 312 | margin: 0 5px; 313 | padding: 3px 11px 5px; 314 | text-decoration: none; 315 | text-overflow: ellipsis; 316 | white-space: nowrap; 317 | max-width: 150px; 318 | } 319 | 320 | .graphiql-container .toolbar-button:active { 321 | background: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#d5d5d5)); 322 | background: linear-gradient(#ececec, #d5d5d5); 323 | -webkit-box-shadow: 324 | 0 1px 0 rgba(255, 255, 255, 0.7), 325 | inset 0 0 0 1px rgba(0,0,0,0.10), 326 | inset 0 1px 1px 1px rgba(0, 0, 0, 0.12), 327 | inset 0 0 5px rgba(0, 0, 0, 0.1); 328 | box-shadow: 329 | 0 1px 0 rgba(255, 255, 255, 0.7), 330 | inset 0 0 0 1px rgba(0,0,0,0.10), 331 | inset 0 1px 1px 1px rgba(0, 0, 0, 0.12), 332 | inset 0 0 5px rgba(0, 0, 0, 0.1); 333 | } 334 | 335 | .graphiql-container .toolbar-button.error { 336 | background: -webkit-gradient(linear, left top, left bottom, from(#fdf3f3), to(#e6d6d7)); 337 | background: linear-gradient(#fdf3f3, #e6d6d7); 338 | color: #b00; 339 | } 340 | 341 | .graphiql-container .toolbar-button-group { 342 | margin: 0 5px; 343 | white-space: nowrap; 344 | } 345 | 346 | .graphiql-container .toolbar-button-group > * { 347 | margin: 0; 348 | } 349 | 350 | .graphiql-container .toolbar-button-group > *:not(:last-child) { 351 | border-top-right-radius: 0; 352 | border-bottom-right-radius: 0; 353 | } 354 | 355 | .graphiql-container .toolbar-button-group > *:not(:first-child) { 356 | border-top-left-radius: 0; 357 | border-bottom-left-radius: 0; 358 | margin-left: -1px; 359 | } 360 | 361 | .graphiql-container .execute-button-wrap { 362 | height: 34px; 363 | margin: 0 14px 0 28px; 364 | position: relative; 365 | } 366 | 367 | .graphiql-container .execute-button { 368 | background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#d2d3d6)); 369 | background: linear-gradient(#fdfdfd, #d2d3d6); 370 | border-radius: 17px; 371 | border: 1px solid rgba(0,0,0,0.25); 372 | -webkit-box-shadow: 0 1px 0 #fff; 373 | box-shadow: 0 1px 0 #fff; 374 | cursor: pointer; 375 | fill: #444; 376 | height: 34px; 377 | margin: 0; 378 | padding: 0; 379 | width: 34px; 380 | } 381 | 382 | .graphiql-container .execute-button svg { 383 | pointer-events: none; 384 | } 385 | 386 | .graphiql-container .execute-button:active { 387 | background: -webkit-gradient(linear, left top, left bottom, from(#e6e6e6), to(#c3c3c3)); 388 | background: linear-gradient(#e6e6e6, #c3c3c3); 389 | -webkit-box-shadow: 390 | 0 1px 0 #fff, 391 | inset 0 0 2px rgba(0, 0, 0, 0.2), 392 | inset 0 0 6px rgba(0, 0, 0, 0.1); 393 | box-shadow: 394 | 0 1px 0 #fff, 395 | inset 0 0 2px rgba(0, 0, 0, 0.2), 396 | inset 0 0 6px rgba(0, 0, 0, 0.1); 397 | } 398 | 399 | .graphiql-container .execute-button:focus { 400 | outline: 0; 401 | } 402 | 403 | .graphiql-container .toolbar-menu, 404 | .graphiql-container .toolbar-select { 405 | position: relative; 406 | } 407 | 408 | .graphiql-container .execute-options, 409 | .graphiql-container .toolbar-menu-items, 410 | .graphiql-container .toolbar-select-options { 411 | background: #fff; 412 | -webkit-box-shadow: 413 | 0 0 0 1px rgba(0,0,0,0.1), 414 | 0 2px 4px rgba(0,0,0,0.25); 415 | box-shadow: 416 | 0 0 0 1px rgba(0,0,0,0.1), 417 | 0 2px 4px rgba(0,0,0,0.25); 418 | margin: 0; 419 | padding: 6px 0; 420 | position: absolute; 421 | z-index: 100; 422 | } 423 | 424 | .graphiql-container .execute-options { 425 | min-width: 100px; 426 | top: 37px; 427 | left: -1px; 428 | } 429 | 430 | .graphiql-container .toolbar-menu-items { 431 | left: 1px; 432 | margin-top: -1px; 433 | min-width: 110%; 434 | top: 100%; 435 | visibility: hidden; 436 | } 437 | 438 | .graphiql-container .toolbar-menu-items.open { 439 | visibility: visible; 440 | } 441 | 442 | .graphiql-container .toolbar-select-options { 443 | left: 0; 444 | min-width: 100%; 445 | top: -5px; 446 | visibility: hidden; 447 | } 448 | 449 | .graphiql-container .toolbar-select-options.open { 450 | visibility: visible; 451 | } 452 | 453 | .graphiql-container .execute-options > li, 454 | .graphiql-container .toolbar-menu-items > li, 455 | .graphiql-container .toolbar-select-options > li { 456 | cursor: pointer; 457 | display: block; 458 | margin: none; 459 | max-width: 300px; 460 | overflow: hidden; 461 | padding: 2px 20px 4px 11px; 462 | text-overflow: ellipsis; 463 | white-space: nowrap; 464 | } 465 | 466 | .graphiql-container .execute-options > li.selected, 467 | .graphiql-container .toolbar-menu-items > li.hover, 468 | .graphiql-container .toolbar-menu-items > li:active, 469 | .graphiql-container .toolbar-menu-items > li:hover, 470 | .graphiql-container .toolbar-select-options > li.hover, 471 | .graphiql-container .toolbar-select-options > li:active, 472 | .graphiql-container .toolbar-select-options > li:hover, 473 | .graphiql-container .history-contents > p:hover, 474 | .graphiql-container .history-contents > p:active { 475 | background: #e10098; 476 | color: #fff; 477 | } 478 | 479 | .graphiql-container .toolbar-select-options > li > svg { 480 | display: inline; 481 | fill: #666; 482 | margin: 0 -6px 0 6px; 483 | pointer-events: none; 484 | vertical-align: middle; 485 | } 486 | 487 | .graphiql-container .toolbar-select-options > li.hover > svg, 488 | .graphiql-container .toolbar-select-options > li:active > svg, 489 | .graphiql-container .toolbar-select-options > li:hover > svg { 490 | fill: #fff; 491 | } 492 | 493 | .graphiql-container .CodeMirror-scroll { 494 | overflow-scrolling: touch; 495 | } 496 | 497 | .graphiql-container .CodeMirror { 498 | color: #141823; 499 | font-family: 500 | 'Consolas', 501 | 'Inconsolata', 502 | 'Droid Sans Mono', 503 | 'Monaco', 504 | monospace; 505 | font-size: 13px; 506 | height: 100%; 507 | left: 0; 508 | position: absolute; 509 | top: 0; 510 | width: 100%; 511 | } 512 | 513 | .graphiql-container .CodeMirror-lines { 514 | padding: 20px 0; 515 | } 516 | 517 | .CodeMirror-hint-information .content { 518 | box-orient: vertical; 519 | color: #141823; 520 | display: -webkit-box; 521 | display: -ms-flexbox; 522 | display: flex; 523 | font-family: system, -apple-system, 'San Francisco', '.SFNSDisplay-Regular', 'Segoe UI', Segoe, 'Segoe WP', 'Helvetica Neue', helvetica, 'Lucida Grande', arial, sans-serif; 524 | font-size: 13px; 525 | line-clamp: 3; 526 | line-height: 16px; 527 | max-height: 48px; 528 | overflow: hidden; 529 | text-overflow: -o-ellipsis-lastline; 530 | } 531 | 532 | .CodeMirror-hint-information .content p:first-child { 533 | margin-top: 0; 534 | } 535 | 536 | .CodeMirror-hint-information .content p:last-child { 537 | margin-bottom: 0; 538 | } 539 | 540 | .CodeMirror-hint-information .infoType { 541 | color: #CA9800; 542 | cursor: pointer; 543 | display: inline; 544 | margin-right: 0.5em; 545 | } 546 | 547 | .autoInsertedLeaf.cm-property { 548 | -webkit-animation-duration: 6s; 549 | animation-duration: 6s; 550 | -webkit-animation-name: insertionFade; 551 | animation-name: insertionFade; 552 | border-bottom: 2px solid rgba(255, 255, 255, 0); 553 | border-radius: 2px; 554 | margin: -2px -4px -1px; 555 | padding: 2px 4px 1px; 556 | } 557 | 558 | @-webkit-keyframes insertionFade { 559 | from, to { 560 | background: rgba(255, 255, 255, 0); 561 | border-color: rgba(255, 255, 255, 0); 562 | } 563 | 564 | 15%, 85% { 565 | background: #fbffc9; 566 | border-color: #f0f3c0; 567 | } 568 | } 569 | 570 | @keyframes insertionFade { 571 | from, to { 572 | background: rgba(255, 255, 255, 0); 573 | border-color: rgba(255, 255, 255, 0); 574 | } 575 | 576 | 15%, 85% { 577 | background: #fbffc9; 578 | border-color: #f0f3c0; 579 | } 580 | } 581 | 582 | div.CodeMirror-lint-tooltip { 583 | background-color: white; 584 | border-radius: 2px; 585 | border: 0; 586 | color: #141823; 587 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); 588 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); 589 | font-family: 590 | system, 591 | -apple-system, 592 | 'San Francisco', 593 | '.SFNSDisplay-Regular', 594 | 'Segoe UI', 595 | Segoe, 596 | 'Segoe WP', 597 | 'Helvetica Neue', 598 | helvetica, 599 | 'Lucida Grande', 600 | arial, 601 | sans-serif; 602 | font-size: 13px; 603 | line-height: 16px; 604 | max-width: 430px; 605 | opacity: 0; 606 | padding: 8px 10px; 607 | -webkit-transition: opacity 0.15s; 608 | transition: opacity 0.15s; 609 | white-space: pre-wrap; 610 | } 611 | 612 | div.CodeMirror-lint-tooltip > * { 613 | padding-left: 23px; 614 | } 615 | 616 | div.CodeMirror-lint-tooltip > * + * { 617 | margin-top: 12px; 618 | } 619 | 620 | /* COLORS */ 621 | 622 | .graphiql-container .CodeMirror-foldmarker { 623 | border-radius: 4px; 624 | background: #08f; 625 | background: -webkit-gradient(linear, left top, left bottom, from(#43A8FF), to(#0F83E8)); 626 | background: linear-gradient(#43A8FF, #0F83E8); 627 | -webkit-box-shadow: 628 | 0 1px 1px rgba(0, 0, 0, 0.2), 629 | inset 0 0 0 1px rgba(0, 0, 0, 0.1); 630 | box-shadow: 631 | 0 1px 1px rgba(0, 0, 0, 0.2), 632 | inset 0 0 0 1px rgba(0, 0, 0, 0.1); 633 | color: white; 634 | font-family: arial; 635 | font-size: 12px; 636 | line-height: 0; 637 | margin: 0 3px; 638 | padding: 0px 4px 1px; 639 | text-shadow: 0 -1px rgba(0, 0, 0, 0.1); 640 | } 641 | 642 | .graphiql-container div.CodeMirror span.CodeMirror-matchingbracket { 643 | color: #555; 644 | text-decoration: underline; 645 | } 646 | 647 | .graphiql-container div.CodeMirror span.CodeMirror-nonmatchingbracket { 648 | color: #f00; 649 | } 650 | 651 | /* Comment */ 652 | .cm-comment { 653 | color: #999; 654 | } 655 | 656 | /* Punctuation */ 657 | .cm-punctuation { 658 | color: #555; 659 | } 660 | 661 | /* Keyword */ 662 | .cm-keyword { 663 | color: #B11A04; 664 | } 665 | 666 | /* OperationName, FragmentName */ 667 | .cm-def { 668 | color: #D2054E; 669 | } 670 | 671 | /* FieldName */ 672 | .cm-property { 673 | color: #1F61A0; 674 | } 675 | 676 | /* FieldAlias */ 677 | .cm-qualifier { 678 | color: #1C92A9; 679 | } 680 | 681 | /* ArgumentName and ObjectFieldName */ 682 | .cm-attribute { 683 | color: #8B2BB9; 684 | } 685 | 686 | /* Number */ 687 | .cm-number { 688 | color: #2882F9; 689 | } 690 | 691 | /* String */ 692 | .cm-string { 693 | color: #D64292; 694 | } 695 | 696 | /* Boolean */ 697 | .cm-builtin { 698 | color: #D47509; 699 | } 700 | 701 | /* EnumValue */ 702 | .cm-string-2 { 703 | color: #0B7FC7; 704 | } 705 | 706 | /* Variable */ 707 | .cm-variable { 708 | color: #397D13; 709 | } 710 | 711 | /* Directive */ 712 | .cm-meta { 713 | color: #B33086; 714 | } 715 | 716 | /* Type */ 717 | .cm-atom { 718 | color: #CA9800; 719 | } 720 | /* BASICS */ 721 | 722 | .CodeMirror { 723 | /* Set height, width, borders, and global font properties here */ 724 | color: black; 725 | font-family: monospace; 726 | height: 300px; 727 | } 728 | 729 | /* PADDING */ 730 | 731 | .CodeMirror-lines { 732 | padding: 4px 0; /* Vertical padding around content */ 733 | } 734 | .CodeMirror pre { 735 | padding: 0 4px; /* Horizontal padding of content */ 736 | } 737 | 738 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 739 | background-color: white; /* The little square between H and V scrollbars */ 740 | } 741 | 742 | /* GUTTER */ 743 | 744 | .CodeMirror-gutters { 745 | border-right: 1px solid #ddd; 746 | background-color: #f7f7f7; 747 | white-space: nowrap; 748 | } 749 | .CodeMirror-linenumbers {} 750 | .CodeMirror-linenumber { 751 | color: #999; 752 | min-width: 20px; 753 | padding: 0 3px 0 5px; 754 | text-align: right; 755 | white-space: nowrap; 756 | } 757 | 758 | .CodeMirror-guttermarker { color: black; } 759 | .CodeMirror-guttermarker-subtle { color: #999; } 760 | 761 | /* CURSOR */ 762 | 763 | .CodeMirror .CodeMirror-cursor { 764 | border-left: 1px solid black; 765 | } 766 | /* Shown when moving in bi-directional text */ 767 | .CodeMirror div.CodeMirror-secondarycursor { 768 | border-left: 1px solid silver; 769 | } 770 | .CodeMirror.cm-fat-cursor div.CodeMirror-cursor { 771 | background: #7e7; 772 | border: 0; 773 | width: auto; 774 | } 775 | .CodeMirror.cm-fat-cursor div.CodeMirror-cursors { 776 | z-index: 1; 777 | } 778 | 779 | .cm-animate-fat-cursor { 780 | -webkit-animation: blink 1.06s steps(1) infinite; 781 | animation: blink 1.06s steps(1) infinite; 782 | border: 0; 783 | width: auto; 784 | } 785 | @-webkit-keyframes blink { 786 | 0% { background: #7e7; } 787 | 50% { background: none; } 788 | 100% { background: #7e7; } 789 | } 790 | @keyframes blink { 791 | 0% { background: #7e7; } 792 | 50% { background: none; } 793 | 100% { background: #7e7; } 794 | } 795 | 796 | /* Can style cursor different in overwrite (non-insert) mode */ 797 | div.CodeMirror-overwrite div.CodeMirror-cursor {} 798 | 799 | .cm-tab { display: inline-block; text-decoration: inherit; } 800 | 801 | .CodeMirror-ruler { 802 | border-left: 1px solid #ccc; 803 | position: absolute; 804 | } 805 | 806 | /* DEFAULT THEME */ 807 | 808 | .cm-s-default .cm-keyword {color: #708;} 809 | .cm-s-default .cm-atom {color: #219;} 810 | .cm-s-default .cm-number {color: #164;} 811 | .cm-s-default .cm-def {color: #00f;} 812 | .cm-s-default .cm-variable, 813 | .cm-s-default .cm-punctuation, 814 | .cm-s-default .cm-property, 815 | .cm-s-default .cm-operator {} 816 | .cm-s-default .cm-variable-2 {color: #05a;} 817 | .cm-s-default .cm-variable-3 {color: #085;} 818 | .cm-s-default .cm-comment {color: #a50;} 819 | .cm-s-default .cm-string {color: #a11;} 820 | .cm-s-default .cm-string-2 {color: #f50;} 821 | .cm-s-default .cm-meta {color: #555;} 822 | .cm-s-default .cm-qualifier {color: #555;} 823 | .cm-s-default .cm-builtin {color: #30a;} 824 | .cm-s-default .cm-bracket {color: #997;} 825 | .cm-s-default .cm-tag {color: #170;} 826 | .cm-s-default .cm-attribute {color: #00c;} 827 | .cm-s-default .cm-header {color: blue;} 828 | .cm-s-default .cm-quote {color: #090;} 829 | .cm-s-default .cm-hr {color: #999;} 830 | .cm-s-default .cm-link {color: #00c;} 831 | 832 | .cm-negative {color: #d44;} 833 | .cm-positive {color: #292;} 834 | .cm-header, .cm-strong {font-weight: bold;} 835 | .cm-em {font-style: italic;} 836 | .cm-link {text-decoration: underline;} 837 | .cm-strikethrough {text-decoration: line-through;} 838 | 839 | .cm-s-default .cm-error {color: #f00;} 840 | .cm-invalidchar {color: #f00;} 841 | 842 | .CodeMirror-composing { border-bottom: 2px solid; } 843 | 844 | /* Default styles for common addons */ 845 | 846 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} 847 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} 848 | .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } 849 | .CodeMirror-activeline-background {background: #e8f2ff;} 850 | 851 | /* STOP */ 852 | 853 | /* The rest of this file contains styles related to the mechanics of 854 | the editor. You probably shouldn't touch them. */ 855 | 856 | .CodeMirror { 857 | background: white; 858 | overflow: hidden; 859 | position: relative; 860 | } 861 | 862 | .CodeMirror-scroll { 863 | height: 100%; 864 | /* 30px is the magic margin used to hide the element's real scrollbars */ 865 | /* See overflow: hidden in .CodeMirror */ 866 | margin-bottom: -30px; margin-right: -30px; 867 | outline: none; /* Prevent dragging from highlighting the element */ 868 | overflow: scroll !important; /* Things will break if this is overridden */ 869 | padding-bottom: 30px; 870 | position: relative; 871 | } 872 | .CodeMirror-sizer { 873 | border-right: 30px solid transparent; 874 | position: relative; 875 | } 876 | 877 | /* The fake, visible scrollbars. Used to force redraw during scrolling 878 | before actual scrolling happens, thus preventing shaking and 879 | flickering artifacts. */ 880 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 881 | display: none; 882 | position: absolute; 883 | z-index: 6; 884 | } 885 | .CodeMirror-vscrollbar { 886 | overflow-x: hidden; 887 | overflow-y: scroll; 888 | right: 0; top: 0; 889 | } 890 | .CodeMirror-hscrollbar { 891 | bottom: 0; left: 0; 892 | overflow-x: scroll; 893 | overflow-y: hidden; 894 | } 895 | .CodeMirror-scrollbar-filler { 896 | right: 0; bottom: 0; 897 | } 898 | .CodeMirror-gutter-filler { 899 | left: 0; bottom: 0; 900 | } 901 | 902 | .CodeMirror-gutters { 903 | min-height: 100%; 904 | position: absolute; left: 0; top: 0; 905 | z-index: 3; 906 | } 907 | .CodeMirror-gutter { 908 | display: inline-block; 909 | height: 100%; 910 | margin-bottom: -30px; 911 | vertical-align: top; 912 | white-space: normal; 913 | /* Hack to make IE7 behave */ 914 | *zoom:1; 915 | *display:inline; 916 | } 917 | .CodeMirror-gutter-wrapper { 918 | background: none !important; 919 | border: none !important; 920 | position: absolute; 921 | z-index: 4; 922 | } 923 | .CodeMirror-gutter-background { 924 | position: absolute; 925 | top: 0; bottom: 0; 926 | z-index: 4; 927 | } 928 | .CodeMirror-gutter-elt { 929 | cursor: default; 930 | position: absolute; 931 | z-index: 4; 932 | } 933 | .CodeMirror-gutter-wrapper { 934 | -webkit-user-select: none; 935 | -moz-user-select: none; 936 | -ms-user-select: none; 937 | user-select: none; 938 | } 939 | 940 | .CodeMirror-lines { 941 | cursor: text; 942 | min-height: 1px; /* prevents collapsing before first draw */ 943 | } 944 | .CodeMirror pre { 945 | -webkit-tap-highlight-color: transparent; 946 | /* Reset some styles that the rest of the page might have set */ 947 | background: transparent; 948 | border-radius: 0; 949 | border-width: 0; 950 | color: inherit; 951 | font-family: inherit; 952 | font-size: inherit; 953 | -webkit-font-variant-ligatures: none; 954 | font-variant-ligatures: none; 955 | line-height: inherit; 956 | margin: 0; 957 | overflow: visible; 958 | position: relative; 959 | white-space: pre; 960 | word-wrap: normal; 961 | z-index: 2; 962 | } 963 | .CodeMirror-wrap pre { 964 | word-wrap: break-word; 965 | white-space: pre-wrap; 966 | word-break: normal; 967 | } 968 | 969 | .CodeMirror-linebackground { 970 | position: absolute; 971 | left: 0; right: 0; top: 0; bottom: 0; 972 | z-index: 0; 973 | } 974 | 975 | .CodeMirror-linewidget { 976 | overflow: auto; 977 | position: relative; 978 | z-index: 2; 979 | } 980 | 981 | .CodeMirror-widget {} 982 | 983 | .CodeMirror-code { 984 | outline: none; 985 | } 986 | 987 | /* Force content-box sizing for the elements where we expect it */ 988 | .CodeMirror-scroll, 989 | .CodeMirror-sizer, 990 | .CodeMirror-gutter, 991 | .CodeMirror-gutters, 992 | .CodeMirror-linenumber { 993 | -webkit-box-sizing: content-box; 994 | box-sizing: content-box; 995 | } 996 | 997 | .CodeMirror-measure { 998 | height: 0; 999 | overflow: hidden; 1000 | position: absolute; 1001 | visibility: hidden; 1002 | width: 100%; 1003 | } 1004 | 1005 | .CodeMirror-cursor { position: absolute; } 1006 | .CodeMirror-measure pre { position: static; } 1007 | 1008 | div.CodeMirror-cursors { 1009 | position: relative; 1010 | visibility: hidden; 1011 | z-index: 3; 1012 | } 1013 | div.CodeMirror-dragcursors { 1014 | visibility: visible; 1015 | } 1016 | 1017 | .CodeMirror-focused div.CodeMirror-cursors { 1018 | visibility: visible; 1019 | } 1020 | 1021 | .CodeMirror-selected { background: #d9d9d9; } 1022 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } 1023 | .CodeMirror-crosshair { cursor: crosshair; } 1024 | .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } 1025 | .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } 1026 | .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } 1027 | 1028 | .cm-searching { 1029 | background: #ffa; 1030 | background: rgba(255, 255, 0, .4); 1031 | } 1032 | 1033 | /* IE7 hack to prevent it from returning funny offsetTops on the spans */ 1034 | .CodeMirror span { *vertical-align: text-bottom; } 1035 | 1036 | /* Used to force a border model for a node */ 1037 | .cm-force-border { padding-right: .1px; } 1038 | 1039 | @media print { 1040 | /* Hide the cursor when printing */ 1041 | .CodeMirror div.CodeMirror-cursors { 1042 | visibility: hidden; 1043 | } 1044 | } 1045 | 1046 | /* See issue #2901 */ 1047 | .cm-tab-wrap-hack:after { content: ''; } 1048 | 1049 | /* Help users use markselection to safely style text background */ 1050 | span.CodeMirror-selectedtext { background: none; } 1051 | 1052 | .CodeMirror-dialog { 1053 | background: inherit; 1054 | color: inherit; 1055 | left: 0; right: 0; 1056 | overflow: hidden; 1057 | padding: .1em .8em; 1058 | position: absolute; 1059 | z-index: 15; 1060 | } 1061 | 1062 | .CodeMirror-dialog-top { 1063 | border-bottom: 1px solid #eee; 1064 | top: 0; 1065 | } 1066 | 1067 | .CodeMirror-dialog-bottom { 1068 | border-top: 1px solid #eee; 1069 | bottom: 0; 1070 | } 1071 | 1072 | .CodeMirror-dialog input { 1073 | background: transparent; 1074 | border: 1px solid #d3d6db; 1075 | color: inherit; 1076 | font-family: monospace; 1077 | outline: none; 1078 | width: 20em; 1079 | } 1080 | 1081 | .CodeMirror-dialog button { 1082 | font-size: 70%; 1083 | } 1084 | .graphiql-container .doc-explorer { 1085 | background: white; 1086 | } 1087 | 1088 | .graphiql-container .doc-explorer-title-bar, 1089 | .graphiql-container .history-title-bar { 1090 | cursor: default; 1091 | display: -webkit-box; 1092 | display: -ms-flexbox; 1093 | display: flex; 1094 | height: 34px; 1095 | line-height: 14px; 1096 | padding: 8px 8px 5px; 1097 | position: relative; 1098 | -webkit-user-select: none; 1099 | -moz-user-select: none; 1100 | -ms-user-select: none; 1101 | user-select: none; 1102 | } 1103 | 1104 | .graphiql-container .doc-explorer-title, 1105 | .graphiql-container .history-title { 1106 | -webkit-box-flex: 1; 1107 | -ms-flex: 1; 1108 | flex: 1; 1109 | font-weight: bold; 1110 | overflow-x: hidden; 1111 | padding: 10px 0 10px 10px; 1112 | text-align: center; 1113 | text-overflow: ellipsis; 1114 | -webkit-user-select: initial; 1115 | -moz-user-select: initial; 1116 | -ms-user-select: initial; 1117 | user-select: initial; 1118 | white-space: nowrap; 1119 | } 1120 | 1121 | .graphiql-container .doc-explorer-back { 1122 | color: #3B5998; 1123 | cursor: pointer; 1124 | margin: -7px 0 -6px -8px; 1125 | overflow-x: hidden; 1126 | padding: 17px 12px 16px 16px; 1127 | text-overflow: ellipsis; 1128 | white-space: nowrap; 1129 | } 1130 | 1131 | .doc-explorer-narrow .doc-explorer-back { 1132 | width: 0; 1133 | } 1134 | 1135 | .graphiql-container .doc-explorer-back:before { 1136 | border-left: 2px solid #3B5998; 1137 | border-top: 2px solid #3B5998; 1138 | content: ''; 1139 | display: inline-block; 1140 | height: 9px; 1141 | margin: 0 3px -1px 0; 1142 | position: relative; 1143 | -webkit-transform: rotate(-45deg); 1144 | transform: rotate(-45deg); 1145 | width: 9px; 1146 | } 1147 | 1148 | .graphiql-container .doc-explorer-rhs { 1149 | position: relative; 1150 | } 1151 | 1152 | .graphiql-container .doc-explorer-contents, 1153 | .graphiql-container .history-contents { 1154 | background-color: #ffffff; 1155 | border-top: 1px solid #d6d6d6; 1156 | bottom: 0; 1157 | left: 0; 1158 | overflow-y: auto; 1159 | padding: 20px 15px; 1160 | position: absolute; 1161 | right: 0; 1162 | top: 47px; 1163 | } 1164 | 1165 | .graphiql-container .doc-explorer-contents { 1166 | min-width: 300px; 1167 | } 1168 | 1169 | .graphiql-container .doc-type-description p:first-child , 1170 | .graphiql-container .doc-type-description blockquote:first-child { 1171 | margin-top: 0; 1172 | } 1173 | 1174 | .graphiql-container .doc-explorer-contents a { 1175 | cursor: pointer; 1176 | text-decoration: none; 1177 | } 1178 | 1179 | .graphiql-container .doc-explorer-contents a:hover { 1180 | text-decoration: underline; 1181 | } 1182 | 1183 | .graphiql-container .doc-value-description > :first-child { 1184 | margin-top: 4px; 1185 | } 1186 | 1187 | .graphiql-container .doc-value-description > :last-child { 1188 | margin-bottom: 4px; 1189 | } 1190 | 1191 | .graphiql-container .doc-category { 1192 | margin: 20px 0; 1193 | } 1194 | 1195 | .graphiql-container .doc-category-title { 1196 | border-bottom: 1px solid #e0e0e0; 1197 | color: #777; 1198 | cursor: default; 1199 | font-size: 14px; 1200 | font-variant: small-caps; 1201 | font-weight: bold; 1202 | letter-spacing: 1px; 1203 | margin: 0 -15px 10px 0; 1204 | padding: 10px 0; 1205 | -webkit-user-select: none; 1206 | -moz-user-select: none; 1207 | -ms-user-select: none; 1208 | user-select: none; 1209 | } 1210 | 1211 | .graphiql-container .doc-category-item { 1212 | margin: 12px 0; 1213 | color: #555; 1214 | } 1215 | 1216 | .graphiql-container .keyword { 1217 | color: #B11A04; 1218 | } 1219 | 1220 | .graphiql-container .type-name { 1221 | color: #CA9800; 1222 | } 1223 | 1224 | .graphiql-container .field-name { 1225 | color: #1F61A0; 1226 | } 1227 | 1228 | .graphiql-container .field-short-description { 1229 | color: #999; 1230 | margin-left: 5px; 1231 | overflow: hidden; 1232 | text-overflow: ellipsis; 1233 | white-space: nowrap; 1234 | } 1235 | 1236 | .graphiql-container .enum-value { 1237 | color: #0B7FC7; 1238 | } 1239 | 1240 | .graphiql-container .arg-name { 1241 | color: #8B2BB9; 1242 | } 1243 | 1244 | .graphiql-container .arg { 1245 | display: block; 1246 | margin-left: 1em; 1247 | } 1248 | 1249 | .graphiql-container .arg:first-child:last-child, 1250 | .graphiql-container .arg:first-child:nth-last-child(2), 1251 | .graphiql-container .arg:first-child:nth-last-child(2) ~ .arg { 1252 | display: inherit; 1253 | margin: inherit; 1254 | } 1255 | 1256 | .graphiql-container .arg:first-child:nth-last-child(2):after { 1257 | content: ', '; 1258 | } 1259 | 1260 | .graphiql-container .arg-default-value { 1261 | color: #0B7FC7; 1262 | } 1263 | 1264 | .graphiql-container .doc-deprecation { 1265 | background: #fffae8; 1266 | -webkit-box-shadow: inset 0 0 1px #bfb063; 1267 | box-shadow: inset 0 0 1px #bfb063; 1268 | color: #867F70; 1269 | line-height: 16px; 1270 | margin: 8px -8px; 1271 | max-height: 80px; 1272 | overflow: hidden; 1273 | padding: 8px; 1274 | border-radius: 3px; 1275 | } 1276 | 1277 | .graphiql-container .doc-deprecation:before { 1278 | content: 'Deprecated:'; 1279 | color: #c79b2e; 1280 | cursor: default; 1281 | display: block; 1282 | font-size: 9px; 1283 | font-weight: bold; 1284 | letter-spacing: 1px; 1285 | line-height: 1; 1286 | padding-bottom: 5px; 1287 | text-transform: uppercase; 1288 | -webkit-user-select: none; 1289 | -moz-user-select: none; 1290 | -ms-user-select: none; 1291 | user-select: none; 1292 | } 1293 | 1294 | .graphiql-container .doc-deprecation > :first-child { 1295 | margin-top: 0; 1296 | } 1297 | 1298 | .graphiql-container .doc-deprecation > :last-child { 1299 | margin-bottom: 0; 1300 | } 1301 | 1302 | .graphiql-container .show-btn { 1303 | -webkit-appearance: initial; 1304 | display: block; 1305 | border-radius: 3px; 1306 | border: solid 1px #ccc; 1307 | text-align: center; 1308 | padding: 8px 12px 10px; 1309 | width: 100%; 1310 | -webkit-box-sizing: border-box; 1311 | box-sizing: border-box; 1312 | background: #fbfcfc; 1313 | color: #555; 1314 | cursor: pointer; 1315 | } 1316 | 1317 | .graphiql-container .search-box { 1318 | border-bottom: 1px solid #d3d6db; 1319 | display: block; 1320 | font-size: 14px; 1321 | margin: -15px -15px 12px 0; 1322 | position: relative; 1323 | } 1324 | 1325 | .graphiql-container .search-box:before { 1326 | content: '\26b2'; 1327 | cursor: pointer; 1328 | display: block; 1329 | font-size: 24px; 1330 | position: absolute; 1331 | top: -2px; 1332 | -webkit-transform: rotate(-45deg); 1333 | transform: rotate(-45deg); 1334 | -webkit-user-select: none; 1335 | -moz-user-select: none; 1336 | -ms-user-select: none; 1337 | user-select: none; 1338 | } 1339 | 1340 | .graphiql-container .search-box .search-box-clear { 1341 | background-color: #d0d0d0; 1342 | border-radius: 12px; 1343 | color: #fff; 1344 | cursor: pointer; 1345 | font-size: 11px; 1346 | padding: 1px 5px 2px; 1347 | position: absolute; 1348 | right: 3px; 1349 | top: 8px; 1350 | -webkit-user-select: none; 1351 | -moz-user-select: none; 1352 | -ms-user-select: none; 1353 | user-select: none; 1354 | } 1355 | 1356 | .graphiql-container .search-box .search-box-clear:hover { 1357 | background-color: #b9b9b9; 1358 | } 1359 | 1360 | .graphiql-container .search-box > input { 1361 | border: none; 1362 | -webkit-box-sizing: border-box; 1363 | box-sizing: border-box; 1364 | font-size: 14px; 1365 | outline: none; 1366 | padding: 6px 24px 8px 20px; 1367 | width: 100%; 1368 | } 1369 | 1370 | .graphiql-container .error-container { 1371 | font-weight: bold; 1372 | left: 0; 1373 | letter-spacing: 1px; 1374 | opacity: 0.5; 1375 | position: absolute; 1376 | right: 0; 1377 | text-align: center; 1378 | text-transform: uppercase; 1379 | top: 50%; 1380 | -webkit-transform: translate(0, -50%); 1381 | transform: translate(0, -50%); 1382 | } 1383 | .CodeMirror-foldmarker { 1384 | color: blue; 1385 | cursor: pointer; 1386 | font-family: arial; 1387 | line-height: .3; 1388 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; 1389 | } 1390 | .CodeMirror-foldgutter { 1391 | width: .7em; 1392 | } 1393 | .CodeMirror-foldgutter-open, 1394 | .CodeMirror-foldgutter-folded { 1395 | cursor: pointer; 1396 | } 1397 | .CodeMirror-foldgutter-open:after { 1398 | content: "\25BE"; 1399 | } 1400 | .CodeMirror-foldgutter-folded:after { 1401 | content: "\25B8"; 1402 | } 1403 | .graphiql-container .history-contents { 1404 | font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace; 1405 | padding: 0; 1406 | } 1407 | 1408 | .graphiql-container .history-contents p { 1409 | font-size: 12px; 1410 | overflow: hidden; 1411 | text-overflow: ellipsis; 1412 | white-space: nowrap; 1413 | margin: 0; 1414 | padding: 8px; 1415 | border-bottom: 1px solid #e0e0e0; 1416 | } 1417 | 1418 | .graphiql-container .history-contents p:hover { 1419 | cursor: pointer; 1420 | } 1421 | .CodeMirror-info { 1422 | background: white; 1423 | border-radius: 2px; 1424 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); 1425 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); 1426 | -webkit-box-sizing: border-box; 1427 | box-sizing: border-box; 1428 | color: #555; 1429 | font-family: 1430 | system, 1431 | -apple-system, 1432 | 'San Francisco', 1433 | '.SFNSDisplay-Regular', 1434 | 'Segoe UI', 1435 | Segoe, 1436 | 'Segoe WP', 1437 | 'Helvetica Neue', 1438 | helvetica, 1439 | 'Lucida Grande', 1440 | arial, 1441 | sans-serif; 1442 | font-size: 13px; 1443 | line-height: 16px; 1444 | margin: 8px -8px; 1445 | max-width: 400px; 1446 | opacity: 0; 1447 | overflow: hidden; 1448 | padding: 8px 8px; 1449 | position: fixed; 1450 | -webkit-transition: opacity 0.15s; 1451 | transition: opacity 0.15s; 1452 | z-index: 50; 1453 | } 1454 | 1455 | .CodeMirror-info :first-child { 1456 | margin-top: 0; 1457 | } 1458 | 1459 | .CodeMirror-info :last-child { 1460 | margin-bottom: 0; 1461 | } 1462 | 1463 | .CodeMirror-info p { 1464 | margin: 1em 0; 1465 | } 1466 | 1467 | .CodeMirror-info .info-description { 1468 | color: #777; 1469 | line-height: 16px; 1470 | margin-top: 1em; 1471 | max-height: 80px; 1472 | overflow: hidden; 1473 | } 1474 | 1475 | .CodeMirror-info .info-deprecation { 1476 | background: #fffae8; 1477 | -webkit-box-shadow: inset 0 1px 1px -1px #bfb063; 1478 | box-shadow: inset 0 1px 1px -1px #bfb063; 1479 | color: #867F70; 1480 | line-height: 16px; 1481 | margin: -8px; 1482 | margin-top: 8px; 1483 | max-height: 80px; 1484 | overflow: hidden; 1485 | padding: 8px; 1486 | } 1487 | 1488 | .CodeMirror-info .info-deprecation-label { 1489 | color: #c79b2e; 1490 | cursor: default; 1491 | display: block; 1492 | font-size: 9px; 1493 | font-weight: bold; 1494 | letter-spacing: 1px; 1495 | line-height: 1; 1496 | padding-bottom: 5px; 1497 | text-transform: uppercase; 1498 | -webkit-user-select: none; 1499 | -moz-user-select: none; 1500 | -ms-user-select: none; 1501 | user-select: none; 1502 | } 1503 | 1504 | .CodeMirror-info .info-deprecation-label + * { 1505 | margin-top: 0; 1506 | } 1507 | 1508 | .CodeMirror-info a { 1509 | text-decoration: none; 1510 | } 1511 | 1512 | .CodeMirror-info a:hover { 1513 | text-decoration: underline; 1514 | } 1515 | 1516 | .CodeMirror-info .type-name { 1517 | color: #CA9800; 1518 | } 1519 | 1520 | .CodeMirror-info .field-name { 1521 | color: #1F61A0; 1522 | } 1523 | 1524 | .CodeMirror-info .enum-value { 1525 | color: #0B7FC7; 1526 | } 1527 | 1528 | .CodeMirror-info .arg-name { 1529 | color: #8B2BB9; 1530 | } 1531 | 1532 | .CodeMirror-info .directive-name { 1533 | color: #B33086; 1534 | } 1535 | .CodeMirror-jump-token { 1536 | text-decoration: underline; 1537 | cursor: pointer; 1538 | } 1539 | /* The lint marker gutter */ 1540 | .CodeMirror-lint-markers { 1541 | width: 16px; 1542 | } 1543 | 1544 | .CodeMirror-lint-tooltip { 1545 | background-color: infobackground; 1546 | border-radius: 4px 4px 4px 4px; 1547 | border: 1px solid black; 1548 | color: infotext; 1549 | font-family: monospace; 1550 | font-size: 10pt; 1551 | max-width: 600px; 1552 | opacity: 0; 1553 | overflow: hidden; 1554 | padding: 2px 5px; 1555 | position: fixed; 1556 | -webkit-transition: opacity .4s; 1557 | transition: opacity .4s; 1558 | white-space: pre-wrap; 1559 | z-index: 100; 1560 | } 1561 | 1562 | .CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning { 1563 | background-position: left bottom; 1564 | background-repeat: repeat-x; 1565 | } 1566 | 1567 | .CodeMirror-lint-mark-error { 1568 | background-image: 1569 | url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==") 1570 | ; 1571 | } 1572 | 1573 | .CodeMirror-lint-mark-warning { 1574 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); 1575 | } 1576 | 1577 | .CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning { 1578 | background-position: center center; 1579 | background-repeat: no-repeat; 1580 | cursor: pointer; 1581 | display: inline-block; 1582 | height: 16px; 1583 | position: relative; 1584 | vertical-align: middle; 1585 | width: 16px; 1586 | } 1587 | 1588 | .CodeMirror-lint-message-error, .CodeMirror-lint-message-warning { 1589 | background-position: top left; 1590 | background-repeat: no-repeat; 1591 | padding-left: 18px; 1592 | } 1593 | 1594 | .CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { 1595 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="); 1596 | } 1597 | 1598 | .CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { 1599 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="); 1600 | } 1601 | 1602 | .CodeMirror-lint-marker-multiple { 1603 | background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"); 1604 | background-position: right bottom; 1605 | background-repeat: no-repeat; 1606 | width: 100%; height: 100%; 1607 | } 1608 | .graphiql-container .spinner-container { 1609 | height: 36px; 1610 | left: 50%; 1611 | position: absolute; 1612 | top: 50%; 1613 | -webkit-transform: translate(-50%, -50%); 1614 | transform: translate(-50%, -50%); 1615 | width: 36px; 1616 | z-index: 10; 1617 | } 1618 | 1619 | .graphiql-container .spinner { 1620 | -webkit-animation: rotation .6s infinite linear; 1621 | animation: rotation .6s infinite linear; 1622 | border-bottom: 6px solid rgba(150, 150, 150, .15); 1623 | border-left: 6px solid rgba(150, 150, 150, .15); 1624 | border-radius: 100%; 1625 | border-right: 6px solid rgba(150, 150, 150, .15); 1626 | border-top: 6px solid rgba(150, 150, 150, .8); 1627 | display: inline-block; 1628 | height: 24px; 1629 | position: absolute; 1630 | vertical-align: middle; 1631 | width: 24px; 1632 | } 1633 | 1634 | @-webkit-keyframes rotation { 1635 | from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 1636 | to { -webkit-transform: rotate(359deg); transform: rotate(359deg); } 1637 | } 1638 | 1639 | @keyframes rotation { 1640 | from { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 1641 | to { -webkit-transform: rotate(359deg); transform: rotate(359deg); } 1642 | } 1643 | .CodeMirror-hints { 1644 | background: white; 1645 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); 1646 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); 1647 | font-family: 'Consolas', 'Inconsolata', 'Droid Sans Mono', 'Monaco', monospace; 1648 | font-size: 13px; 1649 | list-style: none; 1650 | margin-left: -6px; 1651 | margin: 0; 1652 | max-height: 14.5em; 1653 | overflow-y: auto; 1654 | overflow: hidden; 1655 | padding: 0; 1656 | position: absolute; 1657 | z-index: 10; 1658 | } 1659 | 1660 | .CodeMirror-hint { 1661 | border-top: solid 1px #f7f7f7; 1662 | color: #141823; 1663 | cursor: pointer; 1664 | margin: 0; 1665 | max-width: 300px; 1666 | overflow: hidden; 1667 | padding: 2px 6px; 1668 | white-space: pre; 1669 | } 1670 | 1671 | li.CodeMirror-hint-active { 1672 | background-color: #08f; 1673 | border-top-color: white; 1674 | color: white; 1675 | } 1676 | 1677 | .CodeMirror-hint-information { 1678 | border-top: solid 1px #c0c0c0; 1679 | max-width: 300px; 1680 | padding: 4px 6px; 1681 | position: relative; 1682 | z-index: 1; 1683 | } 1684 | 1685 | .CodeMirror-hint-information:first-child { 1686 | border-bottom: solid 1px #c0c0c0; 1687 | border-top: none; 1688 | margin-bottom: -1px; 1689 | } 1690 | 1691 | .CodeMirror-hint-deprecation { 1692 | background: #fffae8; 1693 | -webkit-box-shadow: inset 0 1px 1px -1px #bfb063; 1694 | box-shadow: inset 0 1px 1px -1px #bfb063; 1695 | color: #867F70; 1696 | font-family: 1697 | system, 1698 | -apple-system, 1699 | 'San Francisco', 1700 | '.SFNSDisplay-Regular', 1701 | 'Segoe UI', 1702 | Segoe, 1703 | 'Segoe WP', 1704 | 'Helvetica Neue', 1705 | helvetica, 1706 | 'Lucida Grande', 1707 | arial, 1708 | sans-serif; 1709 | font-size: 13px; 1710 | line-height: 16px; 1711 | margin-top: 4px; 1712 | max-height: 80px; 1713 | overflow: hidden; 1714 | padding: 6px; 1715 | } 1716 | 1717 | .CodeMirror-hint-deprecation .deprecation-label { 1718 | color: #c79b2e; 1719 | cursor: default; 1720 | display: block; 1721 | font-size: 9px; 1722 | font-weight: bold; 1723 | letter-spacing: 1px; 1724 | line-height: 1; 1725 | padding-bottom: 5px; 1726 | text-transform: uppercase; 1727 | -webkit-user-select: none; 1728 | -moz-user-select: none; 1729 | -ms-user-select: none; 1730 | user-select: none; 1731 | } 1732 | 1733 | .CodeMirror-hint-deprecation .deprecation-label + * { 1734 | margin-top: 0; 1735 | } 1736 | 1737 | .CodeMirror-hint-deprecation :last-child { 1738 | margin-bottom: 0; 1739 | } 1740 | --------------------------------------------------------------------------------