You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>To continue to use the <codeclass="language-text">ExecutionHelper.GetArguments</code> method, you may need to refer to the GraphQL.NET source
1407
1407
for reference.</p>
1408
1408
<p>If you directly implement <codeclass="language-text">IResolveFieldContext</code>, you must now also implement the <codeclass="language-text">ExecutionContext</code> property.</p>
1409
+
<h3id="30-code-classlanguage-textgraphtypeinitializecode-method-is-now-called-after-initialization-is-complete" style="position:relative;"><ahref="#30-code-classlanguage-textgraphtypeinitializecode-method-is-now-called-after-initialization-is-complete" aria-label="30 code classlanguage textgraphtypeinitializecode method is now called after initialization is complete permalink" class="anchor before"><svgaria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><pathfill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>30. <codeclass="language-text">GraphType.Initialize</code> method is now called after initialization is complete</h3>
1410
+
<p>The <codeclass="language-text">Initialize</code> method on each <codeclass="language-text">GraphType</code> is now called after the schema has been fully initialized. As such,
1411
+
you cannot add fields to the graph type expecting <codeclass="language-text">SchemaTypes</code> to resolve types and apply name converters.
1412
+
If it is necessary for your graph type to add fields dynamically, you should do so in the constructor or else
1413
+
set the <codeclass="language-text">ResolvedType</code> property for the new fields. Failing to do so will result in a schema validation exception.</p>
1414
+
<p>Please note that the constructor is the preferred place to add fields to a graph type.</p>
Name <spanclass="token operator">=</span><spanclass="token string">"field"</span><spanclass="token punctuation">,</span><spanclass="token comment">// name converter is not applied here, so the name must be exactly as desired</span>
0 commit comments