using GraphQL.Server; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace xDataService.Interfaces { /// /// this is a helper class which provides all requirements to providing GraphQL /// based data manipulating mechanism ... /// public interface IXGraphQLHelper { /// /// Register all GraphQL Enum Types ... /// Enum Types use to Map string values to Enum values in propper way and vise versa in GraphQL ... /// must extended from EnumerationGraphType ... /// void AddXGraphEnumTypes (IServiceCollection services); /// /// Register all GraphQL Object Types ... /// GraphQL works based on Types, so for representing each data you have to define a Type ... /// must extended from ObjectGraphType or XBaseGraphObjectType /// void AddXGraphObjectTypes (IServiceCollection services); /// /// Register all GraphQL Input Types ... /// InputTypes represent recieving data structure in GraphQL for doing mutations ... /// must extended from InputObjectGraphType ... /// void AddXGraphInputTypes (IServiceCollection services); /// /// Register all GraphQL Queries ... /// Queries in GraphQL used to provide data fetch and retrieve mechanism ... /// extended from ObjectGraphType ... /// void AddXGraphQueries (IServiceCollection services); /// /// Register all GraphQL Mutations ... /// Mutations is an Action types in GraphQL which data changed through them, like as Add, Update, Delete ... /// must extends from ObjectGraphType ... /// void AddXGraphMutations (IServiceCollection services); /// /// Register all GraphQL Subscriptions ... /// Subscriptions are listeners to specific events on data in GraphQL ... /// must extended from ObjectGraphType and implements IXBaseRepositoryEvents ... /// void AddXGraphSubscriptions (IServiceCollection services); /// /// Register all GraphQL Schemas ... /// each available Entity in Database must described to GraphQL with all Graph based stuffs such as : /// Queries, Types and etc, this must done through an Schema class. /// must extended from Schema ... /// void AddXGraphSchemas (IServiceCollection services); /// /// Add Schemas to GraphQL Builder ... /// here you must add all registered Schemas to GraphQLBuilder ... /// /// /// IGraphQLBuilder AddXGraphTypes (IGraphQLBuilder builder); /// /// Use all Registered Schemas by GraphQL and and GraphQLWebSockets ... /// /// void UseXGraph (IApplicationBuilder app); } }