Browse Source

Fix graphql issue.

pull/753/head
Sebastian 5 years ago
parent
commit
e099db52ba
  1. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetGraphType.cs
  2. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetsResultGraphType.cs
  3. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentGraphType.cs
  4. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentInterfaceGraphType.cs
  5. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentUnionGraphType.cs
  6. 7
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentGraphType.cs
  7. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentInterfaceGraphType.cs
  8. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentResultGraphType.cs
  9. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataFlatGraphType.cs
  10. 3
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataGraphType.cs
  11. 2
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataInputGraphType.cs
  12. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedGraphType.cs
  13. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedInputGraphType.cs
  14. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ReferenceUnionGraphType.cs
  15. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/EntitySavedGraphType.cs
  16. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonNoopGraphType.cs
  17. 1
      backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetGraphType.cs

@ -20,6 +20,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Assets
{
public AssetGraphType(bool canGenerateSourceUrl)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "Asset";
AddField(new FieldType

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Assets/AssetsResultGraphType.cs

@ -17,6 +17,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Assets
{
public AssetsResultGraphType(IGraphType assetsList)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "AssetResultDto";
AddField(new FieldType

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentGraphType.cs

@ -17,6 +17,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public ComponentGraphType(SchemaInfo schemaInfo)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = schemaInfo.ComponentType;
IsTypeOf = CheckType(schemaInfo.Schema.Id.ToString());

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentInterfaceGraphType.cs

@ -14,6 +14,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public ComponentInterfaceGraphType()
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "Component";
AddField(ContentFields.SchemaId);

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ComponentUnionGraphType.cs

@ -23,6 +23,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
public ComponentUnionGraphType(Builder builder, FieldInfo fieldInfo, ImmutableList<DomainId>? schemaIds)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = fieldInfo.ReferenceType;
if (schemaIds?.Any() == true)

7
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentGraphType.cs

@ -19,9 +19,12 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
public ContentGraphType(SchemaInfo schemaInfo)
{
schemaId = schemaInfo.Schema.Id;
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = schemaInfo.ContentType;
IsTypeOf = CheckType;
schemaId = schemaInfo.Schema.Id;
}
private bool CheckType(object value)
@ -31,8 +34,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
public void Initialize(Builder builder, SchemaInfo schemaInfo, IEnumerable<SchemaInfo> allSchemas)
{
Name = schemaInfo.ContentType;
AddField(ContentFields.Id);
AddField(ContentFields.Version);
AddField(ContentFields.Created);

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentInterfaceGraphType.cs

@ -13,6 +13,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public ContentInterfaceGraphType()
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "Content";
AddField(ContentFields.Id);

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ContentResultGraphType.cs

@ -14,6 +14,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public ContentResultGraphType(ContentGraphType contentType, SchemaInfo schemaInfo)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = schemaInfo.ResultType;
AddField(new FieldType

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataFlatGraphType.cs

@ -15,6 +15,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public DataFlatGraphType(Builder builder, SchemaInfo schemaInfo)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = schemaInfo.DataFlatType;
foreach (var fieldInfo in schemaInfo.Fields)

3
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataGraphType.cs

@ -16,6 +16,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public DataGraphType(Builder builder, SchemaInfo schemaInfo)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = schemaInfo.DataType;
foreach (var fieldInfo in schemaInfo.Fields)
@ -26,6 +27,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
var fieldGraphType = new ObjectGraphType
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = fieldInfo.LocalizedType
};
@ -57,6 +59,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
var fieldGraphType = new ObjectGraphType
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = fieldInfo.LocalizedType
};

2
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/DataInputGraphType.cs

@ -20,6 +20,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public DataInputGraphType(Builder builder, SchemaInfo schemaInfo)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = schemaInfo.DataInputType;
foreach (var fieldInfo in schemaInfo.Fields)
@ -30,6 +31,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
var fieldGraphType = new InputObjectGraphType
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = fieldInfo.LocalizedInputType
};

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedGraphType.cs

@ -15,6 +15,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public NestedGraphType(Builder builder, FieldInfo fieldInfo)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = fieldInfo.NestedType;
foreach (var nestedFieldInfo in fieldInfo.Fields)

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/NestedInputGraphType.cs

@ -16,6 +16,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
{
public NestedInputGraphType(Builder builder, FieldInfo fieldInfo)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = fieldInfo.NestedInputType;
foreach (var nestedFieldInfo in fieldInfo.Fields)

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Contents/ReferenceUnionGraphType.cs

@ -21,6 +21,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Contents
public ReferenceUnionGraphType(Builder builder, FieldInfo fieldInfo, ImmutableList<DomainId>? schemaIds)
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = fieldInfo.ReferenceType;
if (schemaIds?.Any() == true)

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/EntitySavedGraphType.cs

@ -19,6 +19,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Primitives
private EntitySavedGraphType()
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "EntitySavedResultDto";
AddField(new FieldType

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/Primitives/JsonNoopGraphType.cs

@ -14,6 +14,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Primitives
{
public JsonNoopGraphType()
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "JsonScalar";
Description = "Unstructured Json object";

1
backend/src/Squidex.Domain.Apps.Entities/Contents/GraphQL/Types/UserGraphType.cs

@ -21,6 +21,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.GraphQL.Types
public UserGraphType()
{
// The name is used for equal comparison. Therefore it is important to treat it as readonly.
Name = "User";
AddField(new FieldType

Loading…
Cancel
Save