Replies: 1 comment
-
A few days ago, I updated to the latest version 1.5.0-preview-17106 Before updating the latest version, I modified it in this way, but it doesn't work after updating, and the application prompt field has been registered
public static class GraphqlExtensions
{
public static void ReplaceObjectGraphType<TInput, TReplace, TInputType>(this IServiceCollection services)
where TInput : class
where TReplace : ObjectGraphType<TInput>
where TInputType : ObjectGraphType<TInput>, TReplace
{
services.AddSingleton<TInputType>();
//services.Replace(ServiceDescriptor.Singleton<TReplace, TInputType>(s => s.GetRequiredService<TInputType>()));
services.Replace(ServiceDescriptor.Singleton<ObjectGraphType<TInput>, TInputType>(s => s.GetRequiredService<TInputType>()));
services.Replace(ServiceDescriptor.Singleton<IObjectGraphType, TInputType>(s => s.GetRequiredService<TInputType>()));
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to add fields for registered types,
such as
MediaFieldQueryObjectType
andContentPickerFieldQueryObjectType
Does anyone know how to do that?
OrchardCore/src/OrchardCore.Modules/OrchardCore.Media/GraphQL/MediaFieldQueryObjectType.cs
Line 11 in 97abb2e
OrchardCore/src/OrchardCore.Modules/OrchardCore.ContentFields/GraphQL/Types/ContentPickerFieldQueryObjectType.cs
Line 13 in 97abb2e
Beta Was this translation helpful? Give feedback.
All reactions