@@ -15,58 +15,34 @@ public class SchemaOptions : IReadOnlySchemaOptions
15
15
private BindingBehavior _defaultBindingBehavior = BindingBehavior . Implicit ;
16
16
private FieldBindingFlags _defaultFieldBindingFlags = FieldBindingFlags . Instance ;
17
17
18
- /// <summary>
19
- /// Gets or sets the name of the query type.
20
- /// </summary>
18
+ /// <inheritdoc cref="IReadOnlySchemaOptions.QueryTypeName"/>
21
19
public string ? QueryTypeName { get ; set ; }
22
20
23
- /// <summary>
24
- /// Gets or sets the name of the mutation type.
25
- /// </summary>
21
+ /// <inheritdoc cref="IReadOnlySchemaOptions.MutationTypeName"/>
26
22
public string ? MutationTypeName { get ; set ; }
27
23
28
- /// <summary>
29
- /// Gets or sets the name of the subscription type.
30
- /// </summary>
24
+ /// <inheritdoc cref="IReadOnlySchemaOptions.SubscriptionTypeName"/>
31
25
public string ? SubscriptionTypeName { get ; set ; }
32
26
33
- /// <summary>
34
- /// Defines if the schema allows the query type to be omitted.
35
- /// </summary>
27
+ /// <inheritdoc cref="IReadOnlySchemaOptions.StrictValidation"/>
36
28
public bool StrictValidation { get ; set ; } = true ;
37
29
38
- /// <summary>
39
- /// Defines if the CSharp XML documentation shall be integrated.
40
- /// </summary>
30
+ /// <inheritdoc cref="IReadOnlySchemaOptions.UseXmlDocumentation"/>
41
31
public bool UseXmlDocumentation { get ; set ; } = true ;
42
32
43
- /// <summary>
44
- /// A delegate which defines the name of the XML documentation file to be read.
45
- /// Only used if <seealso cref="UseXmlDocumentation"/> is true.
46
- /// </summary>
33
+ /// <inheritdoc cref="IReadOnlySchemaOptions.ResolveXmlDocumentationFileName"/>
47
34
public Func < Assembly , string > ? ResolveXmlDocumentationFileName { get ; set ; }
48
35
49
- /// <summary>
50
- /// Defines if fields shall be sorted by name.
51
- /// Default: <c>false</c>
52
- /// </summary>
36
+ /// <inheritdoc cref="IReadOnlySchemaOptions.SortFieldsByName"/>
53
37
public bool SortFieldsByName { get ; set ; }
54
38
55
- /// <summary>
56
- /// Defines if types shall be removed from the schema that are
57
- /// unreachable from the root types.
58
- /// </summary>
39
+ /// <inheritdoc cref="IReadOnlySchemaOptions.RemoveUnreachableTypes"/>
59
40
public bool RemoveUnreachableTypes { get ; set ; }
60
41
61
- /// <summary>
62
- /// Defines if unused type system directives shall
63
- /// be removed from the schema.
64
- /// </summary>
42
+ /// <inheritdoc cref="IReadOnlySchemaOptions.RemoveUnusedTypeSystemDirectives"/>
65
43
public bool RemoveUnusedTypeSystemDirectives { get ; set ; } = true ;
66
44
67
- /// <summary>
68
- /// Defines the default binding behavior.
69
- /// </summary>
45
+ /// <inheritdoc cref="IReadOnlySchemaOptions.DefaultBindingBehavior"/>
70
46
public BindingBehavior DefaultBindingBehavior
71
47
{
72
48
get => _defaultBindingBehavior ;
@@ -81,10 +57,7 @@ public BindingBehavior DefaultBindingBehavior
81
57
}
82
58
}
83
59
84
- /// <summary>
85
- /// Defines which members shall be by default inferred as GraphQL fields.
86
- /// This default applies to <see cref="ObjectType"/> and <see cref="ObjectTypeExtension"/>.
87
- /// </summary>
60
+ /// <inheritdoc cref="IReadOnlySchemaOptions.DefaultFieldBindingFlags"/>
88
61
public FieldBindingFlags DefaultFieldBindingFlags
89
62
{
90
63
get => _defaultFieldBindingFlags ;
@@ -99,137 +72,69 @@ public FieldBindingFlags DefaultFieldBindingFlags
99
72
}
100
73
}
101
74
102
- /// <summary>
103
- /// Defines on which fields a middleware pipeline can be applied on.
104
- /// </summary>
75
+ /// <inheritdoc cref="IReadOnlySchemaOptions.FieldMiddleware"/>
105
76
public FieldMiddlewareApplication FieldMiddleware { get ; set ; } =
106
77
FieldMiddlewareApplication . UserDefinedFields ;
107
78
108
- /// <summary>
109
- /// Defines if the experimental directive introspection feature shall be enabled.
110
- /// </summary>
79
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableDirectiveIntrospection"/>
111
80
public bool EnableDirectiveIntrospection { get ; set ; }
112
81
113
- /// <summary>
114
- /// The default directive visibility when directive introspection is enabled.
115
- /// </summary>
82
+ /// <inheritdoc cref="IReadOnlySchemaOptions.DefaultDirectiveVisibility"/>
116
83
public DirectiveVisibility DefaultDirectiveVisibility { get ; set ; } =
117
84
DirectiveVisibility . Public ;
118
85
119
- /// <summary>
120
- /// Defines that the default resolver execution strategy.
121
- /// </summary>
86
+ /// <inheritdoc cref="IReadOnlySchemaOptions.DefaultResolverStrategy"/>
122
87
public ExecutionStrategy DefaultResolverStrategy { get ; set ; } =
123
88
ExecutionStrategy . Parallel ;
124
89
125
- /// <summary>
126
- /// Defines if the order of important middleware components shall be validated.
127
- /// </summary>
90
+ /// <inheritdoc cref="IReadOnlySchemaOptions.ValidatePipelineOrder"/>
128
91
public bool ValidatePipelineOrder { get ; set ; } = true ;
129
92
130
- /// <summary>
131
- /// Defines if the runtime types of types shall be validated.
132
- /// </summary>
93
+ /// <inheritdoc cref="IReadOnlySchemaOptions.StrictRuntimeTypeValidation"/>
133
94
public bool StrictRuntimeTypeValidation { get ; set ; }
134
95
135
- /// <summary>
136
- /// Defines a delegate that determines if a runtime
137
- /// is an instance of an <see cref="ObjectType{T}"/>.
138
- /// </summary>
96
+ /// <inheritdoc cref="IReadOnlySchemaOptions.DefaultIsOfTypeCheck"/>
139
97
public IsOfTypeFallback ? DefaultIsOfTypeCheck { get ; set ; }
140
98
141
- /// <summary>
142
- /// Defines if the OneOf spec RFC is enabled. This feature is experimental.
143
- /// </summary>
99
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableOneOf"/>
144
100
public bool EnableOneOf { get ; set ; }
145
101
146
- /// <summary>
147
- /// Defines if the schema building process shall validate that all nodes are resolvable through `node`.
148
- /// </summary>
102
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnsureAllNodesCanBeResolved"/>
149
103
public bool EnsureAllNodesCanBeResolved { get ; set ; } = true ;
150
104
151
- /// <summary>
152
- /// Defines if flag enums should be inferred as object value nodes
153
- /// </summary>
154
- /// <example>
155
- /// Given the following enum
156
- /// <br/>
157
- /// <code>
158
- /// [Flags]
159
- /// public enum Example { First, Second, Third }
160
- ///
161
- /// public class Query { public Example Loopback(Example input) => input;
162
- /// </code>
163
- /// <br/>
164
- /// The following schema is produced
165
- /// <br/>
166
- /// <code>
167
- /// type Query {
168
- /// loopback(input: ExampleFlagsInput!): ExampleFlags
169
- /// }
170
- ///
171
- /// type ExampleFlags {
172
- /// isFirst: Boolean!
173
- /// isSecond: Boolean!
174
- /// isThird: Boolean!
175
- /// }
176
- ///
177
- /// input ExampleFlagsInput {
178
- /// isFirst: Boolean
179
- /// isSecond: Boolean
180
- /// isThird: Boolean
181
- /// }
182
- /// </code>
183
- /// </example>
105
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableFlagEnums"/>
184
106
public bool EnableFlagEnums { get ; set ; }
185
107
186
- /// <summary>
187
- /// Enables the @defer directive.
188
- /// Defer and stream both are at the moment preview features.
189
- /// </summary>
108
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableDefer"/>
190
109
public bool EnableDefer { get ; set ; }
191
110
192
- /// <summary>
193
- /// Enables the @stream directive.
194
- /// Defer and stream both are at the moment preview features.
195
- /// </summary>
111
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableStream"/>
196
112
public bool EnableStream { get ; set ; }
197
113
198
- /// <summary>
199
- /// Specifies the maximum allowed nodes that can be fetched at once through the nodes field.
200
- /// </summary>
114
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableSemanticNonNull"/>
115
+ public bool EnableSemanticNonNull { get ; set ; }
116
+
117
+ /// <inheritdoc cref="IReadOnlySchemaOptions.MaxAllowedNodeBatchSize"/>
201
118
public int MaxAllowedNodeBatchSize { get ; set ; } = 50 ;
202
119
203
- /// <summary>
204
- /// Specified if the leading I shall be stripped from the interface name.
205
- /// </summary>
120
+ /// <inheritdoc cref="IReadOnlySchemaOptions.StripLeadingIFromInterface"/>
206
121
public bool StripLeadingIFromInterface { get ; set ; }
207
122
208
- /// <summary>
209
- /// Specifies that the true nullability proto type shall be enabled.
210
- /// </summary>
123
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableTrueNullability"/>
211
124
public bool EnableTrueNullability { get ; set ; }
212
125
213
- /// <summary>
214
- /// Specifies that the @tag directive shall be registered with the type system.
215
- /// </summary>
126
+ /// <inheritdoc cref="IReadOnlySchemaOptions.EnableTag"/>
216
127
public bool EnableTag { get ; set ; } = true ;
217
128
218
- /// <summary>
219
- /// Defines the default dependency injection scope for query fields.
220
- /// </summary>
129
+ /// <inheritdoc cref="IReadOnlySchemaOptions.DefaultQueryDependencyInjectionScope"/>
221
130
public DependencyInjectionScope DefaultQueryDependencyInjectionScope { get ; set ; } =
222
131
DependencyInjectionScope . Resolver ;
223
132
224
- /// <summary>
225
- /// Defines the default dependency injection scope for mutation fields.
226
- /// </summary>
133
+ /// <inheritdoc cref="IReadOnlySchemaOptions.DefaultMutationDependencyInjectionScope"/>
227
134
public DependencyInjectionScope DefaultMutationDependencyInjectionScope { get ; set ; } =
228
135
DependencyInjectionScope . Request ;
229
136
230
- /// <summary>
231
- /// Defines if the root field pages shall be published to the promise cache.
232
- /// </summary>
137
+ /// <inheritdoc cref="IReadOnlySchemaOptions.PublishRootFieldPagesToPromiseCache"/>
233
138
public bool PublishRootFieldPagesToPromiseCache { get ; set ; } = true ;
234
139
235
140
/// <summary>
@@ -263,6 +168,7 @@ public static SchemaOptions FromOptions(IReadOnlySchemaOptions options)
263
168
EnableFlagEnums = options . EnableFlagEnums ,
264
169
EnableDefer = options . EnableDefer ,
265
170
EnableStream = options . EnableStream ,
171
+ EnableSemanticNonNull = options . EnableSemanticNonNull ,
266
172
DefaultFieldBindingFlags = options . DefaultFieldBindingFlags ,
267
173
MaxAllowedNodeBatchSize = options . MaxAllowedNodeBatchSize ,
268
174
StripLeadingIFromInterface = options . StripLeadingIFromInterface ,
0 commit comments