Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1c9d18c

Browse files
Get compiling with v9 beta 3 and GraphQL 4.5
1 parent 74e345f commit 1c9d18c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+379
-777
lines changed

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ Visual Studio 2017/*
2323
/src/Our.Umbraco.GraphQL/umbraco/UmbracoInstall/
2424
/src/Our.Umbraco.GraphQL/umbraco/UmbracoWebsite/
2525
/src/Our.Umbraco.GraphQL/wwwroot/umbraco/
26+
/samples/Website/umbraco
27+
/samples/Website/wwwroot/umbraco

‎samples/Website/GraphQLComponent.cs‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

‎samples/Website/Program.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Microsoft.AspNetCore.Hosting;
2-
using Microsoft.Extensions.Configuration;
32
using Microsoft.Extensions.Hosting;
43
using Microsoft.Extensions.Logging;
54

‎samples/Website/Startup.cs‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Microsoft.AspNetCore.Hosting;
44
using Microsoft.Extensions.Configuration;
55
using Microsoft.Extensions.DependencyInjection;
6+
using Microsoft.Extensions.Hosting;
67
using Umbraco.Cms.Core.DependencyInjection;
78
using Umbraco.Extensions;
89

@@ -51,10 +52,25 @@ public void ConfigureServices(IServiceCollection services)
5152
/// <summary>
5253
/// Configures the application
5354
/// </summary>
54-
public void Configure(IApplicationBuilder app)
55+
public void Configure(IApplicationBuilder app,IWebHostEnvironmentenv)
5556
{
56-
app.UseUmbracoBackOffice();
57-
app.UseUmbracoWebsite();
57+
if (env.IsDevelopment())
58+
{
59+
app.UseDeveloperExceptionPage();
60+
}
61+
62+
app.UseUmbraco()
63+
.WithMiddleware(u =>
64+
{
65+
u.WithBackOffice();
66+
u.WithWebsite();
67+
})
68+
.WithEndpoints(u =>
69+
{
70+
u.UseInstallerEndpoints();
71+
u.UseBackOfficeEndpoints();
72+
u.UseWebsiteEndpoints();
73+
});
5874
}
5975
}
6076
}

‎samples/Website/Starwars/StarwarsComponent.cs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
using System;
22
using Our.Umbraco.GraphQL.Adapters.Types.Resolution;
33
using Our.Umbraco.GraphQL.Types;
4-
using Umbraco.Cms.Core;
4+
using Umbraco.Extensions;
55
using Umbraco.Cms.Core.Composing;
6+
using Umbraco.Cms.Core.DependencyInjection;
67
using Website.Starwars.Data;
78
using Website.Starwars.Schema;
89

910
namespace Website
1011
{
11-
[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
1212
public class StarwarsComposer : ComponentComposer<StarwarsComponent>, IUserComposer
1313
{
14-
public override void Compose(Compositioncomposition)
14+
public override void Compose(IUmbracoBuilderbuilder)
1515
{
16-
base.Compose(composition);
16+
base.Compose(builder);
1717

18-
composition.Register<StarWarsData>(Lifetime.Singleton);
18+
builder.Services.AddUnique<StarWarsData>();
1919
}
2020
}
2121

‎samples/Website/Website.csproj‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@
44
</PropertyGroup>
55

66
<ItemGroup>
7-
<PackageReference Include="Umbraco.Cms" Version="9.0.0-alpha004" />
7+
<PackageReference Include="Umbraco.Cms" Version="9.0.0-beta003" />
8+
<PackageReference Include="Umbraco.Cms.SqlCe" Version="9.0.0-beta003" />
89
</ItemGroup>
910

1011

1112
<ItemGroup>
1213
<Compile Remove="umbraco\Data\**" />
1314
<Compile Remove="umbraco\logs\**" />
1415
<Compile Remove="umbraco\MediaCache\**" />
15-
<Compile Remove="umbraco\models\**" />
1616
</ItemGroup>
1717
<ItemGroup>
1818
<EmbeddedResource Remove="umbraco\Data\**" />
1919
<EmbeddedResource Remove="umbraco\logs\**" />
2020
<EmbeddedResource Remove="umbraco\MediaCache\**" />
21-
<EmbeddedResource Remove="umbraco\models\**" />
2221
</ItemGroup>
2322
<ItemGroup>
24-
<None Remove="umbraco\models\**" />
2523
<None Remove="umbraco\Data\**" />
2624
<None Remove="umbraco\logs\**" />
2725
<None Remove="umbraco\MediaCache\**" />
@@ -38,7 +36,9 @@
3836
<Content Remove="umbraco\Data\**" />
3937
<Content Remove="umbraco\logs\**" />
4038
<Content Remove="umbraco\MediaCache\**" />
41-
<Content Remove="umbraco\models\**" />
39+
</ItemGroup>
40+
<ItemGroup>
41+
<ProjectReference Include="..\..\src\Our.Umbraco.GraphQL\Our.Umbraco.GraphQL.csproj" />
4242
</ItemGroup>
4343

4444
<!--Set this to true ModelsBuilder mode is not PureLive -->

‎samples/Website/appsettings.Development.json‎

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
},
1919
"Umbraco": {
2020
"CMS": {
21+
"Content": {
22+
"MacroErrors": "Throw"
23+
},
2124
"Global": {
2225
"Smtp": {
23-
//"From": "your@email.here",
24-
//"Host": "localhost",
25-
// "Port": "25"
26+
"From": "your@email.here",
27+
"Host": "localhost",
28+
"Port": "25"
2629
}
2730
},
2831
"Hosting": {
@@ -31,20 +34,7 @@
3134
"RuntimeMinification": {
3235
"useInMemoryCache": true,
3336
"cacheBuster": "Timestamp"
34-
},
35-
"RichTextEditor": {
36-
"Commands": [
37-
{
38-
"Alias": "fullscreen",
39-
"Name": "Full Screen",
40-
"Mode": "All"
41-
}
42-
],
43-
"Plugins": [
44-
"fullscreen"
45-
]
4637
}
4738
}
48-
4939
}
5040
}

‎samples/Website/appsettings.json‎

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"ConnectionStrings": {
3-
"umbracoDbDSN": ""
3+
"umbracoDbDSN": "Data Source=|DataDirectory|\\Umbraco.sdf;Flush Interval=1;"
44
},
55
"Serilog": {
66
"MinimumLevel": {
@@ -14,61 +14,18 @@
1414
},
1515
"Umbraco": {
1616
"CMS": {
17-
"Content": {
18-
"Notifications": {
19-
"Email": "your@email.here"
20-
},
21-
"MacroErrors": "throw"
22-
},
23-
"Global": {
24-
"DefaultUILanguage": "en-us",
25-
"HideTopLevelNodeFromPath": true,
26-
"UmbracoPath": "~/umbraco",
27-
"TimeOutInMinutes": 20,
28-
"UseHttps": false
29-
},
3017
"Hosting": {
3118
"Debug": false
3219
},
33-
"KeepAlive": {
34-
"DisableKeepAliveTask": false,
35-
"KeepAlivePingUrl": "{umbracoApplicationUrl}/api/keepalive/ping"
36-
},
37-
"RequestHandler": {
38-
"ConvertUrlsToAscii": "try"
39-
},
40-
"RuntimeMinification": {
41-
"dataFolder": "umbraco/Data/TEMP/Smidge",
42-
"version": "637510451273675926"
43-
},
44-
"Security": {
45-
"KeepUserLoggedIn": false,
46-
"UsernameIsEmail": true,
47-
"HideDisabledUsersInBackoffice": false,
48-
"UserPassword": {
49-
"RequiredLength": 10,
50-
"RequireNonLetterOrDigit": false,
51-
"RequireDigit": false,
52-
"RequireLowercase": false,
53-
"RequireUppercase": false,
54-
"MaxFailedAccessAttemptsBeforeLockout": 5
55-
},
56-
"MemberPassword": {
57-
"RequiredLength": 10,
58-
"RequireNonLetterOrDigit": false,
59-
"RequireDigit": false,
60-
"RequireLowercase": false,
61-
"RequireUppercase": false,
62-
"MaxFailedAccessAttemptsBeforeLockout": 5
63-
}
64-
},
65-
"Tours": {
66-
"EnableTours": true
67-
},
68-
"ModelsBuilder": {
69-
"ModelsMode": "PureLive",
70-
"Enable": true
20+
"Global": {
21+
"Id": "a6a18915-b6f1-490b-9ab7-d33f7aa09e68"
7122
}
7223
}
24+
},
25+
"GraphQL": {
26+
"Server": {
27+
"EnablePlayground": true,
28+
"EnableMetrics": true
29+
}
7330
}
7431
}

‎src/Our.Umbraco.GraphQL/Adapters/Builders/FieldBuilderExtensions.cs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ public static FieldBuilder<TSourceType, object> Metadata<TSourceType>(
1313
return builder;
1414
}
1515

16-
public static ConnectionBuilder<TNodeType, TSourceType> Metadata<TNodeType, TSourceType>(
17-
this ConnectionBuilder<TNodeType, TSourceType> builder, string key, object value)
18-
where TNodeType : IGraphType
16+
public static ConnectionBuilder<TSourceType> Metadata<TSourceType>(
17+
this ConnectionBuilder<TSourceType> builder, string key, object value)
1918
{
2019
builder.FieldType.Metadata.Add(key, value);
2120
return builder;
2221
}
2322

24-
public static ConnectionBuilder<TNodeType,TSourceType> Orderable<TNodeType,TSourceType>(
25-
this ConnectionBuilder<TNodeType,TSourceType> builder) where TNodeType : IComplexGraphType
23+
public static ConnectionBuilder<TSourceType> Orderable<TSourceType,TNodeType>(
24+
this ConnectionBuilder<TSourceType> builder) where TNodeType : IComplexGraphType
2625
{
2726
builder.Argument<ListGraphType<NonNullGraphType<OrderByGraphType<TNodeType>>>>("orderBy", "");
2827
return builder;

‎src/Our.Umbraco.GraphQL/Adapters/Examine/Types/ExamineGraphTypeExtensions.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static void AddBuiltInFields(this ComplexGraphType<ISearchResult> graphTy
4444
graphType.Connection<SearchResultFieldsGraphType>().Name("fields")
4545
.Metadata(nameof(MemberInfo), GetMember((ISearchResult x) => x.AllValues))
4646
.Bidirectional()
47-
.Orderable()
47+
.Orderable<ISearchResult,SearchResultFieldsGraphType>()
4848
.Resolve(ctx =>
4949
ctx.Source.AllValues
5050
.OrderBy(ctx.GetArgument<IList<OrderBy>>("orderBy"))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /