diff --git a/GraphQL-Core/CSharpClassBuilder.cs b/GraphQL-Core/CSharpClassBuilder.cs index 914b30a..4da16fd 100644 --- a/GraphQL-Core/CSharpClassBuilder.cs +++ b/GraphQL-Core/CSharpClassBuilder.cs @@ -10,7 +10,7 @@ namespace GraphQLCore /// /// Responsible for dynamically creating C# classes to wrap instances of GenericType{T} /// - internal static class GraphQLCoreTypeWrapperGenerator + public static class GraphQLCoreTypeWrapperGenerator { internal static AssemblyBuilder asmBuilder = AssemblyBuilder.DefineDynamicAssembly(CreateDynamicAssemblyName(), AssemblyBuilderAccess.Run); internal static ModuleBuilder mdBuilder = null; diff --git a/GraphQL-Core/Extensions/GraphQLExtensions.cs b/GraphQL-Core/Extensions/GraphQLExtensions.cs index ca5214d..de817cf 100644 --- a/GraphQL-Core/Extensions/GraphQLExtensions.cs +++ b/GraphQL-Core/Extensions/GraphQLExtensions.cs @@ -10,7 +10,7 @@ namespace GraphQLCore.Extensions /// /// Contains extension methods for GraphQLCore /// - internal static class GraphQLExtensions + public static class GraphQLExtensions { /// /// Given a C# Type instance that represents a value type, enumeration, or class, returns the appropriate GraphQL.NET Type diff --git a/GraphQL-Core/Extensions/ReflectionExtensions.cs b/GraphQL-Core/Extensions/ReflectionExtensions.cs index 0a7371b..2cdd262 100644 --- a/GraphQL-Core/Extensions/ReflectionExtensions.cs +++ b/GraphQL-Core/Extensions/ReflectionExtensions.cs @@ -9,7 +9,7 @@ namespace GraphQLCore.Extensions /// /// Extensions necessary when performing reflection-based logic in GraphQLCore /// - internal static class ReflectionExtensions + public static class ReflectionExtensions { /// /// Detects whether a given type, , implements the given interface, diff --git a/GraphQL-Core/GraphQLBuilder.cs b/GraphQL-Core/GraphQLBuilder.cs index fdd3b83..d53f54a 100644 --- a/GraphQL-Core/GraphQLBuilder.cs +++ b/GraphQL-Core/GraphQLBuilder.cs @@ -123,7 +123,7 @@ public class GraphQLBuilder : IGraphQLBuilder /// /// Defaulted to null /// - internal StitchedQuery Schema { get; set; } + public StitchedQuery Schema { get; set; } /// /// Defaulted to null diff --git a/GraphQL-Core/GraphQLMiddleware.cs b/GraphQL-Core/GraphQLMiddleware.cs index 66fed6d..829990d 100644 --- a/GraphQL-Core/GraphQLMiddleware.cs +++ b/GraphQL-Core/GraphQLMiddleware.cs @@ -16,16 +16,22 @@ public static class GraphQLMiddleware /// /// /// An instance of IGraphQLBuilder that can be used to add types, queries, etc. - public static IGraphQLBuilder AddGraphQL(this IServiceCollection services, Expression> config) + public static IGraphQLBuilder AddGraphQL(this IServiceCollection services, Expression> config = null) { var builder = new GraphQLBuilder(services); - config - .Compile() - (builder) - .Build(); + if(config != null) + { + config + .Compile() + (builder) + .Build(); - return builder; + return null; + } + + else + return builder; } } } diff --git a/GraphQL-Core/Queries/Queries.cs b/GraphQL-Core/Queries/Queries.cs index 4b3098b..99fe614 100644 --- a/GraphQL-Core/Queries/Queries.cs +++ b/GraphQL-Core/Queries/Queries.cs @@ -12,7 +12,7 @@ public interface IGraphQLGenericQuery { } /// /// /// - internal class StitchedQuery : ObjectGraphType + public class StitchedQuery : ObjectGraphType { /// /// List of resolved fields @@ -35,7 +35,7 @@ public void Build() /// A user-defined query that acts as a container until the query is supplied to a StitchedQuery instance /// /// The return type of the query - internal class GenericQuery : ObjectGraphType, IGraphQLGenericQuery + public class GenericQuery : ObjectGraphType, IGraphQLGenericQuery { /// /// An instance of StitchedQuery that will received the proxy query diff --git a/GraphQL-Core/Resolvers/Resolvers.cs b/GraphQL-Core/Resolvers/Resolvers.cs index 17c0c7b..aadbeda 100644 --- a/GraphQL-Core/Resolvers/Resolvers.cs +++ b/GraphQL-Core/Resolvers/Resolvers.cs @@ -7,7 +7,7 @@ namespace GraphQLCore.Resolvers /// /// Interface for a generic field resolver /// - internal interface IGenericFieldResolver + public interface IGenericFieldResolver { /// /// When called, returns an instance of FieldType that can be added to any ObjectGraphType diff --git a/GraphQL-Core/Schemas/Schemas.cs b/GraphQL-Core/Schemas/Schemas.cs index 0d2df38..966248a 100644 --- a/GraphQL-Core/Schemas/Schemas.cs +++ b/GraphQL-Core/Schemas/Schemas.cs @@ -12,7 +12,7 @@ internal interface IGraphQLGenericSchema { } /// /// Schema which will be used to combine all user-provided queries /// - internal class SuperSchema : Schema, IGraphQLGenericSchema + public class SuperSchema : Schema, IGraphQLGenericSchema { /// /// Creates a new GraphQL Schema-node using the provided dependency resolver