From 26a50c1199c2b579488873060445b3cd828cf83c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 8 Sep 2020 12:37:03 +0200 Subject: [PATCH] Removed unsued code. --- .../Contents/GraphQL/GraphQLModel.cs | 22 +++---------------- .../Contents/GraphQL/IGraphModel.cs | 4 ++-- .../IdentityServer/Config/LazyClientStore.cs | 1 - 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs index 96ba556df..f9272bcd4 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs @@ -10,7 +10,6 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using GraphQL; -using GraphQL.Resolvers; using GraphQL.Types; using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core.Schemas; @@ -29,8 +28,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL { private readonly Dictionary contentTypes = new Dictionary(); private readonly PartitionResolver partitionResolver; - private readonly IAppEntity app; - private readonly IObjectGraphType assetType; + private readonly IGraphType assetType; private readonly IGraphType assetListType; private readonly GraphQLSchema graphQLSchema; @@ -42,8 +40,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL int pageSizeAssets, IUrlGenerator urlGenerator) { - this.app = app; - partitionResolver = app.PartitionResolver(); CanGenerateAssetSourceUrl = urlGenerator.CanGenerateAssetSourceUrl; @@ -100,18 +96,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL return schema; } - public IFieldResolver ResolveContentUrl(ISchemaEntity schema) - { - var resolver = new FuncFieldResolver(c => - { - var context = (GraphQLExecutionContext)c.UserContext; - - return context.UrlGenerator.ContentUI(app.NamedId(), schema.NamedId(), c.Source.Id); - }); - - return resolver; - } - public IFieldPartitioning ResolvePartition(Partitioning key) { return partitionResolver(key); @@ -127,12 +111,12 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL return field.Accept(new QueryGraphTypeVisitor(schema, contentTypes, this, assetListType, fieldName)); } - public IObjectGraphType GetAssetType() + public IGraphType GetAssetType() { return assetType; } - public IObjectGraphType GetContentType(Guid schemaId) + public IGraphType GetContentType(Guid schemaId) { return contentTypes.GetOrDefault(schemaId); } diff --git a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphModel.cs b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphModel.cs index e0e099331..1fef0c632 100644 --- a/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphModel.cs +++ b/backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphModel.cs @@ -20,9 +20,9 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL IFieldPartitioning ResolvePartition(Partitioning key); - IObjectGraphType GetAssetType(); + IGraphType GetAssetType(); - IObjectGraphType GetContentType(Guid schemaId); + IGraphType GetContentType(Guid schemaId); IGraphType? GetInputGraphType(ISchemaEntity schema, IField field, string fieldName); diff --git a/backend/src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs b/backend/src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs index ba177a4b4..e4ce295b5 100644 --- a/backend/src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs +++ b/backend/src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Security.Claims; using System.Threading.Tasks; using IdentityServer4; using IdentityServer4.Models;