Skip to content

Commit

Permalink
Merged Main
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Aug 27, 2021
2 parents cee5226 + 4c85246 commit db50286
Show file tree
Hide file tree
Showing 114 changed files with 841 additions and 450 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: ChilliCream Community Support
url: https://bit.ly/join-chillicream-slack
url: http://slack.chillicream.com/
about: Join us on slack! We have a vibrant community that is helping each other.
- name: ChilliCream Enterprise Support
url: https://chillicream.com/support
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ One of the easiest ways to contribute is to participate in discussions on GitHub

## General feedback and discussions?

Start a discussion on the [repository issue tracker](https://github.com/ChilliCream/hotchocolate/issues) or [join us on slack](https://bit.ly/joinchilli).
Start a discussion on the [repository issue tracker](https://github.com/ChilliCream/hotchocolate/issues) or [join us on slack](http://slack.chillicream.com/).

## Bugs and feature requests?

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![NuGet Package](https://img.shields.io/nuget/v/hotchocolate.svg)](https://www.nuget.org/packages/HotChocolate/)
[![License](https://img.shields.io/github/license/ChilliCream/hotchocolate.svg)](https://github.com/ChilliCream/hotchocolate/blob/main/LICENSE)
[![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=HotChocolate&metric=coverage)](https://sonarcloud.io/dashboard?id=HotChocolate)
[![Slack channel](https://img.shields.io/badge/join%20the%20community-on%20slack-blue.svg)](https://bit.ly/join-chillicream-slack)
[![Slack channel](https://img.shields.io/badge/join%20the%20community-on%20slack-blue.svg)](http://slack.chillicream.com/)
[![Twitter](https://img.shields.io/badge/join%20us-on%20twitter-green.svg)](https://twitter.com/chilli_cream)

---
Expand Down
2 changes: 1 addition & 1 deletion src/GreenDonut/src/Core/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ GreenDonut.GroupedDataLoader<TKey, TValue>.GroupedDataLoader(GreenDonut.IBatchSc
override sealed GreenDonut.BatchDataLoader<TKey, TValue>.FetchAsync(System.Collections.Generic.IReadOnlyList<TKey>! keys, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyList<GreenDonut.Result<TValue>>!>
override sealed GreenDonut.CacheDataLoader<TKey, TValue>.FetchAsync(System.Collections.Generic.IReadOnlyList<TKey>! keys, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyList<GreenDonut.Result<TValue>>!>
override sealed GreenDonut.GroupedDataLoader<TKey, TValue>.FetchAsync(System.Collections.Generic.IReadOnlyList<TKey>! keys, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyList<GreenDonut.Result<TValue[]!>>!>
static GreenDonut.AutoBatchScheduler.Default.get -> GreenDonut.AutoBatchScheduler!
static GreenDonut.AutoBatchScheduler.Default.get -> GreenDonut.AutoBatchScheduler!
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*REMOVED*HotChocolate.AuthorizeSchemaConfigurationExtensions
*REMOVED*static HotChocolate.AuthorizeSchemaConfigurationExtensions.RegisterAuthorizeDirectiveType(this HotChocolate.Configuration.ISchemaConfiguration! configuration) -> void
*REMOVED*static HotChocolate.AuthorizeSchemaConfigurationExtensions.RegisterAuthorizeDirectiveType(this HotChocolate.Configuration.ISchemaConfiguration! configuration) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ HotChocolate.AspNetCore.ToolOptionsFileMiddleware.ToolOptionsFileMiddleware(Micr
static HotChocolate.AspNetCore.Subscriptions.WebSocketSession.New(Microsoft.AspNetCore.Http.HttpContext! httpContext, HotChocolate.AspNetCore.Subscriptions.IMessagePipeline! messagePipeline, HotChocolate.AspNetCore.ISocketSessionInterceptor! socketSessionInterceptor) -> HotChocolate.AspNetCore.Subscriptions.WebSocketSession!
*REMOVED*static HotChocolate.AspNetCore.Subscriptions.WebSocketSession.New(Microsoft.AspNetCore.Http.HttpContext! httpContext, HotChocolate.AspNetCore.Subscriptions.IMessagePipeline! messagePipeline) -> HotChocolate.AspNetCore.Subscriptions.WebSocketSession!
static Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.MapBananaCakePop(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder! endpointRouteBuilder, string! toolPath = "/graphql/ui", string! requestPath = "/graphql") -> HotChocolate.AspNetCore.Extensions.GraphQLEndpointConventionBuilder!
*REMOVED*HotChocolate.AspNetCore.ToolOptionsFileMiddleware.ToolOptionsFileMiddleware(Microsoft.AspNetCore.Http.RequestDelegate! next, HotChocolate.Execution.IRequestExecutorResolver! executorResolver, HotChocolate.AspNetCore.Serialization.IHttpResultSerializer! resultSerializer, HotChocolate.NameString schemaName, Microsoft.AspNetCore.Http.PathString matchUrl) -> void
*REMOVED*HotChocolate.AspNetCore.ToolOptionsFileMiddleware.ToolOptionsFileMiddleware(Microsoft.AspNetCore.Http.RequestDelegate! next, HotChocolate.Execution.IRequestExecutorResolver! executorResolver, HotChocolate.AspNetCore.Serialization.IHttpResultSerializer! resultSerializer, HotChocolate.NameString schemaName, Microsoft.AspNetCore.Http.PathString matchUrl) -> void
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
using HotChocolate.AspNetCore.Subscriptions.Messages;
Expand Down Expand Up @@ -30,15 +31,22 @@ public async Task ProcessAsync(
ReadOnlySequence<byte> slice,
CancellationToken cancellationToken)
{
if (TryParseMessage(slice, out OperationMessage? message))
try
{
await HandleMessageAsync(connection, message, cancellationToken);
if (TryParseMessage(slice, out OperationMessage? message))
{
await HandleMessageAsync(connection, message, cancellationToken);
}
else
{
await connection.SendAsync(
KeepConnectionAliveMessage.Default,
CancellationToken.None);
}
}
else
catch (WebSocketException)
{
await connection.SendAsync(
KeepConnectionAliveMessage.Default,
CancellationToken.None);
// we will just stop receiving
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
using HotChocolate.AspNetCore.Subscriptions.Messages;
Expand Down Expand Up @@ -52,6 +53,10 @@ await _connection.SendAsync(
{
// the message processing was canceled.
}
catch (WebSocketException)
{
// we will just stop receiving
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Buffers;
using System.IO.Pipelines;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;

Expand Down Expand Up @@ -67,6 +68,10 @@ await _pipeline.ProcessAsync(
}
}
catch(OperationCanceledException) when (cancellationToken.IsCancellationRequested) { }
catch (WebSocketException)
{
// we will just stop receiving
}
finally
{
// reader should be completed always, so that related pipe writer can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Task SendAsync(
{
WebSocket? webSocket = _webSocket;

if (_disposed || webSocket == null)
if (_disposed || webSocket == null || webSocket.State != WebSocketState.Open)
{
return Task.CompletedTask;
}
Expand Down Expand Up @@ -95,6 +95,11 @@ public async Task ReceiveAsync(

if (success)
{
if (webSocket.State != WebSocketState.Open)
{
break;
}

try
{
socketResult = await webSocket.ReceiveAsync(buffer, cancellationToken);
Expand Down Expand Up @@ -122,6 +127,10 @@ public async Task ReceiveAsync(
{
// we will just stop receiving
}
catch (WebSocketException)
{
// we will just stop receiving
}
}

public async Task CloseAsync(
Expand All @@ -133,7 +142,7 @@ public async Task CloseAsync(
{
WebSocket? webSocket = _webSocket;

if (_disposed || Closed || webSocket is null)
if (_disposed || Closed || webSocket is null || webSocket.State != WebSocketState.Open)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ virtual HotChocolate.Execution.Instrumentation.DiagnosticEventListener.StopProce
*REMOVED*static Microsoft.Extensions.DependencyInjection.SchemaRequestExecutorBuilderExtensions.AddResolver(this HotChocolate.Execution.Configuration.IRequestExecutorBuilder! builder, HotChocolate.Resolvers.FieldResolver! fieldResolver) -> HotChocolate.Execution.Configuration.IRequestExecutorBuilder!
*REMOVED*static HotChocolate.Execution.Processing.OperationCompiler.Compile(string! operationId, HotChocolate.Language.DocumentNode! document, HotChocolate.Language.OperationDefinitionNode! operation, HotChocolate.ISchema! schema, HotChocolate.Types.ObjectType! rootType, System.Collections.Generic.IEnumerable<HotChocolate.Execution.Processing.ISelectionOptimizer!>? optimizers = null) -> HotChocolate.Execution.Processing.IPreparedOperation!
*REMOVED*static Microsoft.Extensions.DependencyInjection.SchemaRequestExecutorBuilderExtensions.AddConvention<TConvetion, TConcreteConvention>(this HotChocolate.Execution.Configuration.IRequestExecutorBuilder! builder, string? scope = null) -> HotChocolate.Execution.Configuration.IRequestExecutorBuilder!
*REMOVED*static HotChocolate.Execution.Processing.VariableRewriter.Rewrite(HotChocolate.Language.IValueNode! node, HotChocolate.Execution.IVariableValueCollection! variableValues) -> HotChocolate.Language.IValueNode!
*REMOVED*static HotChocolate.Execution.Processing.VariableRewriter.Rewrite(HotChocolate.Language.IValueNode! node, HotChocolate.Execution.IVariableValueCollection! variableValues) -> HotChocolate.Language.IValueNode!
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public sealed class UsePagingAttribute : DescriptorAttribute
private bool? _allowBackwardPagination;
private bool? _requirePagingBoundaries;
private bool? _inferConnectionNameFromField;
private NameString _name;

/// <summary>
/// Applies the offset paging middleware to the annotated property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ HotChocolate.Types.Pagination.QueryableCursorPagingProvider
HotChocolate.Types.Pagination.QueryableCursorPagingProvider.QueryableCursorPagingProvider() -> void
HotChocolate.Types.PagingObjectFieldDescriptorExtensions
HotChocolate.Types.UsePagingAttribute
HotChocolate.Types.UsePagingAttribute.AllowBackwardPagination.get -> bool
HotChocolate.Types.UsePagingAttribute.AllowBackwardPagination.set -> void
HotChocolate.Types.UsePagingAttribute.DefaultPageSize.get -> int
HotChocolate.Types.UsePagingAttribute.DefaultPageSize.set -> void
HotChocolate.Types.UsePagingAttribute.IncludeTotalCount.get -> bool
Expand All @@ -76,7 +78,9 @@ static HotChocolate.Types.EnumerableCursorPagingExtensions.ApplyCursorPagination
static HotChocolate.Types.Pagination.CursorPagingHelper.ApplyPagination<TSource, TEntity>(TSource source, HotChocolate.Types.Pagination.CursorPagingArguments arguments, HotChocolate.Types.Pagination.CursorPagingHelper.ApplySkip<TSource>! applySkip, HotChocolate.Types.Pagination.CursorPagingHelper.ApplyTake<TSource>! applyTake, HotChocolate.Types.Pagination.CursorPagingHelper.ToIndexEdgesAsync<TSource, TEntity>! toIndexEdgesAsync, HotChocolate.Types.Pagination.CursorPagingHelper.CountAsync<TSource>! countAsync, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<HotChocolate.Types.Pagination.Connection!>
static HotChocolate.Types.Pagination.IndexEdge<T>.Create(T node, int index) -> HotChocolate.Types.Pagination.IndexEdge<T>!
static HotChocolate.Types.Pagination.IndexEdge<T>.DeserializeCursor(string! cursor) -> int
static HotChocolate.Types.PagingObjectFieldDescriptorExtensions.AddPagingArguments(this HotChocolate.Types.IInterfaceFieldDescriptor! descriptor, bool allowBackwardPagination) -> HotChocolate.Types.IInterfaceFieldDescriptor!
static HotChocolate.Types.PagingObjectFieldDescriptorExtensions.AddPagingArguments(this HotChocolate.Types.IInterfaceFieldDescriptor! descriptor) -> HotChocolate.Types.IInterfaceFieldDescriptor!
static HotChocolate.Types.PagingObjectFieldDescriptorExtensions.AddPagingArguments(this HotChocolate.Types.IObjectFieldDescriptor! descriptor, bool allowBackwardPagination) -> HotChocolate.Types.IObjectFieldDescriptor!
static HotChocolate.Types.PagingObjectFieldDescriptorExtensions.AddPagingArguments(this HotChocolate.Types.IObjectFieldDescriptor! descriptor) -> HotChocolate.Types.IObjectFieldDescriptor!
virtual HotChocolate.Types.Pagination.QueryableCursorPagingHandler<TEntity>.ApplyCursorToEdges(System.Linq.IQueryable<TEntity>! allEdges, int? after, int? before) -> System.Linq.IQueryable<TEntity>!
virtual HotChocolate.Types.Pagination.QueryableCursorPagingHandler<TEntity>.ExecuteQueryableAsync(System.Linq.IQueryable<TEntity>! queryable, int offset, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyList<HotChocolate.Types.Pagination.IndexEdge<TEntity>!>!>
Expand Down
4 changes: 4 additions & 0 deletions src/HotChocolate/Core/src/Types/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,7 @@ const HotChocolate.Types.Introspection.__AppliedDirective.Names.Name = "name" ->
const HotChocolate.Types.Introspection.__DirectiveArgument.Names.__DirectiveArgument = "__DirectiveArgument" -> string!
const HotChocolate.Types.Introspection.__DirectiveArgument.Names.Name = "name" -> string!
const HotChocolate.Types.Introspection.__DirectiveArgument.Names.Value = "value" -> string!
const HotChocolate.Types.Pagination.PagingDefaults.AllowBackwardPagination = true -> bool
const HotChocolate.Types.Pagination.PagingDefaults.DefaultPageSize = 10 -> int
const HotChocolate.Types.Pagination.PagingDefaults.IncludeTotalCount = false -> bool
const HotChocolate.Types.Pagination.PagingDefaults.MaxPageSize = 50 -> int
Expand Down Expand Up @@ -2295,6 +2296,7 @@ HotChocolate.Types.IDescriptorExtension.OnBeforeCreate(System.Action<HotChocolat
HotChocolate.Types.IDescriptorExtension.OnBeforeCreate(System.Action<HotChocolate.Types.Descriptors.IDescriptorContext!, HotChocolate.Types.Descriptors.Definitions.DefinitionBase!>! configure) -> void
HotChocolate.Types.IDescriptorExtension.OnBeforeNaming(System.Action<HotChocolate.Configuration.ITypeCompletionContext!, HotChocolate.Types.Descriptors.Definitions.DefinitionBase!>! configure) -> HotChocolate.Types.INamedDependencyDescriptor!
HotChocolate.Types.IDescriptorExtension<T>
HotChocolate.Types.IDescriptorExtension<T>.Definition.get -> T!
HotChocolate.Types.IDescriptorExtension<T>.OnBeforeCompletion(System.Action<HotChocolate.Configuration.ITypeCompletionContext!, T!>! configure) -> HotChocolate.Types.ICompletedDependencyDescriptor!
HotChocolate.Types.IDescriptorExtension<T>.OnBeforeCreate(System.Action<HotChocolate.Types.Descriptors.IDescriptorContext!, T!>! configure) -> void
HotChocolate.Types.IDescriptorExtension<T>.OnBeforeCreate(System.Action<T!>! configure) -> void
Expand Down Expand Up @@ -2673,6 +2675,8 @@ HotChocolate.Types.Pagination.PagingMiddleware
HotChocolate.Types.Pagination.PagingMiddleware.InvokeAsync(HotChocolate.Resolvers.IMiddlewareContext! context) -> System.Threading.Tasks.Task!
HotChocolate.Types.Pagination.PagingMiddleware.PagingMiddleware(HotChocolate.Resolvers.FieldDelegate! next, HotChocolate.Types.Pagination.IPagingHandler! pagingHandler) -> void
HotChocolate.Types.Pagination.PagingOptions
HotChocolate.Types.Pagination.PagingOptions.AllowBackwardPagination.get -> bool?
HotChocolate.Types.Pagination.PagingOptions.AllowBackwardPagination.set -> void
HotChocolate.Types.Pagination.PagingOptions.DefaultPageSize.get -> int?
HotChocolate.Types.Pagination.PagingOptions.DefaultPageSize.set -> void
HotChocolate.Types.Pagination.PagingOptions.IncludeTotalCount.get -> bool?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ static Microsoft.Extensions.DependencyInjection.HotChocolateValidationBuilderExt
static Microsoft.Extensions.DependencyInjection.HotChocolateValidationBuilderExtensions.TryAddValidationVisitor<T>(this HotChocolate.Validation.Options.IValidationBuilder! builder, System.Func<System.IServiceProvider!, HotChocolate.Validation.Options.ValidationOptions!, T!>! factory, bool isCacheable = true) -> HotChocolate.Validation.Options.IValidationBuilder!
*REMOVED*HotChocolate.Validation.DocumentValidatorRule<TVisitor>.DocumentValidatorRule(TVisitor! visitor) -> void
*REMOVED*static Microsoft.Extensions.DependencyInjection.HotChocolateValidationBuilderExtensions.TryAddValidationVisitor<T>(this HotChocolate.Validation.Options.IValidationBuilder! builder, System.Func<System.IServiceProvider!, HotChocolate.Validation.Options.ValidationOptions!, T!>! factory) -> HotChocolate.Validation.Options.IValidationBuilder!
*REMOVED*static Microsoft.Extensions.DependencyInjection.HotChocolateValidationBuilderExtensions.TryAddValidationVisitor<T>(this HotChocolate.Validation.Options.IValidationBuilder! builder) -> HotChocolate.Validation.Options.IValidationBuilder!
*REMOVED*static Microsoft.Extensions.DependencyInjection.HotChocolateValidationBuilderExtensions.TryAddValidationVisitor<T>(this HotChocolate.Validation.Options.IValidationBuilder! builder) -> HotChocolate.Validation.Options.IValidationBuilder!
2 changes: 1 addition & 1 deletion src/HotChocolate/Data/src/Data/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ virtual HotChocolate.Data.Projections.SelectionVisitor<TContext>.VisitObjectType
*REMOVED*override HotChocolate.Data.Sorting.SortInputType.OnCompleteFields(HotChocolate.Configuration.ITypeCompletionContext! context, HotChocolate.Types.Descriptors.Definitions.InputObjectTypeDefinition! definition, System.Collections.Generic.ICollection<HotChocolate.Types.InputField!>! fields) -> void
*REMOVED*override HotChocolate.Data.Sorting.SortTypeInterceptor.OnBeforeCompleteName(HotChocolate.Configuration.ITypeCompletionContext! completionContext, HotChocolate.Types.Descriptors.Definitions.DefinitionBase! definition, System.Collections.Generic.IDictionary<string!, object!>! contextData) -> void
*REMOVED*override HotChocolate.Data.Sorting.SortTypeInterceptor.OnBeforeRegisterDependencies(HotChocolate.Configuration.ITypeDiscoveryContext! discoveryContext, HotChocolate.Types.Descriptors.Definitions.DefinitionBase! definition, System.Collections.Generic.IDictionary<string!, object!>! contextData) -> void
*REMOVED*virtual HotChocolate.Data.Filters.FilterOperationHandler<TContext, T>.TryHandleOperation(TContext! context, HotChocolate.Data.Filters.IFilterOperationField! field, HotChocolate.Language.ObjectFieldNode! node, out T result) -> bool
*REMOVED*virtual HotChocolate.Data.Filters.FilterOperationHandler<TContext, T>.TryHandleOperation(TContext! context, HotChocolate.Data.Filters.IFilterOperationField! field, HotChocolate.Language.ObjectFieldNode! node, out T result) -> bool
Loading

0 comments on commit db50286

Please sign in to comment.