diff --git a/src/HotChocolate/Core/src/Abstractions/WellKnownDirectives.cs b/src/HotChocolate/Core/src/Abstractions/WellKnownDirectives.cs
index ed741877439..d2be4cd06cb 100644
--- a/src/HotChocolate/Core/src/Abstractions/WellKnownDirectives.cs
+++ b/src/HotChocolate/Core/src/Abstractions/WellKnownDirectives.cs
@@ -79,4 +79,29 @@ public static class WellKnownDirectives
/// The name of the @semanticNonNull argument levels.
///
public const string Levels = "levels";
+
+ ///
+ /// The name of the @requiresOptIn directive.
+ ///
+ public const string RequiresOptIn = "requiresOptIn";
+
+ ///
+ /// The name of the @requiresOptIn feature argument.
+ ///
+ public const string RequiresOptInFeatureArgument = "feature";
+
+ ///
+ /// The name of the @optInFeatureStability directive.
+ ///
+ public const string OptInFeatureStability = "optInFeatureStability";
+
+ ///
+ /// The name of the @optInFeatureStability feature argument.
+ ///
+ public const string OptInFeatureStabilityFeatureArgument = "feature";
+
+ ///
+ /// The name of the @optInFeatureStability stability argument.
+ ///
+ public const string OptInFeatureStabilityStabilityArgument = "stability";
}
diff --git a/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.OptInFeatures.cs b/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.OptInFeatures.cs
new file mode 100644
index 00000000000..bebae815d10
--- /dev/null
+++ b/src/HotChocolate/Core/src/Execution/DependencyInjection/RequestExecutorBuilderExtensions.OptInFeatures.cs
@@ -0,0 +1,35 @@
+using HotChocolate;
+using HotChocolate.Execution.Configuration;
+using HotChocolate.Types;
+
+namespace Microsoft.Extensions.DependencyInjection;
+
+public static partial class RequestExecutorBuilderExtensions
+{
+ public static IRequestExecutorBuilder OptInFeatureStability(
+ this IRequestExecutorBuilder builder,
+ string feature,
+ string stability)
+ {
+ if (builder is null)
+ {
+ throw new ArgumentNullException(nameof(builder));
+ }
+
+ if (feature is null)
+ {
+ throw new ArgumentNullException(nameof(feature));
+ }
+
+ if (stability is null)
+ {
+ throw new ArgumentNullException(nameof(stability));
+ }
+
+ return Configure(
+ builder,
+ options => options.OnConfigureSchemaServicesHooks.Add(
+ (ctx, _) => ctx.SchemaBuilder.AddSchemaConfiguration(
+ d => d.Directive(new OptInFeatureStabilityDirective(feature, stability)))));
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Configuration/Validation/RequiresOptInValidationRule.cs b/src/HotChocolate/Core/src/Types/Configuration/Validation/RequiresOptInValidationRule.cs
new file mode 100644
index 00000000000..1c31246defb
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Configuration/Validation/RequiresOptInValidationRule.cs
@@ -0,0 +1,67 @@
+using HotChocolate.Types;
+using HotChocolate.Types.Descriptors;
+using static HotChocolate.Utilities.ErrorHelper;
+
+namespace HotChocolate.Configuration.Validation;
+
+internal sealed class RequiresOptInValidationRule : ISchemaValidationRule
+{
+ public void Validate(
+ IDescriptorContext context,
+ ISchema schema,
+ ICollection errors)
+ {
+ if (!context.Options.EnableOptInFeatures)
+ {
+ return;
+ }
+
+ foreach (var type in schema.Types)
+ {
+ switch (type)
+ {
+ case IInputObjectType inputObjectType:
+ foreach (var field in inputObjectType.Fields)
+ {
+ if (field.Type.IsNonNullType() && field.DefaultValue is null)
+ {
+ var requiresOptInDirectives = field.Directives
+ .Where(d => d.Type is RequiresOptInDirectiveType);
+
+ foreach (var _ in requiresOptInDirectives)
+ {
+ errors.Add(RequiresOptInOnRequiredInputField(
+ inputObjectType,
+ field));
+ }
+ }
+ }
+
+ break;
+
+ case IObjectType objectType:
+ foreach (var field in objectType.Fields)
+ {
+ foreach (var argument in field.Arguments)
+ {
+ if (argument.Type.IsNonNullType() && argument.DefaultValue is null)
+ {
+ var requiresOptInDirectives = argument.Directives
+ .Where(d => d.Type is RequiresOptInDirectiveType);
+
+ foreach (var _ in requiresOptInDirectives)
+ {
+ errors.Add(RequiresOptInOnRequiredArgument(
+ objectType,
+ field,
+ argument));
+ }
+ }
+ }
+ }
+
+ break;
+ }
+ }
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Configuration/Validation/SchemaValidator.cs b/src/HotChocolate/Core/src/Types/Configuration/Validation/SchemaValidator.cs
index 877f7b5d731..ef7dec99fe8 100644
--- a/src/HotChocolate/Core/src/Types/Configuration/Validation/SchemaValidator.cs
+++ b/src/HotChocolate/Core/src/Types/Configuration/Validation/SchemaValidator.cs
@@ -12,7 +12,8 @@ internal static class SchemaValidator
new DirectiveValidationRule(),
new InterfaceHasAtLeastOneImplementationRule(),
new IsSelectedPatternValidation(),
- new EnsureFieldResultsDeclareErrorsRule()
+ new EnsureFieldResultsDeclareErrorsRule(),
+ new RequiresOptInValidationRule()
];
public static IReadOnlyList Validate(
diff --git a/src/HotChocolate/Core/src/Types/IReadOnlySchemaOptions.cs b/src/HotChocolate/Core/src/Types/IReadOnlySchemaOptions.cs
index 7dbf71f8146..275da48fae9 100644
--- a/src/HotChocolate/Core/src/Types/IReadOnlySchemaOptions.cs
+++ b/src/HotChocolate/Core/src/Types/IReadOnlySchemaOptions.cs
@@ -187,6 +187,11 @@ public interface IReadOnlySchemaOptions
///
bool EnableTag { get; }
+ ///
+ /// Specifies that the opt-in features functionality will be enabled.
+ ///
+ bool EnableOptInFeatures { get; }
+
///
/// Specifies the default dependency injection scope for query fields.
///
diff --git a/src/HotChocolate/Core/src/Types/Properties/TypeResources.Designer.cs b/src/HotChocolate/Core/src/Types/Properties/TypeResources.Designer.cs
index 234c40b7099..18bb9769caf 100644
--- a/src/HotChocolate/Core/src/Types/Properties/TypeResources.Designer.cs
+++ b/src/HotChocolate/Core/src/Types/Properties/TypeResources.Designer.cs
@@ -11,32 +11,46 @@ namespace HotChocolate.Properties {
using System;
- [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class TypeResources {
- private static System.Resources.ResourceManager resourceMan;
+ private static global::System.Resources.ResourceManager resourceMan;
- private static System.Globalization.CultureInfo resourceCulture;
+ private static global::System.Globalization.CultureInfo resourceCulture;
- [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal TypeResources() {
}
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static System.Resources.ResourceManager ResourceManager {
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
get {
- if (object.Equals(null, resourceMan)) {
- System.Resources.ResourceManager temp = new System.Resources.ResourceManager("HotChocolate.Properties.TypeResources", typeof(TypeResources).Assembly);
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HotChocolate.Properties.TypeResources", typeof(TypeResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static System.Globalization.CultureInfo Culture {
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -45,1971 +59,3073 @@ internal static System.Globalization.CultureInfo Culture {
}
}
- internal static string ThrowHelper_MissingDirectiveIfArgument {
+ ///
+ /// Looks up a localized string similar to Cycle in object graph detected..
+ ///
+ internal static string AnyType_CycleInObjectGraph {
get {
- return ResourceManager.GetString("ThrowHelper_MissingDirectiveIfArgument", resourceCulture);
+ return ResourceManager.GetString("AnyType_CycleInObjectGraph", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An Applied Directive is an instances of a directive as applied to a schema element. This type is NOT specified by the graphql specification presently..
+ ///
+ internal static string AppliedDirective_Description {
+ get {
+ return ResourceManager.GetString("AppliedDirective_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The argument `{0}` has no type. Specify the type with `.Argument("{0}", a.Type<MyType>())` to fix this issue..
+ ///
+ internal static string Argument_TypeIsNull {
+ get {
+ return ResourceManager.GetString("Argument_TypeIsNull", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The argument type has to be an input-type..
+ ///
internal static string ArgumentDescriptor_InputTypeViolation {
get {
return ResourceManager.GetString("ArgumentDescriptor_InputTypeViolation", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Argument `{0}` of non-null type `{1}` must not be null..
+ ///
internal static string ArgumentValueBuilder_NonNull {
get {
return ResourceManager.GetString("ArgumentValueBuilder_NonNull", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The specified binding cannot be handled..
+ ///
+ internal static string BindingCompiler_AddBinding_BindingCannotBeHandled {
+ get {
+ return ResourceManager.GetString("BindingCompiler_AddBinding_BindingCannotBeHandled", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The `Boolean` scalar type represents `true` or `false`..
+ ///
internal static string BooleanType_Description {
get {
return ResourceManager.GetString("BooleanType_Description", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The `Byte` scalar type represents non-fractional whole numeric values. Byte can represent values between 0 and 255..
+ ///
internal static string ByteType_Description {
get {
return ResourceManager.GetString("ByteType_Description", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Could not resolve the claims principal..
+ ///
+ internal static string ClaimsPrincipalParameterExpressionBuilder_NoClaimsFound {
+ get {
+ return ResourceManager.GetString("ClaimsPrincipalParameterExpressionBuilder_NoClaimsFound", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A segment of a collection..
+ ///
+ internal static string CollectionSegmentType_Description {
+ get {
+ return ResourceManager.GetString("CollectionSegmentType_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A flattened list of the items..
+ ///
+ internal static string CollectionSegmentType_Items_Description {
+ get {
+ return ResourceManager.GetString("CollectionSegmentType_Items_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Information to aid in pagination..
+ ///
+ internal static string CollectionSegmentType_PageInfo_Description {
+ get {
+ return ResourceManager.GetString("CollectionSegmentType_PageInfo_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The specified IComplexTypeFieldBindingBuilder-implementation is not supported..
+ ///
internal static string ComplexTypeBindingBuilder_FieldBuilderNotSupported {
get {
return ResourceManager.GetString("ComplexTypeBindingBuilder_FieldBuilderNotSupported", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The field binding builder is not completed and cannot be added..
+ ///
internal static string ComplexTypeBindingBuilder_FieldNotComplete {
get {
return ResourceManager.GetString("ComplexTypeBindingBuilder_FieldNotComplete", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to A connection to a list of items..
+ ///
+ internal static string ConnectionType_Description {
+ get {
+ return ResourceManager.GetString("ConnectionType_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A list of edges..
+ ///
+ internal static string ConnectionType_Edges_Description {
+ get {
+ return ResourceManager.GetString("ConnectionType_Edges_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A flattened list of the nodes..
+ ///
+ internal static string ConnectionType_Nodes_Description {
+ get {
+ return ResourceManager.GetString("ConnectionType_Nodes_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Information to aid in pagination..
+ ///
+ internal static string ConnectionType_PageInfo_Description {
+ get {
+ return ResourceManager.GetString("ConnectionType_PageInfo_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Identifies the total count of items in the connection..
+ ///
+ internal static string ConnectionType_TotalCount_Description {
+ get {
+ return ResourceManager.GetString("ConnectionType_TotalCount_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The DataLoader key cannot be null or empty..
+ ///
internal static string DataLoaderRegistry_KeyNullOrEmpty {
get {
return ResourceManager.GetString("DataLoaderRegistry_KeyNullOrEmpty", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The DataLoader `{0}` needs to be register with the dependency injection provider..
+ ///
+ internal static string DataLoaderResolverContextExtensions_CreateDataLoader_AbstractType {
+ get {
+ return ResourceManager.GetString("DataLoaderResolverContextExtensions_CreateDataLoader_AbstractType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to create DataLoader `{0}`..
+ ///
+ internal static string DataLoaderResolverContextExtensions_CreateDataLoader_UnableToCreate {
+ get {
+ return ResourceManager.GetString("DataLoaderResolverContextExtensions_CreateDataLoader_UnableToCreate", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to No DataLoader registry was registered with your dependency injection..
+ ///
internal static string DataLoaderResolverContextExtensions_RegistryIsNull {
get {
return ResourceManager.GetString("DataLoaderResolverContextExtensions_RegistryIsNull", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Unable to register a DataLoader with your DataLoader registry..
+ ///
internal static string DataLoaderResolverContextExtensions_UnableToRegister {
get {
return ResourceManager.GetString("DataLoaderResolverContextExtensions_UnableToRegister", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The `DateTime` scalar represents an ISO-8601 compliant date time type..
+ ///
internal static string DateTimeType_Description {
get {
return ResourceManager.GetString("DateTimeType_Description", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The `Date` scalar represents an ISO-8601 compliant date type..
+ ///
internal static string DateType_Description {
get {
return ResourceManager.GetString("DateType_Description", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The `Decimal` scalar type represents a decimal floating-point number..
+ ///
internal static string DecimalType_Description {
get {
return ResourceManager.GetString("DecimalType_Description", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The DataLoader `{0}` was not of the requested type `{1}`..
+ ///
+ internal static string DefaultDataLoaderRegistry_GetOrRegister {
+ get {
+ return ResourceManager.GetString("DefaultDataLoaderRegistry_GetOrRegister", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The fieldName cannot be null or empty..
+ ///
+ internal static string DefaultNamingConventions_FormatFieldName_EmptyOrNull {
+ get {
+ return ResourceManager.GetString("DefaultNamingConventions_FormatFieldName_EmptyOrNull", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Only methods are allowed..
+ ///
+ internal static string DefaultResolverCompilerService_CompileSubscribe_OnlyMethodsAllowed {
+ get {
+ return ResourceManager.GetString("DefaultResolverCompilerService_CompileSubscribe_OnlyMethodsAllowed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The public method should already have ensured that we do not have members other than method or property at this point..
+ ///
+ internal static string DefaultResolverCompilerService_CreateResolver_ArgumentValidationError {
+ get {
+ return ResourceManager.GetString("DefaultResolverCompilerService_CreateResolver_ArgumentValidationError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The specified member has to be a method or a property..
+ ///
internal static string DefaultTypeInspector_MemberInvalid {
get {
return ResourceManager.GetString("DefaultTypeInspector_MemberInvalid", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The `@defer` directive may be provided for fragment spreads and inline fragments to inform the executor to delay the execution of the current fragment to indicate deprioritization of the current fragment. A query with `@defer` directive will cause the request to potentially return multiple responses, where non-deferred data is delivered in the initial response and data deferred is delivered in a subsequent response. `@include` and `@skip` take precedence over `@defer`..
+ ///
+ internal static string DeferDirectiveType_Description {
+ get {
+ return ResourceManager.GetString("DeferDirectiveType_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Deferred when true..
+ ///
+ internal static string DeferDirectiveType_If_Description {
+ get {
+ return ResourceManager.GetString("DeferDirectiveType_If_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to If this argument label has a value other than null, it will be passed on to the result of this defer directive. This label is intended to give client applications a way to identify to which fragment a deferred result belongs to..
+ ///
+ internal static string DeferDirectiveType_Label_Description {
+ get {
+ return ResourceManager.GetString("DeferDirectiveType_Label_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Only type system objects are allowed as schema type..
+ ///
internal static string DependencyDescriptorBase_OnlyTsoIsAllowed {
get {
return ResourceManager.GetString("DependencyDescriptorBase_OnlyTsoIsAllowed", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Deprecations include a reason for why it is deprecated, which is formatted using Markdown syntax (as specified by CommonMark)..
+ ///
+ internal static string DeprecatedDirectiveType_ReasonDescription {
+ get {
+ return ResourceManager.GetString("DeprecatedDirectiveType_ReasonDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The @deprecated directive is used within the type system definition language to indicate deprecated portions of a GraphQL service’s schema,such as deprecated fields on a type or deprecated enum values..
+ ///
+ internal static string DeprecatedDirectiveType_TypeDescription {
+ get {
+ return ResourceManager.GetString("DeprecatedDirectiveType_TypeDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
+ ///
+ ///In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor..
+ ///
+ internal static string Directive_Description {
+ get {
+ return ResourceManager.GetString("Directive_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The argument name is invalid..
+ ///
+ internal static string Directive_GetArgument_ArgumentNameIsInvalid {
+ get {
+ return ResourceManager.GetString("Directive_GetArgument_ArgumentNameIsInvalid", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The directive '{0}' has no argument with the name '{1}'..
+ ///
+ internal static string Directive_GetArgumentValue_UnknownArgument {
+ get {
+ return ResourceManager.GetString("Directive_GetArgumentValue_UnknownArgument", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Use `locations`..
+ ///
+ internal static string Directive_UseLocation {
+ get {
+ return ResourceManager.GetString("Directive_UseLocation", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Directive arguments can have names and values. The values are in graphql SDL syntax printed as a string. This type is NOT specified by the graphql specification presently..
+ ///
+ internal static string DirectiveArgument_Description {
+ get {
+ return ResourceManager.GetString("DirectiveArgument_Description", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The specified directive `@{0}` is unique and cannot be added twice..
+ ///
internal static string DirectiveCollection_DirectiveIsUnique {
get {
return ResourceManager.GetString("DirectiveCollection_DirectiveIsUnique", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The specified directive `@{0}` is not allowed on the current location `{1}`..
+ ///
internal static string DirectiveCollection_LocationNotAllowed {
get {
return ResourceManager.GetString("DirectiveCollection_LocationNotAllowed", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an argument definition.
+ ///
internal static string DirectiveLocation_ArgumentDefinition {
get {
return ResourceManager.GetString("DirectiveLocation_ArgumentDefinition", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies..
+ ///
internal static string DirectiveLocation_Description {
get {
return ResourceManager.GetString("DirectiveLocation_Description", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an enum definition..
+ ///
internal static string DirectiveLocation_Enum {
get {
return ResourceManager.GetString("DirectiveLocation_Enum", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an enum value definition..
+ ///
internal static string DirectiveLocation_EnumValue {
get {
return ResourceManager.GetString("DirectiveLocation_EnumValue", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a field..
+ ///
internal static string DirectiveLocation_Field {
get {
return ResourceManager.GetString("DirectiveLocation_Field", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a field definition..
+ ///
internal static string DirectiveLocation_FieldDefinition {
get {
return ResourceManager.GetString("DirectiveLocation_FieldDefinition", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a fragment definition..
+ ///
internal static string DirectiveLocation_FragmentDefinition {
get {
return ResourceManager.GetString("DirectiveLocation_FragmentDefinition", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a fragment spread..
+ ///
internal static string DirectiveLocation_FragmentSpread {
get {
return ResourceManager.GetString("DirectiveLocation_FragmentSpread", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an inline fragment..
+ ///
internal static string DirectiveLocation_InlineFragment {
get {
return ResourceManager.GetString("DirectiveLocation_InlineFragment", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an input object field definition..
+ ///
internal static string DirectiveLocation_InputFieldDefinition {
get {
return ResourceManager.GetString("DirectiveLocation_InputFieldDefinition", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an input object type definition..
+ ///
internal static string DirectiveLocation_InputObject {
get {
return ResourceManager.GetString("DirectiveLocation_InputObject", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an interface definition..
+ ///
internal static string DirectiveLocation_Interface {
get {
return ResourceManager.GetString("DirectiveLocation_Interface", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a mutation operation..
+ ///
internal static string DirectiveLocation_Mutation {
get {
return ResourceManager.GetString("DirectiveLocation_Mutation", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to an object type definition..
+ ///
internal static string DirectiveLocation_Object {
get {
return ResourceManager.GetString("DirectiveLocation_Object", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a query operation..
+ ///
internal static string DirectiveLocation_Query {
get {
return ResourceManager.GetString("DirectiveLocation_Query", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a scalar definition..
+ ///
internal static string DirectiveLocation_Scalar {
get {
return ResourceManager.GetString("DirectiveLocation_Scalar", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a schema definition..
+ ///
internal static string DirectiveLocation_Schema {
get {
return ResourceManager.GetString("DirectiveLocation_Schema", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a subscription operation..
+ ///
internal static string DirectiveLocation_Subscription {
get {
return ResourceManager.GetString("DirectiveLocation_Subscription", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Location adjacent to a union definition..
+ ///
internal static string DirectiveLocation_Union {
get {
return ResourceManager.GetString("DirectiveLocation_Union", resourceCulture);
}
}
- internal static string DirectiveTypeDescriptor_OnlyProperties {
+ ///
+ /// Looks up a localized string similar to Location adjacent to a variable definition..
+ ///
+ internal static string DirectiveLocation_VariableDefinition {
get {
- return ResourceManager.GetString("DirectiveTypeDescriptor_OnlyProperties", resourceCulture);
+ return ResourceManager.GetString("DirectiveLocation_VariableDefinition", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The `{0}` directive does not declare any location on which it is valid..
+ ///
internal static string DirectiveType_NoLocations {
get {
return ResourceManager.GetString("DirectiveType_NoLocations", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Replace Middleware with `Use`..
+ ///
internal static string DirectiveType_ReplaceWithUse {
get {
return ResourceManager.GetString("DirectiveType_ReplaceWithUse", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to Unable to convert the argument value to the specified type..
+ ///
internal static string DirectiveType_UnableToConvert {
get {
return ResourceManager.GetString("DirectiveType_UnableToConvert", resourceCulture);
}
}
- internal static string Directive_Description {
+ ///
+ /// Looks up a localized string similar to Only property expressions are allowed to describe a directive type argument..
+ ///
+ internal static string DirectiveTypeDescriptor_OnlyProperties {
get {
- return ResourceManager.GetString("Directive_Description", resourceCulture);
+ return ResourceManager.GetString("DirectiveTypeDescriptor_OnlyProperties", resourceCulture);
}
}
- internal static string Directive_UseLocation {
+ ///
+ /// Looks up a localized string similar to A cursor for use in pagination..
+ ///
+ internal static string EdgeType_Cursor_Description {
get {
- return ResourceManager.GetString("Directive_UseLocation", resourceCulture);
+ return ResourceManager.GetString("EdgeType_Cursor_Description", resourceCulture);
}
}
- internal static string EnumTypeExtension_CannotMerge {
+ ///
+ /// Looks up a localized string similar to An edge in a connection..
+ ///
+ internal static string EdgeType_Description {
get {
- return ResourceManager.GetString("EnumTypeExtension_CannotMerge", resourceCulture);
+ return ResourceManager.GetString("EdgeType_Description", resourceCulture);
}
}
- internal static string EnumTypeExtension_ValueTypeInvalid {
+ ///
+ /// Looks up a localized string similar to Edge types that have a non-object node are not supported..
+ ///
+ internal static string EdgeType_IsInstanceOfType_NonObject {
get {
- return ResourceManager.GetString("EnumTypeExtension_ValueTypeInvalid", resourceCulture);
+ return ResourceManager.GetString("EdgeType_IsInstanceOfType_NonObject", resourceCulture);
}
}
- internal static string EnumType_NoValues {
+ ///
+ /// Looks up a localized string similar to The item at the end of the edge..
+ ///
+ internal static string EdgeType_Node_Description {
get {
- return ResourceManager.GetString("EnumType_NoValues", resourceCulture);
+ return ResourceManager.GetString("EdgeType_Node_Description", resourceCulture);
}
}
- internal static string EnumValue_Description {
+ ///
+ /// Looks up a localized string similar to The enum type `{0}` has no values..
+ ///
+ internal static string EnumType_NoValues {
get {
- return ResourceManager.GetString("EnumValue_Description", resourceCulture);
+ return ResourceManager.GetString("EnumType_NoValues", resourceCulture);
}
}
- internal static string EnumValue_ValueIsNull {
+ ///
+ /// Looks up a localized string similar to The enum type extension can only be merged with an enum type..
+ ///
+ internal static string EnumTypeExtension_CannotMerge {
get {
- return ResourceManager.GetString("EnumValue_ValueIsNull", resourceCulture);
+ return ResourceManager.GetString("EnumTypeExtension_CannotMerge", resourceCulture);
}
}
- internal static string FieldInitHelper_InvalidDefaultValue {
+ ///
+ /// Looks up a localized string similar to The enum value `{0}` of the enum type extension is not assignable with the target enum type..
+ ///
+ internal static string EnumTypeExtension_ValueTypeInvalid {
get {
- return ResourceManager.GetString("FieldInitHelper_InvalidDefaultValue", resourceCulture);
+ return ResourceManager.GetString("EnumTypeExtension_ValueTypeInvalid", resourceCulture);
}
}
- internal static string FieldInitHelper_NoFields {
+ ///
+ /// Looks up a localized string similar to One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string..
+ ///
+ internal static string EnumValue_Description {
get {
- return ResourceManager.GetString("FieldInitHelper_NoFields", resourceCulture);
+ return ResourceManager.GetString("EnumValue_Description", resourceCulture);
}
}
- internal static string Field_Description {
+ ///
+ /// Looks up a localized string similar to The inner value of enum value cannot be null or empty..
+ ///
+ internal static string EnumValue_ValueIsNull {
get {
- return ResourceManager.GetString("Field_Description", resourceCulture);
+ return ResourceManager.GetString("EnumValue_ValueIsNull", resourceCulture);
}
}
- internal static string FloatType_Description {
+ ///
+ /// Looks up a localized string similar to The field `{0}` must only declare additional arguments to an implemented field that are nullable..
+ ///
+ internal static string ErrorHelper_AdditionalArgumentNotNullable {
get {
- return ResourceManager.GetString("FloatType_Description", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_AdditionalArgumentNotNullable", resourceCulture);
}
}
- internal static string IdType_Description {
+ ///
+ /// Looks up a localized string similar to The argument `{0}` of the implemented field `{1}` must be defined. The field `{2}` must include an argument of the same name for every argument defined on the implemented field of the interface type `{3}`..
+ ///
+ internal static string ErrorHelper_ArgumentNotImplemented {
get {
- return ResourceManager.GetString("IdType_Description", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_ArgumentNotImplemented", resourceCulture);
}
}
- internal static string InputField_CannotSetValue {
+ ///
+ /// Looks up a localized string similar to Unable to resolve the interface type. For more details look at the error object..
+ ///
+ internal static string ErrorHelper_CompleteInterfacesHelper_UnableToResolveInterface {
get {
- return ResourceManager.GetString("InputField_CannotSetValue", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_CompleteInterfacesHelper_UnableToResolveInterface", resourceCulture);
}
}
- internal static string InputObjectTypeExtension_CannotMerge {
+ ///
+ /// Looks up a localized string similar to The argument `{0}` does not exist on the directive `{1}`..
+ ///
+ internal static string ErrorHelper_DirectiveCollection_ArgumentDoesNotExist {
get {
- return ResourceManager.GetString("InputObjectTypeExtension_CannotMerge", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_DirectiveCollection_ArgumentDoesNotExist", resourceCulture);
}
}
- internal static string InputObjectType_CannotParseLiteral {
+ ///
+ /// Looks up a localized string similar to The argument `{0}` of directive `{1}` mustn't be null..
+ ///
+ internal static string ErrorHelper_DirectiveCollection_ArgumentNonNullViolation {
get {
- return ResourceManager.GetString("InputObjectType_CannotParseLiteral", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_DirectiveCollection_ArgumentNonNullViolation", resourceCulture);
}
}
- internal static string InputObjectType_NoFields {
+ ///
+ /// Looks up a localized string similar to The directive arguments have invalid values: '{0}' at {1}..
+ ///
+ internal static string ErrorHelper_DirectiveCollection_ArgumentValueTypeIsWrong {
get {
- return ResourceManager.GetString("InputObjectType_NoFields", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_DirectiveCollection_ArgumentValueTypeIsWrong", resourceCulture);
}
}
- internal static string InputTypeNonNullCheck_ValueIsNull {
+ ///
+ /// Looks up a localized string similar to The field `{0}` declares the data middleware `{1}` more than once..
+ ///
+ internal static string ErrorHelper_DuplicateDataMiddlewareDetected_Message {
get {
- return ResourceManager.GetString("InputTypeNonNullCheck_ValueIsNull", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_DuplicateDataMiddlewareDetected_Message", resourceCulture);
}
}
- internal static string InputValue_DefaultValue {
+ ///
+ /// Looks up a localized string similar to The following {0}{1} `{2}` {3} declared multiple times on `{4}`..
+ ///
+ internal static string ErrorHelper_DuplicateFieldName_Message {
get {
- return ResourceManager.GetString("InputValue_DefaultValue", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_DuplicateFieldName_Message", resourceCulture);
}
}
- internal static string InputValue_Description {
+ ///
+ /// Looks up a localized string similar to The maximum number of nodes that can be fetched at once is {0}. This selection tried to fetch {1} nodes that exceeded the maximum allowed amount..
+ ///
+ internal static string ErrorHelper_FetchedToManyNodesAtOnce {
get {
- return ResourceManager.GetString("InputValue_Description", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_FetchedToManyNodesAtOnce", resourceCulture);
}
}
- internal static string InterfaceImplRule_ArgumentsDoNotMatch {
+ ///
+ /// Looks up a localized string similar to The field `{0}` must be implemented by {1} type `{2}`..
+ ///
+ internal static string ErrorHelper_FieldNotImplemented {
get {
- return ResourceManager.GetString("InterfaceImplRule_ArgumentsDoNotMatch", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_FieldNotImplemented", resourceCulture);
}
}
- internal static string InterfaceImplRule_ArgumentsNotImpl {
- get {
- return ResourceManager.GetString("InterfaceImplRule_ArgumentsNotImpl", resourceCulture);
- }
- }
-
- internal static string InterfaceImplRule_FieldNotImpl {
- get {
- return ResourceManager.GetString("InterfaceImplRule_FieldNotImpl", resourceCulture);
- }
- }
-
- internal static string InterfaceImplRule_FieldTypeInvalid {
- get {
- return ResourceManager.GetString("InterfaceImplRule_FieldTypeInvalid", resourceCulture);
- }
- }
-
- internal static string InterfaceImplRule_ReturnTypeInvalid {
- get {
- return ResourceManager.GetString("InterfaceImplRule_ReturnTypeInvalid", resourceCulture);
- }
- }
-
- internal static string InterfaceTypeExtension_CannotMerge {
- get {
- return ResourceManager.GetString("InterfaceTypeExtension_CannotMerge", resourceCulture);
- }
- }
-
- internal static string IntType_Description {
- get {
- return ResourceManager.GetString("IntType_Description", resourceCulture);
- }
- }
-
- internal static string LongType_Description {
- get {
- return ResourceManager.GetString("LongType_Description", resourceCulture);
- }
- }
-
- internal static string NameType_Description {
- get {
- return ResourceManager.GetString("NameType_Description", resourceCulture);
- }
- }
-
- internal static string Name_Cannot_BeEmpty {
- get {
- return ResourceManager.GetString("Name_Cannot_BeEmpty", resourceCulture);
- }
- }
-
- internal static string ObjectFieldDescriptorBase_FieldType {
- get {
- return ResourceManager.GetString("ObjectFieldDescriptorBase_FieldType", resourceCulture);
- }
- }
-
- internal static string ObjectTypeDescriptor_InterfaceBaseClass {
- get {
- return ResourceManager.GetString("ObjectTypeDescriptor_InterfaceBaseClass", resourceCulture);
- }
- }
-
- internal static string InterfaceTypeDescriptor_InterfaceBaseClass {
- get {
- return ResourceManager.GetString("InterfaceTypeDescriptor_InterfaceBaseClass", resourceCulture);
- }
- }
-
- internal static string ObjectTypeDescriptor_MustBePropertyOrMethod {
- get {
- return ResourceManager.GetString("ObjectTypeDescriptor_MustBePropertyOrMethod", resourceCulture);
- }
- }
-
- internal static string ObjectTypeDescriptor_ResolveWith_NonAbstract {
- get {
- return ResourceManager.GetString("ObjectTypeDescriptor_ResolveWith_NonAbstract", resourceCulture);
- }
- }
-
- internal static string NodeDescriptor_MustBeMethod {
- get {
- return ResourceManager.GetString("NodeDescriptor_MustBeMethod", resourceCulture);
- }
- }
-
- internal static string NodeDescriptor_IdMember {
+ ///
+ /// Looks up a localized string similar to Cannot reference Input Object `{0}` within itself through a series of non-null fields `{1}`..
+ ///
+ internal static string ErrorHelper_InputObjectMustNotHaveRecursiveNonNullableReferencesToSelf {
get {
- return ResourceManager.GetString("NodeDescriptor_IdMember", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_InputObjectMustNotHaveRecursiveNonNullableReferencesToSelf", resourceCulture);
}
}
- internal static string ObjectTypeDescriptor_Resolver_SchemaType {
+ ///
+ /// Looks up a localized string similar to There is no object type implementing interface `{0}`..
+ ///
+ internal static string ErrorHelper_InterfaceHasNoImplementation {
get {
- return ResourceManager.GetString("ObjectTypeDescriptor_Resolver_SchemaType", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_InterfaceHasNoImplementation", resourceCulture);
}
}
- internal static string Reflection_MemberMust_BeMethodOrProperty {
+ ///
+ /// Looks up a localized string similar to The named argument `{0}` on field `{1}` must accept the same type `{2}` (invariant) as that named argument on the interface `{3}`..
+ ///
+ internal static string ErrorHelper_InvalidArgumentType {
get {
- return ResourceManager.GetString("Reflection_MemberMust_BeMethodOrProperty", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_InvalidArgumentType", resourceCulture);
}
}
- internal static string ResolverCompiler_UnknownParameterType {
+ ///
+ /// Looks up a localized string similar to Field `{0}` must return a type which is equal to or a subtype of (covariant) the return type `{1}` of the interface field..
+ ///
+ internal static string ErrorHelper_InvalidFieldType {
get {
- return ResourceManager.GetString("ResolverCompiler_UnknownParameterType", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_InvalidFieldType", resourceCulture);
}
}
- internal static string ResolverTypeBindingBuilder_FieldBuilderNotSupported {
+ ///
+ /// Looks up a localized string similar to The middleware pipeline order for the field `{0}` is invalid. Middleware order is important especially with data pipelines. The correct order of a data pipeline is as follows: UseDbContext -> UsePaging -> UseProjection -> UseFiltering -> UseSorting. You may omit any of these middleware or have other middleware in between but you need to abide by the overall order. Your order is: {1}..
+ ///
+ internal static string ErrorHelper_MiddlewareOrderInvalid {
get {
- return ResourceManager.GetString("ResolverTypeBindingBuilder_FieldBuilderNotSupported", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_MiddlewareOrderInvalid", resourceCulture);
}
}
- internal static string ResolverTypeBindingBuilder_FieldNotComplete {
+ ///
+ /// Looks up a localized string similar to The {0} type `{1}` has to at least define one field in order to be valid..
+ ///
+ internal static string ErrorHelper_NeedsOneAtLeastField {
get {
- return ResourceManager.GetString("ResolverTypeBindingBuilder_FieldNotComplete", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_NeedsOneAtLeastField", resourceCulture);
}
}
- internal static string Scalar_Cannot_Deserialize {
+ ///
+ /// Looks up a localized string similar to The node resolver `{0}` must specify exactly one argument..
+ ///
+ internal static string ErrorHelper_NodeResolver_MustHaveExactlyOneIdArg {
get {
- return ResourceManager.GetString("Scalar_Cannot_Deserialize", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_NodeResolver_MustHaveExactlyOneIdArg", resourceCulture);
}
}
- internal static string Scalar_Cannot_ParseLiteral {
+ ///
+ /// Looks up a localized string similar to The node resolver `{0}` must return an object type..
+ ///
+ internal static string ErrorHelper_NodeResolver_MustReturnObject {
get {
- return ResourceManager.GetString("Scalar_Cannot_ParseLiteral", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_NodeResolver_MustReturnObject", resourceCulture);
}
}
- internal static string Scalar_Cannot_ParseValue {
+ ///
+ /// Looks up a localized string similar to The type `{0}` implementing the node interface must expose an id field..
+ ///
+ internal static string ErrorHelper_NodeResolver_NodeTypeHasNoId {
get {
- return ResourceManager.GetString("Scalar_Cannot_ParseValue", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_NodeResolver_NodeTypeHasNoId", resourceCulture);
}
}
- internal static string Scalar_Cannot_Serialize {
+ ///
+ /// Looks up a localized string similar to The type `{0}` implements the node interface but does not provide a node resolver for re-fetching..
+ ///
+ internal static string ErrorHelper_NodeResolverMissing {
get {
- return ResourceManager.GetString("Scalar_Cannot_Serialize", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_NodeResolverMissing", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_DirectiveTypeIsBaseType {
+ ///
+ /// Looks up a localized string similar to The type {0} is invalid because the runtime type is a {1}. It is not supported to have type system members as runtime types..
+ ///
+ internal static string ErrorHelper_NoSchemaTypesAllowedAsRuntimeType {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_DirectiveTypeIsBaseType", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_NoSchemaTypesAllowedAsRuntimeType", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_MustBeDirectiveType {
+ ///
+ /// Looks up a localized string similar to The {0} type must also declare all interfaces declared by implemented interfaces..
+ ///
+ internal static string ErrorHelper_NotTransitivelyImplemented {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_MustBeDirectiveType", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_NotTransitivelyImplemented", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_SchemaIsEmpty {
+ ///
+ /// Looks up a localized string similar to The field `{0}.{1}` has no resolver..
+ ///
+ internal static string ErrorHelper_ObjectField_HasNoResolver {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_SchemaIsEmpty", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_ObjectField_HasNoResolver", resourceCulture);
}
}
- internal static string SchemaBuilder_Binding_CannotBeHandled {
+ ///
+ /// Looks up a localized string similar to Unable to infer or resolve the type of field {0}.{1}. Try to explicitly provide the type like the following: `descriptor.Field("field").Type<List<StringType>>()`..
+ ///
+ internal static string ErrorHelper_ObjectType_UnableToInferOrResolveType {
get {
- return ResourceManager.GetString("SchemaBuilder_Binding_CannotBeHandled", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_ObjectType_UnableToInferOrResolveType", resourceCulture);
}
}
- internal static string SchemaBuilder_Binding_Invalid {
+ ///
+ /// Looks up a localized string similar to Oneof Input Object `{0}` must only have nullable fields without default values. Edit your type and make the field{1} `{2}` nullable and remove any defaults..
+ ///
+ internal static string ErrorHelper_OneofInputObjectMustHaveNullableFieldsWithoutDefaults {
get {
- return ResourceManager.GetString("SchemaBuilder_Binding_Invalid", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_OneofInputObjectMustHaveNullableFieldsWithoutDefaults", resourceCulture);
}
}
- internal static string SchemaBuilder_ISchemaNotTso {
+ ///
+ /// Looks up a localized string similar to There is no node resolver registered for type `{0}`..
+ ///
+ internal static string ErrorHelper_Relay_NoNodeResolver {
get {
- return ResourceManager.GetString("SchemaBuilder_ISchemaNotTso", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_Relay_NoNodeResolver", resourceCulture);
}
}
- internal static string SchemaBuilder_NoQueryType {
+ ///
+ /// Looks up a localized string similar to Required argument {0} cannot be deprecated..
+ ///
+ internal static string ErrorHelper_RequiredArgumentCannotBeDeprecated {
get {
- return ResourceManager.GetString("SchemaBuilder_NoQueryType", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_RequiredArgumentCannotBeDeprecated", resourceCulture);
}
}
- internal static string SchemaBuilder_RootType_MustBeClass {
+ ///
+ /// Looks up a localized string similar to Required input field {0} cannot be deprecated..
+ ///
+ internal static string ErrorHelper_RequiredFieldCannotBeDeprecated {
get {
- return ResourceManager.GetString("SchemaBuilder_RootType_MustBeClass", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_RequiredFieldCannotBeDeprecated", resourceCulture);
}
}
- internal static string SchemaBuilder_RootType_MustBeObjectType {
+ ///
+ /// Looks up a localized string similar to The @requiresOptIn directive must not appear on required (non-null without a default) arguments..
+ ///
+ internal static string ErrorHelper_RequiresOptInOnRequiredArgument {
get {
- return ResourceManager.GetString("SchemaBuilder_RootType_MustBeObjectType", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_RequiresOptInOnRequiredArgument", resourceCulture);
}
}
- internal static string SchemaBuilder_RootType_NonGenericType {
+ ///
+ /// Looks up a localized string similar to The @requiresOptIn directive must not appear on required (non-null without a default) input object field definitions..
+ ///
+ internal static string ErrorHelper_RequiresOptInOnRequiredInputField {
get {
- return ResourceManager.GetString("SchemaBuilder_RootType_NonGenericType", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_RequiresOptInOnRequiredInputField", resourceCulture);
}
}
- internal static string SchemaBuilder_SchemaTypeInvalid {
+ ///
+ /// Looks up a localized string similar to Field names starting with `__` are reserved for the GraphQL specification..
+ ///
+ internal static string ErrorHelper_TwoUnderscoresNotAllowedField {
get {
- return ResourceManager.GetString("SchemaBuilder_SchemaTypeInvalid", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_TwoUnderscoresNotAllowedField", resourceCulture);
}
}
- internal static string SchemaErrorBuilder_MessageIsNull {
+ ///
+ /// Looks up a localized string similar to Argument names starting with `__` are reserved for the GraphQL specification..
+ ///
+ internal static string ErrorHelper_TwoUnderscoresNotAllowedOnArgument {
get {
- return ResourceManager.GetString("SchemaErrorBuilder_MessageIsNull", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_TwoUnderscoresNotAllowedOnArgument", resourceCulture);
}
}
- internal static string SchemaField_Description {
+ ///
+ /// Looks up a localized string similar to Names starting with `__` are reserved for the GraphQL specification..
+ ///
+ internal static string ErrorHelper_TwoUnderscoresNotAllowedOnDirectiveName {
get {
- return ResourceManager.GetString("SchemaField_Description", resourceCulture);
+ return ResourceManager.GetString("ErrorHelper_TwoUnderscoresNotAllowedOnDirectiveName", resourceCulture);
}
}
- internal static string SchemaSyntaxVisitor_UnknownOperationType {
+ ///
+ /// Looks up a localized string similar to The event message parameter can only be used in a subscription context..
+ ///
+ internal static string EventMessageParameterExpressionBuilder_MessageNotFound {
get {
- return ResourceManager.GetString("SchemaSyntaxVisitor_UnknownOperationType", resourceCulture);
+ return ResourceManager.GetString("EventMessageParameterExpressionBuilder_MessageNotFound", resourceCulture);
}
}
- internal static string Schema_Description {
+ ///
+ /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ContextData`..
+ ///
+ internal static string ExpressionHelper_GetGlobalStateWithDefault_NoDefaults {
get {
- return ResourceManager.GetString("Schema_Description", resourceCulture);
+ return ResourceManager.GetString("ExpressionHelper_GetGlobalStateWithDefault_NoDefaults", resourceCulture);
}
}
- internal static string Schema_Directives {
+ ///
+ /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ScopedContextData`..
+ ///
+ internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue {
get {
- return ResourceManager.GetString("Schema_Directives", resourceCulture);
+ return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture);
}
}
- internal static string Schema_MutationType {
+ ///
+ /// Looks up a localized string similar to The specified context key does not exist..
+ ///
+ internal static string ExpressionHelper_ResolveScopedContextData_KeyDoesNotExist {
get {
- return ResourceManager.GetString("Schema_MutationType", resourceCulture);
+ return ResourceManager.GetString("ExpressionHelper_ResolveScopedContextData_KeyDoesNotExist", resourceCulture);
}
}
- internal static string Schema_QueryType {
+ ///
+ /// Looks up a localized string similar to The non-generic IExecutable interface cannot be used as a type in the schema..
+ ///
+ internal static string ExtendedTypeReferenceHandler_NonGenericExecutableNotAllowed {
get {
- return ResourceManager.GetString("Schema_QueryType", resourceCulture);
+ return ResourceManager.GetString("ExtendedTypeReferenceHandler_NonGenericExecutableNotAllowed", resourceCulture);
}
}
- internal static string Schema_SubscriptionType {
+ ///
+ /// Looks up a localized string similar to Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type..
+ ///
+ internal static string Field_Description {
get {
- return ResourceManager.GetString("Schema_SubscriptionType", resourceCulture);
+ return ResourceManager.GetString("Field_Description", resourceCulture);
}
}
- internal static string Schema_Types {
+ ///
+ /// Looks up a localized string similar to The max expected field count cannot be smaller than 1..
+ ///
+ internal static string FieldInitHelper_CompleteFields_MaxFieldCountToSmall {
get {
- return ResourceManager.GetString("Schema_Types", resourceCulture);
+ return ResourceManager.GetString("FieldInitHelper_CompleteFields_MaxFieldCountToSmall", resourceCulture);
}
}
- internal static string ShortType_Description {
+ ///
+ /// Looks up a localized string similar to Could not parse the native value of input field `{0}`..
+ ///
+ internal static string FieldInitHelper_InvalidDefaultValue {
get {
- return ResourceManager.GetString("ShortType_Description", resourceCulture);
+ return ResourceManager.GetString("FieldInitHelper_InvalidDefaultValue", resourceCulture);
}
}
- internal static string StringType_Description {
+ ///
+ /// Looks up a localized string similar to {0} `{1}` has no fields declared..
+ ///
+ internal static string FieldInitHelper_NoFields {
get {
- return ResourceManager.GetString("StringType_Description", resourceCulture);
+ return ResourceManager.GetString("FieldInitHelper_NoFields", resourceCulture);
}
}
- internal static string String_Argument_NullOrEmpty {
+ ///
+ /// Looks up a localized string similar to The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point)..
+ ///
+ internal static string FloatType_Description {
get {
- return ResourceManager.GetString("String_Argument_NullOrEmpty", resourceCulture);
+ return ResourceManager.GetString("FloatType_Description", resourceCulture);
}
}
- internal static string TypeConfiguration_ConfigureIsNull {
+ ///
+ /// Looks up a localized string similar to Unable to decode the id string..
+ ///
+ internal static string IdSerializer_UnableToDecode {
get {
- return ResourceManager.GetString("TypeConfiguration_ConfigureIsNull", resourceCulture);
+ return ResourceManager.GetString("IdSerializer_UnableToDecode", resourceCulture);
}
}
- internal static string TypeConfiguration_DefinitionIsNull {
+ ///
+ /// Looks up a localized string similar to Unable to encode data..
+ ///
+ internal static string IdSerializer_UnableToEncode {
get {
- return ResourceManager.GetString("TypeConfiguration_DefinitionIsNull", resourceCulture);
+ return ResourceManager.GetString("IdSerializer_UnableToEncode", resourceCulture);
}
}
- internal static string TypeDependency_MustBeSchemaType {
+ ///
+ /// Looks up a localized string similar to The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID..
+ ///
+ internal static string IdType_Description {
get {
- return ResourceManager.GetString("TypeDependency_MustBeSchemaType", resourceCulture);
+ return ResourceManager.GetString("IdType_Description", resourceCulture);
}
}
- internal static string TypeExtensions_InvalidStructure {
+ ///
+ /// Looks up a localized string similar to Included when true..
+ ///
+ internal static string IncludeDirectiveType_IfDescription {
get {
- return ResourceManager.GetString("TypeExtensions_InvalidStructure", resourceCulture);
+ return ResourceManager.GetString("IncludeDirectiveType_IfDescription", resourceCulture);
}
}
- internal static string TypeExtensions_KindIsNotSupported {
+ ///
+ /// Looks up a localized string similar to Directs the executor to include this field or fragment only when the `if` argument is true..
+ ///
+ internal static string IncludeDirectiveType_TypeDescription {
get {
- return ResourceManager.GetString("TypeExtensions_KindIsNotSupported", resourceCulture);
+ return ResourceManager.GetString("IncludeDirectiveType_TypeDescription", resourceCulture);
}
}
- internal static string TypeExtensions_NoListType {
+ ///
+ /// Looks up a localized string similar to Unable to set the input field value..
+ ///
+ internal static string InputField_CannotSetValue {
get {
- return ResourceManager.GetString("TypeExtensions_NoListType", resourceCulture);
+ return ResourceManager.GetString("InputField_CannotSetValue", resourceCulture);
}
}
- internal static string TypeExtensions_TypeIsNotOfT {
+ ///
+ /// Looks up a localized string similar to The input object type can only parse object value literals..
+ ///
+ internal static string InputObjectType_CannotParseLiteral {
get {
- return ResourceManager.GetString("TypeExtensions_TypeIsNotOfT", resourceCulture);
+ return ResourceManager.GetString("InputObjectType_CannotParseLiteral", resourceCulture);
}
}
- internal static string TypeField_Description {
+ ///
+ /// Looks up a localized string similar to The input object `{0}` does not have any fields..
+ ///
+ internal static string InputObjectType_NoFields {
get {
- return ResourceManager.GetString("TypeField_Description", resourceCulture);
+ return ResourceManager.GetString("InputObjectType_NoFields", resourceCulture);
}
}
- internal static string TypeInitializer_CannotResolveDependency {
+ ///
+ /// Looks up a localized string similar to Only properties are allowed for input types..
+ ///
+ internal static string InputObjectTypeDescriptor_OnlyProperties {
get {
- return ResourceManager.GetString("TypeInitializer_CannotResolveDependency", resourceCulture);
+ return ResourceManager.GetString("InputObjectTypeDescriptor_OnlyProperties", resourceCulture);
}
}
- internal static string TypeInitializer_CompleteName_Duplicate {
+ ///
+ /// Looks up a localized string similar to The input object type extension can only be merged with an input object type..
+ ///
+ internal static string InputObjectTypeExtension_CannotMerge {
get {
- return ResourceManager.GetString("TypeInitializer_CompleteName_Duplicate", resourceCulture);
+ return ResourceManager.GetString("InputObjectTypeExtension_CannotMerge", resourceCulture);
}
}
- internal static string TypeInitializer_Merge_KindDoesNotMatch {
+ ///
+ /// Looks up a localized string similar to The input value of type `{0}` must not be null..
+ ///
+ internal static string InputTypeNonNullCheck_ValueIsNull {
get {
- return ResourceManager.GetString("TypeInitializer_Merge_KindDoesNotMatch", resourceCulture);
+ return ResourceManager.GetString("InputTypeNonNullCheck_ValueIsNull", resourceCulture);
}
}
- internal static string TypeKind_Description {
+ ///
+ /// Looks up a localized string similar to A GraphQL-formatted string representing the default value for this input value..
+ ///
+ internal static string InputValue_DefaultValue {
get {
- return ResourceManager.GetString("TypeKind_Description", resourceCulture);
+ return ResourceManager.GetString("InputValue_DefaultValue", resourceCulture);
}
}
- internal static string TypeKind_Enum {
+ ///
+ /// Looks up a localized string similar to Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value..
+ ///
+ internal static string InputValue_Description {
get {
- return ResourceManager.GetString("TypeKind_Enum", resourceCulture);
+ return ResourceManager.GetString("InputValue_Description", resourceCulture);
}
}
- internal static string TypeKind_InputObject {
+ ///
+ /// Looks up a localized string similar to The arguments of the interface field {0} from interface {1} and {2} do not match and are implemented by object type {3}..
+ ///
+ internal static string InterfaceImplRule_ArgumentsDoNotMatch {
get {
- return ResourceManager.GetString("TypeKind_InputObject", resourceCulture);
+ return ResourceManager.GetString("InterfaceImplRule_ArgumentsDoNotMatch", resourceCulture);
}
}
- internal static string TypeKind_Interface {
+ ///
+ /// Looks up a localized string similar to Object type {0} does not implement all arguments of field {1} from interface {2}..
+ ///
+ internal static string InterfaceImplRule_ArgumentsNotImpl {
get {
- return ResourceManager.GetString("TypeKind_Interface", resourceCulture);
+ return ResourceManager.GetString("InterfaceImplRule_ArgumentsNotImpl", resourceCulture);
}
}
- internal static string TypeKind_List {
+ ///
+ /// Looks up a localized string similar to Object type {0} does not implement the field {1} from interface {2}..
+ ///
+ internal static string InterfaceImplRule_FieldNotImpl {
get {
- return ResourceManager.GetString("TypeKind_List", resourceCulture);
+ return ResourceManager.GetString("InterfaceImplRule_FieldNotImpl", resourceCulture);
}
}
- internal static string TypeKind_NonNull {
+ ///
+ /// Looks up a localized string similar to The return type of the interface field {0} from interface {1} and {2} do not match and are implemented by object type {3}..
+ ///
+ internal static string InterfaceImplRule_FieldTypeInvalid {
get {
- return ResourceManager.GetString("TypeKind_NonNull", resourceCulture);
+ return ResourceManager.GetString("InterfaceImplRule_FieldTypeInvalid", resourceCulture);
}
}
- internal static string TypeKind_Object {
+ ///
+ /// Looks up a localized string similar to The return type of the interface field {0} does not match the field declared by object type {1}..
+ ///
+ internal static string InterfaceImplRule_ReturnTypeInvalid {
get {
- return ResourceManager.GetString("TypeKind_Object", resourceCulture);
+ return ResourceManager.GetString("InterfaceImplRule_ReturnTypeInvalid", resourceCulture);
}
}
- internal static string TypeKind_Scalar {
+ ///
+ /// Looks up a localized string similar to The interface base class cannot be used as interface implementation declaration..
+ ///
+ internal static string InterfaceTypeDescriptor_InterfaceBaseClass {
get {
- return ResourceManager.GetString("TypeKind_Scalar", resourceCulture);
+ return ResourceManager.GetString("InterfaceTypeDescriptor_InterfaceBaseClass", resourceCulture);
}
}
- internal static string TypeKind_Union {
+ ///
+ /// Looks up a localized string similar to A field of an interface can only be inferred from a property or a method..
+ ///
+ internal static string InterfaceTypeDescriptor_MustBePropertyOrMethod {
get {
- return ResourceManager.GetString("TypeKind_Union", resourceCulture);
+ return ResourceManager.GetString("InterfaceTypeDescriptor_MustBePropertyOrMethod", resourceCulture);
}
}
- internal static string TypeNameField_Description {
+ ///
+ /// Looks up a localized string similar to The interface type extension can only be merged with an interface type..
+ ///
+ internal static string InterfaceTypeExtension_CannotMerge {
get {
- return ResourceManager.GetString("TypeNameField_Description", resourceCulture);
+ return ResourceManager.GetString("InterfaceTypeExtension_CannotMerge", resourceCulture);
}
}
- internal static string TypeNameHelper_InvalidTypeStructure {
+ ///
+ /// Looks up a localized string similar to The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1..
+ ///
+ internal static string IntType_Description {
get {
- return ResourceManager.GetString("TypeNameHelper_InvalidTypeStructure", resourceCulture);
+ return ResourceManager.GetString("IntType_Description", resourceCulture);
}
}
- internal static string TypeNameHelper_OnlyTypeSystemObjectsAreAllowed {
+ ///
+ /// Looks up a localized string similar to The `LocalDateTime` scalar type is a local date/time string (i.e., with no associated timezone) with the format `YYYY-MM-DDThh:mm:ss`..
+ ///
+ internal static string LocalDateTimeType_Description {
get {
- return ResourceManager.GetString("TypeNameHelper_OnlyTypeSystemObjectsAreAllowed", resourceCulture);
+ return ResourceManager.GetString("LocalDateTimeType_Description", resourceCulture);
}
}
- internal static string TypeResourceHelper_TypeNameEmptyOrNull {
+ ///
+ /// Looks up a localized string similar to The `LocalDate` scalar type represents a ISO date string, represented as UTF-8 character sequences YYYY-MM-DD. The scalar follows the specification defined in RFC3339.
+ ///
+ internal static string LocalDateType_Description {
get {
- return ResourceManager.GetString("TypeResourceHelper_TypeNameEmptyOrNull", resourceCulture);
+ return ResourceManager.GetString("LocalDateType_Description", resourceCulture);
}
}
- internal static string Type_Description {
+ ///
+ /// Looks up a localized string similar to The LocalTime scalar type is a local time string (i.e., with no associated timezone) in 24-hr HH:mm:ss..
+ ///
+ internal static string LocalTimeType_Description {
get {
- return ResourceManager.GetString("Type_Description", resourceCulture);
+ return ResourceManager.GetString("LocalTimeType_Description", resourceCulture);
}
}
- internal static string UnionTypeExtension_CannotMerge {
+ ///
+ /// Looks up a localized string similar to The `Long` scalar type represents non-fractional signed whole 64-bit numeric values. Long can represent values between -(2^63) and 2^63 - 1..
+ ///
+ internal static string LongType_Description {
get {
- return ResourceManager.GetString("UnionTypeExtension_CannotMerge", resourceCulture);
+ return ResourceManager.GetString("LongType_Description", resourceCulture);
}
}
- internal static string VariableValueBuilder_InputType {
+ ///
+ /// Looks up a localized string similar to The multiplier path scalar represents a valid GraphQL multiplier path string..
+ ///
+ internal static string Name_Cannot_BeEmpty {
get {
- return ResourceManager.GetString("VariableValueBuilder_InputType", resourceCulture);
+ return ResourceManager.GetString("Name_Cannot_BeEmpty", resourceCulture);
}
}
- internal static string VariableValueBuilder_InvalidValue {
+ ///
+ /// Looks up a localized string similar to The name scalar represents a valid GraphQL name as specified in the spec and can be used to refer to fields or types..
+ ///
+ internal static string NameType_Description {
get {
- return ResourceManager.GetString("VariableValueBuilder_InvalidValue", resourceCulture);
+ return ResourceManager.GetString("NameType_Description", resourceCulture);
}
}
- internal static string VariableValueBuilder_NodeKind {
+ ///
+ /// Looks up a localized string similar to The ID field must be a property or a method..
+ ///
+ internal static string NodeDescriptor_IdField_MustBePropertyOrMethod {
get {
- return ResourceManager.GetString("VariableValueBuilder_NodeKind", resourceCulture);
+ return ResourceManager.GetString("NodeDescriptor_IdField_MustBePropertyOrMethod", resourceCulture);
}
}
- internal static string VariableValueBuilder_NonNull {
+ ///
+ /// Looks up a localized string similar to An ID-member must be a property-expression or a method-call-expression..
+ ///
+ internal static string NodeDescriptor_IdMember {
get {
- return ResourceManager.GetString("VariableValueBuilder_NonNull", resourceCulture);
+ return ResourceManager.GetString("NodeDescriptor_IdMember", resourceCulture);
}
}
- internal static string VariableValueBuilder_NonNull_In_Graph {
+ ///
+ /// Looks up a localized string similar to A node-resolver-expression must be a method-call-expression..
+ ///
+ internal static string NodeDescriptor_MustBeMethod {
get {
- return ResourceManager.GetString("VariableValueBuilder_NonNull_In_Graph", resourceCulture);
+ return ResourceManager.GetString("NodeDescriptor_MustBeMethod", resourceCulture);
}
}
- internal static string VariableValueBuilder_VarNameEmpty {
+ ///
+ /// Looks up a localized string similar to The node interface is implemented by entities that have a global unique identifier..
+ ///
+ internal static string NodeType_TypeDescription {
get {
- return ResourceManager.GetString("VariableValueBuilder_VarNameEmpty", resourceCulture);
+ return ResourceManager.GetString("NodeType_TypeDescription", resourceCulture);
}
}
- internal static string Argument_TypeIsNull {
+ ///
+ /// Looks up a localized string similar to The specified type is not an input type..
+ ///
+ internal static string NonNamedType_IsInstanceOfType_NotAnInputType {
get {
- return ResourceManager.GetString("Argument_TypeIsNull", resourceCulture);
+ return ResourceManager.GetString("NonNamedType_IsInstanceOfType_NotAnInputType", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The specified type is not an input type..
+ ///
internal static string NonNullType_NotAnInputType {
get {
return ResourceManager.GetString("NonNullType_NotAnInputType", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The inner type of non-null type must be a nullable type..
+ ///
internal static string NonNullType_TypeIsNunNullType {
get {
return ResourceManager.GetString("NonNullType_TypeIsNunNullType", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to A non null type cannot parse null value literals..
+ ///
internal static string NonNullType_ValueIsNull {
get {
return ResourceManager.GetString("NonNullType_ValueIsNull", resourceCulture);
}
}
- internal static string ObjectTypeExtension_CannotMerge {
- get {
- return ResourceManager.GetString("ObjectTypeExtension_CannotMerge", resourceCulture);
- }
- }
-
- internal static string TypeSystemObjectBase_DefinitionIsNull {
+ ///
+ /// Looks up a localized string similar to The field-type must be an output-type..
+ ///
+ internal static string ObjectFieldDescriptorBase_FieldType {
get {
- return ResourceManager.GetString("TypeSystemObjectBase_DefinitionIsNull", resourceCulture);
+ return ResourceManager.GetString("ObjectFieldDescriptorBase_FieldType", resourceCulture);
}
}
- internal static string TypeSystemObjectBase_NameIsNull {
+ ///
+ /// Looks up a localized string similar to Cycle in object graph detected..
+ ///
+ internal static string ObjectToDictionaryConverter_CycleInObjectGraph {
get {
- return ResourceManager.GetString("TypeSystemObjectBase_NameIsNull", resourceCulture);
+ return ResourceManager.GetString("ObjectToDictionaryConverter_CycleInObjectGraph", resourceCulture);
}
}
- internal static string TypeSystemObject_DescriptionImmutable {
+ ///
+ /// Looks up a localized string similar to The interface base class cannot be used as interface implementation declaration..
+ ///
+ internal static string ObjectTypeDescriptor_InterfaceBaseClass {
get {
- return ResourceManager.GetString("TypeSystemObject_DescriptionImmutable", resourceCulture);
+ return ResourceManager.GetString("ObjectTypeDescriptor_InterfaceBaseClass", resourceCulture);
}
}
- internal static string TypeSystemObject_NameImmutable {
+ ///
+ /// Looks up a localized string similar to A field-expression must be a property-expression or a method-call-expression..
+ ///
+ internal static string ObjectTypeDescriptor_MustBePropertyOrMethod {
get {
- return ResourceManager.GetString("TypeSystemObject_NameImmutable", resourceCulture);
+ return ResourceManager.GetString("ObjectTypeDescriptor_MustBePropertyOrMethod", resourceCulture);
}
}
- internal static string UnionType_MustHaveTypes {
+ ///
+ /// Looks up a localized string similar to Schema types cannot be used as resolver types..
+ ///
+ internal static string ObjectTypeDescriptor_Resolver_SchemaType {
get {
- return ResourceManager.GetString("UnionType_MustHaveTypes", resourceCulture);
+ return ResourceManager.GetString("ObjectTypeDescriptor_Resolver_SchemaType", resourceCulture);
}
}
- internal static string UnionType_UnableToResolveType {
+ ///
+ /// Looks up a localized string similar to The resolver type {0} cannot be used, a non-abstract type is required..
+ ///
+ internal static string ObjectTypeDescriptor_ResolveWith_NonAbstract {
get {
- return ResourceManager.GetString("UnionType_UnableToResolveType", resourceCulture);
+ return ResourceManager.GetString("ObjectTypeDescriptor_ResolveWith_NonAbstract", resourceCulture);
}
}
- internal static string SchemaBuilder_MustBeSchemaType {
+ ///
+ /// Looks up a localized string similar to The object type extension can only be merged with an object type..
+ ///
+ internal static string ObjectTypeExtension_CannotMerge {
get {
- return ResourceManager.GetString("SchemaBuilder_MustBeSchemaType", resourceCulture);
+ return ResourceManager.GetString("ObjectTypeExtension_CannotMerge", resourceCulture);
}
}
- internal static string TypeRegistrar_TypesInconsistent {
+ ///
+ /// Looks up a localized string similar to The `@oneOf` directive is used within the type system definition language
+ /// to indicate:
+ ///
+ /// - an Input Object is a Oneof Input Object, or
+ /// - an Object Type's Field is a Oneof Field..
+ ///
+ internal static string OneOfDirectiveType_Description {
get {
- return ResourceManager.GetString("TypeRegistrar_TypesInconsistent", resourceCulture);
+ return ResourceManager.GetString("OneOfDirectiveType_Description", resourceCulture);
}
}
- internal static string TypeConversion_ConvertNotSupported {
+ ///
+ /// Looks up a localized string similar to An OptInFeatureStability object describes the stability level of an opt-in feature..
+ ///
+ internal static string OptInFeatureStability_Description {
get {
- return ResourceManager.GetString("TypeConversion_ConvertNotSupported", resourceCulture);
+ return ResourceManager.GetString("OptInFeatureStability_Description", resourceCulture);
}
}
- internal static string SchemaBuilder_Interceptor_NotSupported {
+ ///
+ /// Looks up a localized string similar to The feature name must follow the GraphQL type name rules..
+ ///
+ internal static string OptInFeatureStabilityDirective_FeatureName_NotValid {
get {
- return ResourceManager.GetString("SchemaBuilder_Interceptor_NotSupported", resourceCulture);
+ return ResourceManager.GetString("OptInFeatureStabilityDirective_FeatureName_NotValid", resourceCulture);
}
}
- internal static string IdSerializer_UnableToEncode {
+ ///
+ /// Looks up a localized string similar to The stability must follow the GraphQL type name rules..
+ ///
+ internal static string OptInFeatureStabilityDirective_Stability_NotValid {
get {
- return ResourceManager.GetString("IdSerializer_UnableToEncode", resourceCulture);
+ return ResourceManager.GetString("OptInFeatureStabilityDirective_Stability_NotValid", resourceCulture);
}
}
- internal static string IdSerializer_UnableToDecode {
+ ///
+ /// Looks up a localized string similar to The name of the feature for which to set the stability..
+ ///
+ internal static string OptInFeatureStabilityDirectiveType_FeatureDescription {
get {
- return ResourceManager.GetString("IdSerializer_UnableToDecode", resourceCulture);
+ return ResourceManager.GetString("OptInFeatureStabilityDirectiveType_FeatureDescription", resourceCulture);
}
}
- internal static string SchemaBuilder_Convention_NotSupported {
+ ///
+ /// Looks up a localized string similar to The stability level of the feature..
+ ///
+ internal static string OptInFeatureStabilityDirectiveType_StabilityDescription {
get {
- return ResourceManager.GetString("SchemaBuilder_Convention_NotSupported", resourceCulture);
+ return ResourceManager.GetString("OptInFeatureStabilityDirectiveType_StabilityDescription", resourceCulture);
}
}
- internal static string TimeSpanType_Description {
+ ///
+ /// Looks up a localized string similar to Sets the stability level of an opt-in feature..
+ ///
+ internal static string OptInFeatureStabilityDirectiveType_TypeDescription {
get {
- return ResourceManager.GetString("TimeSpanType_Description", resourceCulture);
+ return ResourceManager.GetString("OptInFeatureStabilityDirectiveType_TypeDescription", resourceCulture);
}
}
- internal static string DefaultDataLoaderRegistry_GetOrRegister {
+ ///
+ /// Looks up a localized string similar to The member expression must specify a property or method that is public and that belongs to the type {0}.
+ ///
+ internal static string Reflection_MemberMust_BeMethodOrProperty {
get {
- return ResourceManager.GetString("DefaultDataLoaderRegistry_GetOrRegister", resourceCulture);
+ return ResourceManager.GetString("Reflection_MemberMust_BeMethodOrProperty", resourceCulture);
}
}
- internal static string DataLoaderResolverContextExtensions_CreateDataLoader_AbstractType {
+ ///
+ /// Looks up a localized string similar to Member is not a method!.
+ ///
+ internal static string ReflectionUtils_ExtractMethod_MethodExpected {
get {
- return ResourceManager.GetString("DataLoaderResolverContextExtensions_CreateDataLoader_AbstractType", resourceCulture);
+ return ResourceManager.GetString("ReflectionUtils_ExtractMethod_MethodExpected", resourceCulture);
}
}
- internal static string DataLoaderResolverContextExtensions_CreateDataLoader_UnableToCreate {
+ ///
+ /// Looks up a localized string similar to The object is not yet ready for this action..
+ ///
+ internal static string RegisteredType_Completion_NotYetReady {
get {
- return ResourceManager.GetString("DataLoaderResolverContextExtensions_CreateDataLoader_UnableToCreate", resourceCulture);
+ return ResourceManager.GetString("RegisteredType_Completion_NotYetReady", resourceCulture);
}
}
- internal static string NonNamedType_IsInstanceOfType_NotAnInputType {
+ ///
+ /// Looks up a localized string similar to The completion context can only be set once..
+ ///
+ internal static string RegisteredType_CompletionContext_Already_Set {
get {
- return ResourceManager.GetString("NonNamedType_IsInstanceOfType_NotAnInputType", resourceCulture);
+ return ResourceManager.GetString("RegisteredType_CompletionContext_Already_Set", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The completion context has not been initialized..
+ ///
internal static string RegisteredType_CompletionContext_Not_Initialized {
get {
return ResourceManager.GetString("RegisteredType_CompletionContext_Not_Initialized", resourceCulture);
}
}
- internal static string RegisteredType_CompletionContext_Already_Set {
+ ///
+ /// Looks up a localized string similar to Fetches an object given its ID..
+ ///
+ internal static string Relay_NodeField_Description {
get {
- return ResourceManager.GetString("RegisteredType_CompletionContext_Already_Set", resourceCulture);
+ return ResourceManager.GetString("Relay_NodeField_Description", resourceCulture);
}
}
- internal static string DeferDirectiveType_Description {
+ ///
+ /// Looks up a localized string similar to ID of the object..
+ ///
+ internal static string Relay_NodeField_Id_Description {
get {
- return ResourceManager.GetString("DeferDirectiveType_Description", resourceCulture);
+ return ResourceManager.GetString("Relay_NodeField_Id_Description", resourceCulture);
}
}
- internal static string DeferDirectiveType_Label_Description {
+ ///
+ /// Looks up a localized string similar to Lookup nodes by a list of IDs..
+ ///
+ internal static string Relay_NodesField_Description {
get {
- return ResourceManager.GetString("DeferDirectiveType_Label_Description", resourceCulture);
+ return ResourceManager.GetString("Relay_NodesField_Description", resourceCulture);
}
}
- internal static string DeferDirectiveType_If_Description {
+ ///
+ /// Looks up a localized string similar to The list of node IDs..
+ ///
+ internal static string Relay_NodesField_Ids_Description {
get {
- return ResourceManager.GetString("DeferDirectiveType_If_Description", resourceCulture);
+ return ResourceManager.GetString("Relay_NodesField_Ids_Description", resourceCulture);
}
}
- internal static string StreamDirectiveType_Description {
+ ///
+ /// Looks up a localized string similar to RequiresOptIn is not supported on the specified descriptor..
+ ///
+ internal static string RequiresOptInDirective_Descriptor_NotSupported {
get {
- return ResourceManager.GetString("StreamDirectiveType_Description", resourceCulture);
+ return ResourceManager.GetString("RequiresOptInDirective_Descriptor_NotSupported", resourceCulture);
}
}
- internal static string StreamDirectiveType_Label_Description {
+ ///
+ /// Looks up a localized string similar to The feature name must follow the GraphQL type name rules..
+ ///
+ internal static string RequiresOptInDirective_FeatureName_NotValid {
get {
- return ResourceManager.GetString("StreamDirectiveType_Label_Description", resourceCulture);
+ return ResourceManager.GetString("RequiresOptInDirective_FeatureName_NotValid", resourceCulture);
}
}
- internal static string StreamDirectiveType_InitialCount_Description {
+ ///
+ /// Looks up a localized string similar to The name of the feature that requires opt in..
+ ///
+ internal static string RequiresOptInDirectiveType_FeatureDescription {
get {
- return ResourceManager.GetString("StreamDirectiveType_InitialCount_Description", resourceCulture);
+ return ResourceManager.GetString("RequiresOptInDirectiveType_FeatureDescription", resourceCulture);
}
}
- internal static string StreamDirectiveType_If_Description {
+ ///
+ /// Looks up a localized string similar to Indicates that the given field, argument, input field, or enum value requires giving explicit consent before being used..
+ ///
+ internal static string RequiresOptInDirectiveType_TypeDescription {
get {
- return ResourceManager.GetString("StreamDirectiveType_If_Description", resourceCulture);
+ return ResourceManager.GetString("RequiresOptInDirectiveType_TypeDescription", resourceCulture);
}
}
- internal static string SchemaBuilder_AddRootType_TypeAlreadyRegistered {
+ ///
+ /// Looks up a localized string similar to A directive type mustn't be one of the base classes `DirectiveType` or `DirectiveType<T>` but must be a type inheriting from `DirectiveType` or `DirectiveType<T>`..
+ ///
+ internal static string ResolverCompiler_UnknownParameterType {
get {
- return ResourceManager.GetString("SchemaBuilder_AddRootType_TypeAlreadyRegistered", resourceCulture);
+ return ResourceManager.GetString("ResolverCompiler_UnknownParameterType", resourceCulture);
}
}
- internal static string NodeDescriptor_IdField_MustBePropertyOrMethod {
+ ///
+ /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ContextData`.
+ ///
+ internal static string ResolverContextExtensions_ContextData_KeyNotFound {
get {
- return ResourceManager.GetString("NodeDescriptor_IdField_MustBePropertyOrMethod", resourceCulture);
+ return ResourceManager.GetString("ResolverContextExtensions_ContextData_KeyNotFound", resourceCulture);
}
}
- internal static string DeprecatedDirectiveType_TypeDescription {
+ ///
+ /// Looks up a localized string similar to The field name mustn't be null, empty or consist only of white spaces..
+ ///
+ internal static string ResolverContextExtensions_IsSelected_FieldNameEmpty {
get {
- return ResourceManager.GetString("DeprecatedDirectiveType_TypeDescription", resourceCulture);
+ return ResourceManager.GetString("ResolverContextExtensions_IsSelected_FieldNameEmpty", resourceCulture);
}
}
- internal static string DeprecatedDirectiveType_ReasonDescription {
+ ///
+ /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.LocalContextData`.
+ ///
+ internal static string ResolverContextExtensions_LocalContextData_KeyNotFound {
get {
- return ResourceManager.GetString("DeprecatedDirectiveType_ReasonDescription", resourceCulture);
+ return ResourceManager.GetString("ResolverContextExtensions_LocalContextData_KeyNotFound", resourceCulture);
}
}
- internal static string IncludeDirectiveType_TypeDescription {
+ ///
+ /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ScopedContextData`.
+ ///
+ internal static string ResolverContextExtensions_ScopedContextData_KeyNotFound {
get {
- return ResourceManager.GetString("IncludeDirectiveType_TypeDescription", resourceCulture);
+ return ResourceManager.GetString("ResolverContextExtensions_ScopedContextData_KeyNotFound", resourceCulture);
}
}
- internal static string IncludeDirectiveType_IfDescription {
+ ///
+ /// Looks up a localized string similar to The specified IResolverFieldBindingBuilder-implementation is not supported..
+ ///
+ internal static string ResolverTypeBindingBuilder_FieldBuilderNotSupported {
get {
- return ResourceManager.GetString("IncludeDirectiveType_IfDescription", resourceCulture);
+ return ResourceManager.GetString("ResolverTypeBindingBuilder_FieldBuilderNotSupported", resourceCulture);
}
}
- internal static string SkipDirectiveType_TypeDescription {
+ ///
+ /// Looks up a localized string similar to The field binding builder is not completed and cannot be added..
+ ///
+ internal static string ResolverTypeBindingBuilder_FieldNotComplete {
get {
- return ResourceManager.GetString("SkipDirectiveType_TypeDescription", resourceCulture);
+ return ResourceManager.GetString("ResolverTypeBindingBuilder_FieldNotComplete", resourceCulture);
}
}
- internal static string SkipDirectiveType_IfDescription {
+ ///
+ /// Looks up a localized string similar to {0} cannot deserialize the given value..
+ ///
+ internal static string Scalar_Cannot_Deserialize {
get {
- return ResourceManager.GetString("SkipDirectiveType_IfDescription", resourceCulture);
+ return ResourceManager.GetString("Scalar_Cannot_Deserialize", resourceCulture);
}
}
- internal static string SpecifiedByDirectiveType_TypeDescription {
+ ///
+ /// Looks up a localized string similar to {0} cannot parse the given literal of type `{1}`..
+ ///
+ internal static string Scalar_Cannot_ParseLiteral {
get {
- return ResourceManager.GetString("SpecifiedByDirectiveType_TypeDescription", resourceCulture);
+ return ResourceManager.GetString("Scalar_Cannot_ParseLiteral", resourceCulture);
}
}
- internal static string SpecifiedByDirectiveType_UrlDescription {
+ ///
+ /// Looks up a localized string similar to {0} cannot parse the given value of type `{1}`..
+ ///
+ internal static string Scalar_Cannot_ParseValue {
get {
- return ResourceManager.GetString("SpecifiedByDirectiveType_UrlDescription", resourceCulture);
+ return ResourceManager.GetString("Scalar_Cannot_ParseValue", resourceCulture);
}
}
- internal static string NodeType_TypeDescription {
+ ///
+ /// Looks up a localized string similar to {0} cannot serialize the given value..
+ ///
+ internal static string Scalar_Cannot_Serialize {
get {
- return ResourceManager.GetString("NodeType_TypeDescription", resourceCulture);
+ return ResourceManager.GetString("Scalar_Cannot_Serialize", resourceCulture);
}
}
- internal static string AnyType_CycleInObjectGraph {
+ ///
+ /// Looks up a localized string similar to A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations..
+ ///
+ internal static string Schema_Description {
get {
- return ResourceManager.GetString("AnyType_CycleInObjectGraph", resourceCulture);
+ return ResourceManager.GetString("Schema_Description", resourceCulture);
}
}
- internal static string UuidType_FormatUnknown {
+ ///
+ /// Looks up a localized string similar to A list of all directives supported by this server..
+ ///
+ internal static string Schema_Directives {
get {
- return ResourceManager.GetString("UuidType_FormatUnknown", resourceCulture);
+ return ResourceManager.GetString("Schema_Directives", resourceCulture);
}
}
- internal static string Directive_GetArgument_ArgumentNameIsInvalid {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` does not exist..
+ ///
+ internal static string Schema_GetDirectiveType_DoesNotExist {
get {
- return ResourceManager.GetString("Directive_GetArgument_ArgumentNameIsInvalid", resourceCulture);
+ return ResourceManager.GetString("Schema_GetDirectiveType_DoesNotExist", resourceCulture);
}
}
- internal static string AppliedDirective_Description {
+ ///
+ /// Looks up a localized string similar to If this server supports mutation, the type that mutation operations will be rooted at..
+ ///
+ internal static string Schema_MutationType {
get {
- return ResourceManager.GetString("AppliedDirective_Description", resourceCulture);
+ return ResourceManager.GetString("Schema_MutationType", resourceCulture);
}
}
- internal static string DirectiveArgument_Description {
+ ///
+ /// Looks up a localized string similar to The type that query operations will be rooted at..
+ ///
+ internal static string Schema_QueryType {
get {
- return ResourceManager.GetString("DirectiveArgument_Description", resourceCulture);
+ return ResourceManager.GetString("Schema_QueryType", resourceCulture);
}
}
- internal static string ThrowHelper_UsePagingAttribute_NodeTypeUnknown {
+ ///
+ /// Looks up a localized string similar to If this server support subscription, the type that subscription operations will be rooted at..
+ ///
+ internal static string Schema_SubscriptionType {
get {
- return ResourceManager.GetString("ThrowHelper_UsePagingAttribute_NodeTypeUnknown", resourceCulture);
+ return ResourceManager.GetString("Schema_SubscriptionType", resourceCulture);
}
}
- internal static string Schema_GetDirectiveType_DoesNotExist {
+ ///
+ /// Looks up a localized string similar to A list of all types supported by this server..
+ ///
+ internal static string Schema_Types {
get {
- return ResourceManager.GetString("Schema_GetDirectiveType_DoesNotExist", resourceCulture);
+ return ResourceManager.GetString("Schema_Types", resourceCulture);
}
}
- internal static string ErrorHelper_ObjectField_HasNoResolver {
+ ///
+ /// Looks up a localized string similar to The root type `{0}` has already been registered..
+ ///
+ internal static string SchemaBuilder_AddRootType_TypeAlreadyRegistered {
get {
- return ResourceManager.GetString("ErrorHelper_ObjectField_HasNoResolver", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_AddRootType_TypeAlreadyRegistered", resourceCulture);
}
}
- internal static string ExtendedTypeReferenceHandler_NonGenericExecutableNotAllowed {
+ ///
+ /// Looks up a localized string similar to There is no handler registered that can handle the specified schema binding..
+ ///
+ internal static string SchemaBuilder_Binding_CannotBeHandled {
get {
- return ResourceManager.GetString("ExtendedTypeReferenceHandler_NonGenericExecutableNotAllowed", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_Binding_CannotBeHandled", resourceCulture);
}
}
- internal static string BindingCompiler_AddBinding_BindingCannotBeHandled {
+ ///
+ /// Looks up a localized string similar to The schema binding is not valid..
+ ///
+ internal static string SchemaBuilder_Binding_Invalid {
get {
- return ResourceManager.GetString("BindingCompiler_AddBinding_BindingCannotBeHandled", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_Binding_Invalid", resourceCulture);
}
}
- internal static string Type_SpecifiedByUrl_Description {
+ ///
+ /// Looks up a localized string similar to The type `System.Object` cannot be implicitly bound to a schema type..
+ ///
+ internal static string SchemaBuilder_BindRuntimeType_ObjectNotAllowed {
get {
- return ResourceManager.GetString("Type_SpecifiedByUrl_Description", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_BindRuntimeType_ObjectNotAllowed", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_AddObjectType_TIsSchemaType {
+ ///
+ /// Looks up a localized string similar to The specified convention type is not supported..
+ ///
+ internal static string SchemaBuilder_Convention_NotSupported {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_AddObjectType_TIsSchemaType", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_Convention_NotSupported", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_AddUnionType_TIsSchemaType {
+ ///
+ /// Looks up a localized string similar to The specified interceptor type is not supported..
+ ///
+ internal static string SchemaBuilder_Interceptor_NotSupported {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_AddUnionType_TIsSchemaType", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_Interceptor_NotSupported", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_AddEnumType_TIsSchemaType {
+ ///
+ /// Looks up a localized string similar to The given schema has to inherit from TypeSystemObjectBase in order to be initializable..
+ ///
+ internal static string SchemaBuilder_ISchemaNotTso {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_AddEnumType_TIsSchemaType", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_ISchemaNotTso", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_AddInterfaceType_TIsSchemaType {
+ ///
+ /// Looks up a localized string similar to schemaType must be a schema type..
+ ///
+ internal static string SchemaBuilder_MustBeSchemaType {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_AddInterfaceType_TIsSchemaType", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_MustBeSchemaType", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_AddInputObjectType_TIsSchemaType {
+ ///
+ /// Looks up a localized string similar to The schema builder was unable to identify the query type of the schema. Either specify which type is the query type or set the schema builder to non-strict validation mode..
+ ///
+ internal static string SchemaBuilder_NoQueryType {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_AddInputObjectType_TIsSchemaType", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_NoQueryType", resourceCulture);
}
}
- internal static string EventMessageParameterExpressionBuilder_MessageNotFound {
+ ///
+ /// Looks up a localized string similar to A root type must be a class..
+ ///
+ internal static string SchemaBuilder_RootType_MustBeClass {
get {
- return ResourceManager.GetString("EventMessageParameterExpressionBuilder_MessageNotFound", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_RootType_MustBeClass", resourceCulture);
}
}
- internal static string DefaultResolverCompilerService_CreateResolver_ArgumentValidationError {
+ ///
+ /// Looks up a localized string similar to A root type must be an object type..
+ ///
+ internal static string SchemaBuilder_RootType_MustBeObjectType {
get {
- return ResourceManager.GetString("DefaultResolverCompilerService_CreateResolver_ArgumentValidationError", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_RootType_MustBeObjectType", resourceCulture);
}
}
- internal static string DefaultResolverCompilerService_CompileSubscribe_OnlyMethodsAllowed {
+ ///
+ /// Looks up a localized string similar to Non-generic schema types are not allowed..
+ ///
+ internal static string SchemaBuilder_RootType_NonGenericType {
get {
- return ResourceManager.GetString("DefaultResolverCompilerService_CompileSubscribe_OnlyMethodsAllowed", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_RootType_NonGenericType", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_AddResolverConfig_ContextInvalid {
+ ///
+ /// Looks up a localized string similar to The given schema has to inherit from `Schema` in order to be initializable..
+ ///
+ internal static string SchemaBuilder_SchemaTypeInvalid {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_AddResolverConfig_ContextInvalid", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilder_SchemaTypeInvalid", resourceCulture);
}
}
- internal static string ExpressionHelper_GetGlobalStateWithDefault_NoDefaults {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` is a GraphQL schema type. AddEnumType<T> is a helper method to register a runtime type as GraphQL enum type. Use AddType<T> to register GraphQL schema types..
+ ///
+ internal static string SchemaBuilderExtensions_AddEnumType_TIsSchemaType {
get {
- return ResourceManager.GetString("ExpressionHelper_GetGlobalStateWithDefault_NoDefaults", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_AddEnumType_TIsSchemaType", resourceCulture);
}
}
- internal static string ExpressionHelper_ResolveScopedContextData_KeyDoesNotExist {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` is a GraphQL schema type. AddInputObjectType<T> is a helper method to register a runtime type as GraphQL input object type. Use AddType<T> to register GraphQL schema types..
+ ///
+ internal static string SchemaBuilderExtensions_AddInputObjectType_TIsSchemaType {
get {
- return ResourceManager.GetString("ExpressionHelper_ResolveScopedContextData_KeyDoesNotExist", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_AddInputObjectType_TIsSchemaType", resourceCulture);
}
}
- internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` is a GraphQL schema type. AddInterfaceType<T> is a helper method to register a runtime type as GraphQL interface type. Use AddType<T> to register GraphQL schema types..
+ ///
+ internal static string SchemaBuilderExtensions_AddInterfaceType_TIsSchemaType {
get {
- return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_AddInterfaceType_TIsSchemaType", resourceCulture);
}
}
- internal static string ClaimsPrincipalParameterExpressionBuilder_NoClaimsFound {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` is a GraphQL schema type. AddObjectType<T> is a helper method to register a runtime type as GraphQL object type. Use AddType<T> to register GraphQL schema types..
+ ///
+ internal static string SchemaBuilderExtensions_AddObjectType_TIsSchemaType {
get {
- return ResourceManager.GetString("ClaimsPrincipalParameterExpressionBuilder_NoClaimsFound", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_AddObjectType_TIsSchemaType", resourceCulture);
}
}
- internal static string DirectiveLocation_VariableDefinition {
+ ///
+ /// Looks up a localized string similar to The resolver type needs to be a public non-abstract non-static class..
+ ///
+ internal static string SchemaBuilderExtensions_AddResolver_TypeConditionNotMet {
get {
- return ResourceManager.GetString("DirectiveLocation_VariableDefinition", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_AddResolver_TypeConditionNotMet", resourceCulture);
}
}
- internal static string SchemaBuilderExtensions_AddResolver_TypeConditionNotMet {
+ ///
+ /// Looks up a localized string similar to The schema builder context is invalid..
+ ///
+ internal static string SchemaBuilderExtensions_AddResolverConfig_ContextInvalid {
get {
- return ResourceManager.GetString("SchemaBuilderExtensions_AddResolver_TypeConditionNotMet", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_AddResolverConfig_ContextInvalid", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The resolver type needs to be a class or interface.
+ ///
internal static string SchemaBuilderExtensions_AddRootResolver_NeedsToBeClassOrInterface {
get {
return ResourceManager.GetString("SchemaBuilderExtensions_AddRootResolver_NeedsToBeClassOrInterface", resourceCulture);
}
}
- internal static string Relay_NodeField_Description {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` is a GraphQL schema type. AddUnionType<T> is a helper method to register a runtime type as GraphQL union type. Use AddType<T> to register GraphQL schema types..
+ ///
+ internal static string SchemaBuilderExtensions_AddUnionType_TIsSchemaType {
get {
- return ResourceManager.GetString("Relay_NodeField_Description", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_AddUnionType_TIsSchemaType", resourceCulture);
}
}
- internal static string Relay_NodeField_Id_Description {
+ ///
+ /// Looks up a localized string similar to A directive type mustn't be one of the base classes `DirectiveType` or `DirectiveType<T>` but must be a type inheriting from `DirectiveType` or `DirectiveType<T>`..
+ ///
+ internal static string SchemaBuilderExtensions_DirectiveTypeIsBaseType {
get {
- return ResourceManager.GetString("Relay_NodeField_Id_Description", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_DirectiveTypeIsBaseType", resourceCulture);
}
}
- internal static string Relay_NodesField_Description {
+ ///
+ /// Looks up a localized string similar to A directive type must inherit from `DirectiveType` or `DirectiveType<T>`..
+ ///
+ internal static string SchemaBuilderExtensions_MustBeDirectiveType {
get {
- return ResourceManager.GetString("Relay_NodesField_Description", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_MustBeDirectiveType", resourceCulture);
}
}
- internal static string Relay_NodesField_Ids_Description {
+ ///
+ /// Looks up a localized string similar to The schema string cannot be null or empty..
+ ///
+ internal static string SchemaBuilderExtensions_SchemaIsEmpty {
get {
- return ResourceManager.GetString("Relay_NodesField_Ids_Description", resourceCulture);
+ return ResourceManager.GetString("SchemaBuilderExtensions_SchemaIsEmpty", resourceCulture);
}
}
- internal static string ErrorHelper_MiddlewareOrderInvalid {
+ ///
+ /// Looks up a localized string similar to The error message mustn't be null or empty..
+ ///
+ internal static string SchemaErrorBuilder_MessageIsNull {
get {
- return ResourceManager.GetString("ErrorHelper_MiddlewareOrderInvalid", resourceCulture);
+ return ResourceManager.GetString("SchemaErrorBuilder_MessageIsNull", resourceCulture);
}
}
- internal static string ErrorHelper_NoSchemaTypesAllowedAsRuntimeType {
+ ///
+ /// Looks up a localized string similar to For more details look at the `Errors` property..
+ ///
+ internal static string SchemaException_ErrorSummaryText {
get {
- return ResourceManager.GetString("ErrorHelper_NoSchemaTypesAllowedAsRuntimeType", resourceCulture);
+ return ResourceManager.GetString("SchemaException_ErrorSummaryText", resourceCulture);
}
}
- internal static string FieldInitHelper_CompleteFields_MaxFieldCountToSmall {
+ ///
+ /// Looks up a localized string similar to Unexpected schema exception occurred..
+ ///
+ internal static string SchemaException_UnexpectedError {
get {
- return ResourceManager.GetString("FieldInitHelper_CompleteFields_MaxFieldCountToSmall", resourceCulture);
+ return ResourceManager.GetString("SchemaException_UnexpectedError", resourceCulture);
}
}
- internal static string RegisteredType_Completion_NotYetReady {
+ ///
+ /// Looks up a localized string similar to Access the current type schema of this server..
+ ///
+ internal static string SchemaField_Description {
get {
- return ResourceManager.GetString("RegisteredType_Completion_NotYetReady", resourceCulture);
+ return ResourceManager.GetString("SchemaField_Description", resourceCulture);
}
}
- internal static string EdgeType_IsInstanceOfType_NonObject {
+ ///
+ /// Looks up a localized string similar to Unknown operation type..
+ ///
+ internal static string SchemaSyntaxVisitor_UnknownOperationType {
get {
- return ResourceManager.GetString("EdgeType_IsInstanceOfType_NonObject", resourceCulture);
+ return ResourceManager.GetString("SchemaSyntaxVisitor_UnknownOperationType", resourceCulture);
}
}
- internal static string EdgeType_Description {
+ ///
+ /// Looks up a localized string similar to The schema types definition is in an invalid state..
+ ///
+ internal static string SchemaTypes_DefinitionInvalid {
get {
- return ResourceManager.GetString("EdgeType_Description", resourceCulture);
+ return ResourceManager.GetString("SchemaTypes_DefinitionInvalid", resourceCulture);
}
}
- internal static string EdgeType_Cursor_Description {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` does not exist or is not of the specified kind `{1}`..
+ ///
+ internal static string SchemaTypes_GetType_DoesNotExist {
get {
- return ResourceManager.GetString("EdgeType_Cursor_Description", resourceCulture);
+ return ResourceManager.GetString("SchemaTypes_GetType_DoesNotExist", resourceCulture);
}
}
- internal static string EdgeType_Node_Description {
+ ///
+ /// Looks up a localized string similar to The middleware order is invalid since the service scope is missing..
+ ///
+ internal static string ServiceHelper_UseResolverServiceInternal_Order {
get {
- return ResourceManager.GetString("EdgeType_Node_Description", resourceCulture);
+ return ResourceManager.GetString("ServiceHelper_UseResolverServiceInternal_Order", resourceCulture);
}
}
- internal static string ConnectionType_Description {
+ ///
+ /// Looks up a localized string similar to The `Short` scalar type represents non-fractional signed whole 16-bit numeric values. Short can represent values between -(2^15) and 2^15 - 1..
+ ///
+ internal static string ShortType_Description {
get {
- return ResourceManager.GetString("ConnectionType_Description", resourceCulture);
+ return ResourceManager.GetString("ShortType_Description", resourceCulture);
}
}
- internal static string ConnectionType_PageInfo_Description {
+ ///
+ /// Looks up a localized string similar to Skipped when true..
+ ///
+ internal static string SkipDirectiveType_IfDescription {
get {
- return ResourceManager.GetString("ConnectionType_PageInfo_Description", resourceCulture);
+ return ResourceManager.GetString("SkipDirectiveType_IfDescription", resourceCulture);
}
}
- internal static string ConnectionType_Edges_Description {
+ ///
+ /// Looks up a localized string similar to Directs the executor to skip this field or fragment when the `if` argument is true..
+ ///
+ internal static string SkipDirectiveType_TypeDescription {
get {
- return ResourceManager.GetString("ConnectionType_Edges_Description", resourceCulture);
+ return ResourceManager.GetString("SkipDirectiveType_TypeDescription", resourceCulture);
}
}
- internal static string ConnectionType_TotalCount_Description {
+ ///
+ /// Looks up a localized string similar to The `@specifiedBy` directive is used within the type system definition language to provide a URL for specifying the behavior of custom scalar definitions..
+ ///
+ internal static string SpecifiedByDirectiveType_TypeDescription {
get {
- return ResourceManager.GetString("ConnectionType_TotalCount_Description", resourceCulture);
+ return ResourceManager.GetString("SpecifiedByDirectiveType_TypeDescription", resourceCulture);
}
}
- internal static string CollectionSegmentType_PageInfo_Description {
+ ///
+ /// Looks up a localized string similar to The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types..
+ ///
+ internal static string SpecifiedByDirectiveType_UrlDescription {
get {
- return ResourceManager.GetString("CollectionSegmentType_PageInfo_Description", resourceCulture);
+ return ResourceManager.GetString("SpecifiedByDirectiveType_UrlDescription", resourceCulture);
}
}
- internal static string CollectionSegmentType_Description {
+ ///
+ /// Looks up a localized string similar to The `@stream` directive may be provided for a field of `List` type so that the backend can leverage technology such as asynchronous iterators to provide a partial list in the initial response, and additional list items in subsequent responses. `@include` and `@skip` take precedence over `@stream`..
+ ///
+ internal static string StreamDirectiveType_Description {
get {
- return ResourceManager.GetString("CollectionSegmentType_Description", resourceCulture);
+ return ResourceManager.GetString("StreamDirectiveType_Description", resourceCulture);
}
}
- internal static string CollectionSegmentType_Items_Description {
+ ///
+ /// Looks up a localized string similar to Streamed when true..
+ ///
+ internal static string StreamDirectiveType_If_Description {
get {
- return ResourceManager.GetString("CollectionSegmentType_Items_Description", resourceCulture);
+ return ResourceManager.GetString("StreamDirectiveType_If_Description", resourceCulture);
}
}
- internal static string ConnectionType_Nodes_Description {
+ ///
+ /// Looks up a localized string similar to The initial elements that shall be send down to the consumer..
+ ///
+ internal static string StreamDirectiveType_InitialCount_Description {
get {
- return ResourceManager.GetString("ConnectionType_Nodes_Description", resourceCulture);
+ return ResourceManager.GetString("StreamDirectiveType_InitialCount_Description", resourceCulture);
}
}
- internal static string ServiceHelper_UseResolverServiceInternal_Order {
+ ///
+ /// Looks up a localized string similar to If this argument label has a value other than null, it will be passed on to the result of this stream directive. This label is intended to give client applications a way to identify to which fragment a streamed result belongs to..
+ ///
+ internal static string StreamDirectiveType_Label_Description {
get {
- return ResourceManager.GetString("ServiceHelper_UseResolverServiceInternal_Order", resourceCulture);
+ return ResourceManager.GetString("StreamDirectiveType_Label_Description", resourceCulture);
}
}
- internal static string DefaultNamingConventions_FormatFieldName_EmptyOrNull {
+ ///
+ /// Looks up a localized string similar to The `{0}` cannot be null or empty..
+ ///
+ internal static string String_Argument_NullOrEmpty {
get {
- return ResourceManager.GetString("DefaultNamingConventions_FormatFieldName_EmptyOrNull", resourceCulture);
+ return ResourceManager.GetString("String_Argument_NullOrEmpty", resourceCulture);
}
}
- internal static string OneOfDirectiveType_Description {
+ ///
+ /// Looks up a localized string similar to The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text..
+ ///
+ internal static string StringType_Description {
get {
- return ResourceManager.GetString("OneOfDirectiveType_Description", resourceCulture);
+ return ResourceManager.GetString("StringType_Description", resourceCulture);
}
}
- internal static string ThrowHelper_OneOfNoFieldSet {
+ ///
+ /// Looks up a localized string similar to Tag is not supported on the specified descriptor..
+ ///
+ internal static string TagDirective_Descriptor_NotSupported {
get {
- return ResourceManager.GetString("ThrowHelper_OneOfNoFieldSet", resourceCulture);
+ return ResourceManager.GetString("TagDirective_Descriptor_NotSupported", resourceCulture);
}
}
- internal static string ThrowHelper_OneOfMoreThanOneFieldSet {
+ ///
+ /// Looks up a localized string similar to The tag name must follow the GraphQL type name rules..
+ ///
+ internal static string TagDirective_Name_NotValid {
get {
- return ResourceManager.GetString("ThrowHelper_OneOfMoreThanOneFieldSet", resourceCulture);
+ return ResourceManager.GetString("TagDirective_Name_NotValid", resourceCulture);
}
}
- internal static string ThrowHelper_OneOfFieldIsNull {
+ ///
+ /// Looks up a localized string similar to Convention of type {0} in scope {1} could not be created.
+ ///
+ internal static string ThrowHelper_Convention_ConventionCouldNotBeCreated {
get {
- return ResourceManager.GetString("ThrowHelper_OneOfFieldIsNull", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Convention_ConventionCouldNotBeCreated", resourceCulture);
}
}
- internal static string ReflectionUtils_ExtractMethod_MethodExpected {
+ ///
+ /// Looks up a localized string similar to There are two conventions registered for {0} in scope {1}. Only one convention is allowed. Use convention extensions if additional configuration is needed. Colliding conventions are {2} and {3}.
+ ///
+ internal static string ThrowHelper_Convention_TwoConventionsRegisteredForScope {
get {
- return ResourceManager.GetString("ReflectionUtils_ExtractMethod_MethodExpected", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Convention_TwoConventionsRegisteredForScope", resourceCulture);
}
}
- internal static string ResolverContextExtensions_ScopedContextData_KeyNotFound {
+ ///
+ /// Looks up a localized string similar to Unable to create a convention instance from {0}..
+ ///
+ internal static string ThrowHelper_Convention_UnableToCreateConvention {
get {
- return ResourceManager.GetString("ResolverContextExtensions_ScopedContextData_KeyNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Convention_UnableToCreateConvention", resourceCulture);
}
}
- internal static string ResolverContextExtensions_LocalContextData_KeyNotFound {
+ ///
+ /// Looks up a localized string similar to The provided type {0} is not a dataloader.
+ ///
+ internal static string ThrowHelper_DataLoader_InvalidType {
get {
- return ResourceManager.GetString("ResolverContextExtensions_LocalContextData_KeyNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_DataLoader_InvalidType", resourceCulture);
}
}
- internal static string ResolverContextExtensions_ContextData_KeyNotFound {
+ ///
+ /// Looks up a localized string similar to The event message is of the type `{0}` and cannot be casted to `{1}.`.
+ ///
+ internal static string ThrowHelper_EventMessage_InvalidCast {
get {
- return ResourceManager.GetString("ResolverContextExtensions_ContextData_KeyNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_EventMessage_InvalidCast", resourceCulture);
}
}
- internal static string SchemaTypes_GetType_DoesNotExist {
+ ///
+ /// Looks up a localized string similar to There is no event message on the context..
+ ///
+ internal static string ThrowHelper_EventMessage_NotFound {
get {
- return ResourceManager.GetString("SchemaTypes_GetType_DoesNotExist", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_EventMessage_NotFound", resourceCulture);
}
}
- internal static string SchemaTypes_DefinitionInvalid {
+ ///
+ /// Looks up a localized string similar to The field is already sealed and cannot be mutated..
+ ///
+ internal static string ThrowHelper_FieldBase_Sealed {
get {
- return ResourceManager.GetString("SchemaTypes_DefinitionInvalid", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_FieldBase_Sealed", resourceCulture);
}
}
- internal static string InputObjectTypeDescriptor_OnlyProperties {
+ ///
+ /// Looks up a localized string similar to The shape of the enum {0} is not known.
+ ///
+ internal static string ThrowHelper_Flags_Enum_Shape_Unknown {
get {
- return ResourceManager.GetString("InputObjectTypeDescriptor_OnlyProperties", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Flags_Enum_Shape_Unknown", resourceCulture);
}
}
- internal static string InterfaceTypeDescriptor_MustBePropertyOrMethod {
+ ///
+ /// Looks up a localized string similar to One of the values of {0} does not have a valid name: {1}.
+ ///
+ internal static string ThrowHelper_Flags_IllegalFlagEnumName {
get {
- return ResourceManager.GetString("InterfaceTypeDescriptor_MustBePropertyOrMethod", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Flags_IllegalFlagEnumName", resourceCulture);
}
}
- internal static string ThrowHelper_FieldBase_Sealed {
+ ///
+ /// Looks up a localized string similar to Flags need to have at least one selection. Type: {0}.
+ ///
+ internal static string ThrowHelper_Flags_Parser_NoSelection {
get {
- return ResourceManager.GetString("ThrowHelper_FieldBase_Sealed", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Flags_Parser_NoSelection", resourceCulture);
}
}
- internal static string TypeInitializer_CannotFindType {
+ ///
+ /// Looks up a localized string similar to The value {0} is not known for type {1}.
+ ///
+ internal static string ThrowHelper_Flags_Parser_UnknownSelection {
get {
- return ResourceManager.GetString("TypeInitializer_CannotFindType", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Flags_Parser_UnknownSelection", resourceCulture);
}
}
- internal static string ThrowHelper_RelayIdFieldHelpers_NoFieldType {
+ ///
+ /// Looks up a localized string similar to The type `{0}` does mot expect `{1}`..
+ ///
+ internal static string ThrowHelper_FormatResultLeaf_InvalidSyntaxKind {
get {
- return ResourceManager.GetString("ThrowHelper_RelayIdFieldHelpers_NoFieldType", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_FormatResultLeaf_InvalidSyntaxKind", resourceCulture);
}
}
- internal static string ThrowHelper_NodeResolver_ObjNoDefinition {
+ ///
+ /// Looks up a localized string similar to The list result value of {0} must implement IList but is of the type {1}..
+ ///
+ internal static string ThrowHelper_FormatResultList_InvalidObjectKind {
get {
- return ResourceManager.GetString("ThrowHelper_NodeResolver_ObjNoDefinition", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_FormatResultList_InvalidObjectKind", resourceCulture);
}
}
- internal static string ThrowHelper_NodeResolver_ArgumentTypeMissing {
+ ///
+ /// Looks up a localized string similar to The input object `{1}` must to be of type `{2}` or serialized as `IReadOnlyDictionary<string. object?>` but not as `{0}`..
+ ///
+ internal static string ThrowHelper_FormatResultObject_InvalidObjectKind {
get {
- return ResourceManager.GetString("ThrowHelper_NodeResolver_ArgumentTypeMissing", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_FormatResultObject_InvalidObjectKind", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_TypeNotFound {
+ ///
+ /// Looks up a localized string similar to The list runtime value of {0} must implement IEnumerable or IList but is of the type {1}..
+ ///
+ internal static string ThrowHelper_FormatValueList_InvalidObjectKind {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_TypeNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_FormatValueList_InvalidObjectKind", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_FieldNotFound {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` is expected to be an input type..
+ ///
+ internal static string ThrowHelper_InputTypeExpected_Message {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_FieldNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_InputTypeExpected_Message", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_FieldArgNotFound {
+ ///
+ /// Looks up a localized string similar to The fields `{0}` do not exist on the type `{1}`..
+ ///
+ internal static string ThrowHelper_InvalidInputFieldNames {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_FieldArgNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_InvalidInputFieldNames", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_InvalidCoordinate {
+ ///
+ /// Looks up a localized string similar to The field `{0}` does not exist on the type `{1}`..
+ ///
+ internal static string ThrowHelper_InvalidInputFieldNames_Single {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_InvalidCoordinate", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_InvalidInputFieldNames_Single", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_InputFieldNotFound {
+ ///
+ /// Looks up a localized string similar to The {0}-directive is missing the if-argument..
+ ///
+ internal static string ThrowHelper_MissingDirectiveIfArgument {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_InputFieldNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_MissingDirectiveIfArgument", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_EnumValueNotFound {
+ ///
+ /// Looks up a localized string similar to Mutation conventions infer the error name from the mutation. In this case the error union was inferred from the mutation `{0}` as `{1}`, but the type initialization encountered another object with the name `{1}`. Either rename the error object or specify a naming exception for this particular mutation. You can do that by using the `UseMutationConventionAttribute` for instance..
+ ///
+ internal static string ThrowHelper_MutationDuplicateErrorName {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_EnumValueNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_MutationDuplicateErrorName", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_DirectiveNotFound {
+ ///
+ /// Looks up a localized string similar to The specified id field `{0}` does not exist on `{1}`..
+ ///
+ internal static string ThrowHelper_NodeAttribute_IdFieldNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_DirectiveNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_NodeAttribute_IdFieldNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_Schema_GetMember_DirectiveArgumentNotFound {
+ ///
+ /// Looks up a localized string similar to A field argument at this initialization state is guaranteed to have an argument type, but we found none..
+ ///
+ internal static string ThrowHelper_NodeResolver_ArgumentTypeMissing {
get {
- return ResourceManager.GetString("ThrowHelper_Schema_GetMember_DirectiveArgumentNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_NodeResolver_ArgumentTypeMissing", resourceCulture);
}
}
- internal static string ThrowHelper_FormatResultLeaf_InvalidSyntaxKind {
+ ///
+ /// Looks up a localized string similar to An object type at this point is guaranteed to have a type definition, but we found none..
+ ///
+ internal static string ThrowHelper_NodeResolver_ObjNoDefinition {
get {
- return ResourceManager.GetString("ThrowHelper_FormatResultLeaf_InvalidSyntaxKind", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_NodeResolver_ObjNoDefinition", resourceCulture);
}
}
- internal static string ThrowHelper_FormatResultList_InvalidObjectKind {
+ ///
+ /// Looks up a localized string similar to Cannot accept null for non-nullable input..
+ ///
+ internal static string ThrowHelper_NonNullInputViolation {
get {
- return ResourceManager.GetString("ThrowHelper_FormatResultList_InvalidObjectKind", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_NonNullInputViolation", resourceCulture);
}
}
- internal static string ThrowHelper_FormatResultObject_InvalidObjectKind {
+ ///
+ /// Looks up a localized string similar to `null` was set to the field `{0}`of the Oneof Input Object `{1}`. Oneof Input Objects are a special variant of Input Objects where the type system asserts that exactly one of the fields must be set and non-null..
+ ///
+ internal static string ThrowHelper_OneOfFieldIsNull {
get {
- return ResourceManager.GetString("ThrowHelper_FormatResultObject_InvalidObjectKind", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_OneOfFieldIsNull", resourceCulture);
}
}
- internal static string ThrowHelper_FormatValueList_InvalidObjectKind {
+ ///
+ /// Looks up a localized string similar to More than one field of the Oneof Input Object `{0}` is set. Oneof Input Objects are a special variant of Input Objects where the type system asserts that exactly one of the fields must be set and non-null..
+ ///
+ internal static string ThrowHelper_OneOfMoreThanOneFieldSet {
get {
- return ResourceManager.GetString("ThrowHelper_FormatValueList_InvalidObjectKind", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_OneOfMoreThanOneFieldSet", resourceCulture);
}
}
- internal static string ThrowHelper_ParseList_InvalidObjectKind {
+ ///
+ /// Looks up a localized string similar to The Oneof Input Objects `{0}` require that exactly one field must be supplied and that field must not be `null`. Oneof Input Objects are a special variant of Input Objects where the type system asserts that exactly one of the fields must be set and non-null..
+ ///
+ internal static string ThrowHelper_OneOfNoFieldSet {
get {
- return ResourceManager.GetString("ThrowHelper_ParseList_InvalidObjectKind", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_OneOfNoFieldSet", resourceCulture);
}
}
- internal static string ThrowHelper_ParseNestedList_InvalidSyntaxKind {
+ ///
+ /// Looks up a localized string similar to The specified type `{0}` is expected to be an output type..
+ ///
+ internal static string ThrowHelper_OutputTypeExpected_Message {
get {
- return ResourceManager.GetString("ThrowHelper_ParseNestedList_InvalidSyntaxKind", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_OutputTypeExpected_Message", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The input object `{1}` must to be serialized as `{2}` or as `IReadOnlyDictionary<string. object?>` but not as `{0}`..
+ ///
internal static string ThrowHelper_ParseInputObject_InvalidObjectKind {
get {
return ResourceManager.GetString("ThrowHelper_ParseInputObject_InvalidObjectKind", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to The syntax node `{0}` is incompatible with the type `{1}`..
+ ///
internal static string ThrowHelper_ParseInputObject_InvalidSyntaxKind {
get {
return ResourceManager.GetString("ThrowHelper_ParseInputObject_InvalidSyntaxKind", resourceCulture);
}
}
- internal static string ThrowHelper_NonNullInputViolation {
+ ///
+ /// Looks up a localized string similar to The list `{1}` must to be serialized as `{2}` or as `IList` but not as `{0}`..
+ ///
+ internal static string ThrowHelper_ParseList_InvalidObjectKind {
get {
- return ResourceManager.GetString("ThrowHelper_NonNullInputViolation", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_ParseList_InvalidObjectKind", resourceCulture);
}
}
- internal static string ThrowHelper_InvalidInputFieldNames {
+ ///
+ /// Looks up a localized string similar to The item syntax node for a nested list must be `ListValue` but the parser found `{0}`..
+ ///
+ internal static string ThrowHelper_ParseNestedList_InvalidSyntaxKind {
get {
- return ResourceManager.GetString("ThrowHelper_InvalidInputFieldNames", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_ParseNestedList_InvalidSyntaxKind", resourceCulture);
}
}
- internal static string ThrowHelper_RequiredInputFieldIsMissing {
+ ///
+ /// Looks up a localized string similar to Unable to resolve type from field `{0}`..
+ ///
+ internal static string ThrowHelper_RelayIdFieldHelpers_NoFieldType {
get {
- return ResourceManager.GetString("ThrowHelper_RequiredInputFieldIsMissing", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_RelayIdFieldHelpers_NoFieldType", resourceCulture);
}
}
- internal static string ThrowHelper_DataLoader_InvalidType {
+ ///
+ /// Looks up a localized string similar to The required input field `{0}` is missing..
+ ///
+ internal static string ThrowHelper_RequiredInputFieldIsMissing {
get {
- return ResourceManager.GetString("ThrowHelper_DataLoader_InvalidType", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_RequiredInputFieldIsMissing", resourceCulture);
}
}
- internal static string ThrowHelper_Convention_ConventionCouldNotBeCreated {
+ ///
+ /// Looks up a localized string similar to Argument `{0}` was not found on directive `@{1}`..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_DirectiveArgumentNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_Convention_ConventionCouldNotBeCreated", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_DirectiveArgumentNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_Convention_TwoConventionsRegisteredForScope {
+ ///
+ /// Looks up a localized string similar to Directive `@{0}` not found..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_DirectiveNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_Convention_TwoConventionsRegisteredForScope", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_DirectiveNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_NodeAttribute_IdFieldNotFound {
+ ///
+ /// Looks up a localized string similar to Enum value `{0}` was not found on type `{1}`..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_EnumValueNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_NodeAttribute_IdFieldNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_EnumValueNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_TypeCompletionContext_UnableToResolveType {
+ ///
+ /// Looks up a localized string similar to Argument `{0}` was not found on field `{1}.{2}`..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_FieldArgNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_TypeCompletionContext_UnableToResolveType", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_FieldArgNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_TypeRegistrar_CreateInstanceFailed {
+ ///
+ /// Looks up a localized string similar to Field `{0}` was not found on type `{1}`..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_FieldNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_TypeRegistrar_CreateInstanceFailed", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_FieldNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_Convention_UnableToCreateConvention {
+ ///
+ /// Looks up a localized string similar to Input field `{0}` was not found on type `{1}`..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_InputFieldNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_Convention_UnableToCreateConvention", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_InputFieldNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_SubscribeAttribute_SubscribeResolverNotFound {
+ ///
+ /// Looks up a localized string similar to The coordinate `{0}` is invalid for the type `{1}`..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_InvalidCoordinate {
get {
- return ResourceManager.GetString("ThrowHelper_SubscribeAttribute_SubscribeResolverNotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_InvalidCoordinate", resourceCulture);
}
}
- internal static string ThrowHelper_SubscribeAttribute_TopicTypeUnspecified {
+ ///
+ /// Looks up a localized string similar to A type with the name `{0}` was not found..
+ ///
+ internal static string ThrowHelper_Schema_GetMember_TypeNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_SubscribeAttribute_TopicTypeUnspecified", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_Schema_GetMember_TypeNotFound", resourceCulture);
}
}
+ ///
+ /// Looks up a localized string similar to You need to specify the message type on {0}.{1}. (SubscribeAttribute).
+ ///
internal static string ThrowHelper_SubscribeAttribute_MessageTypeUnspecified {
get {
return ResourceManager.GetString("ThrowHelper_SubscribeAttribute_MessageTypeUnspecified", resourceCulture);
}
}
- internal static string ThrowHelper_EventMessage_NotFound {
+ ///
+ /// Looks up a localized string similar to Unable to find the subscribe resolver `{2}` defined on {0}.{1}. The subscribe resolver bust be a method that is public, non-static and on the same type as the resolver. (SubscribeAttribute).
+ ///
+ internal static string ThrowHelper_SubscribeAttribute_SubscribeResolverNotFound {
get {
- return ResourceManager.GetString("ThrowHelper_EventMessage_NotFound", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_SubscribeAttribute_SubscribeResolverNotFound", resourceCulture);
}
}
- internal static string ThrowHelper_EventMessage_InvalidCast {
+ ///
+ /// Looks up a localized string similar to You need to specify the topic type on {0}.{1}. (SubscribeAttribute).
+ ///
+ internal static string ThrowHelper_SubscribeAttribute_TopicTypeUnspecified {
get {
- return ResourceManager.GetString("ThrowHelper_EventMessage_InvalidCast", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_SubscribeAttribute_TopicTypeUnspecified", resourceCulture);
}
}
- internal static string ErrorHelper_NeedsOneAtLeastField {
+ ///
+ /// Looks up a localized string similar to Unable to resolve type reference `{0}`..
+ ///
+ internal static string ThrowHelper_TypeCompletionContext_UnableToResolveType {
get {
- return ResourceManager.GetString("ErrorHelper_NeedsOneAtLeastField", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_TypeCompletionContext_UnableToResolveType", resourceCulture);
}
}
- internal static string ErrorHelper_TwoUnderscoresNotAllowedField {
+ ///
+ /// Looks up a localized string similar to Unable to create instance of type `{0}`..
+ ///
+ internal static string ThrowHelper_TypeRegistrar_CreateInstanceFailed {
get {
- return ResourceManager.GetString("ErrorHelper_TwoUnderscoresNotAllowedField", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_TypeRegistrar_CreateInstanceFailed", resourceCulture);
}
}
- internal static string ErrorHelper_TwoUnderscoresNotAllowedOnArgument {
+ ///
+ /// Looks up a localized string similar to Unable to infer the element type from the current resolver. This often happens if the resolver is not an iterable type like IEnumerable, IQueryable, IList etc. Ensure that you either explicitly specify the element type or that the return type of your resolver is an iterable type..
+ ///
+ internal static string ThrowHelper_UsePagingAttribute_NodeTypeUnknown {
get {
- return ResourceManager.GetString("ErrorHelper_TwoUnderscoresNotAllowedOnArgument", resourceCulture);
+ return ResourceManager.GetString("ThrowHelper_UsePagingAttribute_NodeTypeUnknown", resourceCulture);
}
}
- internal static string ErrorHelper_TwoUnderscoresNotAllowedOnDirectiveName {
+ ///
+ /// Looks up a localized string similar to The `TimeSpan` scalar represents an ISO-8601 compliant duration type..
+ ///
+ internal static string TimeSpanType_Description {
get {
- return ResourceManager.GetString("ErrorHelper_TwoUnderscoresNotAllowedOnDirectiveName", resourceCulture);
+ return ResourceManager.GetString("TimeSpanType_Description", resourceCulture);
}
}
- internal static string ErrorHelper_NotTransitivelyImplemented {
+ ///
+ /// Looks up a localized string similar to The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.
+ ///
+ ///Depending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other [rest of string was truncated]";.
+ ///
+ internal static string Type_Description {
get {
- return ResourceManager.GetString("ErrorHelper_NotTransitivelyImplemented", resourceCulture);
+ return ResourceManager.GetString("Type_Description", resourceCulture);
}
}
- internal static string ErrorHelper_InvalidFieldType {
+ ///
+ /// Looks up a localized string similar to `specifiedByURL` may return a String (in the form of a URL) for custom scalars, otherwise it will return `null`..
+ ///
+ internal static string Type_SpecifiedByUrl_Description {
get {
- return ResourceManager.GetString("ErrorHelper_InvalidFieldType", resourceCulture);
+ return ResourceManager.GetString("Type_SpecifiedByUrl_Description", resourceCulture);
}
}
- internal static string ErrorHelper_FieldNotImplemented {
+ ///
+ /// Looks up a localized string similar to The configuration delegate mustn't be null..
+ ///
+ internal static string TypeConfiguration_ConfigureIsNull {
get {
- return ResourceManager.GetString("ErrorHelper_FieldNotImplemented", resourceCulture);
+ return ResourceManager.GetString("TypeConfiguration_ConfigureIsNull", resourceCulture);
}
}
- internal static string ErrorHelper_InvalidArgumentType {
+ ///
+ /// Looks up a localized string similar to Definition mustn't be null..
+ ///
+ internal static string TypeConfiguration_DefinitionIsNull {
get {
- return ResourceManager.GetString("ErrorHelper_InvalidArgumentType", resourceCulture);
+ return ResourceManager.GetString("TypeConfiguration_DefinitionIsNull", resourceCulture);
}
}
- internal static string ErrorHelper_AdditionalArgumentNotNullable {
+ ///
+ /// Looks up a localized string similar to Unable to convert type from `{0}` to `{1}`.
+ ///
+ internal static string TypeConversion_ConvertNotSupported {
get {
- return ResourceManager.GetString("ErrorHelper_AdditionalArgumentNotNullable", resourceCulture);
+ return ResourceManager.GetString("TypeConversion_ConvertNotSupported", resourceCulture);
}
}
- internal static string ErrorHelper_ArgumentNotImplemented {
+ ///
+ /// Looks up a localized string similar to The specified type is not a schema type..
+ ///
+ internal static string TypeDependency_MustBeSchemaType {
get {
- return ResourceManager.GetString("ErrorHelper_ArgumentNotImplemented", resourceCulture);
+ return ResourceManager.GetString("TypeDependency_MustBeSchemaType", resourceCulture);
}
}
- internal static string ErrorHelper_OneofInputObjectMustHaveNullableFieldsWithoutDefaults {
+ ///
+ /// Looks up a localized string similar to TypeReference kind not supported..
+ ///
+ internal static string TypeDiscoveryInfo_TypeRefKindNotSupported {
get {
- return ResourceManager.GetString("ErrorHelper_OneofInputObjectMustHaveNullableFieldsWithoutDefaults", resourceCulture);
+ return ResourceManager.GetString("TypeDiscoveryInfo_TypeRefKindNotSupported", resourceCulture);
}
}
- internal static string ErrorHelper_InputObjectMustNotHaveRecursiveNonNullableReferencesToSelf {
+ ///
+ /// Looks up a localized string similar to The type structure is invalid..
+ ///
+ internal static string TypeExtensions_InvalidStructure {
get {
- return ResourceManager.GetString("ErrorHelper_InputObjectMustNotHaveRecursiveNonNullableReferencesToSelf", resourceCulture);
+ return ResourceManager.GetString("TypeExtensions_InvalidStructure", resourceCulture);
}
}
- internal static string ErrorHelper_RequiredArgumentCannotBeDeprecated {
+ ///
+ /// Looks up a localized string similar to The specified type kind is not supported..
+ ///
+ internal static string TypeExtensions_KindIsNotSupported {
get {
- return ResourceManager.GetString("ErrorHelper_RequiredArgumentCannotBeDeprecated", resourceCulture);
+ return ResourceManager.GetString("TypeExtensions_KindIsNotSupported", resourceCulture);
}
}
- internal static string ErrorHelper_RequiredFieldCannotBeDeprecated {
+ ///
+ /// Looks up a localized string similar to The specified type is not a valid list type..
+ ///
+ internal static string TypeExtensions_NoListType {
get {
- return ResourceManager.GetString("ErrorHelper_RequiredFieldCannotBeDeprecated", resourceCulture);
+ return ResourceManager.GetString("TypeExtensions_NoListType", resourceCulture);
}
}
- internal static string ErrorHelper_InterfaceHasNoImplementation {
+ ///
+ /// Looks up a localized string similar to The given type is not a {0}..
+ ///
+ internal static string TypeExtensions_TypeIsNotOfT {
get {
- return ResourceManager.GetString("ErrorHelper_InterfaceHasNoImplementation", resourceCulture);
+ return ResourceManager.GetString("TypeExtensions_TypeIsNotOfT", resourceCulture);
}
}
- internal static string ErrorHelper_CompleteInterfacesHelper_UnableToResolveInterface {
+ ///
+ /// Looks up a localized string similar to Request the type information of a single type..
+ ///
+ internal static string TypeField_Description {
get {
- return ResourceManager.GetString("ErrorHelper_CompleteInterfacesHelper_UnableToResolveInterface", resourceCulture);
+ return ResourceManager.GetString("TypeField_Description", resourceCulture);
}
}
- internal static string ErrorHelper_DirectiveCollection_ArgumentDoesNotExist {
+ ///
+ /// Looks up a localized string similar to Unable to find type(s) {0}.
+ ///
+ internal static string TypeInitializer_CannotFindType {
get {
- return ResourceManager.GetString("ErrorHelper_DirectiveCollection_ArgumentDoesNotExist", resourceCulture);
+ return ResourceManager.GetString("TypeInitializer_CannotFindType", resourceCulture);
}
}
- internal static string ErrorHelper_DirectiveCollection_ArgumentNonNullViolation {
+ ///
+ /// Looks up a localized string similar to Unable to resolve dependencies {1} for type `{0}`..
+ ///
+ internal static string TypeInitializer_CannotResolveDependency {
get {
- return ResourceManager.GetString("ErrorHelper_DirectiveCollection_ArgumentNonNullViolation", resourceCulture);
+ return ResourceManager.GetString("TypeInitializer_CannotResolveDependency", resourceCulture);
}
}
- internal static string ErrorHelper_ObjectType_UnableToInferOrResolveType {
+ ///
+ /// Looks up a localized string similar to The name `{0}` was already registered by another type..
+ ///
+ internal static string TypeInitializer_CompleteName_Duplicate {
get {
- return ResourceManager.GetString("ErrorHelper_ObjectType_UnableToInferOrResolveType", resourceCulture);
+ return ResourceManager.GetString("TypeInitializer_CompleteName_Duplicate", resourceCulture);
}
}
- internal static string ErrorHelper_Relay_NoNodeResolver {
+ ///
+ /// Looks up a localized string similar to The kind of the extension does not match the kind of the type `{0}`..
+ ///
+ internal static string TypeInitializer_Merge_KindDoesNotMatch {
get {
- return ResourceManager.GetString("ErrorHelper_Relay_NoNodeResolver", resourceCulture);
+ return ResourceManager.GetString("TypeInitializer_Merge_KindDoesNotMatch", resourceCulture);
}
}
- internal static string ErrorHelper_NodeResolver_MustHaveExactlyOneIdArg {
+ ///
+ /// Looks up a localized string similar to An enum describing what kind of type a given `__Type` is..
+ ///
+ internal static string TypeKind_Description {
get {
- return ResourceManager.GetString("ErrorHelper_NodeResolver_MustHaveExactlyOneIdArg", resourceCulture);
+ return ResourceManager.GetString("TypeKind_Description", resourceCulture);
}
}
- internal static string ErrorHelper_NodeResolver_MustReturnObject {
+ ///
+ /// Looks up a localized string similar to Indicates this type is an enum. `enumValues` is a valid field..
+ ///
+ internal static string TypeKind_Enum {
get {
- return ResourceManager.GetString("ErrorHelper_NodeResolver_MustReturnObject", resourceCulture);
+ return ResourceManager.GetString("TypeKind_Enum", resourceCulture);
}
}
- internal static string ErrorHelper_NodeResolver_NodeTypeHasNoId {
+ ///
+ /// Looks up a localized string similar to Indicates this type is an input object. `inputFields` is a valid field..
+ ///
+ internal static string TypeKind_InputObject {
get {
- return ResourceManager.GetString("ErrorHelper_NodeResolver_NodeTypeHasNoId", resourceCulture);
+ return ResourceManager.GetString("TypeKind_InputObject", resourceCulture);
}
}
- internal static string ThrowHelper_InvalidInputFieldNames_Single {
+ ///
+ /// Looks up a localized string similar to Indicates this type is an interface. `fields` and `possibleTypes` are valid fields..
+ ///
+ internal static string TypeKind_Interface {
get {
- return ResourceManager.GetString("ThrowHelper_InvalidInputFieldNames_Single", resourceCulture);
+ return ResourceManager.GetString("TypeKind_Interface", resourceCulture);
}
}
- internal static string ThrowHelper_MutationDuplicateErrorName {
+ ///
+ /// Looks up a localized string similar to Indicates this type is a list. `ofType` is a valid field..
+ ///
+ internal static string TypeKind_List {
get {
- return ResourceManager.GetString("ThrowHelper_MutationDuplicateErrorName", resourceCulture);
+ return ResourceManager.GetString("TypeKind_List", resourceCulture);
}
}
- internal static string ErrorHelper_NodeResolverMissing {
+ ///
+ /// Looks up a localized string similar to Indicates this type is a non-null. `ofType` is a valid field..
+ ///
+ internal static string TypeKind_NonNull {
get {
- return ResourceManager.GetString("ErrorHelper_NodeResolverMissing", resourceCulture);
+ return ResourceManager.GetString("TypeKind_NonNull", resourceCulture);
}
}
- internal static string ThrowHelper_Flags_Enum_Shape_Unknown {
+ ///
+ /// Looks up a localized string similar to Indicates this type is an object. `fields` and `interfaces` are valid fields..
+ ///
+ internal static string TypeKind_Object {
get {
- return ResourceManager.GetString("ThrowHelper_Flags_Enum_Shape_Unknown", resourceCulture);
+ return ResourceManager.GetString("TypeKind_Object", resourceCulture);
}
}
- internal static string ThrowHelper_Flags_Parser_NoSelection {
+ ///
+ /// Looks up a localized string similar to Indicates this type is a scalar..
+ ///
+ internal static string TypeKind_Scalar {
get {
- return ResourceManager.GetString("ThrowHelper_Flags_Parser_NoSelection", resourceCulture);
+ return ResourceManager.GetString("TypeKind_Scalar", resourceCulture);
}
}
- internal static string ThrowHelper_Flags_Parser_UnknownSelection {
+ ///
+ /// Looks up a localized string similar to Indicates this type is a union. `possibleTypes` is a valid field..
+ ///
+ internal static string TypeKind_Union {
get {
- return ResourceManager.GetString("ThrowHelper_Flags_Parser_UnknownSelection", resourceCulture);
+ return ResourceManager.GetString("TypeKind_Union", resourceCulture);
}
}
- internal static string ThrowHelper_Flags_IllegalFlagEnumName {
+ ///
+ /// Looks up a localized string similar to The name of the current Object type at runtime..
+ ///
+ internal static string TypeNameField_Description {
get {
- return ResourceManager.GetString("ThrowHelper_Flags_IllegalFlagEnumName", resourceCulture);
+ return ResourceManager.GetString("TypeNameField_Description", resourceCulture);
}
}
- internal static string Directive_GetArgumentValue_UnknownArgument {
+ ///
+ /// Looks up a localized string similar to Invalid type structure..
+ ///
+ internal static string TypeNameHelper_InvalidTypeStructure {
get {
- return ResourceManager.GetString("Directive_GetArgumentValue_UnknownArgument", resourceCulture);
+ return ResourceManager.GetString("TypeNameHelper_InvalidTypeStructure", resourceCulture);
}
}
- internal static string ErrorHelper_DirectiveCollection_ArgumentValueTypeIsWrong {
+ ///
+ /// Looks up a localized string similar to Only type system objects are allowed as dependency..
+ ///
+ internal static string TypeNameHelper_OnlyTypeSystemObjectsAreAllowed {
get {
- return ResourceManager.GetString("ErrorHelper_DirectiveCollection_ArgumentValueTypeIsWrong", resourceCulture);
+ return ResourceManager.GetString("TypeNameHelper_OnlyTypeSystemObjectsAreAllowed", resourceCulture);
}
}
- internal static string TypeDiscoveryInfo_TypeRefKindNotSupported {
+ ///
+ /// Looks up a localized string similar to Unable to infer or resolve a schema type from the type reference `{0}`..
+ ///
+ internal static string TypeRegistrar_TypesInconsistent {
get {
- return ResourceManager.GetString("TypeDiscoveryInfo_TypeRefKindNotSupported", resourceCulture);
+ return ResourceManager.GetString("TypeRegistrar_TypesInconsistent", resourceCulture);
}
}
- internal static string ErrorHelper_FetchedToManyNodesAtOnce {
+ ///
+ /// Looks up a localized string similar to The typeName mustn't be null or empty..
+ ///
+ internal static string TypeResourceHelper_TypeNameEmptyOrNull {
get {
- return ResourceManager.GetString("ErrorHelper_FetchedToManyNodesAtOnce", resourceCulture);
+ return ResourceManager.GetString("TypeResourceHelper_TypeNameEmptyOrNull", resourceCulture);
}
}
- internal static string ThrowHelper_InputTypeExpected_Message {
+ ///
+ /// Looks up a localized string similar to The description becomes immutable once it was assigned..
+ ///
+ internal static string TypeSystemObject_DescriptionImmutable {
get {
- return ResourceManager.GetString("ThrowHelper_InputTypeExpected_Message", resourceCulture);
+ return ResourceManager.GetString("TypeSystemObject_DescriptionImmutable", resourceCulture);
}
}
- internal static string ThrowHelper_OutputTypeExpected_Message {
+ ///
+ /// Looks up a localized string similar to The name becomes immutable once it was assigned..
+ ///
+ internal static string TypeSystemObject_NameImmutable {
get {
- return ResourceManager.GetString("ThrowHelper_OutputTypeExpected_Message", resourceCulture);
+ return ResourceManager.GetString("TypeSystemObject_NameImmutable", resourceCulture);
}
}
- internal static string TagDirective_Name_NotValid {
+ ///
+ /// Looks up a localized string similar to The type definition is null which means that the type was initialized incorrectly..
+ ///
+ internal static string TypeSystemObjectBase_DefinitionIsNull {
get {
- return ResourceManager.GetString("TagDirective_Name_NotValid", resourceCulture);
+ return ResourceManager.GetString("TypeSystemObjectBase_DefinitionIsNull", resourceCulture);
}
}
- internal static string TagDirective_Descriptor_NotSupported {
+ ///
+ /// Looks up a localized string similar to The type name was not completed correctly and is still empty. Type names are not allowed to remain empty after name completion was executed.
+ ///Type: `{0}`.
+ ///
+ internal static string TypeSystemObjectBase_NameIsNull {
get {
- return ResourceManager.GetString("TagDirective_Descriptor_NotSupported", resourceCulture);
+ return ResourceManager.GetString("TypeSystemObjectBase_NameIsNull", resourceCulture);
}
}
- internal static string ErrorHelper_DuplicateFieldName_Message {
+ ///
+ /// Looks up a localized string similar to A Union type must define one or more unique member types..
+ ///
+ internal static string UnionType_MustHaveTypes {
get {
- return ResourceManager.GetString("ErrorHelper_DuplicateFieldName_Message", resourceCulture);
+ return ResourceManager.GetString("UnionType_MustHaveTypes", resourceCulture);
}
}
- internal static string ErrorHelper_DuplicateDataMiddlewareDetected_Message {
+ ///
+ /// Looks up a localized string similar to Unable to resolve the specified type reference..
+ ///
+ internal static string UnionType_UnableToResolveType {
get {
- return ResourceManager.GetString("ErrorHelper_DuplicateDataMiddlewareDetected_Message", resourceCulture);
+ return ResourceManager.GetString("UnionType_UnableToResolveType", resourceCulture);
}
}
- internal static string SchemaException_UnexpectedError {
+ ///
+ /// Looks up a localized string similar to The union type extension can only be merged with an union type..
+ ///
+ internal static string UnionTypeExtension_CannotMerge {
get {
- return ResourceManager.GetString("SchemaException_UnexpectedError", resourceCulture);
+ return ResourceManager.GetString("UnionTypeExtension_CannotMerge", resourceCulture);
}
}
- internal static string SchemaException_ErrorSummaryText {
+ ///
+ /// Looks up a localized string similar to Unknown format. Guid supports the following format chars: {{ `N`, `D`, `B`, `P` }}.
+ /// https://docs.microsoft.com/en-us/dotnet/api/system.buffers.text.utf8parser.tryparse?view=netcore-3.1#System_Buffers_Text_Utf8Parser_TryParse_System_ReadOnlySpan_System_Byte__System_Guid__System_Int32__System_Char.
+ ///
+ internal static string UuidType_FormatUnknown {
get {
- return ResourceManager.GetString("SchemaException_ErrorSummaryText", resourceCulture);
+ return ResourceManager.GetString("UuidType_FormatUnknown", resourceCulture);
}
}
- internal static string ResolverContextExtensions_IsSelected_FieldNameEmpty {
+ ///
+ /// Looks up a localized string similar to Variable `{0}` of type `{1}` must be an input type..
+ ///
+ internal static string VariableValueBuilder_InputType {
get {
- return ResourceManager.GetString("ResolverContextExtensions_IsSelected_FieldNameEmpty", resourceCulture);
+ return ResourceManager.GetString("VariableValueBuilder_InputType", resourceCulture);
}
}
- internal static string ObjectToDictionaryConverter_CycleInObjectGraph {
+ ///
+ /// Looks up a localized string similar to Variable `{0}` got invalid value..
+ ///
+ internal static string VariableValueBuilder_InvalidValue {
get {
- return ResourceManager.GetString("ObjectToDictionaryConverter_CycleInObjectGraph", resourceCulture);
+ return ResourceManager.GetString("VariableValueBuilder_InvalidValue", resourceCulture);
}
}
- internal static string LocalDateTimeType_Description {
+ ///
+ /// Looks up a localized string similar to The type node kind is not supported..
+ ///
+ internal static string VariableValueBuilder_NodeKind {
get {
- return ResourceManager.GetString("LocalDateTimeType_Description", resourceCulture);
+ return ResourceManager.GetString("VariableValueBuilder_NodeKind", resourceCulture);
}
}
- internal static string LocalDateType_Description {
+ ///
+ /// Looks up a localized string similar to Variable `{0}` of type `{1}` must not be null..
+ ///
+ internal static string VariableValueBuilder_NonNull {
get {
- return ResourceManager.GetString("LocalDateType_Description", resourceCulture);
+ return ResourceManager.GetString("VariableValueBuilder_NonNull", resourceCulture);
}
}
- internal static string LocalTimeType_Description {
+ ///
+ /// Looks up a localized string similar to Detected non-null violation in variable `{0}`..
+ ///
+ internal static string VariableValueBuilder_NonNull_In_Graph {
get {
- return ResourceManager.GetString("LocalTimeType_Description", resourceCulture);
+ return ResourceManager.GetString("VariableValueBuilder_NonNull_In_Graph", resourceCulture);
}
}
- internal static string SchemaBuilder_BindRuntimeType_ObjectNotAllowed {
+ ///
+ /// Looks up a localized string similar to Variable name mustn't be null or empty..
+ ///
+ internal static string VariableValueBuilder_VarNameEmpty {
get {
- return ResourceManager.GetString("SchemaBuilder_BindRuntimeType_ObjectNotAllowed", resourceCulture);
+ return ResourceManager.GetString("VariableValueBuilder_VarNameEmpty", resourceCulture);
}
}
}
diff --git a/src/HotChocolate/Core/src/Types/Properties/TypeResources.resx b/src/HotChocolate/Core/src/Types/Properties/TypeResources.resx
index ddc00a9410f..ef90e5aabd3 100644
--- a/src/HotChocolate/Core/src/Types/Properties/TypeResources.resx
+++ b/src/HotChocolate/Core/src/Types/Properties/TypeResources.resx
@@ -1012,4 +1012,40 @@ Type: `{0}`
The type `System.Object` cannot be implicitly bound to a schema type.
+
+ Indicates that the given field, argument, input field, or enum value requires giving explicit consent before being used.
+
+
+ The name of the feature that requires opt in.
+
+
+ RequiresOptIn is not supported on the specified descriptor.
+
+
+ Sets the stability level of an opt-in feature.
+
+
+ The name of the feature for which to set the stability.
+
+
+ The stability level of the feature.
+
+
+ An OptInFeatureStability object describes the stability level of an opt-in feature.
+
+
+ The @requiresOptIn directive must not appear on required (non-null without a default) input object field definitions.
+
+
+ The @requiresOptIn directive must not appear on required (non-null without a default) arguments.
+
+
+ The feature name must follow the GraphQL type name rules.
+
+
+ The feature name must follow the GraphQL type name rules.
+
+
+ The stability must follow the GraphQL type name rules.
+
diff --git a/src/HotChocolate/Core/src/Types/SchemaBuilder.cs b/src/HotChocolate/Core/src/Types/SchemaBuilder.cs
index f207429a865..14cac34d6ea 100644
--- a/src/HotChocolate/Core/src/Types/SchemaBuilder.cs
+++ b/src/HotChocolate/Core/src/Types/SchemaBuilder.cs
@@ -37,7 +37,8 @@ public partial class SchemaBuilder : ISchemaBuilder
typeof(InterfaceCompletionTypeInterceptor),
typeof(MiddlewareValidationTypeInterceptor),
typeof(SemanticNonNullTypeInterceptor),
- typeof(StoreGlobalPagingOptionsTypeInterceptor)
+ typeof(StoreGlobalPagingOptionsTypeInterceptor),
+ typeof(OptInFeaturesTypeInterceptor)
];
private SchemaOptions _options = new();
diff --git a/src/HotChocolate/Core/src/Types/SchemaOptions.cs b/src/HotChocolate/Core/src/Types/SchemaOptions.cs
index 277a67278a6..6332331f3d9 100644
--- a/src/HotChocolate/Core/src/Types/SchemaOptions.cs
+++ b/src/HotChocolate/Core/src/Types/SchemaOptions.cs
@@ -123,6 +123,9 @@ public FieldBindingFlags DefaultFieldBindingFlags
///
public bool EnableTag { get; set; } = true;
+ ///
+ public bool EnableOptInFeatures { get; set; }
+
///
public DependencyInjectionScope DefaultQueryDependencyInjectionScope { get; set; } =
DependencyInjectionScope.Resolver;
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/Directives.cs b/src/HotChocolate/Core/src/Types/Types/Directives/Directives.cs
index 362a883a4d1..892ed86feeb 100644
--- a/src/HotChocolate/Core/src/Types/Types/Directives/Directives.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/Directives.cs
@@ -49,6 +49,15 @@ internal static IReadOnlyList CreateReferences(
directiveTypes.Add(typeInspector.GetTypeRef(typeof(Tag)));
}
+ if (descriptorContext.Options.EnableOptInFeatures)
+ {
+ directiveTypes.Add(
+ typeInspector.GetTypeRef(typeof(OptInFeatureStabilityDirectiveType)));
+
+ directiveTypes.Add(
+ typeInspector.GetTypeRef(typeof(RequiresOptInDirectiveType)));
+ }
+
directiveTypes.Add(typeInspector.GetTypeRef(typeof(SkipDirectiveType)));
directiveTypes.Add(typeInspector.GetTypeRef(typeof(IncludeDirectiveType)));
directiveTypes.Add(typeInspector.GetTypeRef(typeof(DeprecatedDirectiveType)));
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirective.cs b/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirective.cs
new file mode 100644
index 00000000000..d9b2e3a1292
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirective.cs
@@ -0,0 +1,54 @@
+using HotChocolate.Properties;
+using HotChocolate.Utilities;
+
+namespace HotChocolate.Types;
+
+public sealed class OptInFeatureStabilityDirective
+{
+ ///
+ /// Creates a new instance of .
+ ///
+ ///
+ /// The name of the feature for which to set the stability.
+ ///
+ ///
+ /// The stability level of the feature.
+ ///
+ ///
+ /// is not a valid name.
+ ///
+ ///
+ /// is not a valid name.
+ ///
+ public OptInFeatureStabilityDirective(string feature, string stability)
+ {
+ if (!feature.IsValidGraphQLName())
+ {
+ throw new ArgumentException(
+ TypeResources.OptInFeatureStabilityDirective_FeatureName_NotValid,
+ nameof(feature));
+ }
+
+ if (!stability.IsValidGraphQLName())
+ {
+ throw new ArgumentException(
+ TypeResources.OptInFeatureStabilityDirective_Stability_NotValid,
+ nameof(stability));
+ }
+
+ Feature = feature;
+ Stability = stability;
+ }
+
+ ///
+ /// The name of the feature for which to set the stability.
+ ///
+ [GraphQLDescription("The name of the feature for which to set the stability.")]
+ public string Feature { get; }
+
+ ///
+ /// The stability level of the feature.
+ ///
+ [GraphQLDescription("The stability level of the feature.")]
+ public string Stability { get; }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirectiveExtensions.cs b/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirectiveExtensions.cs
new file mode 100644
index 00000000000..8755d6c4e55
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirectiveExtensions.cs
@@ -0,0 +1,12 @@
+namespace HotChocolate.Types;
+
+public static class OptInFeatureStabilityDirectiveExtensions
+{
+ public static ISchemaTypeDescriptor OptInFeatureStability(
+ this ISchemaTypeDescriptor descriptor,
+ string feature,
+ string stability)
+ {
+ return descriptor.Directive(new OptInFeatureStabilityDirective(feature, stability));
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirectiveType.cs b/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirectiveType.cs
new file mode 100644
index 00000000000..f29157e7755
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/OptInFeatureStabilityDirectiveType.cs
@@ -0,0 +1,32 @@
+using HotChocolate.Properties;
+
+namespace HotChocolate.Types;
+
+///
+/// Sets the stability level of an opt-in feature.
+///
+public sealed class OptInFeatureStabilityDirectiveType
+ : DirectiveType
+{
+ protected override void Configure(
+ IDirectiveTypeDescriptor descriptor)
+ {
+ descriptor
+ .Name(WellKnownDirectives.OptInFeatureStability)
+ .Description(TypeResources.OptInFeatureStabilityDirectiveType_TypeDescription)
+ .Location(DirectiveLocation.Schema)
+ .Repeatable();
+
+ descriptor
+ .Argument(t => t.Feature)
+ .Name(WellKnownDirectives.OptInFeatureStabilityFeatureArgument)
+ .Description(TypeResources.OptInFeatureStabilityDirectiveType_FeatureDescription)
+ .Type>();
+
+ descriptor
+ .Argument(t => t.Stability)
+ .Name(WellKnownDirectives.OptInFeatureStabilityStabilityArgument)
+ .Description(TypeResources.OptInFeatureStabilityDirectiveType_StabilityDescription)
+ .Type>();
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInAttribute.cs b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInAttribute.cs
new file mode 100644
index 00000000000..bfc3d37ef77
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInAttribute.cs
@@ -0,0 +1,66 @@
+using System.Reflection;
+using HotChocolate.Properties;
+using HotChocolate.Types.Descriptors;
+
+namespace HotChocolate.Types;
+
+///
+/// Indicates that the given field, argument, input field, or enum value requires giving explicit
+/// consent before being used.
+///
+[AttributeUsage(
+ AttributeTargets.Field // Required for enum values
+ | AttributeTargets.Method
+ | AttributeTargets.Parameter
+ | AttributeTargets.Property,
+ AllowMultiple = true)]
+public sealed class RequiresOptInAttribute : DescriptorAttribute
+{
+ ///
+ /// Initializes a new instance of the
+ /// with a specific feature name and stability.
+ ///
+ /// The name of the feature that requires opt in.
+ public RequiresOptInAttribute(string feature)
+ {
+ Feature = feature ?? throw new ArgumentNullException(nameof(feature));
+ }
+
+ ///
+ /// The name of the feature that requires opt in.
+ ///
+ public string Feature { get; }
+
+ protected internal override void TryConfigure(
+ IDescriptorContext context,
+ IDescriptor descriptor,
+ ICustomAttributeProvider element)
+ {
+ switch (descriptor)
+ {
+ case IObjectFieldDescriptor desc:
+ desc.RequiresOptIn(Feature);
+ break;
+
+ case IInputFieldDescriptor desc:
+ desc.RequiresOptIn(Feature);
+ break;
+
+ case IArgumentDescriptor desc:
+ desc.RequiresOptIn(Feature);
+ break;
+
+ case IEnumValueDescriptor desc:
+ desc.RequiresOptIn(Feature);
+ break;
+
+ default:
+ throw new SchemaException(
+ SchemaErrorBuilder.New()
+ .SetMessage(TypeResources.RequiresOptInDirective_Descriptor_NotSupported)
+ .SetExtension("member", element)
+ .SetExtension("descriptor", descriptor)
+ .Build());
+ }
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirective.cs b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirective.cs
new file mode 100644
index 00000000000..ae0e0a5bf88
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirective.cs
@@ -0,0 +1,70 @@
+#nullable enable
+
+using HotChocolate.Properties;
+using HotChocolate.Utilities;
+
+namespace HotChocolate.Types;
+
+///
+/// Indicates that the given field, argument, input field, or enum value requires giving explicit
+/// consent before being used.
+///
+///
+/// type Session {
+/// id: ID!
+/// title: String!
+/// # [...]
+/// startInstant: Instant @requiresOptIn(feature: "experimentalInstantApi")
+/// endInstant: Instant @requiresOptIn(feature: "experimentalInstantApi")
+/// }
+///
+///
+[DirectiveType(
+ WellKnownDirectives.RequiresOptIn,
+ DirectiveLocation.ArgumentDefinition |
+ DirectiveLocation.EnumValue |
+ DirectiveLocation.FieldDefinition |
+ DirectiveLocation.InputFieldDefinition,
+ IsRepeatable = true)]
+[GraphQLDescription(
+ """
+ Indicates that the given field, argument, input field, or enum value requires giving explicit
+ consent before being used.
+
+ type Session {
+ id: ID!
+ title: String!
+ # [...]
+ startInstant: Instant @requiresOptIn(feature: "experimentalInstantApi")
+ endInstant: Instant @requiresOptIn(feature: "experimentalInstantApi")
+ }
+ """)]
+public sealed class RequiresOptInDirective
+{
+ ///
+ /// Creates a new instance of .
+ ///
+ ///
+ /// The name of the feature that requires opt in.
+ ///
+ ///
+ /// is not a valid name.
+ ///
+ public RequiresOptInDirective(string feature)
+ {
+ if (!feature.IsValidGraphQLName())
+ {
+ throw new ArgumentException(
+ TypeResources.RequiresOptInDirective_FeatureName_NotValid,
+ nameof(feature));
+ }
+
+ Feature = feature;
+ }
+
+ ///
+ /// The name of the feature that requires opt in.
+ ///
+ [GraphQLDescription("The name of the feature that requires opt in.")]
+ public string Feature { get; }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirectiveExtensions.cs b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirectiveExtensions.cs
new file mode 100644
index 00000000000..a1540bf7ef6
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirectiveExtensions.cs
@@ -0,0 +1,147 @@
+using HotChocolate.Properties;
+
+namespace HotChocolate.Types;
+
+public static class RequiresOptInDirectiveExtensions
+{
+ ///
+ /// Adds an @requiresOptIn directive to an .
+ ///
+ /// type Book {
+ /// id: ID!
+ /// title: String!
+ /// author: String @requiresOptIn(feature: "your-feature")
+ /// }
+ ///
+ ///
+ ///
+ /// The on which this directive shall be annotated.
+ ///
+ ///
+ /// The name of the feature that requires opt in.
+ ///
+ ///
+ /// Returns the on which this directive
+ /// was applied for configuration chaining.
+ ///
+ public static IObjectFieldDescriptor RequiresOptIn(
+ this IObjectFieldDescriptor descriptor,
+ string feature)
+ {
+ ApplyRequiresOptIn(descriptor, feature);
+ return descriptor;
+ }
+
+ ///
+ /// Adds an @requiresOptIn directive to an .
+ ///
+ /// input BookInput {
+ /// title: String!
+ /// author: String!
+ /// publishedDate: String @requiresOptIn(feature: "your-feature")
+ /// }
+ ///
+ ///
+ ///
+ /// The on which this directive shall be annotated.
+ ///
+ ///
+ /// The name of the feature that requires opt in.
+ ///
+ ///
+ /// Returns the on which this directive
+ /// was applied for configuration chaining.
+ ///
+ public static IInputFieldDescriptor RequiresOptIn(
+ this IInputFieldDescriptor descriptor,
+ string feature)
+ {
+ ApplyRequiresOptIn(descriptor, feature);
+ return descriptor;
+ }
+
+ ///
+ /// Adds an @requiresOptIn directive to an .
+ ///
+ /// type Query {
+ /// books(search: String @requiresOptIn(feature: "your-feature")): [Book]
+ /// }
+ ///
+ ///
+ ///
+ /// The on which this directive shall be annotated.
+ ///
+ ///
+ /// The name of the feature that requires opt in.
+ ///
+ ///
+ /// Returns the on which this directive
+ /// was applied for configuration chaining.
+ ///
+ public static IArgumentDescriptor RequiresOptIn(
+ this IArgumentDescriptor descriptor,
+ string feature)
+ {
+ ApplyRequiresOptIn(descriptor, feature);
+ return descriptor;
+ }
+
+ ///
+ /// Adds an @requiresOptIn directive to an .
+ ///
+ /// enum Episode {
+ /// NEWHOPE @requiresOptIn(feature: "your-feature")
+ /// EMPIRE
+ /// JEDI
+ /// }
+ ///
+ ///
+ ///
+ /// The on which this directive shall be annotated.
+ ///
+ ///
+ /// The name of the feature that requires opt in.
+ ///
+ ///
+ /// Returns the on which this directive
+ /// was applied for configuration chaining.
+ ///
+ public static IEnumValueDescriptor RequiresOptIn(
+ this IEnumValueDescriptor descriptor,
+ string feature)
+ {
+ ApplyRequiresOptIn(descriptor, feature);
+ return descriptor;
+ }
+
+ private static void ApplyRequiresOptIn(this IDescriptor descriptor, string feature)
+ {
+ if (descriptor is null)
+ {
+ throw new ArgumentNullException(nameof(descriptor));
+ }
+
+ switch (descriptor)
+ {
+ case IObjectFieldDescriptor desc:
+ desc.Directive(new RequiresOptInDirective(feature));
+ break;
+
+ case IInputFieldDescriptor desc:
+ desc.Directive(new RequiresOptInDirective(feature));
+ break;
+
+ case IArgumentDescriptor desc:
+ desc.Directive(new RequiresOptInDirective(feature));
+ break;
+
+ case IEnumValueDescriptor desc:
+ desc.Directive(new RequiresOptInDirective(feature));
+ break;
+
+ default:
+ throw new NotSupportedException(
+ TypeResources.RequiresOptInDirective_Descriptor_NotSupported);
+ }
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirectiveType.cs b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirectiveType.cs
new file mode 100644
index 00000000000..1a06b993706
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Directives/RequiresOptInDirectiveType.cs
@@ -0,0 +1,38 @@
+using HotChocolate.Properties;
+
+namespace HotChocolate.Types;
+
+///
+/// Indicates that the given field, argument, input field, or enum value requires giving explicit
+/// consent before being used.
+///
+///
+/// type Session {
+/// id: ID!
+/// title: String!
+/// # [...]
+/// startInstant: Instant @requiresOptIn(feature: "experimentalInstantApi")
+/// endInstant: Instant @requiresOptIn(feature: "experimentalInstantApi")
+/// }
+///
+///
+public sealed class RequiresOptInDirectiveType : DirectiveType
+{
+ protected override void Configure(
+ IDirectiveTypeDescriptor descriptor)
+ {
+ descriptor
+ .Name(WellKnownDirectives.RequiresOptIn)
+ .Description(TypeResources.RequiresOptInDirectiveType_TypeDescription)
+ .Location(DirectiveLocation.ArgumentDefinition)
+ .Location(DirectiveLocation.EnumValue)
+ .Location(DirectiveLocation.FieldDefinition)
+ .Location(DirectiveLocation.InputFieldDefinition);
+
+ descriptor
+ .Argument(t => t.Feature)
+ .Name(WellKnownDirectives.RequiresOptInFeatureArgument)
+ .Description(TypeResources.RequiresOptInDirectiveType_FeatureDescription)
+ .Type>();
+ }
+}
diff --git a/src/HotChocolate/Core/src/Types/Types/Interceptors/OptInFeaturesTypeInterceptor.cs b/src/HotChocolate/Core/src/Types/Types/Interceptors/OptInFeaturesTypeInterceptor.cs
new file mode 100644
index 00000000000..2c7ffb29c78
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Interceptors/OptInFeaturesTypeInterceptor.cs
@@ -0,0 +1,62 @@
+using HotChocolate.Configuration;
+using HotChocolate.Types.Descriptors;
+using HotChocolate.Types.Descriptors.Definitions;
+
+namespace HotChocolate.Types.Interceptors;
+
+internal sealed class OptInFeaturesTypeInterceptor : TypeInterceptor
+{
+ public override bool IsEnabled(IDescriptorContext context)
+ => context.Options.EnableOptInFeatures;
+
+ private readonly OptInFeatures _optInFeatures = [];
+
+ public override void OnBeforeCompleteName(
+ ITypeCompletionContext completionContext,
+ DefinitionBase definition)
+ {
+ if (definition is SchemaTypeDefinition schema)
+ {
+ schema.Features.Set(_optInFeatures);
+ }
+ }
+
+ public override void OnBeforeCompleteType(
+ ITypeCompletionContext completionContext,
+ DefinitionBase definition)
+ {
+ switch (definition)
+ {
+ case EnumTypeDefinition enumType:
+ _optInFeatures.UnionWith(enumType.Values.SelectMany(v => v.GetOptInFeatures()));
+
+ break;
+
+ case InputObjectTypeDefinition inputType:
+ _optInFeatures.UnionWith(inputType.Fields.SelectMany(f => f.GetOptInFeatures()));
+
+ break;
+
+ case ObjectTypeDefinition objectType:
+ _optInFeatures.UnionWith(objectType.Fields.SelectMany(f => f.GetOptInFeatures()));
+
+ _optInFeatures.UnionWith(objectType.Fields.SelectMany(
+ f => f.Arguments.SelectMany(a => a.GetOptInFeatures())));
+
+ break;
+ }
+ }
+}
+
+file static class Extensions
+{
+ public static IEnumerable GetOptInFeatures(this IHasDirectiveDefinition definition)
+ {
+ return definition.Directives
+ .Select(d => d.Value)
+ .OfType()
+ .Select(r => r.Feature);
+ }
+}
+
+internal sealed class OptInFeatures : SortedSet;
diff --git a/src/HotChocolate/Core/src/Types/Types/Introspection/IntrospectionTypes.cs b/src/HotChocolate/Core/src/Types/Types/Introspection/IntrospectionTypes.cs
index 7d6752fd4d9..7afc36b295a 100644
--- a/src/HotChocolate/Core/src/Types/Types/Introspection/IntrospectionTypes.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Introspection/IntrospectionTypes.cs
@@ -42,6 +42,11 @@ internal static IReadOnlyList CreateReferences(
types.Add(context.TypeInspector.GetTypeRef(typeof(__DirectiveArgument)));
}
+ if (context.Options.EnableOptInFeatures)
+ {
+ types.Add(context.TypeInspector.GetTypeRef(typeof(__OptInFeatureStability)));
+ }
+
return types;
}
diff --git a/src/HotChocolate/Core/src/Types/Types/Introspection/__EnumValue.cs b/src/HotChocolate/Core/src/Types/Types/Introspection/__EnumValue.cs
index 4f68af44f7b..efa72fb006e 100644
--- a/src/HotChocolate/Core/src/Types/Types/Introspection/__EnumValue.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Introspection/__EnumValue.cs
@@ -17,6 +17,7 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
{
var stringType = Create(ScalarNames.String);
var nonNullStringType = Parse($"{ScalarNames.String}!");
+ var nonNullStringListType = Parse($"[{ScalarNames.String}!]");
var nonNullBooleanType = Parse($"{ScalarNames.Boolean}!");
var appDirectiveListType = Parse($"[{nameof(__AppliedDirective)}!]!");
@@ -44,6 +45,14 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
pureResolver: Resolvers.AppliedDirectives));
}
+ if (context.DescriptorContext.Options.EnableOptInFeatures)
+ {
+ def.Fields.Add(new(
+ Names.RequiresOptIn,
+ type: nonNullStringListType,
+ pureResolver: Resolvers.RequiresOptIn));
+ }
+
return def;
}
@@ -65,6 +74,11 @@ public static object AppliedDirectives(IResolverContext context)
=> context.Parent().Directives
.Where(t => t.Type.IsPublic)
.Select(d => d.AsSyntaxNode());
+
+ public static object RequiresOptIn(IResolverContext context)
+ => context.Parent().Directives
+ .Where(t => t.Type is RequiresOptInDirectiveType)
+ .Select(d => d.AsValue().Feature);
}
public static class Names
@@ -76,6 +90,7 @@ public static class Names
public const string IsDeprecated = "isDeprecated";
public const string DeprecationReason = "deprecationReason";
public const string AppliedDirectives = "appliedDirectives";
+ public const string RequiresOptIn = "requiresOptIn";
}
}
#pragma warning restore IDE1006 // Naming Styles
diff --git a/src/HotChocolate/Core/src/Types/Types/Introspection/__Field.cs b/src/HotChocolate/Core/src/Types/Types/Introspection/__Field.cs
index 999418d7472..2b089e26ec9 100644
--- a/src/HotChocolate/Core/src/Types/Types/Introspection/__Field.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Introspection/__Field.cs
@@ -18,11 +18,14 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
{
var stringType = Create(ScalarNames.String);
var nonNullStringType = Parse($"{ScalarNames.String}!");
+ var nonNullStringListType = Parse($"[{ScalarNames.String}!]");
var nonNullTypeType = Parse($"{nameof(__Type)}!");
var nonNullBooleanType = Parse($"{ScalarNames.Boolean}!");
var argumentListType = Parse($"[{nameof(__InputValue)}!]!");
var directiveListType = Parse($"[{nameof(__AppliedDirective)}!]!");
+ var optInFeaturesEnabled = context.DescriptorContext.Options.EnableOptInFeatures;
+
var def = new ObjectTypeDefinition(
Names.__Field,
TypeResources.Field_Description,
@@ -32,7 +35,12 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
{
new(Names.Name, type: nonNullStringType, pureResolver: Resolvers.Name),
new(Names.Description, type: stringType, pureResolver: Resolvers.Description),
- new(Names.Args, type: argumentListType, pureResolver: Resolvers.Arguments)
+ new(
+ Names.Args,
+ type: argumentListType,
+ pureResolver: optInFeaturesEnabled
+ ? Resolvers.ArgumentsWithOptIn
+ : Resolvers.Arguments)
{
Arguments =
{
@@ -60,6 +68,17 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
pureResolver: Resolvers.AppliedDirectives));
}
+ if (optInFeaturesEnabled)
+ {
+ def.Fields.Single(f => f.Name == Names.Args)
+ .Arguments
+ .Add(new(Names.IncludeOptIn, type: nonNullStringListType));
+
+ def.Fields.Add(new(Names.RequiresOptIn,
+ type: nonNullStringListType,
+ pureResolver: Resolvers.RequiresOptIn));
+ }
+
return def;
}
@@ -71,7 +90,21 @@ public static string Name(IResolverContext context)
public static string? Description(IResolverContext context)
=> context.Parent().Description;
- public static object Arguments(IResolverContext context)
+ public static object ArgumentsWithOptIn(IResolverContext context)
+ {
+ var includeOptIn = context.ArgumentValue(Names.IncludeOptIn) ?? [];
+
+ // If an argument requires opting into features "f1" and "f2", then `includeOptIn`
+ // must list at least one of the features in order for the argument to be included.
+ return Arguments(context).Where(
+ a => a
+ .Directives
+ .Where(d => d.Type is RequiresOptInDirectiveType)
+ .Select(d => d.AsValue().Feature)
+ .Any(feature => includeOptIn.Contains(feature)));
+ }
+
+ public static IEnumerable Arguments(IResolverContext context)
{
var field = context.Parent();
return context.ArgumentValue(Names.IncludeDeprecated)
@@ -93,6 +126,12 @@ public static object AppliedDirectives(IResolverContext context) =>
.Directives
.Where(t => t.Type.IsPublic)
.Select(d => d.AsSyntaxNode());
+
+ public static object RequiresOptIn(IResolverContext context) =>
+ context.Parent()
+ .Directives
+ .Where(t => t.Type is RequiresOptInDirectiveType)
+ .Select(d => d.AsValue().Feature);
}
public static class Names
@@ -107,6 +146,8 @@ public static class Names
public const string IncludeDeprecated = "includeDeprecated";
public const string DeprecationReason = "deprecationReason";
public const string AppliedDirectives = "appliedDirectives";
+ public const string RequiresOptIn = "requiresOptIn";
+ public const string IncludeOptIn = "includeOptIn";
}
}
#pragma warning restore IDE1006 // Naming Styles
diff --git a/src/HotChocolate/Core/src/Types/Types/Introspection/__InputValue.cs b/src/HotChocolate/Core/src/Types/Types/Introspection/__InputValue.cs
index eeffec1488d..b21b5f592b2 100644
--- a/src/HotChocolate/Core/src/Types/Types/Introspection/__InputValue.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Introspection/__InputValue.cs
@@ -19,6 +19,7 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
{
var stringType = Create(ScalarNames.String);
var nonNullStringType = Parse($"{ScalarNames.String}!");
+ var nonNullStringListType = Parse($"[{ScalarNames.String}!]");
var nonNullTypeType = Parse($"{nameof(__Type)}!");
var nonNullBooleanType = Parse($"{ScalarNames.Boolean}!");
var appDirectiveListType = Parse($"[{nameof(__AppliedDirective)}!]!");
@@ -54,6 +55,14 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
pureResolver: Resolvers.AppliedDirectives));
}
+ if (context.DescriptorContext.Options.EnableOptInFeatures)
+ {
+ def.Fields.Add(new(
+ Names.RequiresOptIn,
+ type: nonNullStringListType,
+ pureResolver: Resolvers.RequiresOptIn));
+ }
+
return def;
}
@@ -85,6 +94,12 @@ public static object AppliedDirectives(IResolverContext context)
.Directives
.Where(t => t.Type.IsPublic)
.Select(d => d.AsSyntaxNode());
+
+ public static object RequiresOptIn(IResolverContext context)
+ => context.Parent()
+ .Directives
+ .Where(t => t.Type is RequiresOptInDirectiveType)
+ .Select(d => d.AsValue().Feature);
}
public static class Names
@@ -98,6 +113,7 @@ public static class Names
public const string AppliedDirectives = "appliedDirectives";
public const string IsDeprecated = "isDeprecated";
public const string DeprecationReason = "deprecationReason";
+ public const string RequiresOptIn = "requiresOptIn";
}
}
#pragma warning restore IDE1006 // Naming Styles
diff --git a/src/HotChocolate/Core/src/Types/Types/Introspection/__OptInFeatureStability.cs b/src/HotChocolate/Core/src/Types/Types/Introspection/__OptInFeatureStability.cs
new file mode 100644
index 00000000000..25ede0fe29f
--- /dev/null
+++ b/src/HotChocolate/Core/src/Types/Types/Introspection/__OptInFeatureStability.cs
@@ -0,0 +1,58 @@
+#pragma warning disable IDE1006 // Naming Styles
+using HotChocolate.Configuration;
+using HotChocolate.Language;
+using HotChocolate.Properties;
+using HotChocolate.Resolvers;
+using HotChocolate.Types.Descriptors.Definitions;
+using static HotChocolate.Types.Descriptors.TypeReference;
+
+#nullable enable
+
+namespace HotChocolate.Types.Introspection;
+
+///
+/// An OptInFeatureStability object describes the stability level of an opt-in feature.
+///
+[Introspection]
+// ReSharper disable once InconsistentNaming
+internal sealed class __OptInFeatureStability : ObjectType
+{
+ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext context)
+ {
+ var nonNullStringType = Parse($"{ScalarNames.String}!");
+
+ return new ObjectTypeDefinition(
+ Names.__OptInFeatureStability,
+ TypeResources.OptInFeatureStability_Description,
+ typeof(DirectiveNode))
+ {
+ Fields =
+ {
+ new(Names.Feature, type: nonNullStringType, pureResolver: Resolvers.Feature),
+ new(Names.Stability, type: nonNullStringType, pureResolver: Resolvers.Stability)
+ }
+ };
+ }
+
+ private static class Resolvers
+ {
+ public static string Feature(IResolverContext context) =>
+ ((StringValueNode)context.Parent()
+ .Arguments
+ .Single(a => a.Name.Value == Names.Feature).Value).Value;
+
+ public static string Stability(IResolverContext context) =>
+ ((StringValueNode)context.Parent()
+ .Arguments
+ .Single(a => a.Name.Value == Names.Stability).Value).Value;
+ }
+
+ public static class Names
+ {
+ // ReSharper disable once InconsistentNaming
+ public const string __OptInFeatureStability = "__OptInFeatureStability";
+ public const string Feature = "feature";
+ public const string Stability = "stability";
+ }
+}
+#pragma warning restore IDE1006 // Naming Styles
diff --git a/src/HotChocolate/Core/src/Types/Types/Introspection/__Schema.cs b/src/HotChocolate/Core/src/Types/Types/Introspection/__Schema.cs
index d9da3a034e5..6bab69a5070 100644
--- a/src/HotChocolate/Core/src/Types/Types/Introspection/__Schema.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Introspection/__Schema.cs
@@ -1,7 +1,9 @@
#pragma warning disable IDE1006 // Naming Styles
using HotChocolate.Configuration;
+using HotChocolate.Features;
using HotChocolate.Resolvers;
using HotChocolate.Types.Descriptors.Definitions;
+using HotChocolate.Types.Interceptors;
using static HotChocolate.Properties.TypeResources;
using static HotChocolate.Types.Descriptors.TypeReference;
@@ -21,6 +23,8 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
var nonNullTypeType = Parse($"{nameof(__Type)}!");
var directiveListType = Parse($"[{nameof(__Directive)}!]!");
var appDirectiveListType = Parse($"[{nameof(__AppliedDirective)}!]!");
+ var nonNullStringListType = Parse($"[{ScalarNames.String}!]");
+ var optInFeatureStabilityListType = Parse($"[{nameof(__OptInFeatureStability)}!]!");
var def = new ObjectTypeDefinition(Names.__Schema, Schema_Description, typeof(ISchema))
{
@@ -55,6 +59,19 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
pureResolver: Resolvers.AppliedDirectives));
}
+ if (context.DescriptorContext.Options.EnableOptInFeatures)
+ {
+ def.Fields.Add(new(
+ Names.OptInFeatures,
+ type: nonNullStringListType,
+ pureResolver: Resolvers.OptInFeatures));
+
+ def.Fields.Add(new(
+ Names.OptInFeatureStability,
+ type: optInFeatureStabilityListType,
+ pureResolver: Resolvers.OptInFeatureStability));
+ }
+
return def;
}
@@ -82,6 +99,14 @@ public static object AppliedDirectives(IResolverContext context)
=> context.Parent().Directives
.Where(t => t.Type.IsPublic)
.Select(d => d.AsSyntaxNode());
+
+ public static object OptInFeatures(IResolverContext context)
+ => context.Parent().Features.GetRequired();
+
+ public static object OptInFeatureStability(IResolverContext context)
+ => context.Parent().Directives
+ .Where(t => t.Type is OptInFeatureStabilityDirectiveType)
+ .Select(d => d.AsSyntaxNode());
}
public static class Names
@@ -95,6 +120,8 @@ public static class Names
public const string SubscriptionType = "subscriptionType";
public const string Directives = "directives";
public const string AppliedDirectives = "appliedDirectives";
+ public const string OptInFeatures = "optInFeatures";
+ public const string OptInFeatureStability = "optInFeatureStability";
}
}
#pragma warning restore IDE1006 // Naming Styles
diff --git a/src/HotChocolate/Core/src/Types/Types/Introspection/__Type.cs b/src/HotChocolate/Core/src/Types/Types/Introspection/__Type.cs
index 74fa9ff852d..1a8cd4f1e31 100644
--- a/src/HotChocolate/Core/src/Types/Types/Introspection/__Type.cs
+++ b/src/HotChocolate/Core/src/Types/Types/Introspection/__Type.cs
@@ -26,6 +26,9 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
var enumValueListType = Parse($"[{nameof(__EnumValue)}!]");
var inputValueListType = Parse($"[{nameof(__InputValue)}!]");
var directiveListType = Parse($"[{nameof(__AppliedDirective)}!]!");
+ var nonNullStringListType = Parse($"[{ScalarNames.String}!]");
+
+ var optInFeaturesEnabled = context.DescriptorContext.Options.EnableOptInFeatures;
var def = new ObjectTypeDefinition(
Names.__Type,
@@ -37,7 +40,12 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
new(Names.Kind, type: kindType, pureResolver: Resolvers.Kind),
new(Names.Name, type: stringType, pureResolver: Resolvers.Name),
new(Names.Description, type: stringType, pureResolver: Resolvers.Description),
- new(Names.Fields, type: fieldListType, pureResolver: Resolvers.Fields)
+ new(
+ Names.Fields,
+ type: fieldListType,
+ pureResolver: optInFeaturesEnabled
+ ? Resolvers.FieldsWithOptIn
+ : Resolvers.Fields)
{
Arguments =
{
@@ -50,7 +58,12 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
},
new(Names.Interfaces, type: typeListType, pureResolver: Resolvers.Interfaces),
new(Names.PossibleTypes, type: typeListType, pureResolver: Resolvers.PossibleTypes),
- new(Names.EnumValues, type: enumValueListType, pureResolver: Resolvers.EnumValues)
+ new(
+ Names.EnumValues,
+ type: enumValueListType,
+ pureResolver: optInFeaturesEnabled
+ ? Resolvers.EnumValuesWithOptIn
+ : Resolvers.EnumValues)
{
Arguments =
{
@@ -61,9 +74,12 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
},
},
},
- new(Names.InputFields,
+ new(
+ Names.InputFields,
type: inputValueListType,
- pureResolver: Resolvers.InputFields)
+ pureResolver: optInFeaturesEnabled
+ ? Resolvers.InputFieldsWithOptIn
+ : Resolvers.InputFields)
{
Arguments =
{
@@ -96,6 +112,21 @@ protected override ObjectTypeDefinition CreateDefinition(ITypeDiscoveryContext c
pureResolver: Resolvers.AppliedDirectives));
}
+ if (optInFeaturesEnabled)
+ {
+ def.Fields.Single(f => f.Name == Names.EnumValues)
+ .Arguments
+ .Add(new(Names.IncludeOptIn, type: nonNullStringListType));
+
+ def.Fields.Single(f => f.Name == Names.Fields)
+ .Arguments
+ .Add(new(Names.IncludeOptIn, type: nonNullStringListType));
+
+ def.Fields.Single(f => f.Name == Names.InputFields)
+ .Arguments
+ .Add(new(Names.IncludeOptIn, type: nonNullStringListType));
+ }
+
return def;
}
@@ -110,7 +141,35 @@ public static object Kind(IResolverContext context)
public static object? Description(IResolverContext context)
=> context.Parent() is INamedType n ? n.Description : null;
- public static object? Fields(IResolverContext context)
+ public static object? FieldsWithOptIn(IResolverContext context)
+ {
+ var type = context.Parent();
+
+ if (type is IComplexOutputType)
+ {
+ var fields = Fields(context);
+
+ if (fields is null)
+ {
+ return default;
+ }
+
+ var includeOptIn = context.ArgumentValue(Names.IncludeOptIn) ?? [];
+
+ // If a field requires opting into features "f1" and "f2", then `includeOptIn`
+ // must list at least one of the features in order for the field to be included.
+ return fields.Where(
+ f => f
+ .Directives
+ .Where(d => d.Type is RequiresOptInDirectiveType)
+ .Select(d => d.AsValue().Feature)
+ .Any(feature => includeOptIn.Contains(feature)));
+ }
+
+ return default;
+ }
+
+ public static IEnumerable? Fields(IResolverContext context)
{
var type = context.Parent();
var includeDeprecated = context.ArgumentValue(Names.IncludeDeprecated);
@@ -137,14 +196,71 @@ public static object Kind(IResolverContext context)
: null
: null;
- public static object? EnumValues(IResolverContext context)
+ public static object? EnumValuesWithOptIn(IResolverContext context)
+ {
+ var type = context.Parent();
+
+ if (type is EnumType)
+ {
+ var enumValues = EnumValues(context);
+
+ if (enumValues is null)
+ {
+ return default;
+ }
+
+ var includeOptIn = context.ArgumentValue(Names.IncludeOptIn) ?? [];
+
+ // If an enum value requires opting into features "f1" and "f2", then `includeOptIn`
+ // must list at least one of the features in order for the value to be included.
+ return enumValues.Where(
+ v => v
+ .Directives
+ .Where(d => d.Type is RequiresOptInDirectiveType)
+ .Select(d => d.AsValue().Feature)
+ .Any(feature => includeOptIn.Contains(feature)));
+ }
+
+ return default;
+ }
+
+ public static IEnumerable? EnumValues(IResolverContext context)
=> context.Parent() is EnumType et
? context.ArgumentValue(Names.IncludeDeprecated)
? et.Values
: et.Values.Where(t => !t.IsDeprecated)
: null;
- public static object? InputFields(IResolverContext context)
+ public static object? InputFieldsWithOptIn(IResolverContext context)
+ {
+ var type = context.Parent();
+
+ if (type is IInputObjectType)
+ {
+ var inputFields = InputFields(context);
+
+ if (inputFields is null)
+ {
+ return default;
+ }
+
+ var includeOptIn = context.ArgumentValue(Names.IncludeOptIn) ?? [];
+
+ // If an input field requires opting into features "f1" and "f2", then
+ // `includeOptIn` must list at least one of the features in order for the field to
+ // be included.
+ return inputFields.Where(
+ f => f
+ .Directives
+ .Where(d => d.Type is RequiresOptInDirectiveType)
+ .Select(d => d.AsValue().Feature)
+ .Any(feature => includeOptIn.Contains(feature)));
+ }
+
+ return default;
+ }
+
+ public static IEnumerable? InputFields(IResolverContext context)
=> context.Parent() is IInputObjectType iot
? context.ArgumentValue(Names.IncludeDeprecated)
? iot.Fields
@@ -192,6 +308,7 @@ public static class Names
public const string SpecifiedByUrl = "specifiedByURL";
public const string IncludeDeprecated = "includeDeprecated";
public const string AppliedDirectives = "appliedDirectives";
+ public const string IncludeOptIn = "includeOptIn";
}
}
#pragma warning restore IDE1006 // Naming Styles
diff --git a/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs b/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs
index 04479e33ece..990573d3dcc 100644
--- a/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs
+++ b/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs
@@ -538,4 +538,24 @@ public static ISchemaError DuplicateFieldName(
.SetTypeSystemObject(type)
.Build();
}
+
+ public static ISchemaError RequiresOptInOnRequiredInputField(
+ IInputObjectType type,
+ IInputField field)
+ => SchemaErrorBuilder.New()
+ .SetMessage(ErrorHelper_RequiresOptInOnRequiredInputField)
+ .SetType(type)
+ .SetField(field)
+ .Build();
+
+ public static ISchemaError RequiresOptInOnRequiredArgument(
+ IComplexOutputType type,
+ IOutputField field,
+ IInputField argument)
+ => SchemaErrorBuilder.New()
+ .SetMessage(ErrorHelper_RequiresOptInOnRequiredArgument)
+ .SetType(type)
+ .SetField(field)
+ .SetArgument(argument)
+ .Build();
}
diff --git a/src/HotChocolate/Core/test/Execution.Tests/DependencyInjection/RequestExecutorBuilderExtensions_OptInFeatures.Tests.cs b/src/HotChocolate/Core/test/Execution.Tests/DependencyInjection/RequestExecutorBuilderExtensions_OptInFeatures.Tests.cs
new file mode 100644
index 00000000000..22cf6cea965
--- /dev/null
+++ b/src/HotChocolate/Core/test/Execution.Tests/DependencyInjection/RequestExecutorBuilderExtensions_OptInFeatures.Tests.cs
@@ -0,0 +1,82 @@
+using CookieCrumble;
+using HotChocolate.Types;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace HotChocolate.Execution.DependencyInjection;
+
+public class RequestExecutorBuilderExtensionsOptInFeaturesTests
+{
+ [Fact]
+ public void OptInFeatureStability_NullBuilder_ThrowsArgumentNullException()
+ {
+ void Fail() => RequestExecutorBuilderExtensions
+ .OptInFeatureStability(null!, "feature", "stability");
+
+ Assert.Throws(Fail);
+ }
+
+ [Fact]
+ public void OptInFeatureStability_NullFeature_ThrowsArgumentNullException()
+ {
+ void Fail() => new ServiceCollection()
+ .AddGraphQL()
+ .OptInFeatureStability(null!, "stability");
+
+ Assert.Throws(Fail);
+ }
+
+ [Fact]
+ public void OptInFeatureStability_NullStability_ThrowsArgumentNullException()
+ {
+ void Fail() => new ServiceCollection()
+ .AddGraphQL()
+ .OptInFeatureStability("feature", null!);
+
+ Assert.Throws(Fail);
+ }
+
+ [Fact]
+ public async Task ExecuteRequestAsync_OptInFeatureStability_MatchesSnapshot()
+ {
+ (await new ServiceCollection()
+ .AddGraphQLServer()
+ .ModifyOptions(o => o.EnableOptInFeatures = true)
+ .AddQueryType(d => d.Name("Query").Field("foo").Resolve("bar"))
+ .OptInFeatureStability("feature1", "stability1")
+ .OptInFeatureStability("feature2", "stability2")
+ .ExecuteRequestAsync(
+ OperationRequestBuilder
+ .New()
+ .SetDocument(
+ """
+ {
+ __schema {
+ optInFeatureStability {
+ feature
+ stability
+ }
+ }
+ }
+ """)
+ .Build()))
+ .MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__schema": {
+ "optInFeatureStability": [
+ {
+ "feature": "feature1",
+ "stability": "stability1"
+ },
+ {
+ "feature": "feature2",
+ "stability": "stability2"
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+}
diff --git a/src/HotChocolate/Core/test/Execution.Tests/OptInFeaturesIntrospectionTests.cs b/src/HotChocolate/Core/test/Execution.Tests/OptInFeaturesIntrospectionTests.cs
new file mode 100644
index 00000000000..d843d4ad61c
--- /dev/null
+++ b/src/HotChocolate/Core/test/Execution.Tests/OptInFeaturesIntrospectionTests.cs
@@ -0,0 +1,562 @@
+using CookieCrumble;
+using HotChocolate.Types;
+
+namespace HotChocolate.Execution;
+
+public sealed class OptInFeaturesIntrospectionTests
+{
+ [Fact]
+ public async Task Execute_IntrospectionOnSchema_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __schema {
+ optInFeatures
+ optInFeatureStability {
+ feature
+ stability
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__schema": {
+ "optInFeatures": [
+ "enumValueFeature1",
+ "enumValueFeature2",
+ "inputFieldFeature1",
+ "inputFieldFeature2",
+ "objectFieldArgFeature1",
+ "objectFieldArgFeature2",
+ "objectFieldFeature1",
+ "objectFieldFeature2"
+ ],
+ "optInFeatureStability": [
+ {
+ "feature": "enumValueFeature1",
+ "stability": "draft"
+ },
+ {
+ "feature": "enumValueFeature2",
+ "stability": "experimental"
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnObjectFields_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "Query") {
+ fields(includeOptIn: ["objectFieldFeature1"]) {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "fields": [
+ {
+ "requiresOptIn": [
+ "objectFieldFeature1",
+ "objectFieldFeature2"
+ ]
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnObjectFieldsFeatureDoesNotExist_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "Query") {
+ fields(includeOptIn: ["objectFieldFeatureDoesNotExist"]) {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "fields": []
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnObjectFieldsNoIncludedFeatures_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "Query") {
+ fields {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "fields": []
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnArgs_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "Query") {
+ fields(includeOptIn: ["objectFieldFeature1"]) {
+ args(includeOptIn: ["objectFieldArgFeature1"]) {
+ requiresOptIn
+ }
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "fields": [
+ {
+ "args": [
+ {
+ "requiresOptIn": [
+ "objectFieldArgFeature1",
+ "objectFieldArgFeature2"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnArgsFeatureDoesNotExist_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "Query") {
+ fields(includeOptIn: ["objectFieldFeature1"]) {
+ args(includeOptIn: ["objectFieldArgFeatureDoesNotExist"]) {
+ requiresOptIn
+ }
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "fields": [
+ {
+ "args": []
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnArgsNoIncludedFeatures_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "Query") {
+ fields(includeOptIn: ["objectFieldFeature1"]) {
+ args {
+ requiresOptIn
+ }
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "fields": [
+ {
+ "args": []
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnInputFields_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "ExampleInput") {
+ inputFields(includeOptIn: ["inputFieldFeature1"]) {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "inputFields": [
+ {
+ "requiresOptIn": [
+ "inputFieldFeature1",
+ "inputFieldFeature2"
+ ]
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnInputFieldsFeatureDoesNotExist_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "ExampleInput") {
+ inputFields(includeOptIn: ["inputFieldFeatureDoesNotExist"]) {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "inputFields": []
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnInputFieldsNoIncludedFeatures_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "ExampleInput") {
+ inputFields {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "inputFields": []
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnEnumValues_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "ExampleEnum") {
+ enumValues(includeOptIn: ["enumValueFeature1"]) {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "enumValues": [
+ {
+ "requiresOptIn": [
+ "enumValueFeature1",
+ "enumValueFeature2"
+ ]
+ }
+ ]
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnEnumValuesFeatureDoesNotExist_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "ExampleEnum") {
+ enumValues(includeOptIn: ["enumValueFeatureDoesNotExist"]) {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "enumValues": []
+ }
+ }
+ }
+ """);
+ }
+
+ [Fact]
+ public async Task Execute_IntrospectionOnEnumValuesNoIncludedFeatures_MatchesSnapshot()
+ {
+ // arrange
+ const string query =
+ """
+ {
+ __type(name: "ExampleEnum") {
+ enumValues {
+ requiresOptIn
+ }
+ }
+ }
+ """;
+
+ var executor = CreateSchema().MakeExecutable();
+
+ // act
+ var result = await executor.ExecuteAsync(query);
+
+ // assert
+ result.MatchInlineSnapshot(
+ """
+ {
+ "data": {
+ "__type": {
+ "enumValues": []
+ }
+ }
+ }
+ """);
+ }
+
+ private static ISchema CreateSchema()
+ {
+ return SchemaBuilder.New()
+ .SetSchema(
+ s => s
+ .OptInFeatureStability("enumValueFeature1", "draft")
+ .OptInFeatureStability("enumValueFeature2", "experimental"))
+ .AddQueryType()
+ .AddType()
+ .AddType()
+ .ModifyOptions(o => o.EnableOptInFeatures = true)
+ .Create();
+ }
+
+ private sealed class QueryType : ObjectType
+ {
+ protected override void Configure(IObjectTypeDescriptor descriptor)
+ {
+ descriptor.Name(OperationTypeNames.Query);
+
+ descriptor
+ .Field("field")
+ .Type()
+ .Argument(
+ "argument",
+ a => a
+ .Type()
+ .RequiresOptIn("objectFieldArgFeature1")
+ .RequiresOptIn("objectFieldArgFeature2"))
+ .Resolve(() => 1)
+ .RequiresOptIn("objectFieldFeature1")
+ .RequiresOptIn("objectFieldFeature2");
+ }
+ }
+
+ private sealed class ExampleInputType : InputObjectType
+ {
+ protected override void Configure(IInputObjectTypeDescriptor descriptor)
+ {
+ descriptor
+ .Field("field")
+ .Type()
+ .RequiresOptIn("inputFieldFeature1")
+ .RequiresOptIn("inputFieldFeature2");
+ }
+ }
+
+ private sealed class ExampleEnumType : EnumType
+ {
+ protected override void Configure(IEnumTypeDescriptor descriptor)
+ {
+ descriptor
+ .Name("ExampleEnum")
+ .Value("VALUE")
+ .RequiresOptIn("enumValueFeature1")
+ .RequiresOptIn("enumValueFeature2");
+ }
+ }
+}
diff --git a/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/RequiresOptInValidation.cs b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/RequiresOptInValidation.cs
new file mode 100644
index 00000000000..529d5a7d6ab
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/RequiresOptInValidation.cs
@@ -0,0 +1,83 @@
+namespace HotChocolate.Configuration.Validation;
+
+public class RequiresOptInValidation : TypeValidationTestBase
+{
+ [Fact]
+ public void Must_Not_Appear_On_Required_Input_Object_Field()
+ {
+ ExpectError(
+ """
+ input Input {
+ field: Int!
+ @requiresOptIn(feature: "feature1")
+ @requiresOptIn(feature: "feature2")
+ }
+ """);
+ }
+
+ [Fact]
+ public void May_Appear_On_Required_With_Default_Input_Object_Field()
+ {
+ ExpectValid(
+ """
+ type Query { field: Int }
+
+ input Input {
+ field: Int! = 1 @requiresOptIn(feature: "feature")
+ }
+ """);
+ }
+
+ [Fact]
+ public void May_Appear_On_Nullable_Input_Object_Field()
+ {
+ ExpectValid(
+ """
+ type Query { field: Int }
+
+ input Input {
+ field: Int @requiresOptIn(feature: "feature")
+ }
+ """);
+ }
+
+ [Fact]
+ public void Must_Not_Appear_On_Required_Argument()
+ {
+ ExpectError(
+ """
+ type Object {
+ field(
+ argument: Int!
+ @requiresOptIn(feature: "feature1")
+ @requiresOptIn(feature: "feature2")): Int
+ }
+ """);
+ }
+
+ [Fact]
+ public void May_Appear_On_Required_With_Default_Argument()
+ {
+ ExpectValid(
+ """
+ type Query { field: Int }
+
+ type Object {
+ field(argument: Int! = 1 @requiresOptIn(feature: "feature")): Int
+ }
+ """);
+ }
+
+ [Fact]
+ public void May_Appear_On_Nullable_Argument()
+ {
+ ExpectValid(
+ """
+ type Query { field: Int }
+
+ type Object {
+ field(argument: Int @requiresOptIn(feature: "feature")): Int
+ }
+ """);
+ }
+}
diff --git a/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/TypeValidationTestBase.cs b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/TypeValidationTestBase.cs
index 1ae9297cf58..0faa20ffa68 100644
--- a/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/TypeValidationTestBase.cs
+++ b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/TypeValidationTestBase.cs
@@ -9,7 +9,11 @@ public static void ExpectValid(string schema)
SchemaBuilder.New()
.AddDocumentFromString(schema)
.Use(_ => _ => default)
- .ModifyOptions(o => o.EnableOneOf = true)
+ .ModifyOptions(o =>
+ {
+ o.EnableOneOf = true;
+ o.EnableOptInFeatures = true;
+ })
.Create();
}
@@ -20,7 +24,11 @@ public static void ExpectError(string schema, params Action[] erro
SchemaBuilder.New()
.AddDocumentFromString(schema)
.Use(_ => _ => default)
- .ModifyOptions(o => o.EnableOneOf = true)
+ .ModifyOptions(o =>
+ {
+ o.EnableOneOf = true;
+ o.EnableOptInFeatures = true;
+ })
.Create();
Assert.Fail("Expected error!");
}
diff --git a/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/__snapshots__/RequiresOptInValidation.Must_Not_Appear_On_Required_Argument.snap b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/__snapshots__/RequiresOptInValidation.Must_Not_Appear_On_Required_Argument.snap
new file mode 100644
index 00000000000..b81afc16f53
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/__snapshots__/RequiresOptInValidation.Must_Not_Appear_On_Required_Argument.snap
@@ -0,0 +1,18 @@
+{
+ "message": "The @requiresOptIn directive must not appear on required (non-null without a default) arguments.",
+ "type": "Object",
+ "extensions": {
+ "argument": "argument",
+ "field": "field"
+ }
+}
+
+{
+ "message": "The @requiresOptIn directive must not appear on required (non-null without a default) arguments.",
+ "type": "Object",
+ "extensions": {
+ "argument": "argument",
+ "field": "field"
+ }
+}
+
diff --git a/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/__snapshots__/RequiresOptInValidation.Must_Not_Appear_On_Required_Input_Object_Field.snap b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/__snapshots__/RequiresOptInValidation.Must_Not_Appear_On_Required_Input_Object_Field.snap
new file mode 100644
index 00000000000..95853af7257
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Configuration/Validation/__snapshots__/RequiresOptInValidation.Must_Not_Appear_On_Required_Input_Object_Field.snap
@@ -0,0 +1,16 @@
+{
+ "message": "The @requiresOptIn directive must not appear on required (non-null without a default) input object field definitions.",
+ "type": "Input",
+ "extensions": {
+ "field": "field"
+ }
+}
+
+{
+ "message": "The @requiresOptIn directive must not appear on required (non-null without a default) input object field definitions.",
+ "type": "Input",
+ "extensions": {
+ "field": "field"
+ }
+}
+
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Directives/OptInFeatureStabilityDirectiveTests.cs b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/OptInFeatureStabilityDirectiveTests.cs
new file mode 100644
index 00000000000..88a964e0d5d
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/OptInFeatureStabilityDirectiveTests.cs
@@ -0,0 +1,90 @@
+#nullable enable
+
+using CookieCrumble;
+using HotChocolate.Execution;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace HotChocolate.Types.Directives;
+
+public sealed class OptInFeatureStabilityDirectiveTests
+{
+ [Theory]
+ [InlineData(null)]
+ [InlineData("123")]
+ [InlineData("123abc")]
+ [InlineData("!abc")]
+ [InlineData("abc!")]
+ [InlineData("a b c")]
+ public void OptInFeatureStabilityDirective_InvalidFeatureName_ThrowsArgumentException(
+ string? feature)
+ {
+ // arrange & act
+ void Action() => _ = new OptInFeatureStabilityDirective(feature!, "stability");
+
+ // assert
+ Assert.Throws(Action);
+ }
+
+ [Theory]
+ [InlineData(null)]
+ [InlineData("123")]
+ [InlineData("123abc")]
+ [InlineData("!abc")]
+ [InlineData("abc!")]
+ [InlineData("a b c")]
+ public void OptInFeatureStabilityDirective_InvalidStability_ThrowsArgumentException(
+ string? stability)
+ {
+ // arrange & act
+ void Action() => _ = new OptInFeatureStabilityDirective("feature", stability!);
+
+ // assert
+ Assert.Throws(Action);
+ }
+
+ [Fact]
+ public async Task BuildSchemaAsync_CodeFirst_MatchesSnapshot()
+ {
+ // arrange & act
+ var schema =
+ await new ServiceCollection()
+ .AddGraphQL()
+ .ModifyOptions(o => o.EnableOptInFeatures = true)
+ .SetSchema(s => s
+ .OptInFeatureStability("feature1", "stability1")
+ .OptInFeatureStability("feature2", "stability2"))
+ .AddQueryType(d => d.Field("field").Type())
+ .UseField(_ => _ => default)
+ .BuildSchemaAsync();
+
+ // assert
+ schema.MatchSnapshot();
+ }
+
+ [Fact]
+ public async Task BuildSchemaAsync_SchemaFirst_MatchesSnapshot()
+ {
+ // arrange & act
+ var schema =
+ await new ServiceCollection()
+ .AddGraphQL()
+ .ModifyOptions(o => o.EnableOptInFeatures = true)
+ .AddDocumentFromString(
+ """
+ schema
+ @optInFeatureStability(feature: "feature1", stability: "stability1")
+ @optInFeatureStability(feature: "feature2", stability: "stability2") {
+ query: Query
+ }
+
+ type Query {
+ field: Int
+ }
+ """)
+ .UseField(_ => _ => default)
+ .BuildSchemaAsync();
+
+ // assert
+ schema.MatchSnapshot();
+ }
+}
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Directives/RequiresOptInDirectiveTests.cs b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/RequiresOptInDirectiveTests.cs
new file mode 100644
index 00000000000..9fbec195c0d
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/RequiresOptInDirectiveTests.cs
@@ -0,0 +1,142 @@
+#nullable enable
+
+using CookieCrumble;
+using HotChocolate.Execution;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace HotChocolate.Types.Directives;
+
+public sealed class RequiresOptInDirectiveTests
+{
+ [Theory]
+ [InlineData(null)]
+ [InlineData("123")]
+ [InlineData("123abc")]
+ [InlineData("!abc")]
+ [InlineData("abc!")]
+ [InlineData("a b c")]
+ public void RequiresOptInDirective_InvalidFeatureName_ThrowsArgumentException(string? feature)
+ {
+ // arrange & act
+ void Action() => _ = new RequiresOptInDirective(feature!);
+
+ // assert
+ Assert.Throws(Action);
+ }
+
+ [Fact]
+ public async Task BuildSchemaAsync_CodeFirst_MatchesSnapshot()
+ {
+ // arrange & act
+ var schema =
+ await new ServiceCollection()
+ .AddGraphQL()
+ .ModifyOptions(o => o.EnableOptInFeatures = true)
+ .AddQueryType(d => d
+ .Field("field")
+ .Type()
+ .Argument(
+ "argument",
+ a => a
+ .Type()
+ .RequiresOptIn("objectFieldArgFeature1")
+ .RequiresOptIn("objectFieldArgFeature2"))
+ .Resolve(() => 1)
+ .RequiresOptIn("objectFieldFeature1")
+ .RequiresOptIn("objectFieldFeature2"))
+ .AddInputObjectType(d => d
+ .Name("Input")
+ .Field("field")
+ .Type()
+ .RequiresOptIn("inputFieldFeature1")
+ .RequiresOptIn("inputFieldFeature2"))
+ .AddEnumType(d => d
+ .Name("Enum")
+ .Value("VALUE")
+ .RequiresOptIn("enumValueFeature1")
+ .RequiresOptIn("enumValueFeature2"))
+ .BuildSchemaAsync();
+
+ // assert
+ schema.MatchSnapshot();
+ }
+
+ [Fact]
+ public async Task BuildSchemaAsync_ImplementationFirst_MatchesSnapshot()
+ {
+ // arrange & act
+ var schema =
+ await new ServiceCollection()
+ .AddGraphQL()
+ .ModifyOptions(o => o.EnableOptInFeatures = true)
+ .AddQueryType()
+ .AddInputObjectType()
+ .AddType()
+ .BuildSchemaAsync();
+
+ // assert
+ schema.MatchSnapshot();
+ }
+
+ [Fact]
+ public async Task BuildSchemaAsync_SchemaFirst_MatchesSnapshot()
+ {
+ // arrange & act
+ var schema =
+ await new ServiceCollection()
+ .AddGraphQL()
+ .ModifyOptions(o => o.EnableOptInFeatures = true)
+ .AddDocumentFromString(
+ """
+ type Query {
+ field(
+ argument: Int
+ @requiresOptIn(feature: "objectFieldArgFeature1")
+ @requiresOptIn(feature: "objectFieldArgFeature2")): Int
+ @requiresOptIn(feature: "objectFieldFeature1")
+ @requiresOptIn(feature: "objectFieldFeature2")
+ }
+
+ input Input {
+ field: Int
+ @requiresOptIn(feature: "inputFieldFeature1")
+ @requiresOptIn(feature: "inputFieldFeature2")
+ }
+
+ enum Enum {
+ VALUE
+ @requiresOptIn(feature: "enumValueFeature1")
+ @requiresOptIn(feature: "enumValueFeature2")
+ }
+ """)
+ .UseField(_ => _ => default)
+ .BuildSchemaAsync();
+
+ // assert
+ schema.MatchSnapshot();
+ }
+
+ public sealed class Query
+ {
+ [RequiresOptIn("objectFieldFeature1")]
+ [RequiresOptIn("objectFieldFeature2")]
+ public int? GetField(
+ [RequiresOptIn("objectFieldArgFeature1")]
+ [RequiresOptIn("objectFieldArgFeature2")] int? argument)
+ => argument;
+ }
+
+ public sealed class Input
+ {
+ [RequiresOptIn("inputFieldFeature1")]
+ [RequiresOptIn("inputFieldFeature2")]
+ public int? Field { get; set; }
+ }
+
+ public enum Enum
+ {
+ [RequiresOptIn("enumValueFeature1")]
+ [RequiresOptIn("enumValueFeature2")]
+ Value
+ }
+}
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/OptInFeatureStabilityDirectiveTests.BuildSchemaAsync_CodeFirst_MatchesSnapshot.graphql b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/OptInFeatureStabilityDirectiveTests.BuildSchemaAsync_CodeFirst_MatchesSnapshot.graphql
new file mode 100644
index 00000000000..b4543769c00
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/OptInFeatureStabilityDirectiveTests.BuildSchemaAsync_CodeFirst_MatchesSnapshot.graphql
@@ -0,0 +1,10 @@
+schema @optInFeatureStability(feature: "feature1", stability: "stability1") @optInFeatureStability(feature: "feature2", stability: "stability2") {
+ query: Query
+}
+
+type Query {
+ field: Int
+}
+
+"Sets the stability level of an opt-in feature."
+directive @optInFeatureStability("The name of the feature for which to set the stability." feature: String! "The stability level of the feature." stability: String!) repeatable on SCHEMA
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/OptInFeatureStabilityDirectiveTests.BuildSchemaAsync_SchemaFirst_MatchesSnapshot.graphql b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/OptInFeatureStabilityDirectiveTests.BuildSchemaAsync_SchemaFirst_MatchesSnapshot.graphql
new file mode 100644
index 00000000000..b4543769c00
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/OptInFeatureStabilityDirectiveTests.BuildSchemaAsync_SchemaFirst_MatchesSnapshot.graphql
@@ -0,0 +1,10 @@
+schema @optInFeatureStability(feature: "feature1", stability: "stability1") @optInFeatureStability(feature: "feature2", stability: "stability2") {
+ query: Query
+}
+
+type Query {
+ field: Int
+}
+
+"Sets the stability level of an opt-in feature."
+directive @optInFeatureStability("The name of the feature for which to set the stability." feature: String! "The stability level of the feature." stability: String!) repeatable on SCHEMA
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_CodeFirst_MatchesSnapshot.graphql b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_CodeFirst_MatchesSnapshot.graphql
new file mode 100644
index 00000000000..83d995a4cbe
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_CodeFirst_MatchesSnapshot.graphql
@@ -0,0 +1,18 @@
+schema {
+ query: Query
+}
+
+type Query {
+ field(argument: Int @requiresOptIn(feature: "objectFieldArgFeature1") @requiresOptIn(feature: "objectFieldArgFeature2")): Int @requiresOptIn(feature: "objectFieldFeature1") @requiresOptIn(feature: "objectFieldFeature2")
+}
+
+input Input {
+ field: Int @requiresOptIn(feature: "inputFieldFeature1") @requiresOptIn(feature: "inputFieldFeature2")
+}
+
+enum Enum {
+ VALUE @requiresOptIn(feature: "enumValueFeature1") @requiresOptIn(feature: "enumValueFeature2")
+}
+
+"Indicates that the given field, argument, input field, or enum value requires giving explicit consent before being used."
+directive @requiresOptIn("The name of the feature that requires opt in." feature: String!) repeatable on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_ImplementationFirst_MatchesSnapshot.graphql b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_ImplementationFirst_MatchesSnapshot.graphql
new file mode 100644
index 00000000000..83d995a4cbe
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_ImplementationFirst_MatchesSnapshot.graphql
@@ -0,0 +1,18 @@
+schema {
+ query: Query
+}
+
+type Query {
+ field(argument: Int @requiresOptIn(feature: "objectFieldArgFeature1") @requiresOptIn(feature: "objectFieldArgFeature2")): Int @requiresOptIn(feature: "objectFieldFeature1") @requiresOptIn(feature: "objectFieldFeature2")
+}
+
+input Input {
+ field: Int @requiresOptIn(feature: "inputFieldFeature1") @requiresOptIn(feature: "inputFieldFeature2")
+}
+
+enum Enum {
+ VALUE @requiresOptIn(feature: "enumValueFeature1") @requiresOptIn(feature: "enumValueFeature2")
+}
+
+"Indicates that the given field, argument, input field, or enum value requires giving explicit consent before being used."
+directive @requiresOptIn("The name of the feature that requires opt in." feature: String!) repeatable on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION
diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_SchemaFirst_MatchesSnapshot.graphql b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_SchemaFirst_MatchesSnapshot.graphql
new file mode 100644
index 00000000000..83d995a4cbe
--- /dev/null
+++ b/src/HotChocolate/Core/test/Types.Tests/Types/Directives/__snapshots__/RequiresOptInDirectiveTests.BuildSchemaAsync_SchemaFirst_MatchesSnapshot.graphql
@@ -0,0 +1,18 @@
+schema {
+ query: Query
+}
+
+type Query {
+ field(argument: Int @requiresOptIn(feature: "objectFieldArgFeature1") @requiresOptIn(feature: "objectFieldArgFeature2")): Int @requiresOptIn(feature: "objectFieldFeature1") @requiresOptIn(feature: "objectFieldFeature2")
+}
+
+input Input {
+ field: Int @requiresOptIn(feature: "inputFieldFeature1") @requiresOptIn(feature: "inputFieldFeature2")
+}
+
+enum Enum {
+ VALUE @requiresOptIn(feature: "enumValueFeature1") @requiresOptIn(feature: "enumValueFeature2")
+}
+
+"Indicates that the given field, argument, input field, or enum value requires giving explicit consent before being used."
+directive @requiresOptIn("The name of the feature that requires opt in." feature: String!) repeatable on FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM_VALUE | INPUT_FIELD_DEFINITION