Skip to content

Commit

Permalink
Added operation generator
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Feb 14, 2024
1 parent 983a0a2 commit 01e0659
Show file tree
Hide file tree
Showing 23 changed files with 1,007 additions and 933 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@
namespace HotChocolate;

[AttributeUsage(AttributeTargets.Parameter)]
public sealed class EventMessageAttribute
: Attribute
{
}
public sealed class EventMessageAttribute : Attribute;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System;

namespace HotChocolate;

[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)]
public sealed class MutationFieldAttribute : Attribute;
6 changes: 6 additions & 0 deletions src/HotChocolate/Core/src/Abstractions/QueryFieldAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System;

namespace HotChocolate;

[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)]
public sealed class QueryFieldAttribute : Attribute;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System;

namespace HotChocolate;

[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property)]
public sealed class SubscriptionFieldAttribute : Attribute;
27 changes: 27 additions & 0 deletions src/HotChocolate/Core/src/Types.Analyzers/Errors.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using HotChocolate.Types.Analyzers.Properties;
using Microsoft.CodeAnalysis;

namespace HotChocolate.Types.Analyzers;

public static class Errors
{
public static readonly DiagnosticDescriptor KeyParameterMissing =
new(
id: "HC0074",
title: "Parameter Missing.",
messageFormat:
SourceGenResources.DataLoader_KeyParameterMissing,
category: "DataLoader",
DiagnosticSeverity.Error,
isEnabledByDefault: true);

public static readonly DiagnosticDescriptor MethodAccessModifierInvalid =
new(
id: "HC0075",
title: "Access Modifier Invalid.",
messageFormat:
SourceGenResources.DataLoader_InvalidAccessModifier,
category: "DataLoader",
DiagnosticSeverity.Error,
isEnabledByDefault: true);
}
Loading

0 comments on commit 01e0659

Please sign in to comment.