Browse Source

Removed unsued code.

pull/575/head
Sebastian 5 years ago
parent
commit
26a50c1199
  1. 22
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs
  2. 4
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/IGraphModel.cs
  3. 1
      backend/src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs

22
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/GraphQLModel.cs

@ -10,7 +10,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using GraphQL; using GraphQL;
using GraphQL.Resolvers;
using GraphQL.Types; using GraphQL.Types;
using Squidex.Domain.Apps.Core; using Squidex.Domain.Apps.Core;
using Squidex.Domain.Apps.Core.Schemas; using Squidex.Domain.Apps.Core.Schemas;
@ -29,8 +28,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL
{ {
private readonly Dictionary<Guid, ContentGraphType> contentTypes = new Dictionary<Guid, ContentGraphType>(); private readonly Dictionary<Guid, ContentGraphType> contentTypes = new Dictionary<Guid, ContentGraphType>();
private readonly PartitionResolver partitionResolver; private readonly PartitionResolver partitionResolver;
private readonly IAppEntity app; private readonly IGraphType assetType;
private readonly IObjectGraphType assetType;
private readonly IGraphType assetListType; private readonly IGraphType assetListType;
private readonly GraphQLSchema graphQLSchema; private readonly GraphQLSchema graphQLSchema;
@ -42,8 +40,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL
int pageSizeAssets, int pageSizeAssets,
IUrlGenerator urlGenerator) IUrlGenerator urlGenerator)
{ {
this.app = app;
partitionResolver = app.PartitionResolver(); partitionResolver = app.PartitionResolver();
CanGenerateAssetSourceUrl = urlGenerator.CanGenerateAssetSourceUrl; CanGenerateAssetSourceUrl = urlGenerator.CanGenerateAssetSourceUrl;
@ -100,18 +96,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL
return schema; return schema;
} }
public IFieldResolver ResolveContentUrl(ISchemaEntity schema)
{
var resolver = new FuncFieldResolver<IContentEntity, object>(c =>
{
var context = (GraphQLExecutionContext)c.UserContext;
return context.UrlGenerator.ContentUI(app.NamedId(), schema.NamedId(), c.Source.Id);
});
return resolver;
}
public IFieldPartitioning ResolvePartition(Partitioning key) public IFieldPartitioning ResolvePartition(Partitioning key)
{ {
return partitionResolver(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)); return field.Accept(new QueryGraphTypeVisitor(schema, contentTypes, this, assetListType, fieldName));
} }
public IObjectGraphType GetAssetType() public IGraphType GetAssetType()
{ {
return assetType; return assetType;
} }
public IObjectGraphType GetContentType(Guid schemaId) public IGraphType GetContentType(Guid schemaId)
{ {
return contentTypes.GetOrDefault(schemaId); return contentTypes.GetOrDefault(schemaId);
} }

4
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); IFieldPartitioning ResolvePartition(Partitioning key);
IObjectGraphType GetAssetType(); IGraphType GetAssetType();
IObjectGraphType GetContentType(Guid schemaId); IGraphType GetContentType(Guid schemaId);
IGraphType? GetInputGraphType(ISchemaEntity schema, IField field, string fieldName); IGraphType? GetInputGraphType(ISchemaEntity schema, IField field, string fieldName);

1
backend/src/Squidex/Areas/IdentityServer/Config/LazyClientStore.cs

@ -7,7 +7,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using IdentityServer4; using IdentityServer4;
using IdentityServer4.Models; using IdentityServer4.Models;

Loading…
Cancel
Save