Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
1.2 KiB

// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Squidex.AI.Implementation.OpenAI;
using Squidex.Domain.Apps.Core;
using Squidex.Domain.Apps.Core.ExtractReferenceIds;
using Squidex.Domain.Apps.Entities.Contents.GraphQL;
using Squidex.Domain.Apps.Entities.Contents.GraphQL.Types.Primitives;
using Squidex.Web.Services;
namespace Squidex.Config.Domain;
public static class QueryServices
{
public static void AddSquidexQueries(this IServiceCollection services, IConfiguration config)
{
services.Configure<GraphQLOptions>(config,
"graphql");
services.AddSingletonAs<StringReferenceExtractor>()
.AsSelf();
services.AddSingletonAs<UrlGenerator>()
.As<IUrlGenerator>().As<IHttpImageEndpoint>();
services.AddSingletonAs<InstantGraphType>()
.AsSelf();
services.AddSingletonAs<JsonGraphType>()
.AsSelf();
}
}