From 60a5ea01084d3c5cfc0b3e7a2007d72656f43e90 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 4 Dec 2023 14:10:40 +0200 Subject: [PATCH 01/89] Require braces in .editorconfig --- .editorconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.editorconfig b/.editorconfig index fb8adc980ac..820a244b54e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -121,3 +121,12 @@ resharper_trailing_comma_in_multiline_lists = true resharper_wrap_before_binary_pattern_op = false resharper_wrap_chained_binary_expressions = chop_if_long resharper_wrap_chained_binary_patterns = chop_if_long + +# Require braces on all control statements +resharper_csharp_braces_for_ifelse = required +resharper_csharp_braces_for_for = required +resharper_csharp_braces_for_foreach = required +resharper_csharp_braces_for_while = required +resharper_csharp_braces_for_using = required +resharper_csharp_braces_for_lock = required +resharper_csharp_braces_for_fixed = required \ No newline at end of file From 37fe9d0dedc5a50c43d2bd9e63fe09645b3f9a82 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Fri, 17 Nov 2023 14:53:46 +0200 Subject: [PATCH 02/89] Start Migration --- .../Constants/WellKnownArgumentNames.cs | 5 + .../Constants/WellKnownTypeNames.cs | 17 ++- .../ApolloFederation/ExternalDirectiveType.cs | 43 +++++++- .../FederationResources.Designer.cs | 102 ++++++++++++++++++ .../Properties/FederationResources.resx | 55 +++++++++- 5 files changed, 213 insertions(+), 9 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs index 2ba2d494e34..ce937b10b72 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs @@ -3,5 +3,10 @@ namespace HotChocolate.ApolloFederation.Constants; internal static class WellKnownArgumentNames { public const string Fields = "fields"; + public const string From = "from"; + public const string Name = "name"; + public const string Resolvable = "resolvable"; public const string Representations = "representations"; + public const string Scopes = "scopes"; + public const string Url = "url"; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs index 89c1ae9fba1..3fc06312517 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs @@ -2,11 +2,24 @@ namespace HotChocolate.ApolloFederation.Constants; internal static class WellKnownTypeNames { + public const string AuthenticatedDirective = "authenticated"; + public const string ContactDirective = "contact"; + public const string ComposeDirective = "composeDirective"; + public const string Extends = "extends"; public const string External = "external"; - public const string Requires = "requires"; - public const string Provides = "provides"; + public const string Inaccessible = "inaccessible"; + public const string InterfaceObject = "interfaceObject"; public const string Key = "key"; + public const string Link = "link"; + public const string Override = "override"; + public const string Provides = "provides"; + public const string Requires = "requires"; + public const string RequiresScopes = "requiresScopes"; + public const string Shareable = "shareable"; + public const string Tag = "tag"; public const string FieldSet = "_FieldSet"; + public const string FieldSetV2 = "FieldSet"; + public const string Scope = "Scope"; public const string Any = "_Any"; public const string Entity = "_Entity"; public const string Service = "_Service"; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs index 52b9e4bcd47..9a347cc9ba5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs @@ -4,15 +4,24 @@ namespace HotChocolate.ApolloFederation; /// +/// +/// directive @external on FIELD_DEFINITION +/// +/// /// The @external directive is used to mark a field as owned by another service. /// This allows service A to use fields from service B while also knowing at runtime -/// the types of that field. +/// the types of that field. All the external fields should either be referenced from the @key, +/// @requires or @provides directives field sets. +/// +/// Due to the smart merging of entity types, Federation v2 no longer requires @external directive +/// on @key fields and can be safely omitted from the schema. @external directive is only required +/// on fields referenced by the @requires and @provides directive. /// /// -/// # extended from the Users service -/// extend type User @key(fields: "email") { -/// email: String @external -/// reviews: [Review] +/// type Foo @key(fields: "id") { +/// id: ID! +/// remoteField: String @external +/// localField: String @requires(fields: "remoteField") /// } /// /// @@ -24,3 +33,27 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) .Description(FederationResources.ExternalDirective_Description) .Location(DirectiveLocation.FieldDefinition); } + +/// +/// +/// directive @extends on OBJECT | INTERFACE +/// +/// +/// The @extends directive is used to represent type extensions in the schema. Federated extended types should have +/// corresponding @key directive defined that specifies primary key required to fetch the underlying object. +/// +/// # extended from the Users service +/// type Foo @extends @key(fields: "id") { +/// id: ID +/// description: String +/// } +/// +/// +public sealed class ExtendsDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Extends) + .Description(FederationResources.ExtendsDirective_Description) + .Location(DirectiveLocation.Object | DirectiveLocation.Interface); +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index a1f8b0ee7a2..1bbd18098fb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -45,6 +45,30 @@ internal static System.Globalization.CultureInfo Culture { } } + internal static string AuthenticatedDirective_Description { + get { + return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); + } + } + + internal static string ContactDirective_Description { + get { + return ResourceManager.GetString("ContactDirective_Description", resourceCulture); + } + } + + internal static string ComposeDirective_Description { + get { + return ResourceManager.GetString("ComposeDirective_Description", resourceCulture); + } + } + + internal static string ExtendsDirective_Description { + get { + return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); + } + } + internal static string ExternalDirective_Description { get { return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); @@ -57,12 +81,30 @@ internal static string FieldsetType_Description { } } + internal static string InaccessibleDirective_Description { + get { + return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); + } + } + + internal static string InterfaceObjectDirective_Description { + get { + return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); + } + } + internal static string KeyDirective_Description { get { return ResourceManager.GetString("KeyDirective_Description", resourceCulture); } } + internal static string OverrideDirective_Description { + get { + return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); + } + } + internal static string ProvidesDirective_Description { get { return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); @@ -75,6 +117,30 @@ internal static string RequiresDirective_Description { } } + internal static string RequiresScopesDirective_Description { + get { + return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); + } + } + + internal static string ScopeType_Description { + get { + return ResourceManager.GetString("ScopeType_Description", resourceCulture); + } + } + + internal static string ShareableDirective_Description { + get { + return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); + } + } + + internal static string TagDirective_Description { + get { + return ResourceManager.GetString("TagDirective_Description", resourceCulture); + } + } + internal static string EntityType_Description { get { return ResourceManager.GetString("EntityType_Description", resourceCulture); @@ -111,6 +177,30 @@ internal static string ThrowHelper_Requires_FieldSet_CannotBeEmpty { } } + internal static string ThrowHelper_ComposeDirective_Name_CannotBeEmpty { + get { + return ResourceManager.GetString("ThrowHelper_ComposeDirective_Name_CannotBeEmpty", resourceCulture); + } + } + + internal static string ThrowHelper_Link_Url_CannotBeEmpty { + get { + return ResourceManager.GetString("ThrowHelper_Link_Url_CannotBeEmpty", resourceCulture); + } + } + + internal static string ThrowHelper_Contact_Name_CannotBeEmpty { + get { + return ResourceManager.GetString("ThrowHelper_Contact_Name_CannotBeEmpty", resourceCulture); + } + } + + internal static string ThrowHelper_FederationVersion_Unknown { + get { + return ResourceManager.GetString("ThrowHelper_FederationVersion_Unknown", resourceCulture); + } + } + internal static string FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty { get { return ResourceManager.GetString("FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty", resourceCulture); @@ -129,6 +219,12 @@ internal static string FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullO } } + internal static string FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty { + get { + return ResourceManager.GetString("FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty", resourceCulture); + } + } + internal static string ThrowHelper_EntityType_NoEntities { get { return ResourceManager.GetString("ThrowHelper_EntityType_NoEntities", resourceCulture); @@ -159,6 +255,12 @@ internal static string ThrowHelper_Any_HasInvalidFormat { } } + internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue { + get { + return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture); + } + } + internal static string Any_Description { get { return ResourceManager.GetString("Any_Description", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index 5edeea66e82..0d564009fde 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -117,21 +117,54 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Indicates to composition that the target element is accessible only to the authenticated supergraph users. + + + Provides contact information of the owner responsible for this subgraph schema. + + + Marks underlying custom directive to be included in the Supergraph schema. + + + Directive to indicate that marks target object as extending part of the federated schema. + Directive to indicate that a field is owned by another service, for example via Apollo federation. Scalar representing a set of fields. + + Marks location within schema as inaccessible from the GraphQL Gateway + + + Provides meta information to the router that this entity type is an interface in the supergraph. + Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface. + + Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another. + Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway. Used to annotate the required input fieldset from a base type for a resolver. + + Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. + + + Scalar representing a JWT scope + + + Indicates that given object and/or field can be resolved by multiple subgraphs. + + + Allows users to annotate fields and types with additional metadata information. + Union of all types that key directive applied. This information is needed by the Apollo federation gateway. @@ -142,7 +175,7 @@ {0} cannot parse the given value of type `{1}` - The key attribute is used on `{0}` without specifying the the field set. + The key attribute is used on `{0}` without specifying the field set. FieldSet is null or empty on type @@ -150,6 +183,18 @@ FieldSet is null or empty on type + + The compose directive attribute is used on `{0}` without specifying the name. + + + The link attribute is used on `{0}` without specifying the url. + + + The contact attribute is used on `{0}` without specifying the name. + + + Specified federation version `{0}` is not supported. + Value cannot be null or empty. @@ -159,8 +204,11 @@ Value cannot be null or empty. + + Value cannot be null or empty. + - The schema has no types with a KeyDirective and therefor no entities. Apollo federation requires at least on entity. + The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least on entity. This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec. @@ -174,6 +222,9 @@ The given any representation has an invalid format. + + The specified key `{0}` does not exist on `context.ScopedContextData`. + The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema. From 97cb6d06ae6e6d68900423f23c62e597ead7e27d Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Fri, 17 Nov 2023 16:59:05 +0200 Subject: [PATCH 03/89] edits --- .../src/ApolloFederation/KeyAttribute.cs | 16 +++++++---- .../src/ApolloFederation/KeyDirectiveType.cs | 16 +++++++---- .../src/ApolloFederation/ProvidesAttribute.cs | 28 +++++++++++++------ .../ApolloFederation/ProvidesDirectiveType.cs | 28 +++++++++++++------ .../src/ApolloFederation/RequiresAttribute.cs | 25 ++++++++++------- .../ApolloFederation/RequiresDirectiveType.cs | 25 ++++++++++------- 6 files changed, 92 insertions(+), 46 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyAttribute.cs index 5832b476c4b..e5533a692ca 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyAttribute.cs @@ -5,12 +5,18 @@ namespace HotChocolate.ApolloFederation; /// -/// The @key directive is used to indicate a combination of fields that -/// can be used to uniquely identify and fetch an object or interface. +/// +/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +/// +/// +/// The @key directive is used to indicate a combination of fields that can be used to uniquely +/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), +/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can +/// be specified on a target type. /// -/// type Product @key(fields: "upc") { -/// upc: UPC! -/// name: String +/// type Foo @key(fields: "id") { +/// id: ID! +/// field: String /// } /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs index 9b8de0c9317..17c537b8cfd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs @@ -4,12 +4,18 @@ namespace HotChocolate.ApolloFederation; /// -/// The @key directive is used to indicate a combination of fields that -/// can be used to uniquely identify and fetch an object or interface. +/// +/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +/// +/// +/// The @key directive is used to indicate a combination of fields that can be used to uniquely +/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), +/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can +/// be specified on a target type. /// -/// type Product @key(fields: "upc") { -/// upc: UPC! -/// name: String +/// type Foo @key(fields: "id") { +/// id: ID! +/// field: String /// } /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesAttribute.cs index e1cba395a76..0c56f10082e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesAttribute.cs @@ -5,17 +5,29 @@ namespace HotChocolate.ApolloFederation; /// -/// The @provides directive is used to annotate the expected returned fieldset -/// from a field on a base type that is guaranteed to be selectable by the gateway. -/// +/// +/// directive @provides(fields: _FieldSet!) on FIELD_DEFINITION +/// +/// +/// The @provides directive is a router optimization hint specifying field set that +/// can be resolved locally at the given subgraph through this particular query path. This +/// allows you to expose only a subset of fields from the underlying entity type to be selectable +/// from the federated schema without the need to call other subgraphs. Provided fields specified +/// in the directive field set should correspond to a valid field on the underlying GraphQL +/// interface/object type. @provides directive can only be used on fields returning entities. /// -/// type Review @key(fields: "id") { -/// product: Product @provides(fields: "name") +/// type Foo @key(fields: "id") { +/// id: ID! +/// # implies name field can be resolved locally +/// bar: Bar @provides(fields: "name") +/// # name fields are external +/// # so will be fetched from other subgraphs +/// bars: [Bar] /// } /// -/// extend type Product @key(fields: "upc") { -/// upc: String @external -/// name: String @external +/// type Bar @key(fields: "id") { +/// id: ID! +/// name: String @external /// } /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs index caebfc1bc5e..4dad1e7a221 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs @@ -4,17 +4,29 @@ namespace HotChocolate.ApolloFederation; /// -/// The @provides directive is used to annotate the expected returned fieldset -/// from a field on a base type that is guaranteed to be selectable by the gateway. -/// +/// +/// directive @provides(fields: _FieldSet!) on FIELD_DEFINITION +/// +/// +/// The @provides directive is a router optimization hint specifying field set that +/// can be resolved locally at the given subgraph through this particular query path. This +/// allows you to expose only a subset of fields from the underlying entity type to be selectable +/// from the federated schema without the need to call other subgraphs. Provided fields specified +/// in the directive field set should correspond to a valid field on the underlying GraphQL +/// interface/object type. @provides directive can only be used on fields returning entities. /// -/// type Review @key(fields: "id") { -/// product: Product @provides(fields: "name") +/// type Foo @key(fields: "id") { +/// id: ID! +/// # implies name field can be resolved locally +/// bar: Bar @provides(fields: "name") +/// # name fields are external +/// # so will be fetched from other subgraphs +/// bars: [Bar] /// } /// -/// extend type Product @key(fields: "upc") { -/// upc: String @external -/// name: String @external +/// type Bar @key(fields: "id") { +/// id: ID! +/// name: String @external /// } /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresAttribute.cs index 16549b3a1bb..74cdb796cfb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresAttribute.cs @@ -5,17 +5,22 @@ namespace HotChocolate.ApolloFederation; /// -/// The @requires directive is used to annotate the required input fieldset -/// from a base type for a resolver. It is used to develop a query plan -/// where the required fields may not be needed by the client, but the -/// service may need additional information from other services. -/// +/// +/// directive @requires(fields: _FieldSet!) on FIELD_DEFINITON +/// +/// +/// The @requires directive is used to specify external (provided by other subgraphs) +/// entity fields that are needed to resolve target field. It is used to develop a query plan where +/// the required fields may not be needed by the client, but the service may need additional +/// information from other subgraphs. Required fields specified in the directive field set should +/// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented +/// with @external directive. /// -/// # extended from the Users service -/// extend type User @key(fields: "id") { -/// id: ID! @external -/// email: String @external -/// reviews: [Review] @requires(fields: "email") +/// type Foo @key(fields: "id") { +/// id: ID! +/// # this field will be resolved from other subgraph +/// remote: String @external +/// local: String @requires(fields: "remote") /// } /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs index 28ca84decd0..2484166cd0a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs @@ -4,17 +4,22 @@ namespace HotChocolate.ApolloFederation; /// -/// The @requires directive is used to annotate the required input fieldset -/// from a base type for a resolver. It is used to develop a query plan -/// where the required fields may not be needed by the client, but the -/// service may need additional information from other services. -/// +/// +/// directive @requires(fields: _FieldSet!) on FIELD_DEFINITON +/// +/// +/// The @requires directive is used to specify external (provided by other subgraphs) +/// entity fields that are needed to resolve target field. It is used to develop a query plan where +/// the required fields may not be needed by the client, but the service may need additional +/// information from other subgraphs. Required fields specified in the directive field set should +/// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented +/// with @external directive. /// -/// # extended from the Users service -/// extend type User @key(fields: "id") { -/// id: ID! @external -/// email: String @external -/// reviews: [Review] @requires(fields: "email") +/// type Foo @key(fields: "id") { +/// id: ID! +/// # this field will be resolved from other subgraph +/// remote: String @external +/// local: String @requires(fields: "remote") /// } /// /// From 56a8bb954cd01c93e10447aff3398211f33b40a5 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 4 Dec 2023 17:47:29 +0200 Subject: [PATCH 04/89] Use result of Assert instead of pattern matching --- .../ApolloFederation/Directory.Build.props | 2 +- .../ApolloFederation.Tests/AnyTypeTests.cs | 73 +++++++++---------- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/Directory.Build.props b/src/HotChocolate/ApolloFederation/Directory.Build.props index c3a1a4be296..457246e96e5 100644 --- a/src/HotChocolate/ApolloFederation/Directory.Build.props +++ b/src/HotChocolate/ApolloFederation/Directory.Build.props @@ -3,6 +3,6 @@ enable - $(Library2TargetFrameworks) + $(Library3TargetFrameworks) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs index 3f0248c569c..ab5f2f44d28 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs @@ -1,7 +1,6 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.Language; using HotChocolate.Types; -using Xunit; namespace HotChocolate.ApolloFederation; @@ -33,43 +32,41 @@ public void Deserialize() var representationObject = type.Deserialize(serialized); // assert - Assert.IsType(representationObject); - if (representationObject is Representation representation) - { - Assert.Equal("test", representation.TypeName); - Assert.Collection(representation.Data.Fields, - node => - { - Assert.Equal( - AnyType.TypeNameField, - node.Name.Value); - - Assert.Equal( - "test", - node.Value.Value); - }, - node => - { - Assert.Equal( - "faa", - node.Name.Value); - - Assert.Equal( - "foo", - node.Value.Value); - }, - node => - { - Assert.Equal( - "foo", - node.Name.Value); - - Assert.Equal( - "bar", - node.Value.Value); - } - ); - } + var representation = Assert.IsType(representationObject); + + Assert.Equal("test", representation.TypeName); + Assert.Collection(representation.Data.Fields, + node => + { + Assert.Equal( + AnyType.TypeNameField, + node.Name.Value); + + Assert.Equal( + "test", + node.Value.Value); + }, + node => + { + Assert.Equal( + "faa", + node.Name.Value); + + Assert.Equal( + "foo", + node.Value.Value); + }, + node => + { + Assert.Equal( + "foo", + node.Name.Value); + + Assert.Equal( + "bar", + node.Value.Value); + } + ); } [Fact] From 190549295ff1969f4b49ec5488ccfcee7a0f0ebf Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 4 Dec 2023 17:49:42 +0200 Subject: [PATCH 05/89] Add empty list abstraction to simplify node creation logic --- .../FederationSchemaPrinter.DirectiveType.cs | 13 ++----- .../FederationSchemaPrinter.InputType.cs | 6 ++-- .../FederationSchemaPrinter.LeafType.cs | 29 +++++---------- .../FederationSchemaPrinter.OutputTypes.cs | 25 +++++-------- .../FederationSchemaPrinter.cs | 35 ++++++++++++++++--- 5 files changed, 53 insertions(+), 55 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.DirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.DirectiveType.cs index 2f0966d8200..78c49cf0d56 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.DirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.DirectiveType.cs @@ -1,10 +1,5 @@ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Linq; -using HotChocolate.ApolloFederation.Constants; using HotChocolate.Language; -using HotChocolate.Types.Introspection; -using HotChocolate.Utilities.Introspection; namespace HotChocolate.ApolloFederation; @@ -23,14 +18,12 @@ private static DirectiveDefinitionNode SerializeDirectiveTypeDefinition( .Select(l => new NameNode(l.MapDirectiveLocation().ToString())) .ToList(); - return new DirectiveDefinitionNode - ( - null, + return new DirectiveDefinitionNode( + location: null, new NameNode(directiveType.Name), SerializeDescription(directiveType.Description), directiveType.IsRepeatable, arguments, - locations - ); + locations); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.InputType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.InputType.cs index 5758dc1ff9f..2f91678e34b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.InputType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.InputType.cs @@ -16,10 +16,10 @@ private static InputObjectTypeDefinitionNode SerializeInputObjectType( .ToList(); return new InputObjectTypeDefinitionNode( - null, + location: null, new NameNode(inputObjectType.Name), SerializeDescription(inputObjectType.Description), - directives, + directives.ReadOnlyList, fields); } @@ -35,6 +35,6 @@ private static InputValueDefinitionNode SerializeInputField( SerializeDescription(inputValue.Description), SerializeType(inputValue.Type, context), inputValue.DefaultValue, - directives); + directives.ReadOnlyList); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.LeafType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.LeafType.cs index 1abddf1993f..bff93364d03 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.LeafType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.LeafType.cs @@ -18,10 +18,10 @@ private static EnumTypeDefinitionNode SerializeEnumType( .ToList(); return new EnumTypeDefinitionNode( - null, + location: null, new NameNode(enumType.Name), SerializeDescription(enumType.Description), - directives, + directives.ReadOnlyList, values); } @@ -34,24 +34,15 @@ private static EnumValueDefinitionNode SerializeEnumValue( if (enumValue.IsDeprecated) { var deprecateDirective = DeprecatedDirective.CreateNode(enumValue.DeprecationReason); - - if(directives.Count == 0) - { - directives = new List { deprecateDirective }; - } - else - { - var temp = directives.ToList(); - temp.Add(deprecateDirective); - directives = temp; - } + var temp = directives.GetOrCreateList(); + temp.Add(deprecateDirective); } return new EnumValueDefinitionNode( - null, + location: null, new NameNode(enumValue.Name), SerializeDescription(enumValue.Description), - directives); + directives.ReadOnlyList); } private static ScalarTypeDefinitionNode SerializeScalarType( @@ -62,9 +53,7 @@ private static ScalarTypeDefinitionNode SerializeScalarType( if (scalarType.SpecifiedBy is not null) { - var copy = directives as List ?? directives.ToList(); - directives = copy; - copy.Add( + directives.GetOrCreateList().Add( new DirectiveNode( SpecifiedBy, new ArgumentNode( @@ -73,9 +62,9 @@ private static ScalarTypeDefinitionNode SerializeScalarType( } return new( - null, + location: null, new NameNode(scalarType.Name), SerializeDescription(scalarType.Description), - directives); + directives.ReadOnlyList); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.OutputTypes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.OutputTypes.cs index f54e6d4d805..ace34a68b68 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.OutputTypes.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.OutputTypes.cs @@ -30,7 +30,7 @@ public static partial class FederationSchemaPrinter return new ObjectTypeExtensionNode( null, new NameNode(objectType.Name), - directives, + directives.ReadOnlyList, interfaces, fields); } @@ -39,7 +39,7 @@ public static partial class FederationSchemaPrinter null, new NameNode(objectType.Name), SerializeDescription(objectType.Description), - directives, + directives.ReadOnlyList, interfaces, fields); } @@ -58,7 +58,7 @@ private static InterfaceTypeDefinitionNode SerializeInterfaceType( null, new NameNode(interfaceType.Name), SerializeDescription(interfaceType.Description), - directives, + directives.ReadOnlyList, Array.Empty(), fields); } @@ -77,7 +77,7 @@ private static UnionTypeDefinitionNode SerializeUnionType( null, new NameNode(unionType.Name), SerializeDescription(unionType.Description), - directives, + directives.ReadOnlyList, types); } @@ -94,25 +94,16 @@ private static FieldDefinitionNode SerializeObjectField( if (field.IsDeprecated) { var deprecateDirective = DeprecatedDirective.CreateNode(field.DeprecationReason); - - if(directives.Count == 0) - { - directives = new[] { deprecateDirective }; - } - else - { - var temp = directives.ToList(); - temp.Add(deprecateDirective); - directives = temp; - } + var temp = directives.GetOrCreateList(); + temp.Add(deprecateDirective); } return new FieldDefinitionNode( - null, + location: null, new NameNode(field.Name), SerializeDescription(field.Description), arguments, SerializeType(field.Type, context), - directives); + directives.ReadOnlyList); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.cs index 1555925e3dd..6f9fa2bfca2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.cs @@ -126,13 +126,37 @@ private static NamedTypeNode SerializeNamedType( return new NamedTypeNode(null, new NameNode(namedType.Name)); } - private static IReadOnlyList SerializeDirectives( + internal struct MaybeList + { + public MaybeList(List? list) + { + _list = list; + } + + private List? _list; + public List GetOrCreateList() => _list ??= new(); + public IReadOnlyList ReadOnlyList + { + get + { + if (_list is not null) + { + return _list; + } + return Array.Empty(); + } + } + + public bool IsEmpty => _list is null; + } + + private static MaybeList SerializeDirectives( IReadOnlyCollection directives, Context context) { if (directives.Count == 0) { - return Array.Empty(); + return default; } List? directiveNodes = null; @@ -141,16 +165,17 @@ private static IReadOnlyList SerializeDirectives( { if (context.DirectiveNames.Contains(directive.Type.Name)) { - (directiveNodes ??= new()).Add(directive.AsSyntaxNode(true)); + var node = directive.AsSyntaxNode(removeDefaults: true); + (directiveNodes ??= new()).Add(node); } } if (directiveNodes is not null) { - return directiveNodes; + return new(directiveNodes); } - return Array.Empty(); + return default; } private static StringValueNode? SerializeDescription(string? description) From f23ebf785e2c152063f79a53f3b0df861494164c Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 4 Dec 2023 17:50:30 +0200 Subject: [PATCH 06/89] Use raw string literals in test --- .../CodeFirst/CertificationTests.cs | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/CertificationTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/CertificationTests.cs index 5d17999f79f..261e70ff7c9 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/CertificationTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/CertificationTests.cs @@ -4,7 +4,6 @@ using HotChocolate.Execution.Processing; using HotChocolate.Language; using Snapshooter.Xunit; -using Xunit; namespace HotChocolate.ApolloFederation.CertificationSchema.CodeFirst; @@ -25,19 +24,19 @@ public async Task Subgraph_SDL() // act var result = await executor.ExecuteAsync( - @"{ + """ + { _service { sdl } - }"); + } + """); // assert - Assert.IsType( - Assert.IsType( - Assert.IsType(result).Data) - .GetValueOrDefault("_service")) - .GetValueOrDefault("sdl") - .MatchSnapshot(); + var queryResult = Assert.IsType(result); + var data = Assert.IsType(queryResult.Data); + var service = Assert.IsType(data.GetValueOrDefault("_service")); + service.GetValueOrDefault("sdl").MatchSnapshot(); } [Fact] @@ -48,13 +47,15 @@ public async Task Product_By_Id() // act var result = await executor.ExecuteAsync( - @"query ($representations: [_Any!]!) { + """ + query ($representations: [_Any!]!) { _entities(representations: $representations) { ... on Product { sku } } - }", + } + """, new Dictionary { ["representations"] = new List @@ -77,13 +78,15 @@ public async Task Product_By_Package() // act var result = await executor.ExecuteAsync( - @"query ($representations: [_Any!]!) { + """ + query ($representations: [_Any!]!) { _entities(representations: $representations) { ... on Product { sku } } - }", + } + """, new Dictionary { ["representations"] = new List @@ -107,13 +110,15 @@ public async Task Product_By_Variation() // act var result = await executor.ExecuteAsync( - @"query ($representations: [_Any!]!) { + """ + query ($representations: [_Any!]!) { _entities(representations: $representations) { ... on Product { sku } } - }", + } + """, new Dictionary { ["representations"] = new List @@ -139,11 +144,13 @@ public async Task Provides() // act var result = await executor.ExecuteAsync( - @"query ($id: ID!) { + """ + query ($id: ID!) { product(id: $id) { createdBy { email totalProductsCreated } } - }", + } + """, new Dictionary { ["id"] = "apollo-federation", @@ -161,11 +168,13 @@ public async Task Requires() // act var result = await executor.ExecuteAsync( - @"query ($id: ID!) { + """ + query ($id: ID!) { product(id: $id) { dimensions { size weight } } - }", + } + """, new Dictionary { ["id"] = "apollo-federation", From 32ec7fd5453e62eab4f8afc85ad53a35921302d5 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 4 Dec 2023 18:27:59 +0200 Subject: [PATCH 07/89] Refactor condition --- .../SchemaBuilderExtensions.Types.cs | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/HotChocolate/Core/src/Types/Extensions/SchemaBuilderExtensions.Types.cs b/src/HotChocolate/Core/src/Types/Extensions/SchemaBuilderExtensions.Types.cs index 2f321335e6d..8f28d9c104f 100644 --- a/src/HotChocolate/Core/src/Types/Extensions/SchemaBuilderExtensions.Types.cs +++ b/src/HotChocolate/Core/src/Types/Extensions/SchemaBuilderExtensions.Types.cs @@ -628,10 +628,23 @@ public static ISchemaBuilder AddDirectiveType( throw new ArgumentNullException(nameof(directiveType)); } - if (directiveType == typeof(DirectiveType) - || (directiveType.IsGenericType - && directiveType.GetGenericTypeDefinition() == - typeof(DirectiveType<>))) + bool IsDirectiveBaseType() + { + if (directiveType == typeof(DirectiveType)) + { + return true; + } + + if (directiveType.IsGenericType) + { + var genericType = directiveType.GetGenericTypeDefinition(); + return genericType == typeof(DirectiveType<>); + } + + return false; + } + + if (IsDirectiveBaseType()) { throw new ArgumentException( TypeResources.SchemaBuilderExtensions_DirectiveTypeIsBaseType, From 6af10a8122c2e40b2871bc142d7830ddad2636fa Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 4 Dec 2023 18:28:18 +0200 Subject: [PATCH 08/89] Use raw strings in test --- .../Directives/ExternalDirectiveTests.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs index 86348b7123a..31060f70be0 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs @@ -63,13 +63,12 @@ public void AnnotateExternalToTypeFieldSchemaFirst() var schema = SchemaBuilder.New() .AddDocumentFromString( - @" - type Query { - field(a: Int): String - @external - } - " - ) + """ + type Query { + field(a: Int): String + @external + } + """) .AddDirectiveType() .Use(_ => _ => default) .Create(); From b6ef984e59a3ab03927a26f255899b09f9cbe7b5 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 6 Dec 2023 12:30:33 +0200 Subject: [PATCH 09/89] Import some of the new code --- .../Descriptors/EntityResolverDescriptor.cs | 58 +- .../Descriptors/IEntityResolverDescriptor.cs | 99 --- .../Directives/AuthenticatedDirectiveType.cs | 39 + .../Directives/ComposeDirectiveType.cs | 35 + .../ApolloFederation/Directives/Contact.cs | 38 + .../Directives/ContactDirectiveType.cs | 37 + .../Directives/ExtendsDirectiveType.cs | 28 + .../Directives/ExternalDirectiveType.cs | 35 + .../Directives/FederatedSchema.cs | 51 ++ .../FederationSchemaPrinter.DirectiveType.cs | 43 ++ .../FederationSchemaPrinter.InputType.cs | 40 + .../FederationSchemaPrinter.LeafType.cs | 81 ++ .../FederationSchemaPrinter.OutputTypes.cs | 118 +++ .../Directives/FederationSchemaPrinter.cs | 172 +++++ .../Directives/FederationUtils.cs | 86 +++ .../Directives/FederationVersion.cs | 14 + .../Directives/FieldSetType.cs | 139 ++++ .../Directives/InaccessibleDirectiveType.cs | 54 ++ .../InterfaceObjectDirectiveType.cs | 28 + .../Directives/KeyDirectiveType.cs | 34 + .../Directives/LinkDirectiveType.cs | 75 ++ .../Directives/OverrideDirectiveType.cs | 31 + .../Directives/ProvidesDirectiveType.cs | 41 ++ .../Directives/RequiresDirectiveType.cs | 34 + .../Directives/RequiresScopesDirectiveType.cs | 61 ++ .../ApolloFederation/Directives/ScopeType.cs | 64 ++ .../Directives/ShareableDirectiveType.cs | 36 + .../Directives/TagDirectiveType.cs | 70 ++ .../ApolloFederationDescriptorExtensions.cs | 694 ++++++++++++++++-- .../ApolloFederationDescriptorExtensions~1.cs | 82 --- ...erationRequestExecutorBuilderExtensions.cs | 4 +- ...ApolloFederationSchemaBuilderExtensions.cs | 16 +- .../DirectiveTypeDescriptorExtensions.cs | 14 +- 33 files changed, 2180 insertions(+), 271 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/AuthenticatedDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ComposeDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ContactDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExtendsDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExternalDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederatedSchema.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FieldSetType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InaccessibleDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InterfaceObjectDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/KeyDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/LinkDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/OverrideDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ProvidesDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresScopesDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ScopeType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ShareableDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/TagDirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions~1.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs index 98adae9855e..0c52308cf47 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; +using ApolloGraphQL.HotChocolate.Federation.Descriptors; using HotChocolate.ApolloFederation.Helpers; using HotChocolate.ApolloFederation.Properties; using HotChocolate.Internal; @@ -63,31 +64,6 @@ private void OnCompleteDefinition(ObjectTypeDefinition definition) } } - protected internal override EntityResolverDefinition Definition { get; protected set; } = new(); - - /// - public IObjectTypeDescriptor ResolveReference( - FieldResolverDelegate fieldResolver) - => ResolveReference(fieldResolver, Array.Empty()); - - private IObjectTypeDescriptor ResolveReference( - FieldResolverDelegate fieldResolver, - IReadOnlyList required) - { - if (fieldResolver is null) - { - throw new ArgumentNullException(nameof(fieldResolver)); - } - - if (required is null) - { - throw new ArgumentNullException(nameof(required)); - } - - Definition.ResolverDefinition = new(fieldResolver, required); - return _typeDescriptor; - } - /// public IObjectTypeDescriptor ResolveReferenceWith( Expression> method) @@ -114,13 +90,6 @@ public IObjectTypeDescriptor ResolveReferenceWith( nameof(member)); } - /// - public IObjectTypeDescriptor ResolveReferenceWith() - => ResolveReferenceWith( - Context.TypeInspector.GetNodeResolverMethod( - Definition.EntityType ?? typeof(TResolver), - typeof(TResolver))!); - /// public IObjectTypeDescriptor ResolveReferenceWith(MethodInfo method) { @@ -141,10 +110,23 @@ public IObjectTypeDescriptor ResolveReferenceWith(MethodInfo method) return ResolveReference(resolver.Resolver!, argumentBuilder.Required); } - /// - public IObjectTypeDescriptor ResolveReferenceWith(Type type) - => ResolveReferenceWith( - Context.TypeInspector.GetNodeResolverMethod( - Definition.EntityType ?? type, - type)!); + private IObjectTypeDescriptor ResolveReference( + FieldResolverDelegate fieldResolver, + IReadOnlyList required) + { + if (fieldResolver is null) + { + throw new ArgumentNullException(nameof(fieldResolver)); + } + + if (required is null) + { + throw new ArgumentNullException(nameof(required)); + } + + Definition.ResolverDefinition = new(fieldResolver, required); + return _typeDescriptor; + } + + protected internal override EntityResolverDefinition Definition { get; protected set; } = new(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/IEntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/IEntityResolverDescriptor.cs index e25defb1199..7c58b12bf84 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/IEntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/IEntityResolverDescriptor.cs @@ -1,6 +1,5 @@ using System.Linq.Expressions; using System.Reflection; -using HotChocolate.Resolvers; namespace HotChocolate.ApolloFederation.Descriptors; @@ -9,44 +8,6 @@ namespace HotChocolate.ApolloFederation.Descriptors; /// public interface IEntityResolverDescriptor { - /// - /// Resolve an entity from its representation. - /// - /// - /// The resolver. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReference( - FieldResolverDelegate fieldResolver); - - /// - /// Resolve an entity from its representation. - /// - /// - /// The reference resolver selector. - /// - /// - /// The type on which the reference resolver is located. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReferenceWith( - Expression> method); - - /// - /// Resolve an entity from its representation. - /// - /// - /// The type on which the reference resolver is located. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReferenceWith(); - /// /// Resolve an entity from its representation. /// @@ -57,17 +18,6 @@ IObjectTypeDescriptor ResolveReferenceWith( /// Returns the descriptor for configuration chaining. /// IObjectTypeDescriptor ResolveReferenceWith(MethodInfo method); - - /// - /// Resolve an entity from its representation. - /// - /// - /// The type on which the reference resolver is located. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReferenceWith(Type type); } /// @@ -75,18 +25,6 @@ IObjectTypeDescriptor ResolveReferenceWith( /// public interface IEntityResolverDescriptor { - /// - /// Resolve an entity from its representation. - /// - /// - /// The resolver. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReference( - FieldResolverDelegate fieldResolver); - /// /// Resolve an entity from its representation. /// @@ -99,32 +37,6 @@ IObjectTypeDescriptor ResolveReference( IObjectTypeDescriptor ResolveReferenceWith( Expression> method); - /// - /// Resolve an entity from its representation. - /// - /// - /// The reference resolver selector. - /// - /// - /// The type on which the reference resolver is located. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReferenceWith( - Expression> method); - - /// - /// Resolve an entity from its representation. - /// - /// - /// The type on which the reference resolver is located. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReferenceWith(); - /// /// Resolve an entity from its representation. /// @@ -135,15 +47,4 @@ IObjectTypeDescriptor ResolveReferenceWith( /// Returns the descriptor for configuration chaining. /// IObjectTypeDescriptor ResolveReferenceWith(MethodInfo method); - - /// - /// Resolve an entity from its representation. - /// - /// - /// The type on which the reference resolver is located. - /// - /// - /// Returns the descriptor for configuration chaining. - /// - IObjectTypeDescriptor ResolveReferenceWith(Type type); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/AuthenticatedDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/AuthenticatedDirectiveType.cs new file mode 100644 index 00000000000..ae097f1c16e --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/AuthenticatedDirectiveType.cs @@ -0,0 +1,39 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @authenticated on +/// ENUM +/// | FIELD_DEFINITION +/// | INTERFACE +/// | OBJECT +/// | SCALAR +/// +/// +/// The @authenticated directive is used to indicate that the target element is accessible only to the authenticated supergraph users. +/// For more granular access control, see the RequiresScopeDirectiveType directive usage. +/// Refer to the Apollo Router article +/// for additional details. +/// +/// type Foo @key(fields: "id") { +/// id: ID +/// description: String @authenticated +/// } +/// +/// +public sealed class AuthenticatedDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.AuthenticatedDirective) + .Description(FederationResources.AuthenticatedDirective_Description) + .Location( + DirectiveLocation.Enum | + DirectiveLocation.FieldDefinition | + DirectiveLocation.Interface | + DirectiveLocation.Object | + DirectiveLocation.Scalar); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ComposeDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ComposeDirectiveType.cs new file mode 100644 index 00000000000..9c49dc1233c --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ComposeDirectiveType.cs @@ -0,0 +1,35 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @composeDirective(name: String!) repeatable on SCHEMA +/// +/// +/// By default, Supergraph schema excludes all custom directives. The @composeDirective is used to specify +/// custom directives that should be exposed in the Supergraph schema. +/// +/// +/// extend schema @composeDirective(name: "@custom") +/// @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) +/// @link(url: "https://myspecs.dev/custom/v1.0", import: ["@custom"]) +/// +/// directive @custom on FIELD_DEFINITION +/// +/// type Query { +/// helloWorld: String! @custom +/// } +/// +/// +public sealed class ComposeDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.ComposeDirective) + .Description(FederationResources.ComposeDirective_Description) + .Location(DirectiveLocation.Schema) + .Argument(WellKnownArgumentNames.Name) + .Type>(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs new file mode 100644 index 00000000000..b53929c5190 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs @@ -0,0 +1,38 @@ +namespace HotChocolate.ApolloFederation; + +public sealed class Contact +{ + /// + /// Initializes new instance of + /// + /// + /// Contact title of the subgraph owner + /// + /// + /// URL where the subgraph's owner can be reached + /// + /// + /// Other relevant notes can be included here; supports markdown links + /// + public Contact(string name, string? url, string? description) + { + Name = name; + Url = url; + Description = description; + } + + /// + /// Gets the contact title of the subgraph owner. + /// + public string Name { get; } + + /// + /// Gets the url where the subgraph's owner can be reached. + /// + public string? Url { get; } + + /// + /// Gets other relevant notes about subgraph contact information. Can include markdown links. + /// + public string? Description { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ContactDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ContactDirectiveType.cs new file mode 100644 index 00000000000..5ca58534a60 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ContactDirectiveType.cs @@ -0,0 +1,37 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @contact( +/// "Contact title of the subgraph owner" +/// name: String! +/// "URL where the subgraph's owner can be reached" +/// url: String +/// "Other relevant notes can be included here; supports markdown links" +/// description: String +/// ) on SCHEMA +/// +/// +/// Contact schema directive can be used to provide team contact information to your subgraph schema. This information is automatically parsed and displayed by Apollo Studio. +/// See Subgraph Contact Information for additional details. +/// +/// +/// +/// +/// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ +/// query: Query +/// } +/// +/// +/// +public sealed class ContactDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.ContactDirective) + .Description(FederationResources.ContactDirective_Description) + .Location(DirectiveLocation.Schema); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExtendsDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExtendsDirectiveType.cs new file mode 100644 index 00000000000..50ae3df2ff9 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExtendsDirectiveType.cs @@ -0,0 +1,28 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @extends on OBJECT | INTERFACE +/// +/// +/// The @extends directive is used to represent type extensions in the schema. Federated extended types should have +/// corresponding @key directive defined that specifies primary key required to fetch the underlying object. +/// +/// # extended from the Users service +/// type Foo @extends @key(fields: "id") { +/// id: ID +/// description: String +/// } +/// +/// +public sealed class ExtendsDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Extends) + .Description(FederationResources.ExtendsDirective_Description) + .Location(DirectiveLocation.Object | DirectiveLocation.Interface); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExternalDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExternalDirectiveType.cs new file mode 100644 index 00000000000..50d95949b14 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExternalDirectiveType.cs @@ -0,0 +1,35 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @external on FIELD_DEFINITION +/// +/// +/// The @external directive is used to mark a field as owned by another service. +/// This allows service A to use fields from service B while also knowing at runtime +/// the types of that field. All the external fields should either be referenced from the @key, +/// @requires or @provides directives field sets. +/// +/// Due to the smart merging of entity types, Federation v2 no longer requires @external directive +/// on @key fields and can be safely omitted from the schema. @external directive is only required +/// on fields referenced by the @requires and @provides directive. +/// +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// remoteField: String @external +/// localField: String @requires(fields: "remoteField") +/// } +/// +/// +public sealed class ExternalDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.External) + .Description(FederationResources.ExternalDirective_Description) + .Location(DirectiveLocation.FieldDefinition); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederatedSchema.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederatedSchema.cs new file mode 100644 index 00000000000..383bafc4085 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederatedSchema.cs @@ -0,0 +1,51 @@ +using HotChocolate.Configuration; +using HotChocolate.Types.Descriptors; +using HotChocolate.Types.Descriptors.Definitions; + +namespace HotChocolate.ApolloFederation; + +/// +/// Apollo Federation v2 base schema object that allows users to apply custom schema directives (e.g. @composeDirective) +/// +public class FederatedSchema : Schema +{ + /// + /// Initializes new instance of + /// + /// + /// Supported Apollo Federation version + /// + public FederatedSchema(FederationVersion version = FederationVersion.FEDERATION_25) + { + FederationVersion = version; + } + + /// + /// Retrieve supported Apollo Federation version + /// + public FederationVersion FederationVersion { get; } + + private IDescriptorContext _context = default!; + protected override void OnAfterInitialize(ITypeDiscoveryContext context, DefinitionBase definition) + { + base.OnAfterInitialize(context, definition); + _context = context.DescriptorContext; + } + + protected override void Configure(ISchemaTypeDescriptor descriptor) + { + var schemaType = this.GetType(); + if (schemaType.IsDefined(typeof(SchemaTypeDescriptorAttribute), true)) + { + foreach (var attribute in schemaType.GetCustomAttributes(true)) + { + if (attribute is SchemaTypeDescriptorAttribute casted) + { + casted.OnConfigure(_context, descriptor, schemaType); + } + } + } + var link = FederationUtils.GetFederationLink(FederationVersion); + descriptor.Link(link.Url, link.Import?.ToArray()); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs new file mode 100644 index 00000000000..af714699a8f --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using System.Linq; +using HotChocolate.Language; +using DirectiveLocationType = HotChocolate.Types.DirectiveLocation; + +namespace HotChocolate.ApolloFederation; + +public static partial class FederationSchemaPrinter +{ + private static DirectiveDefinitionNode SerializeDirectiveTypeDefinition( + DirectiveType directiveType, + Context context) + { + var arguments = directiveType.Arguments + .Select(a => SerializeInputField(a, context)) + .ToList(); + + var locations = DirectiveLocations(directiveType.Locations) + .Select(l => new NameNode(DirectiveLocationExtensions.MapDirectiveLocation(l).ToString())) + .ToList(); + + return new DirectiveDefinitionNode + ( + null, + new NameNode(directiveType.Name), + SerializeDescription(directiveType.Description), + directiveType.IsRepeatable, + arguments, + locations + ); + } + + private static IEnumerable DirectiveLocations(DirectiveLocationType locations) + { + foreach (DirectiveLocationType value in Enum.GetValues(locations.GetType())) + { + if (locations.HasFlag(value)) + { + yield return value; + } + } + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs new file mode 100644 index 00000000000..5758dc1ff9f --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs @@ -0,0 +1,40 @@ +using System.Linq; +using HotChocolate.Language; + +namespace HotChocolate.ApolloFederation; + +public static partial class FederationSchemaPrinter +{ + private static InputObjectTypeDefinitionNode SerializeInputObjectType( + InputObjectType inputObjectType, + Context context) + { + var directives = SerializeDirectives(inputObjectType.Directives, context); + + var fields = inputObjectType.Fields + .Select(t => SerializeInputField(t, context)) + .ToList(); + + return new InputObjectTypeDefinitionNode( + null, + new NameNode(inputObjectType.Name), + SerializeDescription(inputObjectType.Description), + directives, + fields); + } + + private static InputValueDefinitionNode SerializeInputField( + IInputField inputValue, + Context context) + { + var directives = SerializeDirectives(inputValue.Directives, context); + + return new InputValueDefinitionNode( + null, + new NameNode(inputValue.Name), + SerializeDescription(inputValue.Description), + SerializeType(inputValue.Type, context), + inputValue.DefaultValue, + directives); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs new file mode 100644 index 00000000000..e893bb319aa --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs @@ -0,0 +1,81 @@ +using System.Collections.Generic; +using System.Linq; +using HotChocolate.Language; +using static HotChocolate.Types.SpecifiedByDirectiveType.Names; + +namespace HotChocolate.ApolloFederation; + +public static partial class FederationSchemaPrinter +{ + private static EnumTypeDefinitionNode SerializeEnumType( + EnumType enumType, + Context context) + { + var directives = SerializeDirectives(enumType.Directives, context); + + var values = enumType.Values + .Select(t => SerializeEnumValue(t, context)) + .ToList(); + + return new EnumTypeDefinitionNode( + null, + new NameNode(enumType.Name), + SerializeDescription(enumType.Description), + directives, + values); + } + + private static EnumValueDefinitionNode SerializeEnumValue( + IEnumValue enumValue, + Context context) + { + var directives = SerializeDirectives(enumValue.Directives, context); + + if (enumValue.IsDeprecated) + { + var deprecateDirective = DeprecatedDirective.CreateNode(enumValue.DeprecationReason); + + if (directives.Count == 0) + { + directives = new List { deprecateDirective }; + } + else + { + var temp = directives.ToList(); + temp.Add(deprecateDirective); + directives = temp; + } + } + + return new EnumValueDefinitionNode( + null, + new NameNode(enumValue.Name), + SerializeDescription(enumValue.Description), + directives); + } + + private static ScalarTypeDefinitionNode SerializeScalarType( + ScalarType scalarType, + Context context) + { + var directives = SerializeDirectives(scalarType.Directives, context); + + if (scalarType.SpecifiedBy is not null) + { + var copy = directives as List ?? directives.ToList(); + directives = copy; + copy.Add( + new DirectiveNode( + SpecifiedBy, + new ArgumentNode( + Url, + new StringValueNode(scalarType.SpecifiedBy.ToString())))); + } + + return new( + null, + new NameNode(scalarType.Name), + SerializeDescription(scalarType.Description), + directives); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs new file mode 100644 index 00000000000..91d1ded1736 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs @@ -0,0 +1,118 @@ +using System.Linq; +using HotChocolate.Language; + +namespace HotChocolate.ApolloFederation; + +public static partial class FederationSchemaPrinter +{ + private static IDefinitionNode? SerializeObjectType( + ObjectType objectType, + Context context) + { + var fields = objectType.Fields + .Where(IncludeField) + .Select(t => SerializeObjectField(t, context)) + .ToList(); + + if (fields.Count == 0) + { + return null; + } + + var directives = SerializeDirectives(objectType.Directives, context); + + var interfaces = objectType.Implements + .Select(t => SerializeNamedType(t, context)) + .ToList(); + + if (objectType.ContextData.ContainsKey(Constants.WellKnownContextData.ExtendMarker)) + { + return new ObjectTypeExtensionNode( + null, + new NameNode(objectType.Name), + directives, + interfaces, + fields); + } + + return new ObjectTypeDefinitionNode( + null, + new NameNode(objectType.Name), + SerializeDescription(objectType.Description), + directives, + interfaces, + fields); + } + + private static InterfaceTypeDefinitionNode SerializeInterfaceType( + InterfaceType interfaceType, + Context context) + { + var directives = SerializeDirectives(interfaceType.Directives, context); + + var fields = interfaceType.Fields + .Select(t => SerializeObjectField(t, context)) + .ToList(); + + return new InterfaceTypeDefinitionNode( + null, + new NameNode(interfaceType.Name), + SerializeDescription(interfaceType.Description), + directives, + Array.Empty(), + fields); + } + + private static UnionTypeDefinitionNode SerializeUnionType( + UnionType unionType, + Context context) + { + var directives = SerializeDirectives(unionType.Directives, context); + + var types = unionType.Types.Values + .Select(t => SerializeNamedType(t, context)) + .ToList(); + + return new UnionTypeDefinitionNode( + null, + new NameNode(unionType.Name), + SerializeDescription(unionType.Description), + directives, + types); + } + + private static FieldDefinitionNode SerializeObjectField( + IOutputField field, + Context context) + { + var arguments = field.Arguments + .Select(t => SerializeInputField(t, context)) + .ToList(); + + var directives = SerializeDirectives(field.Directives, context); + + if (field.IsDeprecated) + { + var deprecateDirective = DeprecatedDirective.CreateNode(field.DeprecationReason); + + if (directives.Count == 0) + { + directives = new[] { deprecateDirective }; + } + else + { + var temp = directives.ToList(); + temp.Add(deprecateDirective); + directives = temp; + } + } + + return new FieldDefinitionNode( + null, + new NameNode(field.Name), + SerializeDescription(field.Description), + arguments, + SerializeType(field.Type, context), + directives); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs new file mode 100644 index 00000000000..ef2aa052ee5 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs @@ -0,0 +1,172 @@ +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.Language; +using HotChocolate.Types.Introspection; +using HotChocolate.Utilities; +using HotChocolate.Utilities.Introspection; + +namespace HotChocolate.ApolloFederation; + +/// +/// The Apollo Federation schema printer. +/// +public static partial class FederationSchemaPrinter +{ + private static readonly HashSet _builtInDirectives = new() + { + WellKnownTypeNames.Extends, + WellKnownTypeNames.External, + WellKnownTypeNames.Requires, + WellKnownTypeNames.Provides, + WellKnownTypeNames.Key, + WellKnownDirectives.Defer, + WellKnownDirectives.Stream, + WellKnownDirectives.Skip, + WellKnownDirectives.Include, + WellKnownDirectives.Deprecated, + SpecifiedByDirectiveType.Names.SpecifiedBy + }; + + /// + /// Creates a representation of the given + /// . + /// + /// + /// The schema object. + /// + /// + /// Returns the representation of the given + /// . + /// + public static string Print(ISchema schema) + { + if (schema is null) + { + throw new ArgumentNullException(nameof(schema)); + } + + return SerializeSchema(schema).ToString(); + } + + private static DocumentNode SerializeSchema(ISchema schema) + { + var context = new Context(); + var definitionNodes = new List(); + + // don't add any directives + // federation directives were already manually added + + foreach (var namedType in GetRelevantTypes(schema)) + { + if (TrySerializeType(namedType, context, out var definitionNode)) + { + definitionNodes.Add(definitionNode); + } + } + + return new DocumentNode(null, definitionNodes); + } + + private static IEnumerable GetRelevantTypes(ISchema schema) + => schema.Types + .Where(IncludeType) + .OrderBy(t => t.Name, StringComparer.Ordinal); + + private static bool TrySerializeType( + INamedType namedType, + Context context, + [NotNullWhen(true)] out IDefinitionNode? definitionNode) + { + definitionNode = namedType switch + { + ObjectType type => SerializeObjectType(type, context), + InterfaceType type => SerializeInterfaceType(type, context), + InputObjectType type => SerializeInputObjectType(type, context), + UnionType type => SerializeUnionType(type, context), + EnumType type => SerializeEnumType(type, context), + ScalarType type => SerializeScalarType(type, context), + _ => throw new NotSupportedException() + }; + return definitionNode is not null; + } + + private static ITypeNode SerializeType( + IType type, + Context context) + { + return type switch + { + NonNullType nt => new NonNullTypeNode( + (INullableTypeNode)SerializeType(nt.Type, context)), + ListType lt => new ListTypeNode(SerializeType(lt.ElementType, context)), + INamedType namedType => SerializeNamedType(namedType, context), + _ => throw new NotSupportedException() + }; + } + + private static NamedTypeNode SerializeNamedType( + INamedType namedType, + Context context) + { + context.TypeNames.Add(namedType.Name); + return new NamedTypeNode(null, new NameNode(namedType.Name)); + } + + private static IReadOnlyList SerializeDirectives( + IReadOnlyCollection directives, + Context context) + { + if (directives.Count == 0) + { + return Array.Empty(); + } + + List? directiveNodes = null; + + foreach (var directive in directives) + { + if (context.DirectiveNames.Contains(directive.Type.Name)) + { + (directiveNodes ??= new()).Add(directive.AsSyntaxNode(true)); + } + } + + if (directiveNodes is not null) + { + return directiveNodes; + } + + return Array.Empty(); + } + + private static StringValueNode? SerializeDescription(string? description) + => description is { Length: > 0 } + ? new StringValueNode(description) + : null; + + private static bool IncludeType(INamedType type) + => !IsBuiltInType(type) && + !IsApolloFederationType(type); + + private static bool IncludeField(IOutputField field) + => !field.IsIntrospectionField && + !IsApolloFederationType(field.Type.NamedType()); + + private static bool IsApolloFederationType(INamedType type) + => type is EntityType or ServiceType || + type.Name.EqualsOrdinal(WellKnownTypeNames.Any) || + type.Name.EqualsOrdinal(WellKnownTypeNames.FieldSet); + + private static bool IsBuiltInType(INamedType type) => + IntrospectionTypes.IsIntrospectionType(type.Name) || + BuiltInTypes.IsBuiltInType(type.Name); + + private sealed class Context + { + // ReSharper disable once CollectionNeverQueried.Local + public HashSet TypeNames { get; } = new(); + public HashSet DirectiveNames { get; } = new(_builtInDirectives); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs new file mode 100644 index 00000000000..a77942e230f --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs @@ -0,0 +1,86 @@ +using System.Collections.Generic; +using System.Linq; + +namespace HotChocolate.ApolloFederation; + +/// +/// Utility class to help calculate different Apollo Federation @link imports based on the supported version. +/// +internal sealed class FederationUtils +{ + private static string FEDERATION_SPEC_BASE_URL = "https://specs.apollo.dev/federation/v"; + + private static List FEDERATION_IMPORTS_20 = new List + { + "@extends", + "@external", + "@key", + "@inaccessible", + "@override", + "@provides", + "@requires", + "@shareable", + "@tag", + "FieldSet" + }; + + private static List FEDERATION_IMPORTS_21 = ConcatFederationImports(FEDERATION_IMPORTS_20, new List { "@composeDirective" }); + private static List FEDERATION_IMPORTS_22 = FEDERATION_IMPORTS_21; + private static List FEDERATION_IMPORTS_23 = ConcatFederationImports(FEDERATION_IMPORTS_22, new List { "@interfaceObject" }); + + private static List FEDERATION_IMPORTS_24 = FEDERATION_IMPORTS_23; + + // TODO add @authenticated and @requiresPolicy + private static List FEDERATION_IMPORTS_25 = FEDERATION_IMPORTS_23; + + private static List ConcatFederationImports(List baseImports, List additionalImports) + { + var imports = new List(baseImports); + imports.AddRange(additionalImports); + return imports; + } + + /// + /// Retrieve Apollo Federation @link information corresponding to the specified version. + /// + /// + /// Supported Apollo Federation version + /// + /// + /// Federation @link information corresponding to the specified version. + /// + internal static Link GetFederationLink(FederationVersion federationVersion) + { + switch (federationVersion) + { + case FederationVersion.FEDERATION_20: + { + return new Link(FEDERATION_SPEC_BASE_URL + "2.0", FEDERATION_IMPORTS_20); + } + case FederationVersion.FEDERATION_21: + { + return new Link(FEDERATION_SPEC_BASE_URL + "2.1", FEDERATION_IMPORTS_21); + } + case FederationVersion.FEDERATION_22: + { + return new Link(FEDERATION_SPEC_BASE_URL + "2.2", FEDERATION_IMPORTS_22); + } + case FederationVersion.FEDERATION_23: + { + return new Link(FEDERATION_SPEC_BASE_URL + "2.3", FEDERATION_IMPORTS_23); + } + case FederationVersion.FEDERATION_24: + { + return new Link(FEDERATION_SPEC_BASE_URL + "2.4", FEDERATION_IMPORTS_24); + } + case FederationVersion.FEDERATION_25: + { + return new Link(FEDERATION_SPEC_BASE_URL + "2.5", FEDERATION_IMPORTS_25); + } + default: + { + throw ThrowHelper.FederationVersion_Unknown(federationVersion); + } + } + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs new file mode 100644 index 00000000000..5196e398495 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs @@ -0,0 +1,14 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// Enum defining all supported Apollo Federation v2 versions. +/// +public enum FederationVersion +{ + FEDERATION_20, + FEDERATION_21, + FEDERATION_22, + FEDERATION_23, + FEDERATION_24, + FEDERATION_25, +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FieldSetType.cs new file mode 100644 index 00000000000..25fb5cca2fb --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FieldSetType.cs @@ -0,0 +1,139 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; +using HotChocolate.Language; +using static HotChocolate.ApolloFederation.ThrowHelper; + +namespace HotChocolate.ApolloFederation; + +/// +/// A scalar called _FieldSet is a custom scalar type that is used to +/// represent a set of fields. +/// +/// Grammatically, a field set is a selection set minus the braces. +/// +/// This means it can represent a single field "upc", multiple fields "id countryCode", +/// and even nested selection sets "id organization { id }". +/// +public sealed class FieldSetType : ScalarType +{ + /// + /// Initializes a new instance of . + /// + public FieldSetType() : this(WellKnownTypeNames.FieldSet) + { + } + + /// + /// Initializes a new instance of . + /// + /// + /// The name the scalar shall have. + /// + /// + /// Defines if this scalar shall bind implicitly to . + /// + public FieldSetType(string name, BindingBehavior bind = BindingBehavior.Explicit) + : base(name, bind) + { + Description = FederationResources.FieldsetType_Description; + } + + /// + protected override SelectionSetNode ParseLiteral(StringValueNode valueSyntax) + { + try + { + return ParseSelectionSet(valueSyntax.Value); + } + catch (SyntaxException) + { + throw FieldSetV1_InvalidFormat(this); + } + } + + /// + protected override StringValueNode ParseValue(SelectionSetNode runtimeValue) + => new StringValueNode(SerializeSelectionSet(runtimeValue)); + + /// + public override IValueNode ParseResult(object? resultValue) + { + if (resultValue is null) + { + return NullValueNode.Default; + } + + if (resultValue is string s) + { + return new StringValueNode(s); + } + + if (resultValue is SelectionSetNode selectionSet) + { + return new StringValueNode(SerializeSelectionSet(selectionSet)); + } + + throw Scalar_CannotParseValue(this, resultValue.GetType()); + } + + /// + public override bool TrySerialize(object? runtimeValue, out object? resultValue) + { + if (runtimeValue is null) + { + resultValue = null; + return true; + } + + if (runtimeValue is SelectionSetNode selectionSet) + { + resultValue = SerializeSelectionSet(selectionSet); + return true; + } + + resultValue = null; + return false; + } + + /// + public override bool TryDeserialize(object? resultValue, out object? runtimeValue) + { + if (resultValue is null) + { + runtimeValue = null; + return true; + } + + if (resultValue is SelectionSetNode selectionSet) + { + runtimeValue = selectionSet; + return true; + } + + if (resultValue is string serializedSelectionSet) + { + try + { + runtimeValue = ParseSelectionSet(serializedSelectionSet); + return true; + } + catch (SyntaxException) + { + runtimeValue = null; + return false; + } + } + + runtimeValue = null; + return false; + } + + private static SelectionSetNode ParseSelectionSet(string s) + => Utf8GraphQLParser.Syntax.ParseSelectionSet($"{{{s}}}"); + + private static string SerializeSelectionSet(SelectionSetNode selectionSet) + { + var s = selectionSet.ToString(false); + return s.Substring(1, s.Length - 2).Trim(); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InaccessibleDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InaccessibleDirectiveType.cs new file mode 100644 index 00000000000..21ab226c766 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InaccessibleDirectiveType.cs @@ -0,0 +1,54 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @inaccessible on FIELD_DEFINITION +/// | OBJECT +/// | INTERFACE +/// | UNION +/// | ENUM +/// | ENUM_VALUE +/// | SCALAR +/// | INPUT_OBJECT +/// | INPUT_FIELD_DEFINITION +/// | ARGUMENT_DEFINITION +/// +/// +/// The @inaccessible directive is used to mark location within schema as inaccessible +/// from the GraphQL Router. Applying @inaccessible directive on a type is equivalent of applying +/// it on all type fields. +/// +/// While @inaccessible fields are not exposed by the router to the clients, they are still available +/// for query plans and can be referenced from @key and @requires directives. This allows you to not +/// expose sensitive fields to your clients but still make them available for computations. +/// Inaccessible can also be used to incrementally add schema elements (e.g. fields) to multiple +/// subgraphs without breaking composition. +/// +/// type Foo @inaccessible { +/// hiddenId: ID! +/// hiddenField: String +/// } +/// +/// +public sealed class InaccessibleDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Inaccessible) + .Description(FederationResources.InaccessibleDirective_Description) + .Location( + DirectiveLocation.FieldDefinition + | DirectiveLocation.Object + | DirectiveLocation.Interface + | DirectiveLocation.Union + | DirectiveLocation.Enum + | DirectiveLocation.EnumValue + | DirectiveLocation.Scalar + | DirectiveLocation.Scalar + | DirectiveLocation.InputObject + | DirectiveLocation.InputFieldDefinition + | DirectiveLocation.ArgumentDefinition); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InterfaceObjectDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InterfaceObjectDirectiveType.cs new file mode 100644 index 00000000000..0dbc122af47 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InterfaceObjectDirectiveType.cs @@ -0,0 +1,28 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @interfaceObject on OBJECT +/// +/// +/// The @interfaceObject directive provides meta information to the router that this entity +/// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality +/// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. +/// +/// type Foo @interfaceObject @key(fields: "ids") { +/// id: ID! +/// newCommonField: String +/// } +/// +/// +public sealed class InterfaceObjectDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.InterfaceObject) + .Description(FederationResources.InterfaceObjectDirective_Description) + .Location(DirectiveLocation.Object); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/KeyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/KeyDirectiveType.cs new file mode 100644 index 00000000000..9819485d355 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/KeyDirectiveType.cs @@ -0,0 +1,34 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +/// +/// +/// The @key directive is used to indicate a combination of fields that can be used to uniquely +/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), +/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can +/// be specified on a target type. +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// field: String +/// } +/// +/// +public sealed class KeyDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Key) + .Description(FederationResources.KeyDirective_Description) + .Location(DirectiveLocation.Object | DirectiveLocation.Interface) + .Repeatable() + .FieldsArgumentV2() + .Argument(WellKnownArgumentNames.Resolvable) + .Type() + .DefaultValue(true); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/LinkDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/LinkDirectiveType.cs new file mode 100644 index 00000000000..1f46e98f31a --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/LinkDirectiveType.cs @@ -0,0 +1,75 @@ +using System.Collections.Generic; +using HotChocolate.ApolloFederation.Constants; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @link(url: String!, import: [String]) repeatable on SCHEMA +/// +/// +/// The @link directive links definitions within the document to external schemas. +/// External schemas are identified by their url, which optionally ends with a name and version with +/// the following format: `{NAME}/v{MAJOR}.{MINOR}` +/// +/// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive +/// should be namespaced as federation__key) unless they are explicitly imported. We automatically +/// import ALL federation directives to avoid the need for namespacing. +/// +/// NOTE: We currently DO NOT support full @link directive capability as it requires support for +/// namespacing and renaming imports. This functionality may be added in the future releases. +/// See @link specification for details. +/// +/// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) +/// +/// type Query { +/// foo: Foo! +/// } +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// name: String +/// } +/// +/// +public sealed class LinkDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .BindArgumentsImplicitly() + .Name(WellKnownTypeNames.Link) + .Location(DirectiveLocation.Schema) + .Repeatable(); +} + +/// +/// Object representation of @link directive. +/// +public sealed class Link +{ + /// + /// Initializes new instance of + /// + /// + /// Url of specification to be imported + /// + /// + /// Optional list of imported elements. + /// + public Link(string url, List? import) + { + Url = url; + Import = import; + } + + /// + /// Gets imported specification url. + /// + public string Url { get; } + + /// + /// Gets optional list of imported element names. + /// + + public List? Import { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/OverrideDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/OverrideDirectiveType.cs new file mode 100644 index 00000000000..ab4351293cc --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/OverrideDirectiveType.cs @@ -0,0 +1,31 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @override(from: String!) on FIELD_DEFINITION +/// +/// +/// The @override directive is used to indicate that the current subgraph is taking +/// responsibility for resolving the marked field away from the subgraph specified in the from +/// argument. Name of the subgraph to be overridden has to match the name of the subgraph that +/// was used to publish their schema. +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// description: String @override(from: "BarSubgraph") +/// } +/// +/// +public sealed class OverrideDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Override) + .Description(FederationResources.OverrideDirective_Description) + .Location(DirectiveLocation.FieldDefinition) + .Argument(WellKnownArgumentNames.From) + .Type>(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ProvidesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ProvidesDirectiveType.cs new file mode 100644 index 00000000000..5d7488a49cf --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ProvidesDirectiveType.cs @@ -0,0 +1,41 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @provides(fields: _FieldSet!) on FIELD_DEFINITION +/// +/// +/// The @provides directive is a router optimization hint specifying field set that +/// can be resolved locally at the given subgraph through this particular query path. This +/// allows you to expose only a subset of fields from the underlying entity type to be selectable +/// from the federated schema without the need to call other subgraphs. Provided fields specified +/// in the directive field set should correspond to a valid field on the underlying GraphQL +/// interface/object type. @provides directive can only be used on fields returning entities. +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// # implies name field can be resolved locally +/// bar: Bar @provides(fields: "name") +/// # name fields are external +/// # so will be fetched from other subgraphs +/// bars: [Bar] +/// } +/// +/// type Bar @key(fields: "id") { +/// id: ID! +/// name: String @external +/// } +/// +/// +public sealed class ProvidesDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Provides) + .Description(FederationResources.ProvidesDirective_Description) + .Location(DirectiveLocation.FieldDefinition) + .FieldsArgumentV1(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresDirectiveType.cs new file mode 100644 index 00000000000..616eb6c9a1d --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresDirectiveType.cs @@ -0,0 +1,34 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @requires(fields: _FieldSet!) on FIELD_DEFINITON +/// +/// +/// The @requires directive is used to specify external (provided by other subgraphs) +/// entity fields that are needed to resolve target field. It is used to develop a query plan where +/// the required fields may not be needed by the client, but the service may need additional +/// information from other subgraphs. Required fields specified in the directive field set should +/// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented +/// with @external directive. +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// # this field will be resolved from other subgraph +/// remote: String @external +/// local: String @requires(fields: "remote") +/// } +/// +/// +public sealed class RequiresDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Requires) + .Description(FederationResources.RequiresDirective_Description) + .Location(DirectiveLocation.FieldDefinition) + .FieldsArgumentV1(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresScopesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresScopesDirectiveType.cs new file mode 100644 index 00000000000..1c3f8696226 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresScopesDirectiveType.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @@requiresScopes(scopes: [[Scope!]!]!) on +/// ENUM +/// | FIELD_DEFINITION +/// | INTERFACE +/// | OBJECT +/// | SCALAR +/// +/// +/// Directive that is used to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. +/// Refer to the Apollo Router article for additional details. +/// +/// type Foo @key(fields: "id") { +/// id: ID +/// description: String @requiresScopes(scopes: [["scope1"]]) +/// } +/// +/// +public sealed class RequiresScopesDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .BindArgumentsImplicitly() + .Name(WellKnownTypeNames.RequiresScopes) + .Description(FederationResources.RequiresScopesDirective_Description) + .Location( + DirectiveLocation.Enum | + DirectiveLocation.FieldDefinition | + DirectiveLocation.Interface | + DirectiveLocation.Object | + DirectiveLocation.Scalar); +} + +/// +/// Object representation of @requiresScopes directive. +/// +public sealed class RequiresScopes +{ + /// + /// Initializes new instance of + /// + /// + /// List of a list of required JWT scopes. + /// + public RequiresScopes(List> scopes) + { + Scopes = scopes; + } + + /// + /// Retrieves list of a list of required JWT scopes. + /// + public List> Scopes { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ScopeType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ScopeType.cs new file mode 100644 index 00000000000..83f3e4bc202 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ScopeType.cs @@ -0,0 +1,64 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; +using HotChocolate.Language; + +namespace HotChocolate.ApolloFederation; + +/// +/// The Scope scalar representing a JWT scope. Serializes as a string. +/// +public sealed class ScopeType : ScalarType +{ + /// + /// Initializes a new instance of . + /// + public ScopeType() : this(WellKnownTypeNames.Scope) + { + } + + /// + /// Initializes a new instance of . + /// + /// + /// Scalar name + /// + /// + /// Defines if this scalar shall bind implicitly to . + /// + public ScopeType(string name, BindingBehavior bind = BindingBehavior.Explicit) + : base(name, bind) + { + Description = FederationResources.ScopeType_Description; + } + + protected override Scope ParseLiteral(StringValueNode valueSyntax) + => new Scope(valueSyntax.Value); + + public override IValueNode ParseResult(object? resultValue) + => ParseValue(resultValue); + + protected override StringValueNode ParseValue(Scope runtimeValue) + => new StringValueNode(runtimeValue.Value); +} + +/// +/// Scalar Scope representation. +/// +public sealed class Scope +{ + /// + /// Initializes a new instance of . + /// + /// + /// Scope value + /// + public Scope(string value) + { + Value = value; + } + + /// + /// Retrieve scope value + /// + public string Value { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ShareableDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ShareableDirectiveType.cs new file mode 100644 index 00000000000..638539784cd --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ShareableDirectiveType.cs @@ -0,0 +1,36 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @shareable repeatable on FIELD_DEFINITION | OBJECT +/// +/// +/// The @shareable directive indicates that given object and/or field can be resolved by multiple subgraphs. +/// If an object is marked as @shareable then all its fields are automatically shareable without the need +/// for explicitly marking them with @shareable directive. All fields referenced from @key directive are +/// automatically shareable as well. +/// +/// type Foo @key(fields: "id") { +/// id: ID! # shareable because id is a key field +/// name: String # non-shareable +/// description: String @shareable # shareable +/// } +/// +/// type Bar @shareable { +/// description: String # shareable because User is marked shareable +/// name: String # shareable because User is marked shareable +/// } +/// +/// +public sealed class ShareableDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.Shareable) + .Description(FederationResources.ShareableDirective_Description) + .Location(DirectiveLocation.FieldDefinition | DirectiveLocation.Object) + .Repeatable(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/TagDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/TagDirectiveType.cs new file mode 100644 index 00000000000..ec209020dff --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/TagDirectiveType.cs @@ -0,0 +1,70 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @tag(name: String!) repeatable on FIELD_DEFINITION +/// | OBJECT +/// | INTERFACE +/// | UNION +/// | ENUM +/// | ENUM_VALUE +/// | SCALAR +/// | INPUT_OBJECT +/// | INPUT_FIELD_DEFINITION +/// | ARGUMENT_DEFINITION +/// +/// +/// The @tag directive allows users to annotate fields and types with additional metadata information. +/// Tagging is commonly used for creating variants of the supergraph using contracts. +/// +/// type Foo @tag(name: "internal") { +/// id: ID! +/// name: String +/// } +/// +/// +public sealed class TagDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .BindArgumentsImplicitly() + .Name(WellKnownTypeNames.Tag) + .Description(FederationResources.TagDirective_Description) + .Location( + DirectiveLocation.FieldDefinition + | DirectiveLocation.Object + | DirectiveLocation.Interface + | DirectiveLocation.Union + | DirectiveLocation.Enum + | DirectiveLocation.EnumValue + | DirectiveLocation.Scalar + | DirectiveLocation.Scalar + | DirectiveLocation.InputObject + | DirectiveLocation.InputFieldDefinition + | DirectiveLocation.ArgumentDefinition); +} + +/// +/// Object representation of a @tag directive. +/// +public sealed class TagValue +{ + /// + /// Initializes a new instance of . + /// + /// + /// Custom tag value + /// + public TagValue(string name) + { + Name = name; + } + + /// + /// Get tag value. + /// + public string Name { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 721b9eb53c5..7fe61ff9dea 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -1,8 +1,12 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Descriptors; using HotChocolate.Language; -using static HotChocolate.ApolloFederation.Properties.FederationResources; +using System.Collections.Generic; +using System.Linq; +using ContactDirective = HotChocolate.ApolloFederation.Contact; +using LinkDirective = HotChocolate.ApolloFederation.Link; using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.Types; @@ -12,15 +16,174 @@ namespace HotChocolate.Types; public static partial class ApolloFederationDescriptorExtensions { /// - /// Adds the @external directive which is used to mark a field as owned by another service. - /// This allows service A to use fields from service B while also knowing at runtime - /// the types of that field. + /// Applies @contact directive which can be used to prpvode team contact information to your subgraph schema. + /// This information is automatically parsed and displayed by Apollo Studio. See + /// Subgraph Contact Information + /// for additional details. + /// + /// + /// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ + /// query: Query + /// } + /// + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Contact title of the subgraph owner + /// + /// + /// URL where the subgraph's owner can be reached + /// + /// + /// Other relevant contact notes; supports markdown links + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static ISchemaTypeDescriptor Contact(this ISchemaTypeDescriptor descriptor, string name, string? url = null, string? description = null) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + if (name is null) + { + throw new ArgumentNullException(nameof(name)); + } + + return descriptor.Directive(new ContactDirective(name, url, description)); + } + + /// + /// Applies @composeDirective which is used to specify custom directives that should be exposed in the + /// Supergraph schema. If not specified, by default, Supergraph schema excludes all custom directives. + /// + /// extend schema @composeDirective(name: "@custom") + /// @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) + /// @link(url: "https://myspecs.dev/custom/v1.0", import: ["@custom"]) + /// + /// directive @custom on FIELD_DEFINITION + /// + /// type Query { + /// helloWorld: String! @custom + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Name of the directive that should be preserved in the supergraph composition. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor descriptor, string name) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + if (name is null) + { + throw new ArgumentNullException(nameof(name)); + } + + return descriptor.Directive( + WellKnownTypeNames.ComposeDirective, + new ArgumentNode( + WellKnownArgumentNames.Name, + new StringValueNode(name) + ) + ); + } + + /// + /// Mark the type as an extension of a type that is defined by another service when + /// using Apollo Federation. + /// + [Obsolete("Use ExtendsType type instead")] + public static IObjectTypeDescriptor ExtendServiceType( + this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + descriptor + .Extend() + .OnBeforeCreate(d => d.ContextData[ExtendMarker] = true); + + return descriptor; + } + + /// + /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have + /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. /// + /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends + /// directive should be removed from your Federation v2 schemas. /// /// # extended from the Users service - /// extend type User @key(fields: "email") { - /// email: String @external - /// reviews: [Review] + /// type Foo @extends @key(fields: "id") { + /// id: ID + /// description: String + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor ExtendsType( + this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return descriptor.Directive(WellKnownTypeNames.Extends); + } + + /// + /// Applies the @external directive which is used to mark a field as owned by another service. + /// This allows service A to use fields from service B while also knowing at runtime + /// the types of that field. All the external fields should either be referenced from the @key, + /// @requires or @provides directives field sets. + /// + /// Due to the smart merging of entity types, Federation v2 no longer requires @external directive + /// on @key fields and can be safely omitted from the schema. @external directive is only required + /// on fields referenced by the @requires and @provides directive. + /// + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// remoteField: String @external + /// localField: String @requires(fields: "remoteField") /// } /// /// @@ -45,12 +208,53 @@ public static IObjectFieldDescriptor External( } /// - /// Adds the @key directive which is used to indicate a combination of fields that - /// can be used to uniquely identify and fetch an object or interface. + /// Applies the @interfaceObject directive which provides meta information to the router that this entity + /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality + /// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. /// - /// type Product @key(fields: "upc") { - /// upc: UPC! - /// name: String + /// type Foo @interfaceObject @key(fields: "ids") { + /// id: ID! + /// newCommonField: String + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// The is null. + /// + public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return descriptor.Directive(WellKnownTypeNames.InterfaceObject); + } + + /// + /// Applies the @key directive which is used to indicate a combination of fields that can be used to uniquely + /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), + /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can + /// be specified on a target type. + /// + /// Keys can be marked as non-resolvable which indicates to router that given entity should never be + /// resolved within given subgraph. This allows your subgraph to still reference target entity without + /// contributing any fields to it. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// field: String + /// bars: [Bar!]! + /// } + /// + /// type Bar @key(fields: "id", resolvable: false) { + /// id: ID! /// } /// /// @@ -61,6 +265,9 @@ public static IObjectFieldDescriptor External( /// The field set that describes the key. /// Grammatically, a field set is a selection set minus the braces. /// + /// + /// Boolean flag to indicate whether this entity is resolvable locally. + /// /// /// /// is null. @@ -70,7 +277,8 @@ public static IObjectFieldDescriptor External( /// public static IEntityResolverDescriptor Key( this IObjectTypeDescriptor descriptor, - string fieldSet) + string fieldSet, + bool? resolvable = null) { if (descriptor is null) { @@ -84,27 +292,253 @@ public static IEntityResolverDescriptor Key( nameof(fieldSet)); } + var arguments = new List + { + new ArgumentNode( + WellKnownArgumentNames.Fields, + new StringValueNode(fieldSet)), + }; + if (false == resolvable) + { + arguments.Add( + new ArgumentNode( + WellKnownArgumentNames.Resolvable, + new BooleanValueNode(false)) + ); + } + descriptor.Directive( WellKnownTypeNames.Key, + arguments.ToArray()); + + return new EntityResolverDescriptor(descriptor); + } + + /// + public static IInterfaceTypeDescriptor Key( + this IInterfaceTypeDescriptor descriptor, + string fieldSet, + bool? resolvable = null) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + if (string.IsNullOrEmpty(fieldSet)) + { + throw new ArgumentException( + FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty, + nameof(fieldSet)); + } + + var arguments = new List + { new ArgumentNode( WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet))); + new StringValueNode(fieldSet)), + }; + if (false == resolvable) + { + arguments.Add( + new ArgumentNode( + WellKnownArgumentNames.Resolvable, + new BooleanValueNode(false)) + ); + } - return new EntityResolverDescriptor(descriptor); + return descriptor.Directive( + WellKnownTypeNames.Key, + arguments.ToArray()); } /// - /// Adds the @requires directive which is used to annotate the required - /// input fieldset from a base type for a resolver. It is used to develop - /// a query plan where the required fields may not be needed by the client, but the - /// service may need additional information from other services. + /// Applies @link directive definitions to link the document to external schemas. + /// External schemas are identified by their url, which optionally ends with a name and version with + /// the following format: `{NAME}/v{MAJOR}.{MINOR}` /// + /// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive + /// should be namespaced as federation__key) unless they are explicitly imported. We automatically + /// import ALL federation directives to avoid the need for namespacing. + /// + /// NOTE: We currently DO NOT support full @link directive capability as it requires support for + /// namespacing and renaming imports. This functionality may be added in the future releases. + /// See @link specification for details. + /// - /// # extended from the Users service - /// extend type User @key(fields: "id") { - /// id: ID! @external - /// email: String @external - /// reviews: [Review] @requires(fields: "email") + /// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) + /// + /// type Query { + /// foo: Foo! + /// } + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// name: String + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Url of specification to be imported + /// + /// + /// Optional list of imported elements. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static ISchemaTypeDescriptor Link( + this ISchemaTypeDescriptor descriptor, + string url, + string?[]? import) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + if (url is null) + { + throw new ArgumentNullException(nameof(url)); + } + + return descriptor.Directive(new LinkDirective(url, import?.ToList())); + } + + /// + /// Applies the @override directive which is used to indicate that the current subgraph is taking + /// responsibility for resolving the marked field away from the subgraph specified in the from + /// argument. Name of the subgraph to be overridden has to match the name of the subgraph that + /// was used to publish their schema. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// description: String @override(from: "BarSubgraph") + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Name of the subgraph to be overridden. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// is null. + /// + /// + /// is null or . + /// + public static IObjectFieldDescriptor Override( + this IObjectFieldDescriptor descriptor, + string from) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + if (string.IsNullOrEmpty(from)) + { + throw new ArgumentException( + FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty, + nameof(from)); + } + + return descriptor.Directive( + WellKnownTypeNames.Override, + new ArgumentNode( + WellKnownArgumentNames.From, + new StringValueNode(from))); + } + + /// + /// Applies the @provides directive which is a router optimization hint specifying field set that + /// can be resolved locally at the given subgraph through this particular query path. This + /// allows you to expose only a subset of fields from the underlying entity type to be selectable + /// from the federated schema without the need to call other subgraphs. Provided fields specified + /// in the directive field set should correspond to a valid field on the underlying GraphQL + /// interface/object type. @provides directive can only be used on fields returning entities. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// # implies name field can be resolved locally + /// bar: Bar @provides(fields: "name") + /// # name fields are external + /// # so will be fetched from other subgraphs + /// bars: [Bar] + /// } + /// + /// type Bar @key(fields: "id") { + /// id: ID! + /// name: String @external + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// The fields that are guaranteed to be selectable by the gateway. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// is null. + /// + /// + /// is null or . + /// + public static IObjectFieldDescriptor Provides( + this IObjectFieldDescriptor descriptor, + string fieldSet) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + if (string.IsNullOrEmpty(fieldSet)) + { + throw new ArgumentException( + FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty, + nameof(fieldSet)); + } + + return descriptor.Directive( + WellKnownTypeNames.Provides, + new ArgumentNode( + WellKnownArgumentNames.Fields, + new StringValueNode(fieldSet))); + } + + /// + /// Applies the @requires directive which is used to specify external (provided by other subgraphs) + /// entity fields that are needed to resolve target field. It is used to develop a query plan where + /// the required fields may not be needed by the client, but the service may need additional + /// information from other subgraphs. Required fields specified in the directive field set should + /// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented + /// with @external directive. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// # this field will be resolved from other subgraph + /// remote: String @external + /// local: String @requires(fields: "remote") /// } /// /// @@ -150,40 +584,140 @@ public static IObjectFieldDescriptor Requires( } /// - /// Adds the @provides directive which is used to annotate the expected returned - /// fieldset from a field on a base type that is guaranteed to be selectable by - /// the gateway. - /// + /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. + /// If an object is marked as @shareable then all its fields are automatically shareable without the need + /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are + /// automatically shareable as well. /// - /// # extended from the Users service - /// type Review @key(fields: "id") { - /// product: Product @provides(fields: "name") + /// type Foo @key(fields: "id") { + /// id: ID! # shareable because id is a key field + /// name: String # non-shareable + /// description: String @shareable # shareable /// } /// - /// extend type Product @key(fields: "upc") { - /// upc: String @external - /// name: String @external + /// type Bar @shareable { + /// description: String # shareable because User is marked shareable + /// name: String # shareable because User is marked shareable /// } /// /// /// /// The object field descriptor on which this directive shall be annotated. /// - /// - /// The fields that are guaranteed to be selectable by the gateway. - /// Grammatically, a field set is a selection set minus the braces. - /// /// /// Returns the object field descriptor. /// /// /// is null. /// + public static IObjectFieldDescriptor Shareable(this IObjectFieldDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return descriptor.Directive(WellKnownTypeNames.Shareable); + } + + /// + /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. + /// If an object is marked as @shareable then all its fields are automatically shareable without the need + /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are + /// automatically shareable as well. + /// + /// type Foo @key(fields: "id") { + /// id: ID! # shareable because id is a key field + /// name: String # non-shareable + /// description: String @shareable # shareable + /// } + /// + /// type Bar @shareable { + /// description: String # shareable because User is marked shareable + /// name: String # shareable because User is marked shareable + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return descriptor.Directive(WellKnownTypeNames.Shareable); + } + /// + /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have + /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. + /// + /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends + /// directive should be removed from your Federation v2 schemas. + /// + /// # extended from the Users service + /// type Foo @extends @key(fields: "id") { + /// id: ID + /// description: String + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor ExtendsType( + this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return descriptor.Directive(WellKnownTypeNames.Extends); + } + + /// + /// Adds the @key directive which is used to indicate a combination of fields that can be used to uniquely + /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), + /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can + /// be specified on a target type. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// field: String + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// The field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// + /// is null. + /// /// /// is null or . /// - public static IObjectFieldDescriptor Provides( - this IObjectFieldDescriptor descriptor, + public static IEntityResolverDescriptor Key( + this IObjectTypeDescriptor descriptor, string fieldSet) { if (descriptor is null) @@ -194,15 +728,17 @@ public static IObjectFieldDescriptor Provides( if (string.IsNullOrEmpty(fieldSet)) { throw new ArgumentException( - FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty, + FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty, nameof(fieldSet)); } - return descriptor.Directive( - WellKnownTypeNames.Provides, + descriptor.Directive( + WellKnownTypeNames.Key, new ArgumentNode( WellKnownArgumentNames.Fields, new StringValueNode(fieldSet))); + + return new EntityResolverDescriptor(descriptor); } /// @@ -210,8 +746,9 @@ public static IObjectFieldDescriptor Provides( /// of a type that is defined by another service when /// using apollo federation. /// - public static IObjectTypeDescriptor ExtendServiceType( - this IObjectTypeDescriptor descriptor) + [Obsolete("Use ExtendsType type instead")] + public static IObjectTypeDescriptor ExtendServiceType( + this IObjectTypeDescriptor descriptor) { if (descriptor is null) { @@ -224,4 +761,71 @@ public static IObjectTypeDescriptor ExtendServiceType( return descriptor; } + + /// + /// Applies the @interfaceObject directive which provides meta information to the router that this entity + /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality + /// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. + /// + /// type Foo @interfaceObject @key(fields: "ids") { + /// id: ID! + /// newCommonField: String + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// The is null. + /// + public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return descriptor.Directive(WellKnownTypeNames.InterfaceObject); + } + + /// + /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. + /// If an object is marked as @shareable then all its fields are automatically shareable without the need + /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are + /// automatically shareable as well. + /// + /// type Foo @key(fields: "id") { + /// id: ID! # shareable because id is a key field + /// name: String # non-shareable + /// description: String @shareable # shareable + /// } + /// + /// type Bar @shareable { + /// description: String # shareable because User is marked shareable + /// name: String # shareable because User is marked shareable + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + return descriptor.Directive(WellKnownTypeNames.Shareable); + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions~1.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions~1.cs deleted file mode 100644 index 99eb7ed4e56..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions~1.cs +++ /dev/null @@ -1,82 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Descriptors; -using HotChocolate.Language; -using static HotChocolate.ApolloFederation.Properties.FederationResources; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; - -namespace HotChocolate.Types; - -/// -/// Provides extensions for type system descriptors. -/// -public static partial class ApolloFederationDescriptorExtensions -{ - /// - /// Adds the @key directive which is used to indicate a combination of fields that - /// can be used to uniquely identify and fetch an object or interface. - /// - /// type Product @key(fields: "upc") { - /// upc: UPC! - /// name: String - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// The field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - /// - /// - /// is null. - /// - /// - /// is null or . - /// - public static IEntityResolverDescriptor Key( - this IObjectTypeDescriptor descriptor, - string fieldSet) - { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - if (string.IsNullOrEmpty(fieldSet)) - { - throw new ArgumentException( - FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty, - nameof(fieldSet)); - } - - descriptor.Directive( - WellKnownTypeNames.Key, - new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet))); - - return new EntityResolverDescriptor(descriptor); - } - - /// - /// Mark the type as an extension - /// of a type that is defined by another service when - /// using apollo federation. - /// - public static IObjectTypeDescriptor ExtendServiceType( - this IObjectTypeDescriptor descriptor) - { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - descriptor - .Extend() - .OnBeforeCreate(d => d.ContextData[ExtendMarker] = true); - - return descriptor; - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs index 5d6ddf5f0b5..989907a3587 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs @@ -1,6 +1,4 @@ -using System; using HotChocolate.Execution.Configuration; -using Microsoft.Extensions.DependencyInjection; namespace Microsoft.Extensions.DependencyInjection; @@ -28,7 +26,7 @@ public static IRequestExecutorBuilder AddApolloFederation( { throw new ArgumentNullException(nameof(builder)); } - + return builder.ConfigureSchema(s => s.AddApolloFederation()); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index a112a1b5d93..1df0cb6d89f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -1,4 +1,5 @@ using HotChocolate.ApolloFederation; +using HotChocolate.ApolloFederation; using AnyType = HotChocolate.ApolloFederation.AnyType; namespace HotChocolate; @@ -20,18 +21,29 @@ public static class ApolloFederationSchemaBuilderExtensions /// /// The is null. /// - internal static ISchemaBuilder AddApolloFederation( + public static ISchemaBuilder AddApolloFederation( this ISchemaBuilder builder) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } + // disable hot chocolate tag directive + // specify default Query type name if not specified + builder.ModifyOptions(opt => + { + opt.EnableTag = false; + if (opt.QueryTypeName is null) + { + opt.QueryTypeName = "Query"; + } + }); builder.AddType(); builder.AddType(); - builder.AddType(); + builder.AddType(new ServiceType()); builder.AddType(); + builder.AddType(); builder.AddType(); builder.AddType(); builder.AddType(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs index 94b0acfa0f7..4809f6b0001 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs @@ -1,16 +1,26 @@ using static HotChocolate.ApolloFederation.Constants.WellKnownArgumentNames; +using FieldSetTypeV1 = HotChocolate.ApolloFederation.FieldSetType; +using FieldSetTypeV2 = HotChocolate.ApolloFederation.FieldSetType; namespace HotChocolate.ApolloFederation; internal static class DirectiveTypeDescriptorExtensions { - public static IDirectiveTypeDescriptor FieldsArgument( + public static IDirectiveTypeDescriptor FieldsArgumentV1( this IDirectiveTypeDescriptor descriptor) { descriptor .Argument(Fields) - .Type>(); + .Type>(); + return descriptor; + } + public static IDirectiveTypeDescriptor FieldsArgumentV2( + this IDirectiveTypeDescriptor descriptor) + { + descriptor + .Argument(Fields) + .Type>(); return descriptor; } } From a34ea84a79a9b9015a62c14bf39c3d94386bf9bc Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 6 Dec 2023 14:08:47 +0200 Subject: [PATCH 10/89] Introduce more order --- .../Attributes}/ExtendServiceTypeAttribute.cs | 1 + .../Attributes/ExternalAttribute.cs | 39 ++ .../Attributes}/KeyAttribute.cs | 55 +- .../Attributes}/MapAttribute.cs | 0 .../Attributes}/ProvidesAttribute.cs | 10 +- .../Attributes/ReferenceResolverAttribute.cs | 19 + .../Attributes}/RequiresAttribute.cs | 10 +- .../Directives/AuthenticatedDirectiveType.cs | 0 .../Directives/ComposeDirectiveType.cs | 0 .../Directives/ContactDirectiveType.cs | 37 ++ .../Directives/ExtendsDirectiveType.cs | 0 .../Directives/ExternalDirectiveType.cs | 0 .../Directives/InaccessibleDirectiveType.cs | 0 .../InterfaceObjectDirectiveType.cs | 0 .../Directives/KeyDirectiveType.cs | 2 +- .../Directives/LinkDirectiveType.cs | 5 +- .../Directives/OverrideDirectiveType.cs | 0 .../Directives/ProvidesDirectiveType.cs | 0 .../Directives/RequiresDirectiveType.cs | 0 .../Directives/RequiresScopesDirectiveType.cs | 0 .../Directives/ShareableDirectiveType.cs | 0 .../Directives/TagDirectiveType.cs | 0 .../ObjectTypes}/AnyType.cs | 0 .../ObjectTypes}/EntityType.cs | 4 +- .../ObjectTypes}/FieldSetType.cs | 0 .../ObjectTypes}/ScopeType.cs | 0 .../ObjectTypes}/ServiceType.cs | 23 +- .../FederationSchemaPrinter.DirectiveType.cs | 0 .../FederationSchemaPrinter.InputType.cs | 0 .../FederationSchemaPrinter.LeafType.cs | 0 .../FederationSchemaPrinter.OutputTypes.cs | 0 .../SchemaPrinter}/FederationSchemaPrinter.cs | 0 .../ApolloFederation/Directives/Contact.cs | 38 -- .../FederationSchemaPrinter.DirectiveType.cs | 43 -- .../FederationSchemaPrinter.InputType.cs | 40 -- .../FederationSchemaPrinter.LeafType.cs | 81 --- .../FederationSchemaPrinter.OutputTypes.cs | 118 ---- .../Directives/FederationSchemaPrinter.cs | 172 ----- .../Directives/FederationUtils.cs | 86 --- .../Directives/FederationVersion.cs | 14 - .../src/ApolloFederation/ExternalAttribute.cs | 26 - .../ApolloFederation/ExternalDirectiveType.cs | 59 -- .../FederationTypeInterceptor.cs | 315 --------- .../FederatedSchema.cs | 10 +- .../FederationVersioning/FederationUtils.cs | 121 ++++ .../FederationVersioning/FederationVersion.cs | 16 + .../src/ApolloFederation/FieldSetType.cs | 139 ---- .../FederationTypeInterceptor.cs | 606 ++++++++++++++++++ .../src/ApolloFederation/KeyDirectiveType.cs | 31 - .../ApolloFederation/ProvidesDirectiveType.cs | 41 -- .../ReferenceResolverAttribute.cs | 89 --- .../ApolloFederation/RequiresDirectiveType.cs | 34 - 52 files changed, 905 insertions(+), 1379 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/Attributes}/ExtendServiceTypeAttribute.cs (93%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/Attributes}/KeyAttribute.cs (50%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/Attributes}/MapAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/Attributes}/ProvidesAttribute.cs (93%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/Attributes}/RequiresAttribute.cs (90%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/AuthenticatedDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/ComposeDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/ContactDirectiveType.cs (58%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/ExtendsDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/ExternalDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/InaccessibleDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/InterfaceObjectDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/KeyDirectiveType.cs (97%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/LinkDirectiveType.cs (95%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/OverrideDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/ProvidesDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/RequiresDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/RequiresScopesDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/ShareableDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration}/Directives/TagDirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/ObjectTypes}/AnyType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/ObjectTypes}/EntityType.cs (82%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Directives => Configuration/ObjectTypes}/FieldSetType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Directives => Configuration/ObjectTypes}/ScopeType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/ObjectTypes}/ServiceType.cs (60%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/SchemaPrinter}/FederationSchemaPrinter.DirectiveType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/SchemaPrinter}/FederationSchemaPrinter.InputType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/SchemaPrinter}/FederationSchemaPrinter.LeafType.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/SchemaPrinter}/FederationSchemaPrinter.OutputTypes.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Configuration/SchemaPrinter}/FederationSchemaPrinter.cs (100%) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Directives => FederationVersioning}/FederatedSchema.cs (87%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FieldSetType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/ReferenceResolverAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExtendServiceTypeAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs similarity index 93% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/ExtendServiceTypeAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs index 47ff6842b02..80227a12991 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExtendServiceTypeAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs @@ -11,6 +11,7 @@ namespace HotChocolate.ApolloFederation; AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)] +[Obsolete("Use ExtendsAttribute instead")] public sealed class ExtendServiceTypeAttribute : ObjectTypeDescriptorAttribute { protected override void OnConfigure( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs new file mode 100644 index 00000000000..0732d886b04 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs @@ -0,0 +1,39 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// # federation v1 definition +/// directive @external on FIELD_DEFINITION +/// +/// # federation v2 definition +/// directive @external on OBJECT | FIELD_DEFINITION +/// +/// +/// The @external directive is used to mark a field as owned by another service. +/// This allows service A to use fields from service B while also knowing at runtime +/// the types of that field. All the external fields should either be referenced from the @key, +/// @requires or @provides directives field sets. +/// +/// Due to the smart merging of entity types, Federation v2 no longer requires @external directive +/// on @key fields and can be safely omitted from the schema. @external directive is only required +/// on fields referenced by the @requires and @provides directive. +/// +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// remoteField: String @external +/// localField: String @requires(fields: "remoteField") +/// } +/// +/// +public sealed class ExternalAttribute : ObjectFieldDescriptorAttribute +{ + protected override void OnConfigure( + IDescriptorContext context, + IObjectFieldDescriptor descriptor, + MemberInfo member) + => descriptor.External(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs similarity index 50% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs index e5533a692ca..c26b37eda61 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs @@ -1,4 +1,3 @@ -using System.Reflection; using HotChocolate.Types.Descriptors; using static HotChocolate.ApolloFederation.ThrowHelper; @@ -6,28 +5,35 @@ namespace HotChocolate.ApolloFederation; /// /// +/// # federation v1 definition /// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +/// +/// # federation v2 definition +/// directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE /// -/// +/// /// The @key directive is used to indicate a combination of fields that can be used to uniquely /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can /// be specified on a target type. +/// +/// Keys can also be marked as non-resolvable which indicates to router that given entity should never be +/// resolved within given subgraph. This allows your subgraph to still reference target entity without +/// contributing any fields to it. /// /// type Foo @key(fields: "id") { /// id: ID! /// field: String +/// bars: [Bar!]! +/// } +/// +/// type Bar @key(fields: "id", resolvable: false) { +/// id: ID! /// } /// +/// /// -[AttributeUsage( - AttributeTargets.Class | - AttributeTargets.Struct | - AttributeTargets.Interface | - AttributeTargets.Property | - AttributeTargets.Method, - AllowMultiple = true)] -public sealed class KeyAttribute : DescriptorAttribute +public sealed class KeyAttribute : ObjectTypeDescriptorAttribute { /// /// Initializes a new instance of . @@ -36,7 +42,7 @@ public sealed class KeyAttribute : DescriptorAttribute /// The field set that describes the key. /// Grammatically, a field set is a selection set minus the braces. /// - public KeyAttribute(string? fieldSet = default) + public KeyAttribute(string fieldSet) { FieldSet = fieldSet; } @@ -45,31 +51,14 @@ public KeyAttribute(string? fieldSet = default) /// Gets the field set that describes the key. /// Grammatically, a field set is a selection set minus the braces. /// - public string? FieldSet { get; } + public string FieldSet { get; } - protected internal override void TryConfigure( - IDescriptorContext context, - IDescriptor descriptor, - ICustomAttributeProvider element) + protected override void OnConfigure(IDescriptorContext context, IObjectTypeDescriptor descriptor, Type type) { - switch (descriptor) + if (string.IsNullOrEmpty(FieldSet)) { - case IObjectTypeDescriptor objectTypeDescriptor when element is Type runtimeType: - { - if (string.IsNullOrEmpty(FieldSet)) - { - throw Key_FieldSet_CannotBeEmpty(runtimeType); - } - - objectTypeDescriptor.Key(FieldSet!); - break; - } - - case IObjectFieldDescriptor objectFieldDescriptor when element is MemberInfo: - objectFieldDescriptor - .Extend() - .OnBeforeCreate(d => d.ContextData[Constants.WellKnownContextData.KeyMarker] = true); - break; + throw Key_FieldSet_CannotBeEmpty(type); } + descriptor.Key(FieldSet); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/MapAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/MapAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ProvidesAttribute.cs similarity index 93% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ProvidesAttribute.cs index 0c56f10082e..f02c535e7f7 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ProvidesAttribute.cs @@ -8,19 +8,19 @@ namespace HotChocolate.ApolloFederation; /// /// directive @provides(fields: _FieldSet!) on FIELD_DEFINITION /// -/// +/// /// The @provides directive is a router optimization hint specifying field set that -/// can be resolved locally at the given subgraph through this particular query path. This +/// can be resolved locally at the given subgraph through this particular query path. This /// allows you to expose only a subset of fields from the underlying entity type to be selectable /// from the federated schema without the need to call other subgraphs. Provided fields specified -/// in the directive field set should correspond to a valid field on the underlying GraphQL +/// in the directive field set should correspond to a valid field on the underlying GraphQL /// interface/object type. @provides directive can only be used on fields returning entities. /// /// type Foo @key(fields: "id") { /// id: ID! -/// # implies name field can be resolved locally +/// # implies name field can be resolved locally /// bar: Bar @provides(fields: "name") -/// # name fields are external +/// # name fields are external /// # so will be fetched from other subgraphs /// bars: [Bar] /// } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs new file mode 100644 index 00000000000..c2c9eebb219 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using HotChocolate.ApolloFederation.Descriptors; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// The reference resolver enables your gateway's query planner to resolve a particular +/// entity by whatever unique identifier your other subgraphs use to reference it. +/// +[AttributeUsage(AttributeTargets.Method)] +public class ReferenceResolverAttribute : Attribute +{ + public void Configure(IDescriptorContext context, IObjectTypeDescriptor descriptor, MethodInfo method) + { + var entityResolverDescriptor = new EntityResolverDescriptor(descriptor); + entityResolverDescriptor.ResolveReferenceWith(method); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresAttribute.cs similarity index 90% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresAttribute.cs index 74cdb796cfb..f75a75af3b6 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresAttribute.cs @@ -6,12 +6,16 @@ namespace HotChocolate.ApolloFederation; /// /// -/// directive @requires(fields: _FieldSet!) on FIELD_DEFINITON +/// # federation v1 definition +/// directive @requires(fields: _FieldSet!) on FIELD_DEFINITION +/// +/// # federation v2 definition +/// directive @requires(fields: FieldSet!) on FIELD_DEFINITON /// -/// +/// /// The @requires directive is used to specify external (provided by other subgraphs) /// entity fields that are needed to resolve target field. It is used to develop a query plan where -/// the required fields may not be needed by the client, but the service may need additional +/// the required fields may not be needed by the client, but the service may need additional /// information from other subgraphs. Required fields specified in the directive field set should /// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented /// with @external directive. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/AuthenticatedDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/AuthenticatedDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/AuthenticatedDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/AuthenticatedDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ComposeDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ComposeDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ComposeDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ComposeDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ContactDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs similarity index 58% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ContactDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs index 5ca58534a60..bb77fc8f3f0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ContactDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs @@ -35,3 +35,40 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) .Description(FederationResources.ContactDirective_Description) .Location(DirectiveLocation.Schema); } + +public sealed class Contact +{ + /// + /// Initializes new instance of + /// + /// + /// Contact title of the subgraph owner + /// + /// + /// URL where the subgraph's owner can be reached + /// + /// + /// Other relevant notes can be included here; supports markdown links + /// + public Contact(string name, string? url, string? description) + { + Name = name; + Url = url; + Description = description; + } + + /// + /// Gets the contact title of the subgraph owner. + /// + public string Name { get; } + + /// + /// Gets the url where the subgraph's owner can be reached. + /// + public string? Url { get; } + + /// + /// Gets other relevant notes about subgraph contact information. Can include markdown links. + /// + public string? Description { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExtendsDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExtendsDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExtendsDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExtendsDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExternalDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExternalDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ExternalDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExternalDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InaccessibleDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InaccessibleDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InterfaceObjectDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InterfaceObjectDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/InterfaceObjectDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InterfaceObjectDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/KeyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/KeyDirectiveType.cs similarity index 97% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/KeyDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/KeyDirectiveType.cs index 9819485d355..502b2d98bd4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/KeyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/KeyDirectiveType.cs @@ -27,7 +27,7 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) .Description(FederationResources.KeyDirective_Description) .Location(DirectiveLocation.Object | DirectiveLocation.Interface) .Repeatable() - .FieldsArgumentV2() + .FieldsArgument() .Argument(WellKnownArgumentNames.Resolvable) .Type() .DefaultValue(true); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/LinkDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/LinkDirectiveType.cs similarity index 95% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/LinkDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/LinkDirectiveType.cs index 1f46e98f31a..0887a9834e4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/LinkDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/LinkDirectiveType.cs @@ -56,7 +56,7 @@ public sealed class Link /// /// Optional list of imported elements. /// - public Link(string url, List? import) + public Link(string url, List? import) { Url = url; Import = import; @@ -70,6 +70,5 @@ public Link(string url, List? import) /// /// Gets optional list of imported element names. /// - - public List? Import { get; } + public List? Import { get; } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/OverrideDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/OverrideDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/OverrideDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/OverrideDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ProvidesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ProvidesDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresScopesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/RequiresScopesDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ShareableDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ShareableDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ShareableDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ShareableDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/TagDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/TagDirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/TagDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/TagDirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/AnyType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/AnyType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/AnyType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/AnyType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/EntityType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/EntityType.cs similarity index 82% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/EntityType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/EntityType.cs index 6f070a1e6f9..0f31a7a7673 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/EntityType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/EntityType.cs @@ -1,5 +1,5 @@ +using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; -using static HotChocolate.ApolloFederation.Constants.WellKnownTypeNames; namespace HotChocolate.ApolloFederation; @@ -11,6 +11,6 @@ public sealed class EntityType : UnionType { protected override void Configure(IUnionTypeDescriptor descriptor) => descriptor - .Name(Entity) + .Name(WellKnownTypeNames.Entity) .Description(FederationResources.EntityType_Description); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FieldSetType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ScopeType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ScopeType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/ScopeType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ScopeType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ServiceType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs similarity index 60% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/ServiceType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs index 64a1e86fb66..d18db2f1682 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ServiceType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs @@ -1,5 +1,7 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; +using HotChocolate.Resolvers; +using FederationSchemaPrinter = HotChocolate.ApolloFederation.FederationSchemaPrinter; namespace HotChocolate.ApolloFederation; @@ -13,11 +15,30 @@ namespace HotChocolate.ApolloFederation; /// public class ServiceType : ObjectType { + public ServiceType(bool isV2 = false) + { + IsV2 = isV2; + } + + public bool IsV2 { get; } + protected override void Configure(IObjectTypeDescriptor descriptor) => descriptor .Name(WellKnownTypeNames.Service) .Description(FederationResources.ServiceType_Description) .Field(WellKnownFieldNames.Sdl) .Type>() - .Resolve(resolver => FederationSchemaPrinter.Print(resolver.Schema)); + .Resolve(resolver => PrintSchemaSdl(resolver, IsV2)); + + private string PrintSchemaSdl(IResolverContext resolver, bool isV2) + { + if (isV2) + { + return SchemaPrinter.Print(resolver.Schema); + } + else + { + return FederationSchemaPrinter.Print(resolver.Schema); + } + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.DirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.DirectiveType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.DirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.DirectiveType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.InputType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.InputType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.InputType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.InputType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.LeafType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.LeafType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.OutputTypes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.OutputTypes.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationSchemaPrinter.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs deleted file mode 100644 index b53929c5190..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/Contact.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace HotChocolate.ApolloFederation; - -public sealed class Contact -{ - /// - /// Initializes new instance of - /// - /// - /// Contact title of the subgraph owner - /// - /// - /// URL where the subgraph's owner can be reached - /// - /// - /// Other relevant notes can be included here; supports markdown links - /// - public Contact(string name, string? url, string? description) - { - Name = name; - Url = url; - Description = description; - } - - /// - /// Gets the contact title of the subgraph owner. - /// - public string Name { get; } - - /// - /// Gets the url where the subgraph's owner can be reached. - /// - public string? Url { get; } - - /// - /// Gets other relevant notes about subgraph contact information. Can include markdown links. - /// - public string? Description { get; } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs deleted file mode 100644 index af714699a8f..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.DirectiveType.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using HotChocolate.Language; -using DirectiveLocationType = HotChocolate.Types.DirectiveLocation; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static DirectiveDefinitionNode SerializeDirectiveTypeDefinition( - DirectiveType directiveType, - Context context) - { - var arguments = directiveType.Arguments - .Select(a => SerializeInputField(a, context)) - .ToList(); - - var locations = DirectiveLocations(directiveType.Locations) - .Select(l => new NameNode(DirectiveLocationExtensions.MapDirectiveLocation(l).ToString())) - .ToList(); - - return new DirectiveDefinitionNode - ( - null, - new NameNode(directiveType.Name), - SerializeDescription(directiveType.Description), - directiveType.IsRepeatable, - arguments, - locations - ); - } - - private static IEnumerable DirectiveLocations(DirectiveLocationType locations) - { - foreach (DirectiveLocationType value in Enum.GetValues(locations.GetType())) - { - if (locations.HasFlag(value)) - { - yield return value; - } - } - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs deleted file mode 100644 index 5758dc1ff9f..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.InputType.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Linq; -using HotChocolate.Language; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static InputObjectTypeDefinitionNode SerializeInputObjectType( - InputObjectType inputObjectType, - Context context) - { - var directives = SerializeDirectives(inputObjectType.Directives, context); - - var fields = inputObjectType.Fields - .Select(t => SerializeInputField(t, context)) - .ToList(); - - return new InputObjectTypeDefinitionNode( - null, - new NameNode(inputObjectType.Name), - SerializeDescription(inputObjectType.Description), - directives, - fields); - } - - private static InputValueDefinitionNode SerializeInputField( - IInputField inputValue, - Context context) - { - var directives = SerializeDirectives(inputValue.Directives, context); - - return new InputValueDefinitionNode( - null, - new NameNode(inputValue.Name), - SerializeDescription(inputValue.Description), - SerializeType(inputValue.Type, context), - inputValue.DefaultValue, - directives); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs deleted file mode 100644 index e893bb319aa..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.LeafType.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using HotChocolate.Language; -using static HotChocolate.Types.SpecifiedByDirectiveType.Names; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static EnumTypeDefinitionNode SerializeEnumType( - EnumType enumType, - Context context) - { - var directives = SerializeDirectives(enumType.Directives, context); - - var values = enumType.Values - .Select(t => SerializeEnumValue(t, context)) - .ToList(); - - return new EnumTypeDefinitionNode( - null, - new NameNode(enumType.Name), - SerializeDescription(enumType.Description), - directives, - values); - } - - private static EnumValueDefinitionNode SerializeEnumValue( - IEnumValue enumValue, - Context context) - { - var directives = SerializeDirectives(enumValue.Directives, context); - - if (enumValue.IsDeprecated) - { - var deprecateDirective = DeprecatedDirective.CreateNode(enumValue.DeprecationReason); - - if (directives.Count == 0) - { - directives = new List { deprecateDirective }; - } - else - { - var temp = directives.ToList(); - temp.Add(deprecateDirective); - directives = temp; - } - } - - return new EnumValueDefinitionNode( - null, - new NameNode(enumValue.Name), - SerializeDescription(enumValue.Description), - directives); - } - - private static ScalarTypeDefinitionNode SerializeScalarType( - ScalarType scalarType, - Context context) - { - var directives = SerializeDirectives(scalarType.Directives, context); - - if (scalarType.SpecifiedBy is not null) - { - var copy = directives as List ?? directives.ToList(); - directives = copy; - copy.Add( - new DirectiveNode( - SpecifiedBy, - new ArgumentNode( - Url, - new StringValueNode(scalarType.SpecifiedBy.ToString())))); - } - - return new( - null, - new NameNode(scalarType.Name), - SerializeDescription(scalarType.Description), - directives); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs deleted file mode 100644 index 91d1ded1736..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.OutputTypes.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System.Linq; -using HotChocolate.Language; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static IDefinitionNode? SerializeObjectType( - ObjectType objectType, - Context context) - { - var fields = objectType.Fields - .Where(IncludeField) - .Select(t => SerializeObjectField(t, context)) - .ToList(); - - if (fields.Count == 0) - { - return null; - } - - var directives = SerializeDirectives(objectType.Directives, context); - - var interfaces = objectType.Implements - .Select(t => SerializeNamedType(t, context)) - .ToList(); - - if (objectType.ContextData.ContainsKey(Constants.WellKnownContextData.ExtendMarker)) - { - return new ObjectTypeExtensionNode( - null, - new NameNode(objectType.Name), - directives, - interfaces, - fields); - } - - return new ObjectTypeDefinitionNode( - null, - new NameNode(objectType.Name), - SerializeDescription(objectType.Description), - directives, - interfaces, - fields); - } - - private static InterfaceTypeDefinitionNode SerializeInterfaceType( - InterfaceType interfaceType, - Context context) - { - var directives = SerializeDirectives(interfaceType.Directives, context); - - var fields = interfaceType.Fields - .Select(t => SerializeObjectField(t, context)) - .ToList(); - - return new InterfaceTypeDefinitionNode( - null, - new NameNode(interfaceType.Name), - SerializeDescription(interfaceType.Description), - directives, - Array.Empty(), - fields); - } - - private static UnionTypeDefinitionNode SerializeUnionType( - UnionType unionType, - Context context) - { - var directives = SerializeDirectives(unionType.Directives, context); - - var types = unionType.Types.Values - .Select(t => SerializeNamedType(t, context)) - .ToList(); - - return new UnionTypeDefinitionNode( - null, - new NameNode(unionType.Name), - SerializeDescription(unionType.Description), - directives, - types); - } - - private static FieldDefinitionNode SerializeObjectField( - IOutputField field, - Context context) - { - var arguments = field.Arguments - .Select(t => SerializeInputField(t, context)) - .ToList(); - - var directives = SerializeDirectives(field.Directives, context); - - if (field.IsDeprecated) - { - var deprecateDirective = DeprecatedDirective.CreateNode(field.DeprecationReason); - - if (directives.Count == 0) - { - directives = new[] { deprecateDirective }; - } - else - { - var temp = directives.ToList(); - temp.Add(deprecateDirective); - directives = temp; - } - } - - return new FieldDefinitionNode( - null, - new NameNode(field.Name), - SerializeDescription(field.Description), - arguments, - SerializeType(field.Type, context), - directives); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs deleted file mode 100644 index ef2aa052ee5..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationSchemaPrinter.cs +++ /dev/null @@ -1,172 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.Language; -using HotChocolate.Types.Introspection; -using HotChocolate.Utilities; -using HotChocolate.Utilities.Introspection; - -namespace HotChocolate.ApolloFederation; - -/// -/// The Apollo Federation schema printer. -/// -public static partial class FederationSchemaPrinter -{ - private static readonly HashSet _builtInDirectives = new() - { - WellKnownTypeNames.Extends, - WellKnownTypeNames.External, - WellKnownTypeNames.Requires, - WellKnownTypeNames.Provides, - WellKnownTypeNames.Key, - WellKnownDirectives.Defer, - WellKnownDirectives.Stream, - WellKnownDirectives.Skip, - WellKnownDirectives.Include, - WellKnownDirectives.Deprecated, - SpecifiedByDirectiveType.Names.SpecifiedBy - }; - - /// - /// Creates a representation of the given - /// . - /// - /// - /// The schema object. - /// - /// - /// Returns the representation of the given - /// . - /// - public static string Print(ISchema schema) - { - if (schema is null) - { - throw new ArgumentNullException(nameof(schema)); - } - - return SerializeSchema(schema).ToString(); - } - - private static DocumentNode SerializeSchema(ISchema schema) - { - var context = new Context(); - var definitionNodes = new List(); - - // don't add any directives - // federation directives were already manually added - - foreach (var namedType in GetRelevantTypes(schema)) - { - if (TrySerializeType(namedType, context, out var definitionNode)) - { - definitionNodes.Add(definitionNode); - } - } - - return new DocumentNode(null, definitionNodes); - } - - private static IEnumerable GetRelevantTypes(ISchema schema) - => schema.Types - .Where(IncludeType) - .OrderBy(t => t.Name, StringComparer.Ordinal); - - private static bool TrySerializeType( - INamedType namedType, - Context context, - [NotNullWhen(true)] out IDefinitionNode? definitionNode) - { - definitionNode = namedType switch - { - ObjectType type => SerializeObjectType(type, context), - InterfaceType type => SerializeInterfaceType(type, context), - InputObjectType type => SerializeInputObjectType(type, context), - UnionType type => SerializeUnionType(type, context), - EnumType type => SerializeEnumType(type, context), - ScalarType type => SerializeScalarType(type, context), - _ => throw new NotSupportedException() - }; - return definitionNode is not null; - } - - private static ITypeNode SerializeType( - IType type, - Context context) - { - return type switch - { - NonNullType nt => new NonNullTypeNode( - (INullableTypeNode)SerializeType(nt.Type, context)), - ListType lt => new ListTypeNode(SerializeType(lt.ElementType, context)), - INamedType namedType => SerializeNamedType(namedType, context), - _ => throw new NotSupportedException() - }; - } - - private static NamedTypeNode SerializeNamedType( - INamedType namedType, - Context context) - { - context.TypeNames.Add(namedType.Name); - return new NamedTypeNode(null, new NameNode(namedType.Name)); - } - - private static IReadOnlyList SerializeDirectives( - IReadOnlyCollection directives, - Context context) - { - if (directives.Count == 0) - { - return Array.Empty(); - } - - List? directiveNodes = null; - - foreach (var directive in directives) - { - if (context.DirectiveNames.Contains(directive.Type.Name)) - { - (directiveNodes ??= new()).Add(directive.AsSyntaxNode(true)); - } - } - - if (directiveNodes is not null) - { - return directiveNodes; - } - - return Array.Empty(); - } - - private static StringValueNode? SerializeDescription(string? description) - => description is { Length: > 0 } - ? new StringValueNode(description) - : null; - - private static bool IncludeType(INamedType type) - => !IsBuiltInType(type) && - !IsApolloFederationType(type); - - private static bool IncludeField(IOutputField field) - => !field.IsIntrospectionField && - !IsApolloFederationType(field.Type.NamedType()); - - private static bool IsApolloFederationType(INamedType type) - => type is EntityType or ServiceType || - type.Name.EqualsOrdinal(WellKnownTypeNames.Any) || - type.Name.EqualsOrdinal(WellKnownTypeNames.FieldSet); - - private static bool IsBuiltInType(INamedType type) => - IntrospectionTypes.IsIntrospectionType(type.Name) || - BuiltInTypes.IsBuiltInType(type.Name); - - private sealed class Context - { - // ReSharper disable once CollectionNeverQueried.Local - public HashSet TypeNames { get; } = new(); - public HashSet DirectiveNames { get; } = new(_builtInDirectives); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs deleted file mode 100644 index a77942e230f..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationUtils.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System.Collections.Generic; -using System.Linq; - -namespace HotChocolate.ApolloFederation; - -/// -/// Utility class to help calculate different Apollo Federation @link imports based on the supported version. -/// -internal sealed class FederationUtils -{ - private static string FEDERATION_SPEC_BASE_URL = "https://specs.apollo.dev/federation/v"; - - private static List FEDERATION_IMPORTS_20 = new List - { - "@extends", - "@external", - "@key", - "@inaccessible", - "@override", - "@provides", - "@requires", - "@shareable", - "@tag", - "FieldSet" - }; - - private static List FEDERATION_IMPORTS_21 = ConcatFederationImports(FEDERATION_IMPORTS_20, new List { "@composeDirective" }); - private static List FEDERATION_IMPORTS_22 = FEDERATION_IMPORTS_21; - private static List FEDERATION_IMPORTS_23 = ConcatFederationImports(FEDERATION_IMPORTS_22, new List { "@interfaceObject" }); - - private static List FEDERATION_IMPORTS_24 = FEDERATION_IMPORTS_23; - - // TODO add @authenticated and @requiresPolicy - private static List FEDERATION_IMPORTS_25 = FEDERATION_IMPORTS_23; - - private static List ConcatFederationImports(List baseImports, List additionalImports) - { - var imports = new List(baseImports); - imports.AddRange(additionalImports); - return imports; - } - - /// - /// Retrieve Apollo Federation @link information corresponding to the specified version. - /// - /// - /// Supported Apollo Federation version - /// - /// - /// Federation @link information corresponding to the specified version. - /// - internal static Link GetFederationLink(FederationVersion federationVersion) - { - switch (federationVersion) - { - case FederationVersion.FEDERATION_20: - { - return new Link(FEDERATION_SPEC_BASE_URL + "2.0", FEDERATION_IMPORTS_20); - } - case FederationVersion.FEDERATION_21: - { - return new Link(FEDERATION_SPEC_BASE_URL + "2.1", FEDERATION_IMPORTS_21); - } - case FederationVersion.FEDERATION_22: - { - return new Link(FEDERATION_SPEC_BASE_URL + "2.2", FEDERATION_IMPORTS_22); - } - case FederationVersion.FEDERATION_23: - { - return new Link(FEDERATION_SPEC_BASE_URL + "2.3", FEDERATION_IMPORTS_23); - } - case FederationVersion.FEDERATION_24: - { - return new Link(FEDERATION_SPEC_BASE_URL + "2.4", FEDERATION_IMPORTS_24); - } - case FederationVersion.FEDERATION_25: - { - return new Link(FEDERATION_SPEC_BASE_URL + "2.5", FEDERATION_IMPORTS_25); - } - default: - { - throw ThrowHelper.FederationVersion_Unknown(federationVersion); - } - } - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs deleted file mode 100644 index 5196e398495..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederationVersion.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace HotChocolate.ApolloFederation; - -/// -/// Enum defining all supported Apollo Federation v2 versions. -/// -public enum FederationVersion -{ - FEDERATION_20, - FEDERATION_21, - FEDERATION_22, - FEDERATION_23, - FEDERATION_24, - FEDERATION_25, -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalAttribute.cs deleted file mode 100644 index b05bb154494..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalAttribute.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Reflection; -using HotChocolate.Types.Descriptors; - -namespace HotChocolate.ApolloFederation; - -/// -/// The @external directive is used to mark a field as owned by another service. -/// This allows service A to use fields from service B while also knowing at runtime -/// the types of that field. -/// -/// -/// # extended from the Users service -/// extend type User @key(fields: "email") { -/// email: String @external -/// reviews: [Review] -/// } -/// -/// -public sealed class ExternalAttribute : ObjectFieldDescriptorAttribute -{ - protected override void OnConfigure( - IDescriptorContext context, - IObjectFieldDescriptor descriptor, - MemberInfo member) - => descriptor.External(); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs deleted file mode 100644 index 9a347cc9ba5..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ExternalDirectiveType.cs +++ /dev/null @@ -1,59 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @external on FIELD_DEFINITION -/// -/// -/// The @external directive is used to mark a field as owned by another service. -/// This allows service A to use fields from service B while also knowing at runtime -/// the types of that field. All the external fields should either be referenced from the @key, -/// @requires or @provides directives field sets. -/// -/// Due to the smart merging of entity types, Federation v2 no longer requires @external directive -/// on @key fields and can be safely omitted from the schema. @external directive is only required -/// on fields referenced by the @requires and @provides directive. -/// -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// remoteField: String @external -/// localField: String @requires(fields: "remoteField") -/// } -/// -/// -public sealed class ExternalDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.External) - .Description(FederationResources.ExternalDirective_Description) - .Location(DirectiveLocation.FieldDefinition); -} - -/// -/// -/// directive @extends on OBJECT | INTERFACE -/// -/// -/// The @extends directive is used to represent type extensions in the schema. Federated extended types should have -/// corresponding @key directive defined that specifies primary key required to fetch the underlying object. -/// -/// # extended from the Users service -/// type Foo @extends @key(fields: "id") { -/// id: ID -/// description: String -/// } -/// -/// -public sealed class ExtendsDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Extends) - .Description(FederationResources.ExtendsDirective_Description) - .Location(DirectiveLocation.Object | DirectiveLocation.Interface); -} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs deleted file mode 100644 index 1a26cfe0302..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs +++ /dev/null @@ -1,315 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Descriptors; -using HotChocolate.ApolloFederation.Helpers; -using HotChocolate.Configuration; -using HotChocolate.Language; -using HotChocolate.Resolvers; -using HotChocolate.Types.Descriptors; -using HotChocolate.Types.Descriptors.Definitions; -using static HotChocolate.ApolloFederation.ThrowHelper; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; -using static HotChocolate.Types.TagHelper; - -namespace HotChocolate.ApolloFederation; - -internal sealed class FederationTypeInterceptor : TypeInterceptor -{ - private static readonly object _empty = new(); - - private static readonly MethodInfo _matches = - typeof(ReferenceResolverHelper) - .GetMethod( - nameof(ReferenceResolverHelper.Matches), - BindingFlags.Static | BindingFlags.Public)!; - - private static readonly MethodInfo _execute = - typeof(ReferenceResolverHelper) - .GetMethod( - nameof(ReferenceResolverHelper.ExecuteAsync), - BindingFlags.Static | BindingFlags.Public)!; - - private static readonly MethodInfo _invalid = - typeof(ReferenceResolverHelper) - .GetMethod( - nameof(ReferenceResolverHelper.Invalid), - BindingFlags.Static | BindingFlags.Public)!; - - private readonly List _entityTypes = new(); - private IDescriptorContext _context = default!; - private ITypeInspector _typeInspector = default!; - private ObjectType _queryType = default!; - - internal override void InitializeContext( - IDescriptorContext context, - TypeInitializer typeInitializer, - TypeRegistry typeRegistry, - TypeLookup typeLookup, - TypeReferenceResolver typeReferenceResolver) - { - _context = context; - _typeInspector = context.TypeInspector; - ModifyOptions(context, o => o.Mode = TagMode.ApolloFederation); - } - - public override void OnAfterInitialize( - ITypeDiscoveryContext discoveryContext, - DefinitionBase definition) - { - if (discoveryContext.Type is ObjectType objectType && - definition is ObjectTypeDefinition objectTypeDefinition) - { - ApplyMethodLevelReferenceResolvers( - objectType, - objectTypeDefinition); - - AddToUnionIfHasTypeLevelKeyDirective( - objectType, - objectTypeDefinition); - - AggregatePropertyLevelKeyDirectives( - objectType, - objectTypeDefinition, - discoveryContext); - } - } - - public override void OnTypesInitialized() - { - if (_entityTypes.Count == 0) - { - throw EntityType_NoEntities(); - } - } - - internal override void OnAfterResolveRootType( - ITypeCompletionContext completionContext, - ObjectTypeDefinition definition, - OperationType operationType) - { - if (operationType is OperationType.Query) - { - _queryType = (ObjectType) completionContext.Type; - } - } - - public override void OnBeforeCompleteType( - ITypeCompletionContext completionContext, - DefinitionBase definition) - { - AddMemberTypesToTheEntityUnionType( - completionContext, - definition); - - AddServiceTypeToQueryType( - completionContext, - definition); - } - - public override void OnAfterCompleteType( - ITypeCompletionContext completionContext, - DefinitionBase definition) - { - if (completionContext.Type is ObjectType type && - definition is ObjectTypeDefinition typeDef) - { - CompleteExternalFieldSetters(type, typeDef); - CompleteReferenceResolver(typeDef); - } - } - - private void CompleteExternalFieldSetters(ObjectType type, ObjectTypeDefinition typeDef) - => ExternalSetterExpressionHelper.TryAddExternalSetter(type, typeDef); - - private void CompleteReferenceResolver(ObjectTypeDefinition typeDef) - { - if (typeDef.GetContextData().TryGetValue(EntityResolver, out var value) && - value is IReadOnlyList resolvers) - { - if (resolvers.Count == 1) - { - typeDef.ContextData[EntityResolver] = resolvers[0].Resolver; - } - else - { - var expressions = new Stack<(Expression Condition, Expression Execute)>(); - var context = Expression.Parameter(typeof(IResolverContext)); - - foreach (var resolverDef in resolvers) - { - Expression required = Expression.Constant(resolverDef.Required); - Expression resolver = Expression.Constant(resolverDef.Resolver); - Expression condition = Expression.Call(_matches, context, required); - Expression execute = Expression.Call(_execute, context, resolver); - expressions.Push((condition, execute)); - } - - Expression current = Expression.Call(_invalid, context); - var variable = Expression.Variable(typeof(ValueTask)); - - while (expressions.Count > 0) - { - var expression = expressions.Pop(); - current = Expression.IfThenElse( - expression.Condition, - Expression.Assign(variable, expression.Execute), - current); - } - - current = Expression.Block(new[] { variable }, current, variable); - - typeDef.ContextData[EntityResolver] = - Expression.Lambda(current, context).Compile(); - } - } - } - - private void AddServiceTypeToQueryType( - ITypeCompletionContext completionContext, - DefinitionBase? definition) - { - if (ReferenceEquals(completionContext.Type, _queryType) && - definition is ObjectTypeDefinition objectTypeDefinition) - { - var serviceFieldDescriptor = ObjectFieldDescriptor.New( - _context, - WellKnownFieldNames.Service); - serviceFieldDescriptor - .Type>() - .Resolve(_empty); - objectTypeDefinition.Fields.Add(serviceFieldDescriptor.CreateDefinition()); - - var entitiesFieldDescriptor = ObjectFieldDescriptor.New( - _context, - WellKnownFieldNames.Entities); - entitiesFieldDescriptor - .Type>>() - .Argument( - WellKnownArgumentNames.Representations, - descriptor => descriptor.Type>>>()) - .Resolve( - c => EntitiesResolver.ResolveAsync( - c.Schema, - c.ArgumentValue>( - WellKnownArgumentNames.Representations), - c - )); - objectTypeDefinition.Fields.Add(entitiesFieldDescriptor.CreateDefinition()); - } - } - - private void ApplyMethodLevelReferenceResolvers( - ObjectType objectType, - ObjectTypeDefinition objectTypeDefinition) - { - if (objectType.RuntimeType != typeof(object)) - { - var descriptor = ObjectTypeDescriptor.From(_context, objectTypeDefinition); - - foreach (var possibleReferenceResolver in - objectType.RuntimeType.GetMethods(BindingFlags.Static | BindingFlags.Public)) - { - if (possibleReferenceResolver.IsDefined(typeof(ReferenceResolverAttribute))) - { - _typeInspector.ApplyAttributes( - _context, - descriptor, - possibleReferenceResolver); - } - } - - descriptor.CreateDefinition(); - } - } - - private void AddToUnionIfHasTypeLevelKeyDirective( - ObjectType objectType, - ObjectTypeDefinition objectTypeDefinition) - { - if (objectTypeDefinition.Directives.Any( - d => d.Value is DirectiveNode { Name.Value: WellKnownTypeNames.Key }) || - objectTypeDefinition.Fields.Any(f => f.ContextData.ContainsKey(WellKnownTypeNames.Key))) - { - _entityTypes.Add(objectType); - } - } - - private void AggregatePropertyLevelKeyDirectives( - ObjectType objectType, - ObjectTypeDefinition objectTypeDefinition, - ITypeDiscoveryContext discoveryContext) - { - // if we find key markers on our fields, we need to construct the key directive - // from the annotated fields. - if (objectTypeDefinition.Fields.Any(f => f.ContextData.ContainsKey(KeyMarker))) - { - IReadOnlyList fields = objectTypeDefinition.Fields; - var fieldSet = new StringBuilder(); - - foreach (var fieldDefinition in fields) - { - if (fieldDefinition.ContextData.ContainsKey(KeyMarker)) - { - if (fieldSet.Length > 0) - { - fieldSet.Append(' '); - } - - fieldSet.Append(fieldDefinition.Name); - } - } - - // add the key directive with the dynamically generated field set. - AddKeyDirective(objectTypeDefinition, fieldSet.ToString()); - - // register dependency to the key directive so that it is completed before - // we complete this type. - foreach (var directiveDefinition in objectTypeDefinition.Directives) - { - discoveryContext.Dependencies.Add( - new TypeDependency( - directiveDefinition.Type, - TypeDependencyFulfilled.Completed)); - - discoveryContext.Dependencies.Add(new(directiveDefinition.Type)); - } - - // since this type has now a key directive we also need to add this type to - // the _Entity union type. - _entityTypes.Add(objectType); - } - } - - private void AddMemberTypesToTheEntityUnionType( - ITypeCompletionContext completionContext, - DefinitionBase? definition) - { - if (completionContext.Type is EntityType && - definition is UnionTypeDefinition unionTypeDefinition) - { - foreach (var objectType in _entityTypes) - { - unionTypeDefinition.Types.Add(TypeReference.Create(objectType)); - } - } - } - - private static void AddKeyDirective( - ObjectTypeDefinition objectTypeDefinition, - string fieldSet) - { - var directiveNode = new DirectiveNode( - WellKnownTypeNames.Key, - new ArgumentNode( - WellKnownArgumentNames.Fields, - fieldSet)); - - objectTypeDefinition.Directives.Add( - new DirectiveDefinition(directiveNode)); - } -} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederatedSchema.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs similarity index 87% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederatedSchema.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs index 383bafc4085..6d073d68247 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Directives/FederatedSchema.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs @@ -5,9 +5,9 @@ namespace HotChocolate.ApolloFederation; /// -/// Apollo Federation v2 base schema object that allows users to apply custom schema directives (e.g. @composeDirective) +/// Apollo Federation base schema object that allows users to apply custom schema directives (e.g. @composeDirective) /// -public class FederatedSchema : Schema +public sealed class FederatedSchema : Schema { /// /// Initializes new instance of @@ -15,7 +15,7 @@ public class FederatedSchema : Schema /// /// Supported Apollo Federation version /// - public FederatedSchema(FederationVersion version = FederationVersion.FEDERATION_25) + public FederatedSchema(FederationVersion version = FederationVersion.Latest) { FederationVersion = version; } @@ -35,9 +35,9 @@ protected override void OnAfterInitialize(ITypeDiscoveryContext context, Definit protected override void Configure(ISchemaTypeDescriptor descriptor) { var schemaType = this.GetType(); - if (schemaType.IsDefined(typeof(SchemaTypeDescriptorAttribute), true)) + if (schemaType.IsDefined(typeof(SchemaTypeDescriptorAttribute), inherit: true)) { - foreach (var attribute in schemaType.GetCustomAttributes(true)) + foreach (var attribute in schemaType.GetCustomAttributes(inherit: true)) { if (attribute is SchemaTypeDescriptorAttribute casted) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs new file mode 100644 index 00000000000..45c132d235c --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs @@ -0,0 +1,121 @@ +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; + +namespace HotChocolate.ApolloFederation; + +internal readonly struct FederationVersionValues +{ + public required T[] Values { get; init; } + + public bool IsValidVersion(FederationVersion v) + { + return (int)v > 0 && (int)v < Values.Length; + } + + public ref T this[FederationVersion v] + { + get => ref Values[(int)v]; + } + + public ref T V20 => ref this[FederationVersion.Federation20]; + public ref T V21 => ref this[FederationVersion.Federation21]; + public ref T V22 => ref this[FederationVersion.Federation22]; + public ref T V23 => ref this[FederationVersion.Federation23]; + public ref T V24 => ref this[FederationVersion.Federation24]; + public ref T V25 => ref this[FederationVersion.Federation25]; + + public bool AllSet + { + get + { + foreach (var v in Values) + { + if (v == null) + { + return false; + } + } + return true; + } + } +} + +/// +/// Utility class to help calculate different Apollo Federation @link imports based on the supported version. +/// +internal sealed class FederationUtils +{ + private const string _federationSpecBaseUrl = "https://specs.apollo.dev/federation/v"; + + private static FederationVersionValues> _imports; + private static FederationVersionValues _urls; + + private static FederationVersionValues CreateFederationValues() + { + return new() + { + Values = new T[(int)FederationVersion.Count], + }; + } + + static FederationUtils() + { + _imports = CreateFederationValues>(); + _imports.V20 = new() + { + "@extends", + "@external", + "@key", + "@inaccessible", + "@override", + "@provides", + "@requires", + "@shareable", + "@tag", + "FieldSet", + }; + _imports.V21 = new(_imports.V20); + _imports.V21.Add("@composeDirective"); + + _imports.V22 = _imports.V21; + + _imports.V23 = new(_imports.V22); + _imports.V23.Add("@interfaceObject"); + + _imports.V24 = _imports.V23; + + _imports.V25 = new(_imports.V24); + _imports.V25.Add("@authenticated"); + _imports.V25.Add("@requiresPolicy"); + + Debug.Assert(_imports.AllSet); + + for (FederationVersion i = 0; i < FederationVersion.Count; i++) + { + _urls[i] = _federationSpecBaseUrl + "2." + (int)i; + } + Debug.Assert(_urls.AllSet); + } + + /// + /// Retrieve Apollo Federation @link information corresponding to the specified version. + /// + /// + /// Supported Apollo Federation version + /// + /// + /// Federation @link information corresponding to the specified version. + /// + internal static Link GetFederationLink(FederationVersion federationVersion) + { + if (!_imports.IsValidVersion(federationVersion)) + { + throw ThrowHelper.FederationVersion_Unknown(federationVersion); + } + + return new Link( + _urls[federationVersion], + _imports[federationVersion]); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs new file mode 100644 index 00000000000..496c9278bd7 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs @@ -0,0 +1,16 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// Enum defining all supported Apollo Federation v2 versions. +/// +public enum FederationVersion +{ + Federation20 = 0, + Federation21 = 1, + Federation22 = 2, + Federation23 = 3, + Federation24 = 4, + Federation25 = 5, + Latest = Federation25, + Count, +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FieldSetType.cs deleted file mode 100644 index b437c896633..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FieldSetType.cs +++ /dev/null @@ -1,139 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; -using HotChocolate.Language; -using static HotChocolate.ApolloFederation.ThrowHelper; - -namespace HotChocolate.ApolloFederation; - -/// -/// A scalar called _FieldSet is a custom scalar type that is used to -/// represent a set of fields. -/// -/// Grammatically, a field set is a selection set minus the braces. -/// -/// This means it can represent a single field "upc", multiple fields "id countryCode", -/// and even nested selection sets "id organization { id }". -/// -public sealed class FieldSetType : ScalarType -{ - /// - /// Initializes a new instance of . - /// - public FieldSetType() : this(WellKnownTypeNames.FieldSet) - { - } - - /// - /// Initializes a new instance of . - /// - /// - /// The name the scalar shall have. - /// - /// - /// Defines if this scalar shall bind implicitly to . - /// - public FieldSetType(string name, BindingBehavior bind = BindingBehavior.Explicit) - : base(name, bind) - { - Description = FederationResources.FieldsetType_Description; - } - - /// - protected override SelectionSetNode ParseLiteral(StringValueNode valueSyntax) - { - try - { - return ParseSelectionSet(valueSyntax.Value); - } - catch (SyntaxException) - { - throw FieldSet_InvalidFormat(this); - } - } - - /// - protected override StringValueNode ParseValue(SelectionSetNode runtimeValue) - => new StringValueNode(SerializeSelectionSet(runtimeValue)); - - /// - public override IValueNode ParseResult(object? resultValue) - { - if (resultValue is null) - { - return NullValueNode.Default; - } - - if (resultValue is string s) - { - return new StringValueNode(s); - } - - if (resultValue is SelectionSetNode selectionSet) - { - return new StringValueNode(SerializeSelectionSet(selectionSet)); - } - - throw Scalar_CannotParseValue(this, resultValue.GetType()); - } - - /// - public override bool TrySerialize(object? runtimeValue, out object? resultValue) - { - if (runtimeValue is null) - { - resultValue = null; - return true; - } - - if (runtimeValue is SelectionSetNode selectionSet) - { - resultValue = SerializeSelectionSet(selectionSet); - return true; - } - - resultValue = null; - return false; - } - - /// - public override bool TryDeserialize(object? resultValue, out object? runtimeValue) - { - if (resultValue is null) - { - runtimeValue = null; - return true; - } - - if (resultValue is SelectionSetNode selectionSet) - { - runtimeValue = selectionSet; - return true; - } - - if (resultValue is string serializedSelectionSet) - { - try - { - runtimeValue = ParseSelectionSet(serializedSelectionSet); - return true; - } - catch (SyntaxException) - { - runtimeValue = null; - return false; - } - } - - runtimeValue = null; - return false; - } - - private static SelectionSetNode ParseSelectionSet(string s) - => Utf8GraphQLParser.Syntax.ParseSelectionSet($"{{{s}}}"); - - private static string SerializeSelectionSet(SelectionSetNode selectionSet) - { - var s = selectionSet.ToString(false); - return s.Substring(1, s.Length - 2).Trim(); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs new file mode 100644 index 00000000000..e1eb918dd60 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -0,0 +1,606 @@ +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Threading.Tasks; +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Descriptors; +using HotChocolate.ApolloFederation.Helpers; +using HotChocolate.Configuration; +using HotChocolate.Language; +using HotChocolate.Resolvers; +using HotChocolate.Types.Descriptors; +using HotChocolate.Types.Descriptors.Definitions; +using static HotChocolate.ApolloFederation.ThrowHelper; +using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; + +namespace HotChocolate.ApolloFederation; + +internal sealed class FederationTypeInterceptor : TypeInterceptor +{ + private static readonly object _empty = new(); + + private static readonly MethodInfo _matches = + typeof(ReferenceResolverHelper) + .GetMethod( + nameof(ReferenceResolverHelper.Matches), + BindingFlags.Static | BindingFlags.Public)!; + + private static readonly MethodInfo _execute = + typeof(ReferenceResolverHelper) + .GetMethod( + nameof(ReferenceResolverHelper.ExecuteAsync), + BindingFlags.Static | BindingFlags.Public)!; + + private static readonly MethodInfo _invalid = + typeof(ReferenceResolverHelper) + .GetMethod( + nameof(ReferenceResolverHelper.Invalid), + BindingFlags.Static | BindingFlags.Public)!; + + private readonly List _entityTypes = new(); + private IDescriptorContext _context = default!; + + [Obsolete("This hook is deprecated and will be removed in the next release.")] + internal override void OnBeforeCreateSchema(IDescriptorContext context, ISchemaBuilder schemaBuilder) + { + base.OnBeforeCreateSchema(context, schemaBuilder); + _context = context; + } + + public override void OnAfterInitialize( + ITypeDiscoveryContext discoveryContext, + DefinitionBase definition) + { + if (discoveryContext.Type is ObjectType objectType && + definition is ObjectTypeDefinition objectTypeDefinition) + { + ApplyMethodLevelReferenceResolvers( + objectType, + objectTypeDefinition); + + AddToUnionIfHasTypeLevelKeyDirective( + objectType, + objectTypeDefinition); + } + } + + public override void OnTypesInitialized() + { + if (_entityTypes.Count == 0) + { + throw EntityType_NoEntities(); + } + } + + public override void OnBeforeCompleteType( + ITypeCompletionContext completionContext, + DefinitionBase definition) + { + AddMemberTypesToTheEntityUnionType( + completionContext, + definition); + + AddServiceTypeToQueryType( + completionContext, + definition); + + ApplyFederationDirectives(definition); + } + + public override void OnAfterCompleteType( + ITypeCompletionContext completionContext, + DefinitionBase definition) + { + if (completionContext.Type is ObjectType type && + definition is ObjectTypeDefinition typeDef) + { + CompleteExternalFieldSetters(type, typeDef); + CompleteReferenceResolver(typeDef); + } + } + + private void CompleteExternalFieldSetters(ObjectType type, ObjectTypeDefinition typeDef) + => ExternalSetterExpressionHelper.TryAddExternalSetter(type, typeDef); + + private void CompleteReferenceResolver(ObjectTypeDefinition typeDef) + { + if (!typeDef.GetContextData().TryGetValue(EntityResolver, out var value) || + value is not IReadOnlyList resolvers) + { + return; + } + + if (resolvers.Count == 1) + { + typeDef.ContextData[EntityResolver] = resolvers[0].Resolver; + } + else + { + var expressions = new Stack<(Expression Condition, Expression Execute)>(); + var context = Expression.Parameter(typeof(IResolverContext)); + + foreach (var resolverDef in resolvers) + { + Expression required = Expression.Constant(resolverDef.Required); + Expression resolver = Expression.Constant(resolverDef.Resolver); + Expression condition = Expression.Call(_matches, context, required); + Expression execute = Expression.Call(_execute, context, resolver); + expressions.Push((condition, execute)); + } + + Expression current = Expression.Call(_invalid, context); + var variable = Expression.Variable(typeof(ValueTask)); + + while (expressions.Count > 0) + { + var expression = expressions.Pop(); + current = Expression.IfThenElse( + expression.Condition, + Expression.Assign(variable, expression.Execute), + current); + } + + current = Expression.Block(new[] { variable }, current, variable); + + typeDef.ContextData[EntityResolver] = + Expression.Lambda(current, context).Compile(); + } + } + + private void AddServiceTypeToQueryType( + ITypeCompletionContext completionContext, + DefinitionBase? definition) + { + if (definition is not ObjectTypeDefinition objectTypeDefinition || + _context.Options.QueryTypeName != definition.Name) + { + return; + } + + var serviceFieldDescriptor = ObjectFieldDescriptor.New( + _context, + WellKnownFieldNames.Service); + serviceFieldDescriptor + .Type>() + .Resolve(_empty); + objectTypeDefinition.Fields.Add(serviceFieldDescriptor.CreateDefinition()); + + var entitiesFieldDescriptor = ObjectFieldDescriptor.New( + _context, + WellKnownFieldNames.Entities); + entitiesFieldDescriptor + .Type>>() + .Argument( + WellKnownArgumentNames.Representations, + descriptor => descriptor.Type>>>()) + .Resolve( + c => EntitiesResolver.ResolveAsync( + c.Schema, + c.ArgumentValue>( + WellKnownArgumentNames.Representations), + c + )); + objectTypeDefinition.Fields.Add(entitiesFieldDescriptor.CreateDefinition()); + } + + private void ApplyMethodLevelReferenceResolvers( + ObjectType objectType, + ObjectTypeDefinition objectTypeDefinition) + { + if (objectType.RuntimeType == typeof(object)) + { + return; + } + + var descriptor = ObjectTypeDescriptor.From(_context, objectTypeDefinition); + + foreach (var possibleReferenceResolver in + objectType.RuntimeType.GetMethods(BindingFlags.Static | BindingFlags.Public)) + { + if (!possibleReferenceResolver.IsDefined(typeof(ReferenceResolverAttribute))) + { + continue; + } + + foreach (var attribute in possibleReferenceResolver.GetCustomAttributes(true)) + { + if (attribute is ReferenceResolverAttribute casted) + { + casted.Configure(_context, descriptor, possibleReferenceResolver); + } + } + } + + descriptor.CreateDefinition(); + } + + private void AddToUnionIfHasTypeLevelKeyDirective( + ObjectType objectType, + ObjectTypeDefinition objectTypeDefinition) + { + if (objectTypeDefinition.Directives.Any( + d => d.Value is DirectiveNode { Name.Value: WellKnownTypeNames.Key }) || + objectTypeDefinition.Fields.Any(f => f.ContextData.ContainsKey(WellKnownTypeNames.Key))) + { + _entityTypes.Add(objectType); + } + } + + private void AddMemberTypesToTheEntityUnionType( + ITypeCompletionContext completionContext, + DefinitionBase? definition) + { + if (completionContext.Type is not EntityType) + { + return; + } + if (definition is UnionTypeDefinition unionTypeDefinition) + { + foreach (var objectType in _entityTypes) + { + unionTypeDefinition.Types.Add(TypeReference.Create(objectType)); + } + } + } + + /// + /// Apply Apollo Federation directives based on the custom attributes. + /// + /// + /// Type definition + /// + private void ApplyFederationDirectives(DefinitionBase? definition) + { + switch (definition) + { + case EnumTypeDefinition enumTypeDefinition: + { + ApplyEnumDirectives(enumTypeDefinition); + ApplyEnumValueDirectives(enumTypeDefinition.Values); + break; + } + case InterfaceTypeDefinition interfaceTypeDefinition: + { + ApplyInterfaceDirectives(interfaceTypeDefinition); + ApplyInterfaceFieldDirectives(interfaceTypeDefinition.Fields); + break; + } + case InputObjectTypeDefinition inputObjectTypeDefinition: + { + ApplyInputObjectDirectives(inputObjectTypeDefinition); + ApplyInputFieldDirectives(inputObjectTypeDefinition.Fields); + break; + } + case ObjectTypeDefinition objectTypeDefinition: + { + ApplyObjectDirectives(objectTypeDefinition); + ApplyObjectFieldDirectives(objectTypeDefinition.Fields); + break; + } + case UnionTypeDefinition unionTypeDefinition: + { + ApplyUnionDirectives(unionTypeDefinition); + break; + } + default: + break; + } + } + + private void ApplyEnumDirectives(EnumTypeDefinition enumTypeDefinition) + { + var requiresScopes = new List>(); + var descriptor = EnumTypeDescriptor.From(_context, enumTypeDefinition); + foreach (var attribute in enumTypeDefinition.RuntimeType.GetCustomAttributes(true)) + { + switch (attribute) + { + case ApolloTagAttribute tag: + { + descriptor.ApolloTag(tag.Name); + break; + } + case ApolloAuthenticatedAttribute: + { + descriptor.ApolloAuthenticated(); + break; + } + case InaccessibleAttribute: + { + descriptor.Inaccessible(); + break; + } + case RequiresScopesAttribute scopes: + { + requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); + break; + } + default: break; + } + } + + if (requiresScopes.Count > 0) + { + descriptor.RequiresScopes(requiresScopes); + } + } + + private void ApplyEnumValueDirectives(IList enumValues) + { + foreach (var enumValueDefinition in enumValues) + { + if (enumValueDefinition.Member == null) + { + continue; + } + + var enumValueDescriptor = EnumValueDescriptor.From(_context, enumValueDefinition); + foreach (var attribute in enumValueDefinition.Member.GetCustomAttributes(true)) + { + switch (attribute) + { + case InaccessibleAttribute: + { + enumValueDescriptor.Inaccessible(); + break; + } + case ApolloTagAttribute casted: + { + enumValueDescriptor.ApolloTag(casted.Name); + break; + } + } + } + } + } + + private void ApplyInterfaceDirectives(InterfaceTypeDefinition interfaceTypeDefinition) + { + var descriptor = InterfaceTypeDescriptor.From(_context, interfaceTypeDefinition); + var requiresScopes = new List>(); + foreach (var attribute in interfaceTypeDefinition.RuntimeType.GetCustomAttributes(true)) + { + switch (attribute) + { + case ApolloTagAttribute tag: + { + descriptor.ApolloTag(tag.Name); + break; + } + case ApolloAuthenticatedAttribute: + { + descriptor.ApolloAuthenticated(); + break; + } + case InaccessibleAttribute: + { + descriptor.Inaccessible(); + break; + } + case RequiresScopesAttribute scopes: + { + requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); + break; + } + default: break; + } + } + + if (requiresScopes.Count > 0) + { + descriptor.RequiresScopes(requiresScopes); + } + } + + private void ApplyInterfaceFieldDirectives(IList fields) + { + foreach (var fieldDefinition in fields) + { + var descriptor = InterfaceFieldDescriptor.From(_context, fieldDefinition); + if (fieldDefinition.Member == null) + { + continue; + } + + var requiresScopes = new List>(); + foreach (var attribute in fieldDefinition.Member.GetCustomAttributes(true)) + { + switch (attribute) + { + case ApolloTagAttribute tag: + { + descriptor.ApolloTag(tag.Name); + break; + } + case ApolloAuthenticatedAttribute: + { + descriptor.ApolloAuthenticated(); + break; + } + case InaccessibleAttribute: + { + descriptor.Inaccessible(); + break; + } + case RequiresScopesAttribute scopes: + { + requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); + break; + } + default: break; + } + } + + if (requiresScopes.Count > 0) + { + descriptor.RequiresScopes(requiresScopes); + } + } + } + + private void ApplyInputObjectDirectives(InputObjectTypeDefinition inputObjectTypeDefinition) + { + var descriptor = InputObjectTypeDescriptor.From(_context, inputObjectTypeDefinition); + foreach (var attribute in inputObjectTypeDefinition.RuntimeType.GetCustomAttributes(true)) + { + switch (attribute) + { + case InaccessibleAttribute: + { + descriptor.Inaccessible(); + break; + } + case ApolloTagAttribute casted: + { + descriptor.ApolloTag(casted.Name); + break; + } + } + } + } + + private void ApplyInputFieldDirectives(IList inputFields) + { + foreach (var fieldDefinition in inputFields) + { + if (fieldDefinition.RuntimeType == null) + { + continue; + } + + var fieldDescriptor = InputFieldDescriptor.From(_context, fieldDefinition); + foreach (var attribute in fieldDefinition.RuntimeType.GetCustomAttributes(true)) + { + switch (attribute) + { + case InaccessibleAttribute: + { + fieldDescriptor.Inaccessible(); + break; + } + case ApolloTagAttribute casted: + { + fieldDescriptor.ApolloTag(casted.Name); + break; + } + } + } + } + } + + private void ApplyObjectDirectives(ObjectTypeDefinition objectTypeDefinition) + { + var descriptor = ObjectTypeDescriptor.From(_context, objectTypeDefinition); + var requiresScopes = new List>(); + foreach (var attribute in objectTypeDefinition.RuntimeType.GetCustomAttributes(true)) + { + switch (attribute) + { + case ApolloTagAttribute tag: + { + descriptor.ApolloTag(tag.Name); + break; + } + case ApolloAuthenticatedAttribute: + { + descriptor.ApolloAuthenticated(); + break; + } + case InaccessibleAttribute: + { + descriptor.Inaccessible(); + break; + } + case RequiresScopesAttribute scopes: + { + requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); + break; + } + case ShareableAttribute: + { + descriptor.Shareable(); + break; + } + default: break; + } + } + + if (requiresScopes.Count > 0) + { + descriptor.RequiresScopes(requiresScopes); + } + } + + private void ApplyObjectFieldDirectives(IEnumerable fields) + { + foreach (var fieldDefinition in fields) + { + if (fieldDefinition.Member == null) + { + continue; + } + + var requiresScopes = new List>(); + var descriptor = ObjectFieldDescriptor.From(_context, fieldDefinition); + foreach (var attribute in fieldDefinition.Member.GetCustomAttributes(true)) + { + switch (attribute) + { + case ApolloTagAttribute tag: + { + descriptor.ApolloTag(tag.Name); + break; + } + case ApolloAuthenticatedAttribute: + { + descriptor.ApolloAuthenticated(); + break; + } + case InaccessibleAttribute: + { + descriptor.Inaccessible(); + break; + } + case RequiresScopesAttribute scopes: + { + requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); + break; + } + case ShareableAttribute: + { + descriptor.Shareable(); + break; + } + default: break; + } + } + + if (requiresScopes.Count > 0) + { + descriptor.RequiresScopes(requiresScopes); + } + } + } + + private void ApplyUnionDirectives(UnionTypeDefinition unionTypeDefinition) + { + var descriptor = UnionTypeDescriptor.From(_context, unionTypeDefinition); + foreach (var attribute in unionTypeDefinition.RuntimeType.GetCustomAttributes(true)) + { + switch (attribute) + { + case InaccessibleAttribute: + { + descriptor.Inaccessible(); + break; + } + case ApolloTagAttribute casted: + { + descriptor.ApolloTag(casted.Name); + break; + } + } + } + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs deleted file mode 100644 index 17c537b8cfd..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/KeyDirectiveType.cs +++ /dev/null @@ -1,31 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE -/// -/// -/// The @key directive is used to indicate a combination of fields that can be used to uniquely -/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), -/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can -/// be specified on a target type. -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// field: String -/// } -/// -/// -public sealed class KeyDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Key) - .Description(FederationResources.KeyDirective_Description) - .Location(DirectiveLocation.Object | DirectiveLocation.Interface) - .Repeatable() - .FieldsArgument(); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs deleted file mode 100644 index 4dad1e7a221..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ProvidesDirectiveType.cs +++ /dev/null @@ -1,41 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @provides(fields: _FieldSet!) on FIELD_DEFINITION -/// -/// -/// The @provides directive is a router optimization hint specifying field set that -/// can be resolved locally at the given subgraph through this particular query path. This -/// allows you to expose only a subset of fields from the underlying entity type to be selectable -/// from the federated schema without the need to call other subgraphs. Provided fields specified -/// in the directive field set should correspond to a valid field on the underlying GraphQL -/// interface/object type. @provides directive can only be used on fields returning entities. -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// # implies name field can be resolved locally -/// bar: Bar @provides(fields: "name") -/// # name fields are external -/// # so will be fetched from other subgraphs -/// bars: [Bar] -/// } -/// -/// type Bar @key(fields: "id") { -/// id: ID! -/// name: String @external -/// } -/// -/// -public sealed class ProvidesDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Provides) - .Description(FederationResources.ProvidesDirective_Description) - .Location(DirectiveLocation.FieldDefinition) - .FieldsArgument(); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ReferenceResolverAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ReferenceResolverAttribute.cs deleted file mode 100644 index f7444142df3..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ReferenceResolverAttribute.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Reflection; -using HotChocolate.ApolloFederation.Descriptors; -using HotChocolate.Types.Descriptors; -using static HotChocolate.ApolloFederation.ThrowHelper; - -namespace HotChocolate.ApolloFederation; - -/// -/// The reference resolver enables your gateway's query planner to resolve a particular -/// entity by whatever unique identifier your other subgraphs use to reference it. -/// -[AttributeUsage( - AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method, - AllowMultiple = true)] -public class ReferenceResolverAttribute : DescriptorAttribute -{ - public string? EntityResolver { get; set; } - - public Type? EntityResolverType { get; set; } - - protected internal override void TryConfigure( - IDescriptorContext context, - IDescriptor descriptor, - ICustomAttributeProvider element) - { - if (descriptor is IObjectTypeDescriptor objectTypeDescriptor) - { - switch (element) - { - case Type type: - OnConfigure(objectTypeDescriptor, type); - break; - - case MethodInfo method: - OnConfigure(objectTypeDescriptor, method); - break; - } - } - } - - private void OnConfigure(IObjectTypeDescriptor descriptor, Type type) - { - var entityResolverDescriptor = new EntityResolverDescriptor(descriptor); - - if (EntityResolverType is not null) - { - if (EntityResolver is not null) - { - var method = EntityResolverType.GetMethod(EntityResolver); - - if (method is null) - { - throw ReferenceResolverAttribute_EntityResolverNotFound( - EntityResolverType, - EntityResolver); - } - - entityResolverDescriptor.ResolveReferenceWith(method); - } - else - { - entityResolverDescriptor.ResolveReferenceWith(EntityResolverType); - } - } - else if (EntityResolver is not null) - { - var method = type.GetMethod(EntityResolver); - - if (method is null) - { - throw ReferenceResolverAttribute_EntityResolverNotFound( - type, - EntityResolver); - } - - entityResolverDescriptor.ResolveReferenceWith(method); - } - else - { - entityResolverDescriptor.ResolveReferenceWith(type); - } - } - - private void OnConfigure(IObjectTypeDescriptor descriptor, MethodInfo method) - { - var entityResolverDescriptor = new EntityResolverDescriptor(descriptor); - entityResolverDescriptor.ResolveReferenceWith(method); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs deleted file mode 100644 index 2484166cd0a..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/RequiresDirectiveType.cs +++ /dev/null @@ -1,34 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @requires(fields: _FieldSet!) on FIELD_DEFINITON -/// -/// -/// The @requires directive is used to specify external (provided by other subgraphs) -/// entity fields that are needed to resolve target field. It is used to develop a query plan where -/// the required fields may not be needed by the client, but the service may need additional -/// information from other subgraphs. Required fields specified in the directive field set should -/// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented -/// with @external directive. -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// # this field will be resolved from other subgraph -/// remote: String @external -/// local: String @requires(fields: "remote") -/// } -/// -/// -public sealed class RequiresDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Requires) - .Description(FederationResources.RequiresDirective_Description) - .Location(DirectiveLocation.FieldDefinition) - .FieldsArgument(); -} From 1eba6756c4f310a6be6b48551371a7f7db27cb1e Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 6 Dec 2023 14:36:30 +0200 Subject: [PATCH 11/89] Attributes --- .../ApolloAuthenticatedAttribute.cs | 33 +++++++ .../Attributes/ApolloTagAttribute.cs | 54 ++++++++++++ .../Attributes/ComposeDirectiveAttribute.cs | 57 +++++++++++++ .../Attributes/ContactAttribute.cs | 78 +++++++++++++++++ .../Attributes/ExtendsAttribute.cs | 27 ++++++ .../Attributes/InaccessibleAttribute.cs | 46 ++++++++++ .../Attributes/InterfaceObjectAttribute.cs | 27 ++++++ .../Configuration/Attributes/KeyAttribute.cs | 31 +++++-- .../Attributes/KeyInterfaceAttribute.cs | 85 +++++++++++++++++++ .../Configuration/Attributes/LinkAttribute.cs | 83 ++++++++++++++++++ .../Attributes/NonResolvableKeyAttribute.cs | 61 +++++++++++++ .../Attributes/OverrideAttribute.cs | 49 +++++++++++ .../Attributes/RequiresScopesAttribute.cs | 48 +++++++++++ .../SchemaTypeDescriptorAttribute.cs | 13 +++ .../Attributes/ShareableAttribute.cs | 34 ++++++++ .../Configuration/ObjectTypes/ServiceType.cs | 1 - .../FederationSchemaPrinter.LeafType.cs | 1 - 17 files changed, 719 insertions(+), 9 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ComposeDirectiveAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ContactAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InterfaceObjectAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/OverrideAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs new file mode 100644 index 00000000000..b837b5f8454 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs @@ -0,0 +1,33 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @authenticated on +/// ENUM +/// | FIELD_DEFINITION +/// | INTERFACE +/// | OBJECT +/// | SCALAR +/// +/// +/// The @authenticated directive is used to indicate that the target element is accessible only to the authenticated supergraph users. +/// For more granular access control, see the RequiresScopeDirectiveType directive usage. +/// Refer to the Apollo Router article +/// for additional details. +/// +/// type Foo @key(fields: "id") { +/// id: ID +/// description: String @authenticated +/// } +/// +/// +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Enum | + AttributeTargets.Interface | + AttributeTargets.Method | + AttributeTargets.Property | + AttributeTargets.Struct)] +public sealed class ApolloAuthenticatedAttribute : Attribute +{ +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs new file mode 100644 index 00000000000..c5ec13fb36a --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs @@ -0,0 +1,54 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @tag(name: String!) repeatable on FIELD_DEFINITION +/// | OBJECT +/// | INTERFACE +/// | UNION +/// | ENUM +/// | ENUM_VALUE +/// | SCALAR +/// | INPUT_OBJECT +/// | INPUT_FIELD_DEFINITION +/// | ARGUMENT_DEFINITION +/// +/// +/// The @tag directive allows users to annotate fields and types with additional metadata information. +/// Tagging is commonly used for creating variants of the supergraph using contracts. +/// +/// +/// type Foo @tag(name: "internal") { +/// id: ID! +/// name: String +/// } +/// +/// +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Enum | + AttributeTargets.Field | + AttributeTargets.Interface | + AttributeTargets.Method | + AttributeTargets.Parameter | + AttributeTargets.Property | + AttributeTargets.Struct, + AllowMultiple = true)] +public sealed class ApolloTagAttribute : Attribute +{ + /// + /// Initializes new instance of + /// + /// + /// Tag metadata value + /// + public ApolloTagAttribute(string name) + { + Name = name; + } + + /// + /// Retrieves tag metadata value + /// + public string Name { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ComposeDirectiveAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ComposeDirectiveAttribute.cs new file mode 100644 index 00000000000..98334462f69 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ComposeDirectiveAttribute.cs @@ -0,0 +1,57 @@ +using HotChocolate.Types.Descriptors; +using static HotChocolate.ApolloFederation.ThrowHelper; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @composeDirective(name: String!) repeatable on SCHEMA +/// +/// +/// By default, Supergraph schema excludes all custom directives. The @composeDirective is used to specify +/// custom directives that should be exposed in the Supergraph schema. +/// +/// +/// extend schema @composeDirective(name: "@custom") +/// @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) +/// @link(url: "https://myspecs.dev/custom/v1.0", import: ["@custom"]) +/// +/// directive @custom on FIELD_DEFINITION +/// +/// type Query { +/// helloWorld: String! @custom +/// } +/// +/// +[AttributeUsage( + AttributeTargets.Class + | AttributeTargets.Struct, + Inherited = true, + AllowMultiple = true)] +public sealed class ComposeDirectiveAttribute : SchemaTypeDescriptorAttribute +{ + /// + /// Initializes new instance of + /// + /// + /// Name of the directive that should be preserved in the supergraph composition. + /// + public ComposeDirectiveAttribute(string name) + { + Name = name; + } + + /// + /// Gets the composed directive name. + /// + public string Name { get; } + + public override void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type) + { + if (string.IsNullOrEmpty(Name)) + { + throw ComposeDirective_Name_CannotBeEmpty(type); + } + descriptor.ComposeDirective(Name); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ContactAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ContactAttribute.cs new file mode 100644 index 00000000000..209c444082f --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ContactAttribute.cs @@ -0,0 +1,78 @@ +using HotChocolate.Types.Descriptors; +using static HotChocolate.ApolloFederation.ThrowHelper; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @contact( +/// "Contact title of the subgraph owner" +/// name: String! +/// "URL where the subgraph's owner can be reached" +/// url: String +/// "Other relevant notes can be included here; supports markdown links" +/// description: String +/// ) on SCHEMA +/// +/// +/// Contact schema directive can be used to provide team contact information to your subgraph schema. This information is automatically parsed and displayed by Apollo Studio. +/// See Subgraph Contact Information for additional details. +/// +/// +/// +/// +/// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ +/// query: Query +/// } +/// +/// +/// +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct, + Inherited = true)] +public sealed class ContactAttribute : SchemaTypeDescriptorAttribute +{ + /// + /// Initializes new instance of + /// + /// + /// Contact title of the subgraph owner + /// + /// + /// URL where the subgraph's owner can be reached + /// + /// + /// Other relevant contact notes; supports markdown links + /// + public ContactAttribute(string name, string? url = null, string? description = null) + { + Name = name; + Url = url; + Description = description; + } + + /// + /// Gets the contact title of the subgraph owner. + /// + public string Name { get; } + + /// + /// Gets the url where the subgraph's owner can be reached. + /// + public string? Url { get; } + + /// + /// Gets other relevant notes about subgraph contact information. Can include markdown links. + /// + public string? Description { get; } + + public override void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type) + { + if (string.IsNullOrEmpty(Url)) + { + throw Contact_Name_CannotBeEmpty(type); + } + descriptor.Contact(Name, Url, Description); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs new file mode 100644 index 00000000000..f1ca583c3ca --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs @@ -0,0 +1,27 @@ +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @extends on OBJECT | INTERFACE +/// +/// +/// The @extends directive is used to represent type extensions in the schema. Federated extended types should have +/// corresponding @key directive defined that specifies primary key required to fetch the underlying object. +/// +/// # extended from the Users service +/// type Foo @extends @key(fields: "id") { +/// id: ID +/// description: String +/// } +/// +/// +public sealed class ExtendsAttribute : ObjectTypeDescriptorAttribute +{ + protected override void OnConfigure( + IDescriptorContext context, + IObjectTypeDescriptor descriptor, + Type type) + => descriptor.ExtendsType(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs new file mode 100644 index 00000000000..13b5125b986 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs @@ -0,0 +1,46 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @inaccessible on FIELD_DEFINITION +/// | OBJECT +/// | INTERFACE +/// | UNION +/// | ENUM +/// | ENUM_VALUE +/// | SCALAR +/// | INPUT_OBJECT +/// | INPUT_FIELD_DEFINITION +/// | ARGUMENT_DEFINITION +/// +/// +/// The @inaccessible directive is used to mark location within schema as inaccessible +/// from the GraphQL Router. Applying @inaccessible directive on a type is equivalent of applying +/// it on all type fields. +/// +/// While @inaccessible fields are not exposed by the router to the clients, they are still available +/// for query plans and can be referenced from @key and @requires directives. This allows you to not +/// expose sensitive fields to your clients but still make them available for computations. +/// Inaccessible can also be used to incrementally add schema elements (e.g. fields) to multiple +/// subgraphs without breaking composition. +/// +/// +/// type Foo @inaccessible { +/// hiddenId: ID! +/// hiddenField: String +/// } +/// +/// +[AttributeUsage( + AttributeTargets.Class + | AttributeTargets.Enum + | AttributeTargets.Field + | AttributeTargets.Interface + | AttributeTargets.Method + | AttributeTargets.Parameter + | AttributeTargets.Property + | AttributeTargets.Struct +)] +public sealed class InaccessibleAttribute : Attribute +{ +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InterfaceObjectAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InterfaceObjectAttribute.cs new file mode 100644 index 00000000000..67bb3f7cc1f --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InterfaceObjectAttribute.cs @@ -0,0 +1,27 @@ +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @interfaceObject on OBJECT +/// +/// +/// The @interfaceObject directive provides meta information to the router that this entity +/// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality +/// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. +/// +/// +/// type Foo @interfaceObject @key(fields: "ids") { +/// id: ID! +/// newCommonField: String +/// } +/// +/// +public sealed class InterfaceObjectAttribute : ObjectTypeDescriptorAttribute +{ + protected override void OnConfigure(IDescriptorContext context, IObjectTypeDescriptor descriptor, Type type) + { + descriptor.InterfaceObject(); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs index c26b37eda61..c4625ba4572 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs @@ -1,3 +1,4 @@ +using System.Reflection; using HotChocolate.Types.Descriptors; using static HotChocolate.ApolloFederation.ThrowHelper; @@ -33,7 +34,7 @@ namespace HotChocolate.ApolloFederation; /// /// /// -public sealed class KeyAttribute : ObjectTypeDescriptorAttribute +public sealed class KeyAttribute : DescriptorAttribute { /// /// Initializes a new instance of . @@ -42,7 +43,7 @@ public sealed class KeyAttribute : ObjectTypeDescriptorAttribute /// The field set that describes the key. /// Grammatically, a field set is a selection set minus the braces. /// - public KeyAttribute(string fieldSet) + public KeyAttribute(string? fieldSet = default) { FieldSet = fieldSet; } @@ -51,14 +52,30 @@ public KeyAttribute(string fieldSet) /// Gets the field set that describes the key. /// Grammatically, a field set is a selection set minus the braces. /// - public string FieldSet { get; } + public string? FieldSet { get; } - protected override void OnConfigure(IDescriptorContext context, IObjectTypeDescriptor descriptor, Type type) + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) { - if (string.IsNullOrEmpty(FieldSet)) + if (descriptor is IObjectTypeDescriptor objectTypeDescriptor && + element is Type objectType) { - throw Key_FieldSet_CannotBeEmpty(type); + if (string.IsNullOrEmpty(FieldSet)) + { + throw Key_FieldSet_CannotBeEmpty(objectType); + } + + objectTypeDescriptor.Key(FieldSet); + } + + if (descriptor is IObjectFieldDescriptor objectFieldDescriptor && + element is MemberInfo) + { + objectFieldDescriptor + .Extend() + .OnBeforeCreate(d => d.ContextData[Constants.WellKnownContextData.KeyMarker] = true); } - descriptor.Key(FieldSet); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs new file mode 100644 index 00000000000..84898146a0e --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs @@ -0,0 +1,85 @@ +using HotChocolate.Types.Descriptors; +using static HotChocolate.ApolloFederation.ThrowHelper; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// # federation v1 definition +/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +/// +/// # federation v2 definition +/// directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE +/// +/// +/// The @key directive is used to indicate a combination of fields that can be used to uniquely +/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), +/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can +/// be specified on a target type. +/// +/// Keys can also be marked as non-resolvable which indicates to router that given entity should never be +/// resolved within given subgraph. This allows your subgraph to still reference target entity without +/// contributing any fields to it. +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// field: String +/// bars: [Bar!]! +/// } +/// +/// type Bar @key(fields: "id", resolvable: false) { +/// id: ID! +/// } +/// +/// +public sealed class KeyInterfaceAttribute : InterfaceTypeDescriptorAttribute +{ + /// + /// Initializes a new instance of . + /// + /// + /// The field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + public KeyInterfaceAttribute(string fieldSet) + { + FieldSet = fieldSet; + Resolvable = null; + } + + /// + /// Initializes a new instance of . + /// + /// + /// The field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// Boolean flag to indicate whether this entity is resolvable locally. + /// + public KeyInterfaceAttribute(string fieldSet, bool? resolvable = null) + { + FieldSet = fieldSet; + Resolvable = resolvable; + } + + /// + /// Gets the field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + public string FieldSet { get; } + + /// + /// Gets the resolvable flag. + /// + public bool? Resolvable { get; } + + protected override void OnConfigure(IDescriptorContext context, IInterfaceTypeDescriptor descriptor, Type type) + { + if (string.IsNullOrEmpty(FieldSet)) + { + throw Key_FieldSet_CannotBeEmpty(type); + } + descriptor.Key(FieldSet, Resolvable); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs new file mode 100644 index 00000000000..17c8d835dec --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs @@ -0,0 +1,83 @@ +using HotChocolate.Types.Descriptors; +using static HotChocolate.ApolloFederation.ThrowHelper; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @link(url: String!, import: [String]) repeatable on SCHEMA +/// +/// +/// The @link directive links definitions within the document to external schemas. +/// External schemas are identified by their url, which optionally ends with a name and version with +/// the following format: `{NAME}/v{MAJOR}.{MINOR}` +/// +/// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive +/// should be namespaced as federation__key) unless they are explicitly imported. We automatically +/// import ALL federation directives to avoid the need for namespacing. +/// +/// NOTE: We currently DO NOT support full @link directive capability as it requires support for +/// namespacing and renaming imports. This functionality may be added in the future releases. +/// See @link specification for details. +/// +/// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) +/// +/// type Query { +/// foo: Foo! +/// } +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// name: String +/// } +/// +/// +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = true)] +public sealed class LinkAttribute : SchemaTypeDescriptorAttribute +{ + /// + /// Initializes new instance of + /// + /// + /// Url of specification to be imported + /// + public LinkAttribute(string url) + { + Url = url; + Import = null; + } + + /// + /// Initializes new instance of + /// + /// + /// Url of specification to be imported + /// + /// + /// Optional list of imported elements. + /// + public LinkAttribute(string url, string?[]? import) + { + Url = url; + Import = import; + } + + /// + /// Gets imported specification url. + /// + public string Url { get; } + + /// + /// Gets optional list of imported element names. + /// + public string?[]? Import { get; } + + public override void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type) + { + if (string.IsNullOrEmpty(Url)) + { + throw Link_Url_CannotBeEmpty(type); + } + descriptor.Link(Url, Import); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs new file mode 100644 index 00000000000..2fdfcd32d3c --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs @@ -0,0 +1,61 @@ +using HotChocolate.Types.Descriptors; +using static HotChocolate.ApolloFederation.ThrowHelper; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// # federation v2 definition +/// directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE +/// +/// +/// The @key directive is used to indicate a combination of fields that can be used to uniquely +/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), +/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can +/// be specified on a target type. +/// +/// Keys can also be marked as non-resolvable which indicates to router that given entity should never be +/// resolved within given subgraph. This allows your subgraph to still reference target entity without +/// contributing any fields to it. +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// field: String +/// bars: [Bar!]! +/// } +/// +/// type Bar @key(fields: "id", resolvable: false) { +/// id: ID! +/// } +/// +/// +/// +public sealed class NonResolvableKeyAttribute : ObjectTypeDescriptorAttribute +{ + /// + /// Initializes a new instance of . + /// + /// + /// The field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + public NonResolvableKeyAttribute(string fieldSet) + { + FieldSet = fieldSet; + } + + /// + /// Gets the field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + public string FieldSet { get; } + + protected override void OnConfigure(IDescriptorContext context, IObjectTypeDescriptor descriptor, Type type) + { + if (string.IsNullOrEmpty(FieldSet)) + { + throw Key_FieldSet_CannotBeEmpty(type); + } + descriptor.Key(FieldSet, false); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/OverrideAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/OverrideAttribute.cs new file mode 100644 index 00000000000..6909078f428 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/OverrideAttribute.cs @@ -0,0 +1,49 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @override(from: String!) on FIELD_DEFINITION +/// +/// +/// The @override directive is used to indicate that the current subgraph is taking +/// responsibility for resolving the marked field away from the subgraph specified in the from +/// argument. Name of the subgraph to be overridden has to match the name of the subgraph that +/// was used to publish their schema. +/// +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// description: String @override(from: "BarSubgraph") +/// } +/// +/// +public sealed class OverrideAttribute : ObjectFieldDescriptorAttribute +{ + + /// + /// Initializes new instance of + /// + /// + /// Name of the subgraph to be overridden + /// + public OverrideAttribute(string from) + { + From = from; + } + + /// + /// Get name of the subgraph to be overridden. + /// + public string From { get; } + + protected override void OnConfigure( + IDescriptorContext context, + IObjectFieldDescriptor descriptor, + MemberInfo member) + { + descriptor.Override(From); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs new file mode 100644 index 00000000000..8879cf9801e --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs @@ -0,0 +1,48 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @requiresScopes(scopes: [[Scope!]!]!) on +/// ENUM +/// | FIELD_DEFINITION +/// | INTERFACE +/// | OBJECT +/// | SCALAR +/// +/// +/// Directive that is used to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. +/// Refer to the Apollo Router article for additional details. +/// +/// type Foo @key(fields: "id") { +/// id: ID +/// description: String @requiresScopes(scopes: [["scope1"]]) +/// } +/// +/// +[AttributeUsage( + AttributeTargets.Class + | AttributeTargets.Enum + | AttributeTargets.Interface + | AttributeTargets.Method + | AttributeTargets.Property + | AttributeTargets.Struct, + AllowMultiple = true +)] +public sealed class RequiresScopesAttribute : Attribute +{ + /// + /// Initializes new instance of + /// + /// + /// Array of required JWT scopes. + /// + public RequiresScopesAttribute(string[] scopes) + { + Scopes = scopes; + } + + /// + /// Retrieves array of required JWT scopes. + /// + public string[] Scopes { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs new file mode 100644 index 00000000000..2186f8ae259 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs @@ -0,0 +1,13 @@ +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// Schema descriptor attribute that provides common mechanism of applying directives on schema type. +/// +/// NOTE: HotChocolate currently does not provide mechanism to apply those directives. +/// +public abstract class SchemaTypeDescriptorAttribute : Attribute +{ + public abstract void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs new file mode 100644 index 00000000000..dc99e1450d0 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs @@ -0,0 +1,34 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @shareable repeatable on FIELD_DEFINITION | OBJECT +/// +/// +/// The @shareable directive indicates that given object and/or field can be resolved by multiple subgraphs. +/// If an object is marked as @shareable then all its fields are automatically shareable without the need +/// for explicitly marking them with @shareable directive. All fields referenced from @key directive are +/// automatically shareable as well. +/// +/// +/// type Foo @key(fields: "id") { +/// id: ID! # shareable because id is a key field +/// name: String # non-shareable +/// description: String @shareable # shareable +/// } +/// +/// type Bar @shareable { +/// description: String # shareable because User is marked shareable +/// name: String # shareable because User is marked shareable +/// } +/// +/// +[AttributeUsage( + AttributeTargets.Class + | AttributeTargets.Struct + | AttributeTargets.Method + | AttributeTargets.Property +)] +public sealed class ShareableAttribute : Attribute +{ +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs index d18db2f1682..49494234578 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs @@ -1,7 +1,6 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; using HotChocolate.Resolvers; -using FederationSchemaPrinter = HotChocolate.ApolloFederation.FederationSchemaPrinter; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs index bff93364d03..3bc0b605710 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Linq; using HotChocolate.Language; using static HotChocolate.Types.SpecifiedByDirectiveType.Names; From 90dd9fe1fa7c8c71dce2ed6f4802b872d56175db Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 6 Dec 2023 16:01:15 +0200 Subject: [PATCH 12/89] Add some of the other stuff --- .../Descriptors/EntityResolverDescriptor.cs | 1 - ...escriptorExtensions.ApolloAuthenticated.cs | 76 +++++++++ ...ederationDescriptorExtensions.ApolloTag.cs | 108 +++++++++++++ ...rationDescriptorExtensions.Inaccessible.cs | 111 +++++++++++++ ...tionDescriptorExtensions.RequiresScopes.cs | 88 +++++++++++ ...ApolloFederationSchemaBuilderExtensions.cs | 146 ++++++++++++++++-- .../DirectiveTypeDescriptorExtensions.cs | 19 +-- .../FederationVersioning/FederationUtils.cs | 1 - 8 files changed, 516 insertions(+), 34 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs index 0c52308cf47..67b76c1d7e4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; -using ApolloGraphQL.HotChocolate.Federation.Descriptors; using HotChocolate.ApolloFederation.Helpers; using HotChocolate.ApolloFederation.Properties; using HotChocolate.Internal; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs new file mode 100644 index 00000000000..b15d172712f --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs @@ -0,0 +1,76 @@ +using HotChocolate.ApolloFederation.Constants; + +namespace HotChocolate.Types; + +/// +/// Provides extensions for applying @authenticated directive on type system descriptors. +/// +public static partial class ApolloFederationDescriptorExtensions +{ + /// + /// Applies @authenticated directive to indicate that the target element is accessible only to the authenticated supergraph users. + /// + /// type Foo @key(fields: "id") { + /// id: ID + /// description: String @authenticated + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor ApolloAuthenticated(this IEnumTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); + } + + /// + public static IInterfaceFieldDescriptor ApolloAuthenticated(this IInterfaceFieldDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); + } + + /// + public static IInterfaceTypeDescriptor ApolloAuthenticated(this IInterfaceTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); + } + + /// + public static IObjectFieldDescriptor ApolloAuthenticated(this IObjectFieldDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); + } + + /// + public static IObjectTypeDescriptor ApolloAuthenticated(this IObjectTypeDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs new file mode 100644 index 00000000000..e20532f0e23 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs @@ -0,0 +1,108 @@ +using HotChocolate.ApolloFederation; + +namespace HotChocolate.Types; + +/// +/// Provides extensions for applying @tag directive on type system descriptors. +/// +public static partial class ApolloFederationDescriptorExtensions +{ + /// + /// Applies @tag directive to annotate fields and types with additional metadata information. + /// Tagging is commonly used for creating variants of the supergraph using contracts. + /// + /// type Foo @tag(name: "internal") { + /// id: ID! + /// name: String + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// + /// Tag value to be applied on the target + /// + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor ApolloTag(this IEnumTypeDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IEnumValueDescriptor ApolloTag(this IEnumValueDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IInterfaceFieldDescriptor ApolloTag(this IInterfaceFieldDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IInterfaceTypeDescriptor ApolloTag(this IInterfaceTypeDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IInputObjectTypeDescriptor ApolloTag(this IInputObjectTypeDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IInputFieldDescriptor ApolloTag(this IInputFieldDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IObjectFieldDescriptor ApolloTag(this IObjectFieldDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IObjectTypeDescriptor ApolloTag(this IObjectTypeDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + /// + public static IUnionTypeDescriptor ApolloTag(this IUnionTypeDescriptor descriptor, string name) + { + ValidateTagExtensionParams(descriptor, name); + return descriptor.Directive(new TagValue(name)); + } + + private static void ValidateTagExtensionParams(IDescriptor descriptor, string name) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + if (name is null) + { + throw new ArgumentNullException(nameof(name)); + } + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs new file mode 100644 index 00000000000..2eb12af4a54 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs @@ -0,0 +1,111 @@ +using HotChocolate.ApolloFederation.Constants; + +namespace HotChocolate.Types; + +/// +/// Provides extensions for applying @inaccessible directive on type system descriptors. +/// +public static partial class ApolloFederationDescriptorExtensions +{ + /// + /// Applies the @inaccessible directive which is used to mark location within schema as inaccessible + /// from the GraphQL Router. While @inaccessible fields are not exposed by the router to the clients, + /// they are still available for query plans and can be referenced from @key and @requires directives. + /// This allows you to not expose sensitive fields to your clients but still make them available for + /// computations. Inaccessible can also be used to incrementally add schema elements (e.g. fields) to + /// multiple subgraphs without breaking composition. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// hidden: String @inaccessible + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor Inaccessible( + this IEnumTypeDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IEnumValueDescriptor Inaccessible( + this IEnumValueDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IInterfaceFieldDescriptor Inaccessible( + this IInterfaceFieldDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IInterfaceTypeDescriptor Inaccessible( + this IInterfaceTypeDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IInputObjectTypeDescriptor Inaccessible( + this IInputObjectTypeDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IInputFieldDescriptor Inaccessible( + this IInputFieldDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IObjectFieldDescriptor Inaccessible( + this IObjectFieldDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IObjectTypeDescriptor Inaccessible( + this IObjectTypeDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + /// + public static IUnionTypeDescriptor Inaccessible( + this IUnionTypeDescriptor descriptor) + { + ValidateDescriptor(descriptor); + return descriptor.Directive(WellKnownTypeNames.Inaccessible); + } + + private static void ValidateDescriptor(IDescriptor descriptor) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs new file mode 100644 index 00000000000..a371286d07d --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs @@ -0,0 +1,88 @@ +using System.Collections.Generic; +using HotChocolate.ApolloFederation; + +namespace HotChocolate.Types; + +/// +/// Provides extensions for applying @requiresScopes directive on type system descriptors. +/// +public static partial class ApolloFederationDescriptorExtensions +{ + /// + /// Applies @requiresScopes directive to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. + /// + /// type Foo @key(fields: "id") { + /// id: ID + /// description: String @requiresScopes(scopes: [["scope1"]]) + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// Required JWT scopes + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor RequiresScopes( + this IEnumTypeDescriptor descriptor, + List> scopes) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(new RequiresScopes(scopes)); + } + + /// + public static IInterfaceFieldDescriptor RequiresScopes( + this IInterfaceFieldDescriptor descriptor, + List> scopes) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(new RequiresScopes(scopes)); + } + + /// + public static IInterfaceTypeDescriptor RequiresScopes( + this IInterfaceTypeDescriptor descriptor, + List> scopes) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(new RequiresScopes(scopes)); + } + + /// + public static IObjectFieldDescriptor RequiresScopes( + this IObjectFieldDescriptor descriptor, + List> scopes) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(new RequiresScopes(scopes)); + } + + /// + public static IObjectTypeDescriptor RequiresScopes( + this IObjectTypeDescriptor descriptor, + List> scopes) + { + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + return descriptor.Directive(new RequiresScopes(scopes)); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index 1df0cb6d89f..4a887ceeaea 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -1,13 +1,12 @@ using HotChocolate.ApolloFederation; -using HotChocolate.ApolloFederation; -using AnyType = HotChocolate.ApolloFederation.AnyType; +using ApolloAnyType = HotChocolate.ApolloFederation.AnyType; namespace HotChocolate; /// /// Provides extensions to . /// -public static class ApolloFederationSchemaBuilderExtensions +public static partial class ApolloFederationSchemaBuilderExtensions { /// /// Adds support for Apollo Federation to the schema. @@ -18,36 +17,149 @@ public static class ApolloFederationSchemaBuilderExtensions /// /// Returns the . /// + /// + /// Target Federation version + /// /// /// The is null. /// public static ISchemaBuilder AddApolloFederation( - this ISchemaBuilder builder) + this ISchemaBuilder builder, + FederationVersion version = FederationVersion.Latest, + Action? schemaConfiguration = null) + { + if (builder is null) + { + throw new ArgumentNullException(nameof(builder)); + } + + builder.SetSchema(s => + { + var link = FederationUtils.GetFederationLink(version); + s.Link(link.Url, link.Import?.ToArray()); + schemaConfiguration?.Invoke(s); + }); + return AddApolloFederationDefinitions(builder, version); + } + + /// + /// Adds support for Apollo Federation to the schema. + /// + /// + /// The . + /// + /// + /// Federated schema object. + /// + /// + /// Returns the . + /// + /// + /// The is null. + /// + /// + /// The is null. + /// + public static ISchemaBuilder AddApolloFederation(this ISchemaBuilder builder, FederatedSchema schema) + { + if (builder is null) + { + throw new ArgumentNullException(nameof(builder)); + } + + if (schema is null) + { + throw new ArgumentNullException(nameof(schema)); + } + + builder.SetSchema(schema); + return AddApolloFederationDefinitions(builder, schema.FederationVersion); + } + + /// + /// Adds support for Apollo Federation to the schema. + /// + /// + /// The . + /// + /// + /// Returns the . + /// + /// + /// The is null. + /// + private static ISchemaBuilder AddApolloFederationDefinitions( + this ISchemaBuilder builder, + FederationVersion version = FederationVersion.Latest) { if (builder is null) { throw new ArgumentNullException(nameof(builder)); } - // disable hot chocolate tag directive + + // Disable hot chocolate tag directive // specify default Query type name if not specified builder.ModifyOptions(opt => { opt.EnableTag = false; - if (opt.QueryTypeName is null) - { - opt.QueryTypeName = "Query"; - } + opt.QueryTypeName ??= "Query"; }); - builder.AddType(); - builder.AddType(); - builder.AddType(new ServiceType()); + // Scalars + builder.AddType(); builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); + + // Types + builder.AddType(); + builder.AddType(new ServiceType(true)); + + // Directives + switch (version) + { + case FederationVersion.Federation20: + { + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.AddType(); + break; + } + + case FederationVersion.Federation21: + case FederationVersion.Federation22: + { + builder.AddType(); + goto case FederationVersion.Federation20; + } + + case FederationVersion.Federation23: + case FederationVersion.Federation24: + { + builder.AddType(); + goto case FederationVersion.Federation22; + } + + case FederationVersion.Federation25: + { + builder.AddType(); + builder.AddType(); + builder.AddType(); + builder.BindRuntimeType(); + goto case FederationVersion.Federation24; + } + + default: + { + break; + } + } + builder.TryAddTypeInterceptor(); return builder; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs index 4809f6b0001..46faecf697f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs @@ -1,26 +1,15 @@ -using static HotChocolate.ApolloFederation.Constants.WellKnownArgumentNames; -using FieldSetTypeV1 = HotChocolate.ApolloFederation.FieldSetType; -using FieldSetTypeV2 = HotChocolate.ApolloFederation.FieldSetType; +using HotChocolate.ApolloFederation.Constants; namespace HotChocolate.ApolloFederation; internal static class DirectiveTypeDescriptorExtensions { - public static IDirectiveTypeDescriptor FieldsArgumentV1( + public static IDirectiveTypeDescriptor FieldsArgument( this IDirectiveTypeDescriptor descriptor) { descriptor - .Argument(Fields) - .Type>(); - return descriptor; - } - - public static IDirectiveTypeDescriptor FieldsArgumentV2( - this IDirectiveTypeDescriptor descriptor) - { - descriptor - .Argument(Fields) - .Type>(); + .Argument(WellKnownArgumentNames.Fields) + .Type>(); return descriptor; } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs index 45c132d235c..06b14ca84fd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Linq; namespace HotChocolate.ApolloFederation; From 3d320dbb0490dcb1e2b83db9a5700780c4e623d2 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 12:05:18 +0200 Subject: [PATCH 13/89] package.lock after restore? --- .../src/ApolloFederation/packages.lock.json | 260 -- .../ApolloFederation.Tests/packages.lock.json | 1322 ------- .../Types.Analyzers.Tests/packages.lock.json | 3041 +---------------- .../Fusion/src/CommandLine/packages.lock.json | 28 +- .../Fusion/test/Shared/packages.lock.json | 1620 +-------- 5 files changed, 29 insertions(+), 6242 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json b/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json index 1620dbf1fde..bfea3cf908b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json @@ -1,266 +1,6 @@ { "version": 1, "dependencies": { - "net6.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Microsoft.Bcl.AsyncInterfaces": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "7hR9FU0JJHOCLmn/Ary31pLLAhlzoMptBKs5CJmNUzD87dXjl+/NqVkyCTl6cT2JAfTK0G39HpvCOv1fhsX3BQ==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Runtime.CompilerServices.Unsafe": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "6.0.7", - "contentHash": "/Tf/9XjprpHolbcDOrxsKVYy/mUG/FS7aGd9YUgBVEiHeQH4kAE0T1sMbde7q6B5xcrNUsJ5iW7D1RvHudQNqA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==" - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "csAJe24tWCOTO/rXoJAuBGuOq7ZdHY60XtC6b/hNMHT9tuX+2J9HK7nciLEtNvnrRLMxBACLXO3R4y5+kCduMA==" - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.Diagnostics.DiagnosticSource": "[6.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[6.0.0, )", - "System.Collections.Immutable": "[6.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[6.0.0, )", - "System.Threading.Channels": "[6.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[6.0.7, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.Options": "[6.0.0, )" - } - } - }, "net7.0": { "Microsoft.SourceLink.GitHub": { "type": "Direct", diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json index 6062bfc7773..6c070a403d9 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json @@ -1,1328 +1,6 @@ { "version": 1, "dependencies": { - "net6.0": { - "ChilliCream.Testing.Utilities": { - "type": "Direct", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Snapshooter.Xunit": { - "type": "Direct", - "requested": "[0.5.4, )", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "Microsoft.Bcl.AsyncInterfaces": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "7hR9FU0JJHOCLmn/Ary31pLLAhlzoMptBKs5CJmNUzD87dXjl+/NqVkyCTl6cT2JAfTK0G39HpvCOv1fhsX3BQ==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "12.0.1", - "contentHash": "pBR3wCgYWZGiaZDYP+HHYnalVnPJlpP1q55qvVb+adrDHmFMDc1NAKio61xTwftK3Pw5h7TZJPJEEVMd6ty8rg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.CompilerServices.Unsafe": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "6.0.7", - "contentHash": "/Tf/9XjprpHolbcDOrxsKVYy/mUG/FS7aGd9YUgBVEiHeQH4kAE0T1sMbde7q6B5xcrNUsJ5iW7D1RvHudQNqA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.Diagnostics.DiagnosticSource": "[6.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "greendonut.tests": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "GreenDonut": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "System.Diagnostics.DiagnosticSource": "[6.0.0, )", - "xunit": "[2.4.1, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[6.0.0, )", - "System.Collections.Immutable": "[6.0.0, )" - } - }, - "hotchocolate.apollofederation": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[6.0.0, )", - "System.Threading.Channels": "[6.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[6.0.7, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.Options": "[6.0.0, )" - } - } - }, "net7.0": { "ChilliCream.Testing.Utilities": { "type": "Direct", diff --git a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json index 0a36aa0a1b4..1b7d57684b6 100644 --- a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json +++ b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json @@ -1208,8 +1208,8 @@ "dependencies": { "DiffPlex": "[1.7.1, )", "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", "Newtonsoft.Json": "[13.0.2, )", "Xunit": "[2.4.1, )" @@ -1250,7 +1250,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -1431,3041 +1431,6 @@ "Microsoft.Extensions.Options": "[6.0.0, )" } } - }, - "net7.0": { - "ChilliCream.Testing.Utilities": { - "type": "Direct", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "DiffPlex": { - "type": "Direct", - "requested": "[1.7.1, )", - "resolved": "1.7.1", - "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Snapshooter.Xunit": { - "type": "Direct", - "requested": "[0.5.4, )", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "BananaCakePop.Middleware": { - "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", - "dependencies": { - "Yarp.ReverseProxy": "2.0.1" - } - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "Microsoft.AspNetCore.WebUtilities": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "9ErxAAKaDzxXASB/b5uLEkLgUWv1QbeVxyJYEHQwMaxXOeFFVkQxiq8RyfVcifLU7NR0QY0p3acqx4ZpYfhHDg==", - "dependencies": { - "Microsoft.Net.Http.Headers": "2.2.0", - "System.Text.Encodings.Web": "4.5.0" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw==" - }, - "Microsoft.Extensions.Http": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "9Pq9f/CvOSz0t9yQa6g1uWpxa2sm13daLFm8EZwy9MaQUjKXWdNUXQwIxwhmba5N83UIqURiPHSNqGK1vfWF2w==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", - "Microsoft.Extensions.Logging": "7.0.0", - "Microsoft.Extensions.Logging.Abstractions": "7.0.0", - "Microsoft.Extensions.Options": "7.0.0" - } - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "7.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", - "Microsoft.Extensions.Logging.Abstractions": "7.0.0", - "Microsoft.Extensions.Options": "7.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==" - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "udvKco0sAVgYGTBnHUb0tY9JQzJ/nPDiv/8PIyz69wl1AibeCDZOLVVI+6156dPfHmJH7ws5oUJRiW4ZmAvuuA==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", - "Microsoft.Extensions.Primitives": "7.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==" - }, - "Microsoft.Net.Http.Headers": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "iZNkjYqlo8sIOI0bQfpsSoMTmB/kyvmV2h225ihyZT33aTp48ZpF6qYnXxzSXmHt8DpBAwBTX+1s1UFLbYfZKg==", - "dependencies": { - "Microsoft.Extensions.Primitives": "2.2.0", - "System.Buffers": "4.5.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.2", - "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A==" - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ==" - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "9W0ewWDuAyDqS2PigdTxk6jDKonfgscY/hP8hm7VpxYhNHZHKvZTdRckberlFk3VnCmr3xBUyMBut12Q+T2aOw==" - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" - }, - "System.IO.Packaging": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "+j5ezLP7785/pd4taKQhXAWsymsIW2nTnE/U3/jpGZzcJx5lip6qkj6UrxSE7ZYZfL0GaLuymwGLqwJV/c7O7Q==" - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "jRn6JYnNPW6xgQazROBLSfpdoczRw694vO5kKvMcNnpXuolEixUyw6IBuBs2Y2mlSX/LdLvyyWmfXhaI3ND1Yg==" - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reactive": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg==" - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "DaGSsVqKsn/ia6RG8frjwmJonfos0srquhw09TlT8KRw5I43E+4gs+/bZj4K0vShJ5H9imCuXupb4RmS+dBy3w==", - "dependencies": { - "System.Text.Encodings.Web": "7.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "qmeeYNROMsONF6ndEZcIQ+VxR4Q/TX/7uIVLJqtwIWL7dDWeh0l1UIqgo4wYyjG//5lUNhwkLDSFl+pAWO6oiA==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "Yarp.ReverseProxy": { - "type": "Transitive", - "resolved": "2.0.1", - "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", - "dependencies": { - "System.IO.Hashing": "7.0.0" - } - }, - "cookiecrumble": { - "type": "Project", - "dependencies": { - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", - "Newtonsoft.Json": "[13.0.2, )", - "Xunit": "[2.4.1, )" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[7.0.0, )", - "System.Diagnostics.DiagnosticSource": "[7.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "System.Collections.Immutable": "[7.0.0, )" - } - }, - "hotchocolate.aspnetcore": { - "type": "Project", - "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[7.0.0, )", - "System.Threading.Channels": "[7.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.fusion": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", - "Microsoft.Extensions.Http": "[7.0.0, )", - "System.Reactive": "[5.0.0, )" - } - }, - "hotchocolate.fusion.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Packaging": "[7.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[7.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "HotChocolate.StarWars": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.subscriptions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )" - } - }, - "hotchocolate.subscriptions.inmemory": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Subscriptions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )" - } - }, - "hotchocolate.tests.utilities": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.transport.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "System.Collections.Immutable": "[7.0.0, )", - "System.Text.Json": "[7.0.0, )" - } - }, - "hotchocolate.transport.http": { - "type": "Project", - "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Pipelines": "[7.0.0, )" - } - }, - "hotchocolate.transport.sockets": { - "type": "Project", - "dependencies": { - "System.IO.Pipelines": "[7.0.0, )" - } - }, - "hotchocolate.transport.sockets.client": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.Collections.Immutable": "[7.0.0, )", - "System.Text.Json": "[7.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", - "Microsoft.Extensions.ObjectPool": "[7.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[7.0.0, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.scalars.upload": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", - "Microsoft.Extensions.Options": "[7.0.0, )" - } - } - }, - "net8.0": { - "ChilliCream.Testing.Utilities": { - "type": "Direct", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "DiffPlex": { - "type": "Direct", - "requested": "[1.7.1, )", - "resolved": "1.7.1", - "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Snapshooter.Xunit": { - "type": "Direct", - "requested": "[0.5.4, )", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "BananaCakePop.Middleware": { - "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", - "dependencies": { - "Yarp.ReverseProxy": "2.0.1" - } - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "Microsoft.AspNetCore.WebUtilities": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "z1SXKg5Bk02VmrrOab1TO2yxkZIfL4RyrS+yCpwxcLTqJwImYhEttz3LYbl1gQebkAAvx2Fm4NVXmopxXeLZgw==", - "dependencies": { - "Microsoft.Net.Http.Headers": "8.0.0", - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Binder": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" - }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3PZp/YSkIXrF7QK7PfC1bkyRYwqOHpWFad8Qx+4wkuumAeXo1NHaxpS9LboNA9OvNSAu+QOVlXbMyoY+pHSqcw==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Diagnostics.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "System.Diagnostics.DiagnosticSource": "8.0.0" - } - }, - "Microsoft.Extensions.Http": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cWz4caHwvx0emoYe7NkHPxII/KkTI8R/LC9qdqJqnKv2poTJ4e2qqPGQqvRoQ5kaSA4FU5IV3qFAuLuOhoqULQ==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Diagnostics": "8.0.0", - "Microsoft.Extensions.Logging": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "4pm+XgxSukskwjzDDfSjG4KNUIOdFF2VaqZZDtTzoyQMOVSnlV6ZM8a9aVu5dg9LVZTB//utzSc8fOi0b0Mb2Q==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" - }, - "Microsoft.Net.Http.Headers": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "YlHqL8oWBX3H1LmdKUOxEMW8cVD8nUACEnE2Fu3Ze4k7mYf8yJ1o/uLqoequQV0GDupXyCBEzYhn7Zxdz7pqYQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.2", - "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" - }, - "System.IO.Packaging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "8g1V4YRpdGAxFcK8v9OjuMdIOJSpF30Zb1JGicwVZhly3I994WFyBdV6mQEo8d3T+URQe55/M0U0eIH0Hts1bg==" - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reactive": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==" - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", - "dependencies": { - "System.Text.Encodings.Web": "8.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "CMaFr7v+57RW7uZfZkPExsPB6ljwzhjACWW1gfU35Y56rk72B/Wu+sTqxVmGSk4SFUlPc3cjeKND0zktziyjBA==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "Yarp.ReverseProxy": { - "type": "Transitive", - "resolved": "2.0.1", - "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", - "dependencies": { - "System.IO.Hashing": "7.0.0" - } - }, - "cookiecrumble": { - "type": "Project", - "dependencies": { - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", - "Newtonsoft.Json": "[13.0.2, )", - "Xunit": "[2.4.1, )" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.Diagnostics.DiagnosticSource": "[8.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )" - } - }, - "hotchocolate.aspnetcore": { - "type": "Project", - "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "System.Threading.Channels": "[8.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.fusion": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "Microsoft.Extensions.Http": "[8.0.0, )", - "System.Reactive": "[5.0.0, )" - } - }, - "hotchocolate.fusion.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Packaging": "[8.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "HotChocolate.StarWars": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.subscriptions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )" - } - }, - "hotchocolate.subscriptions.inmemory": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Subscriptions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.tests.utilities": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.transport.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.transport.http": { - "type": "Project", - "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets": { - "type": "Project", - "dependencies": { - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets.client": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.scalars.upload": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.Options": "[8.0.0, )" - } - } } } } \ No newline at end of file diff --git a/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json b/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json index ec5167c15e9..b97fb59ea01 100644 --- a/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json +++ b/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json @@ -223,7 +223,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -263,10 +263,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", "Microsoft.Extensions.Http": "[7.0.0, )", "System.Reactive": "[5.0.0, )" @@ -354,7 +354,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[7.0.0, )" } @@ -369,8 +369,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[7.0.0, )", "System.Text.Json": "[7.0.0, )" @@ -716,7 +716,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -756,10 +756,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", "Microsoft.Extensions.Http": "[8.0.0, )", "System.Reactive": "[5.0.0, )" @@ -847,7 +847,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[8.0.0, )" } @@ -862,8 +862,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[8.0.0, )", "System.Text.Json": "[8.0.0, )" diff --git a/src/HotChocolate/Fusion/test/Shared/packages.lock.json b/src/HotChocolate/Fusion/test/Shared/packages.lock.json index 7da95b22359..f2ae213e6b7 100644 --- a/src/HotChocolate/Fusion/test/Shared/packages.lock.json +++ b/src/HotChocolate/Fusion/test/Shared/packages.lock.json @@ -1226,9 +1226,9 @@ "dependencies": { "DiffPlex": "[1.7.1, )", "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", "Newtonsoft.Json": "[13.0.2, )", "Xunit": "[2.4.1, )" @@ -1268,7 +1268,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -1276,11 +1276,11 @@ "type": "Project", "dependencies": { "CookieCrumble": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", "HotChocolate.StarWars": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", "HotChocolate.Tests.Utilities": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", "Microsoft.AspNetCore.TestHost": "[7.0.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", @@ -1324,10 +1324,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", "Microsoft.Extensions.Http": "[7.0.0, )", "System.Reactive": "[5.0.0, )" @@ -1442,7 +1442,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[7.0.0, )" } @@ -1457,8 +1457,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[7.0.0, )", "System.Text.Json": "[7.0.0, )" @@ -1516,7 +1516,7 @@ "type": "Project", "dependencies": { "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", "HotChocolate.Types.Shared": "[0.0.0, )", "System.Text.Json": "[7.0.0, )" } @@ -1529,1602 +1529,6 @@ "Microsoft.Extensions.Options": "[7.0.0, )" } } - }, - "net8.0": { - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "BananaCakePop.Middleware": { - "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", - "dependencies": { - "Yarp.ReverseProxy": "2.0.1" - } - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "ChilliCream.Testing.Utilities": { - "type": "Transitive", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "DiffPlex": { - "type": "Transitive", - "resolved": "1.7.1", - "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" - }, - "Microsoft.AspNetCore.TestHost": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "Rk6Ai9bFf1KubVY5oEbEPN5fiKWW2oeU+easjokyUqqYyTHRsXlkjFeMvwecgoXsoTfXMSwEHzJp8FCjQcyYTQ==", - "dependencies": { - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.AspNetCore.WebUtilities": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "z1SXKg5Bk02VmrrOab1TO2yxkZIfL4RyrS+yCpwxcLTqJwImYhEttz3LYbl1gQebkAAvx2Fm4NVXmopxXeLZgw==", - "dependencies": { - "Microsoft.Net.Http.Headers": "8.0.0", - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Binder": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" - }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3PZp/YSkIXrF7QK7PfC1bkyRYwqOHpWFad8Qx+4wkuumAeXo1NHaxpS9LboNA9OvNSAu+QOVlXbMyoY+pHSqcw==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Diagnostics.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "System.Diagnostics.DiagnosticSource": "8.0.0" - } - }, - "Microsoft.Extensions.Http": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cWz4caHwvx0emoYe7NkHPxII/KkTI8R/LC9qdqJqnKv2poTJ4e2qqPGQqvRoQ5kaSA4FU5IV3qFAuLuOhoqULQ==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Diagnostics": "8.0.0", - "Microsoft.Extensions.Logging": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "4pm+XgxSukskwjzDDfSjG4KNUIOdFF2VaqZZDtTzoyQMOVSnlV6ZM8a9aVu5dg9LVZTB//utzSc8fOi0b0Mb2Q==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" - }, - "Microsoft.Net.Http.Headers": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "YlHqL8oWBX3H1LmdKUOxEMW8cVD8nUACEnE2Fu3Ze4k7mYf8yJ1o/uLqoequQV0GDupXyCBEzYhn7Zxdz7pqYQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.2", - "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "Snapshooter.Xunit": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" - }, - "System.IO.Packaging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "8g1V4YRpdGAxFcK8v9OjuMdIOJSpF30Zb1JGicwVZhly3I994WFyBdV6mQEo8d3T+URQe55/M0U0eIH0Hts1bg==" - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reactive": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==" - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", - "dependencies": { - "System.Text.Encodings.Web": "8.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "CMaFr7v+57RW7uZfZkPExsPB6ljwzhjACWW1gfU35Y56rk72B/Wu+sTqxVmGSk4SFUlPc3cjeKND0zktziyjBA==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "Yarp.ReverseProxy": { - "type": "Transitive", - "resolved": "2.0.1", - "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", - "dependencies": { - "System.IO.Hashing": "7.0.0" - } - }, - "cookiecrumble": { - "type": "Project", - "dependencies": { - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", - "Newtonsoft.Json": "[13.0.2, )", - "Xunit": "[2.4.1, )" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.Diagnostics.DiagnosticSource": "[8.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )" - } - }, - "hotchocolate.aspnetcore": { - "type": "Project", - "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" - } - }, - "hotchocolate.aspnetcore.tests.utilities": { - "type": "Project", - "dependencies": { - "CookieCrumble": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Tests.Utilities": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", - "Microsoft.AspNetCore.TestHost": "[8.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "System.Threading.Channels": "[8.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.fusion": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "Microsoft.Extensions.Http": "[8.0.0, )", - "System.Reactive": "[5.0.0, )" - } - }, - "hotchocolate.fusion.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Packaging": "[8.0.0, )" - } - }, - "hotchocolate.fusion.composition": { - "type": "Project", - "dependencies": { - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Skimmed": "[0.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "HotChocolate.Skimmed": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )" - } - }, - "HotChocolate.StarWars": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.subscriptions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )" - } - }, - "hotchocolate.subscriptions.inmemory": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Subscriptions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.tests.utilities": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.transport.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.transport.http": { - "type": "Project", - "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets": { - "type": "Project", - "dependencies": { - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets.client": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.scalars.upload": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.utilities.introspection": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.Options": "[8.0.0, )" - } - } } } } \ No newline at end of file From a95e52c85d1e13a6514dcc263393f1ea0231cf55 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 12:07:46 +0200 Subject: [PATCH 14/89] Remove redundant imports, fix naming of a few symbols, ignore naming warnings --- .../Instrumentation/ApolloTracingResultBuilder.cs | 4 ++-- .../Core/src/Subscriptions.Postgres/ContinuousTask.cs | 6 +++--- .../src/Subscriptions.Postgres/PostgresMessageEnvelope.cs | 8 ++++---- .../Subscriptions.Postgres/ResilientNpgsqlConnection.cs | 6 +++--- .../Core/src/Types.NodaTime/ZonedDateTimeType.cs | 4 ++-- .../Types.OffsetPagination/QueryableOffsetPagination.cs | 2 +- src/HotChocolate/Core/src/Types.Scalars/PostalCodeType.cs | 2 ++ src/HotChocolate/Core/src/Types.Shared/WellKnownTypes.cs | 5 ++++- .../Configuration/Validation/DirectiveValidationRule.cs | 6 +++--- .../Configuration/Validation/TypeValidationHelper.cs | 6 +++--- .../Core/src/Types/Types/EnumType.Initialization.cs | 2 ++ .../Types/Types/Interceptors/FlagEnumTypeInterceptor.cs | 6 +++--- .../Core/src/Types/Types/Scalars/Iso8601Duration.cs | 4 ++++ .../Integration/DataLoader/DataLoaderTests.cs | 2 ++ .../Execution.Tests/Integration/Spec/MutationTests.cs | 3 ++- 15 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/HotChocolate/Core/src/Execution/Instrumentation/ApolloTracingResultBuilder.cs b/src/HotChocolate/Core/src/Execution/Instrumentation/ApolloTracingResultBuilder.cs index 081210951d8..be2517cc996 100644 --- a/src/HotChocolate/Core/src/Execution/Instrumentation/ApolloTracingResultBuilder.cs +++ b/src/HotChocolate/Core/src/Execution/Instrumentation/ApolloTracingResultBuilder.cs @@ -8,7 +8,7 @@ namespace HotChocolate.Execution.Instrumentation; internal class ApolloTracingResultBuilder { private const int _apolloTracingVersion = 1; - private const long _ticksToNanosecondsMultiplicator = 100; + private const long _ticksToNanosecondsMultiplier = 100; private readonly ConcurrentQueue _resolverRecords = new ConcurrentQueue(); private TimeSpan _duration; @@ -76,7 +76,7 @@ public ObjectResult Build() details.SetValueUnsafe(0, ApolloTracingResultKeys.Version, _apolloTracingVersion); details.SetValueUnsafe(1, StartTime, _startTime.ToRfc3339DateTimeString()); details.SetValueUnsafe(2, EndTime, _startTime.Add(_duration).ToRfc3339DateTimeString()); - details.SetValueUnsafe(3, Duration, _duration.Ticks * _ticksToNanosecondsMultiplicator); + details.SetValueUnsafe(3, Duration, _duration.Ticks * _ticksToNanosecondsMultiplier); details.SetValueUnsafe(4, Parsing, _parsingResult); details.SetValueUnsafe(5, ApolloTracingResultKeys.Validation, _validationResult); details.SetValueUnsafe(6, ApolloTracingResultKeys.Execution, result); diff --git a/src/HotChocolate/Core/src/Subscriptions.Postgres/ContinuousTask.cs b/src/HotChocolate/Core/src/Subscriptions.Postgres/ContinuousTask.cs index d1568ac7831..6491a47f64c 100644 --- a/src/HotChocolate/Core/src/Subscriptions.Postgres/ContinuousTask.cs +++ b/src/HotChocolate/Core/src/Subscriptions.Postgres/ContinuousTask.cs @@ -7,7 +7,7 @@ internal sealed class ContinuousTask : IAsyncDisposable private readonly CancellationTokenSource _completion = new(); private readonly Func _handler; private readonly Task _task; - private bool disposed; + private bool _disposed; public ContinuousTask(Func handler) { @@ -47,7 +47,7 @@ private async Task RunContinuously() /// public async ValueTask DisposeAsync() { - if(disposed) + if(_disposed) { return; } @@ -62,7 +62,7 @@ public async ValueTask DisposeAsync() } _completion.Dispose(); - disposed = true; + _disposed = true; await ValueTask.CompletedTask; } diff --git a/src/HotChocolate/Core/src/Subscriptions.Postgres/PostgresMessageEnvelope.cs b/src/HotChocolate/Core/src/Subscriptions.Postgres/PostgresMessageEnvelope.cs index 50e3570d8cd..2c5101559f8 100644 --- a/src/HotChocolate/Core/src/Subscriptions.Postgres/PostgresMessageEnvelope.cs +++ b/src/HotChocolate/Core/src/Subscriptions.Postgres/PostgresMessageEnvelope.cs @@ -11,7 +11,7 @@ internal readonly struct PostgresMessageEnvelope { private static readonly Encoding _utf8 = Encoding.UTF8; private static readonly Random _random = Random.Shared; - private const byte separator = (byte)':'; + private const byte _separator = (byte)':'; private const byte _messageIdLength = 24; private PostgresMessageEnvelope(string topic, string formattedPayload) @@ -53,7 +53,7 @@ private static string Format(string topic, string payload, int maxMessagePayload slicedBuffer = slicedBuffer[_messageIdLength..]; // write separator - slicedBuffer[0] = separator; + slicedBuffer[0] = _separator; slicedBuffer = slicedBuffer[1..]; // write topic as base64 @@ -62,7 +62,7 @@ private static string Format(string topic, string payload, int maxMessagePayload slicedBuffer = slicedBuffer[topicLengthBase64..]; // write separator - slicedBuffer[0] = separator; + slicedBuffer[0] = _separator; slicedBuffer = slicedBuffer[1..]; // write payload @@ -112,7 +112,7 @@ public static bool TryParse( buffer = buffer[(_messageIdLength + 1)..]; // find the separator - var indexOfColon = buffer.IndexOf(separator); + var indexOfColon = buffer.IndexOf(_separator); if (indexOfColon == -1) { topic = null; diff --git a/src/HotChocolate/Core/src/Subscriptions.Postgres/ResilientNpgsqlConnection.cs b/src/HotChocolate/Core/src/Subscriptions.Postgres/ResilientNpgsqlConnection.cs index e15e8371adb..adcfed606f2 100644 --- a/src/HotChocolate/Core/src/Subscriptions.Postgres/ResilientNpgsqlConnection.cs +++ b/src/HotChocolate/Core/src/Subscriptions.Postgres/ResilientNpgsqlConnection.cs @@ -7,7 +7,7 @@ namespace HotChocolate.Subscriptions.Postgres; internal sealed class ResilientNpgsqlConnection : IAsyncDisposable { - private const int _waitOnFailureinMs = 500; + private const int _waitOnFailureInMs = 500; private readonly ISubscriptionDiagnosticEvents _diagnosticEvents; private readonly Func> _connectionFactory; @@ -53,12 +53,12 @@ private async Task OnReconnectAsync(CancellationToken cancellationToken) // trigger var message = string - .Format(ResilientConnection_FailedToConnect, _waitOnFailureinMs, ex.Message); + .Format(ResilientConnection_FailedToConnect, _waitOnFailureInMs, ex.Message); _diagnosticEvents.ProviderInfo(message); try { - await Task.Delay(_waitOnFailureinMs, cancellationToken); + await Task.Delay(_waitOnFailureInMs, cancellationToken); } catch { diff --git a/src/HotChocolate/Core/src/Types.NodaTime/ZonedDateTimeType.cs b/src/HotChocolate/Core/src/Types.NodaTime/ZonedDateTimeType.cs index 1528be7b511..4fac49cb0f9 100644 --- a/src/HotChocolate/Core/src/Types.NodaTime/ZonedDateTimeType.cs +++ b/src/HotChocolate/Core/src/Types.NodaTime/ZonedDateTimeType.cs @@ -12,9 +12,9 @@ namespace HotChocolate.Types.NodaTime; /// public class ZonedDateTimeType : StringToStructBaseType { - private static readonly string formatString = "uuuu'-'MM'-'dd'T'HH':'mm':'ss' 'z' 'o"; + private static readonly string _formatString = "uuuu'-'MM'-'dd'T'HH':'mm':'ss' 'z' 'o"; private static readonly ZonedDateTimePattern _default = - ZonedDateTimePattern.CreateWithInvariantCulture(formatString, DateTimeZoneProviders.Tzdb); + ZonedDateTimePattern.CreateWithInvariantCulture(_formatString, DateTimeZoneProviders.Tzdb); private readonly IPattern[] _allowedPatterns; private readonly IPattern _serializationPattern; diff --git a/src/HotChocolate/Core/src/Types.OffsetPagination/QueryableOffsetPagination.cs b/src/HotChocolate/Core/src/Types.OffsetPagination/QueryableOffsetPagination.cs index b15a5358c11..45223f8c6bd 100644 --- a/src/HotChocolate/Core/src/Types.OffsetPagination/QueryableOffsetPagination.cs +++ b/src/HotChocolate/Core/src/Types.OffsetPagination/QueryableOffsetPagination.cs @@ -48,7 +48,7 @@ await Task.Run(() => list.Add(item); } - }) + }, cancellationToken) .ConfigureAwait(false); } diff --git a/src/HotChocolate/Core/src/Types.Scalars/PostalCodeType.cs b/src/HotChocolate/Core/src/Types.Scalars/PostalCodeType.cs index 0f650cec0bd..23b531c1b62 100644 --- a/src/HotChocolate/Core/src/Types.Scalars/PostalCodeType.cs +++ b/src/HotChocolate/Core/src/Types.Scalars/PostalCodeType.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Text.RegularExpressions; using HotChocolate.Language; using static HotChocolate.Types.RegexType; @@ -246,6 +247,7 @@ private static bool ValidatePostCode(string postCode) return false; } + [SuppressMessage("ReSharper", "InconsistentNaming")] private static class PostalCodePatterns { public const string US = diff --git a/src/HotChocolate/Core/src/Types.Shared/WellKnownTypes.cs b/src/HotChocolate/Core/src/Types.Shared/WellKnownTypes.cs index 1dad6f39c66..c9a033c33ac 100644 --- a/src/HotChocolate/Core/src/Types.Shared/WellKnownTypes.cs +++ b/src/HotChocolate/Core/src/Types.Shared/WellKnownTypes.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace HotChocolate.Utilities.Introspection; +[SuppressMessage("ReSharper", "InconsistentNaming")] internal static class WellKnownTypes { public const string __Directive = "__Directive"; @@ -15,4 +18,4 @@ internal static class WellKnownTypes public const string Float = "Float"; public const string ID = "ID"; public const string Int = "Int"; -} \ No newline at end of file +} diff --git a/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs b/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs index 49ecfff09fb..41811b66e2f 100644 --- a/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs +++ b/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs @@ -12,7 +12,7 @@ namespace HotChocolate.Configuration.Validation; /// internal sealed class DirectiveValidationRule : ISchemaValidationRule { - private const char _underscore = '_'; + private const char _prefixCharacter = '_'; public void Validate( ReadOnlySpan typeSystemObjects, @@ -41,8 +41,8 @@ private static void EnsureDirectiveNameIsValid( { var firstTwoLetters = type.Name.AsSpan().Slice(0, 2); - if (firstTwoLetters[0] == _underscore && - firstTwoLetters[1] == _underscore) + if (firstTwoLetters[0] == _prefixCharacter && + firstTwoLetters[1] == _prefixCharacter) { errors.Add(TwoUnderscoresNotAllowedOnDirectiveName(type)); } diff --git a/src/HotChocolate/Core/src/Types/Configuration/Validation/TypeValidationHelper.cs b/src/HotChocolate/Core/src/Types/Configuration/Validation/TypeValidationHelper.cs index e5722d0f851..175dc0999bf 100644 --- a/src/HotChocolate/Core/src/Types/Configuration/Validation/TypeValidationHelper.cs +++ b/src/HotChocolate/Core/src/Types/Configuration/Validation/TypeValidationHelper.cs @@ -10,7 +10,7 @@ namespace HotChocolate.Configuration.Validation; internal static class TypeValidationHelper { - private const char _underscore = '_'; + private const char _prefixCharacter = '_'; public static void EnsureTypeHasFields( IComplexOutputType type, @@ -287,8 +287,8 @@ private static bool StartsWithTwoUnderscores(string name) { var firstTwoLetters = name.AsSpan().Slice(0, 2); - if (firstTwoLetters[0] == _underscore && - firstTwoLetters[1] == _underscore) + if (firstTwoLetters[0] == _prefixCharacter && + firstTwoLetters[1] == _prefixCharacter) { return true; } diff --git a/src/HotChocolate/Core/src/Types/Types/EnumType.Initialization.cs b/src/HotChocolate/Core/src/Types/Types/EnumType.Initialization.cs index 06af38cbd3f..2ed128955fe 100644 --- a/src/HotChocolate/Core/src/Types/Types/EnumType.Initialization.cs +++ b/src/HotChocolate/Core/src/Types/Types/EnumType.Initialization.cs @@ -106,7 +106,9 @@ protected override void OnCompleteType( foreach (var enumValueDefinition in definition.Values) { if (enumValueDefinition.Ignore) + { continue; + } if (TryCreateEnumValue(context, enumValueDefinition, out var enumValue)) { diff --git a/src/HotChocolate/Core/src/Types/Types/Interceptors/FlagEnumTypeInterceptor.cs b/src/HotChocolate/Core/src/Types/Types/Interceptors/FlagEnumTypeInterceptor.cs index a8ffe2e5889..56fcc9aa206 100644 --- a/src/HotChocolate/Core/src/Types/Types/Interceptors/FlagEnumTypeInterceptor.cs +++ b/src/HotChocolate/Core/src/Types/Types/Interceptors/FlagEnumTypeInterceptor.cs @@ -15,7 +15,7 @@ namespace HotChocolate.Types.Interceptors; public class FlagsEnumInterceptor : TypeInterceptor { - private const string FlagNameAddition = "Flags"; + private const string _flagNameAddition = "Flags"; private readonly Dictionary _outputTypeCache = new(); private readonly Dictionary _inputTypeCache = new(); @@ -113,7 +113,7 @@ private string CreateObjectType(Type type) return outputType; } - var typeName = _namingConventions.GetTypeName(type) + FlagNameAddition; + var typeName = _namingConventions.GetTypeName(type) + _flagNameAddition; var desc = _namingConventions.GetTypeDescription(type, TypeKind.Enum); var objectTypeDefinition = new ObjectTypeDefinition(typeName, desc) { @@ -144,7 +144,7 @@ private RegisteredInputType CreateInputObjectType(Type type) return result; } - var typeName = $"{_namingConventions.GetTypeName(type)}{FlagNameAddition}Input"; + var typeName = $"{_namingConventions.GetTypeName(type)}{_flagNameAddition}Input"; var desc = _namingConventions.GetTypeDescription(type, TypeKind.Enum); var objectTypeDefinition = new InputObjectTypeDefinition(typeName, desc) { diff --git a/src/HotChocolate/Core/src/Types/Types/Scalars/Iso8601Duration.cs b/src/HotChocolate/Core/src/Types/Types/Scalars/Iso8601Duration.cs index 2261beda687..21a74123bb5 100644 --- a/src/HotChocolate/Core/src/Types/Types/Scalars/Iso8601Duration.cs +++ b/src/HotChocolate/Core/src/Types/Types/Scalars/Iso8601Duration.cs @@ -301,10 +301,14 @@ internal static bool TryParse(string s, out TimeSpan? result) } // Normalize to nanosecond intervals for (; numDigits > 9; numDigits--) + { value /= 10; + } for (; numDigits < 9; numDigits++) + { value *= 10; + } nanoseconds |= (uint)value; diff --git a/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs b/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs index d52eef6df8e..6d5a77abf10 100644 --- a/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs +++ b/src/HotChocolate/Core/test/Execution.Tests/Integration/DataLoader/DataLoaderTests.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -388,6 +389,7 @@ public class FooQueries await FooObject.Get(context, "hello", ct); } + [SuppressMessage("ReSharper", "InconsistentNaming")] [GraphQLName("Foo")] [Node] public class FooObject diff --git a/src/HotChocolate/Core/test/Execution.Tests/Integration/Spec/MutationTests.cs b/src/HotChocolate/Core/test/Execution.Tests/Integration/Spec/MutationTests.cs index 017cb496ae0..6d0224598b6 100644 --- a/src/HotChocolate/Core/test/Execution.Tests/Integration/Spec/MutationTests.cs +++ b/src/HotChocolate/Core/test/Execution.Tests/Integration/Spec/MutationTests.cs @@ -37,7 +37,7 @@ public async Task Ensure_Mutations_Are_Executed_Serially() public async Task Ensure_Mutations_Child_Fields_Are_Scoped_To_Its_Parent() { using var cts = new CancellationTokenSource(5_000); - + var result = await new ServiceCollection() .AddGraphQLServer() @@ -115,6 +115,7 @@ public class Mutation2 { private bool _a; private bool _b; + // ReSharper disable once InconsistentNaming internal readonly object _sync = new(); public bool IsExecutingA => _a; From 260672efa96d0ccbc2722be11101a0ff7606fa0b Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 12:08:40 +0200 Subject: [PATCH 15/89] Remove imports in tests --- .../AnnotationBased/CertificationTests.cs | 1 - .../CertificationSchema/CodeFirst/Types/User.cs | 2 -- .../ApolloFederation.Tests/Directives/KeyDirectiveTests.cs | 1 + .../test/ApolloFederation.Tests/EntitiesResolverTests.cs | 3 +-- .../test/ApolloFederation.Tests/EntityTypeTests.cs | 1 - .../ApolloFederation.Tests/FederationSchemaPrinterTests.cs | 1 - .../test/ApolloFederation.Tests/FederationTypesTestBase.cs | 1 - .../test/ApolloFederation.Tests/FieldSetTypeTests.cs | 1 - .../ReferenceResolverAttributeTests.cs | 7 +++---- .../test/ApolloFederation.Tests/ServiceTypeTests.cs | 1 - 10 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/CertificationTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/CertificationTests.cs index 210f81a7841..a4e785174f3 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/CertificationTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/CertificationTests.cs @@ -4,7 +4,6 @@ using HotChocolate.Execution.Processing; using HotChocolate.Language; using Snapshooter.Xunit; -using Xunit; namespace HotChocolate.ApolloFederation.CertificationSchema.AnnotationBased; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/User.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/User.cs index 1ad79c9f611..e15fb009f53 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/User.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/User.cs @@ -1,5 +1,3 @@ -using HotChocolate.Types.Relay; - namespace HotChocolate.ApolloFederation.CertificationSchema.CodeFirst.Types; public class User diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs index 88f685d70b9..f32d1a37442 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs @@ -194,6 +194,7 @@ public void AnnotateKeyToClassAttributesPureCodeFirst() public class Query { + // ReSharper disable once InconsistentNaming public T someField(int id) => default!; } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs index 586de6eb967..5ca0809ef9b 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs @@ -5,7 +5,6 @@ using GreenDonut; using HotChocolate.ApolloFederation.Helpers; using HotChocolate.Language; -using Xunit; using static HotChocolate.ApolloFederation.TestHelper; namespace HotChocolate.ApolloFederation; @@ -258,7 +257,7 @@ public static TypeWithReferenceResolver Get([LocalState] ObjectValueNode data) } } - [ExtendServiceType] + [Extends] public class ForeignType { public ForeignType(string id, string someExternalField) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs index 9e198cd1b67..a210ab4ee27 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs @@ -1,4 +1,3 @@ -using Xunit; using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs index 6db0f1a47e2..6140cd3d5ef 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs @@ -3,7 +3,6 @@ using HotChocolate.Types; using HotChocolate.Types.Descriptors; using Snapshooter.Xunit; -using Xunit; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs index c497a20ec7e..1c4c2d8abfe 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs @@ -1,6 +1,5 @@ using System; using HotChocolate.Types; -using Xunit; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs index e980004e98e..6e69749eb81 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs @@ -1,7 +1,6 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.Language; using HotChocolate.Types; -using Xunit; using static HotChocolate.Language.Utf8GraphQLParser; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs index 154f6932f4c..af8515c9f43 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs @@ -3,7 +3,6 @@ using HotChocolate.Language; using HotChocolate.Resolvers; using HotChocolate.Types; -using Xunit; using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; using static HotChocolate.ApolloFederation.TestHelper; @@ -274,7 +273,7 @@ public class InClassRefResolver public Task GetAsync([LocalState] ObjectValueNode data) { return Task.FromResult( - new InClassRefResolver() + new InClassRefResolver { Id = nameof(InClassRefResolver), }); @@ -344,7 +343,7 @@ public static Task SomeRenamedMethod( [LocalState] ObjectValueNode data) { return Task.FromResult( - new ExternalRefResolver() + new ExternalRefResolver { Id = nameof(ExternalRefResolverRenamedMethod), }); @@ -357,7 +356,7 @@ public static Task GetExternalReferenceResolverAsync( [LocalState] ObjectValueNode data) { return Task.FromResult( - new ExternalRefResolver() + new ExternalRefResolver { Id = nameof(ExternalRefResolver), }); diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs index 52e4fd93ed4..9e1fdffdb95 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs @@ -1,7 +1,6 @@ using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; using Snapshooter.Xunit; -using Xunit; using static HotChocolate.ApolloFederation.TestHelper; namespace HotChocolate.ApolloFederation; From a368ec6196ba8ce978b4d9af59fcac1a0e15bbdf Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 12:09:14 +0200 Subject: [PATCH 16/89] Add the few new errors --- .../src/ApolloFederation/ThrowHelper.cs | 51 ++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs index 2804e2a6f2a..5ebcff5898e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs @@ -103,8 +103,7 @@ public static SchemaException EntityResolver_NoResolverFound() => .Build()); /// - /// The key attribute is used on the type level without specifying the the - /// fieldset. + /// The key attribute is used on the type level without specifying the fieldset. /// public static SchemaException Key_FieldSet_CannotBeEmpty( Type type) => @@ -141,4 +140,52 @@ public static SchemaException Requires_FieldSet_CannotBeEmpty( // .SetCode(ErrorCodes.ApolloFederation.RequiresFieldSetNullOrEmpty) .SetExtension(nameof(member), member) .Build()); + + /// + /// The compose directive attribute is used on the type level without specifying the name. + /// + public static SchemaException ComposeDirective_Name_CannotBeEmpty( + Type type) => + new SchemaException( + SchemaErrorBuilder.New() + .SetMessage( + ThrowHelper_ComposeDirective_Name_CannotBeEmpty, + type.FullName ?? type.Name) + .Build()); + + /// + /// The link attribute is used on the schema without specifying the url. + /// + public static SchemaException Link_Url_CannotBeEmpty( + Type type) => + new SchemaException( + SchemaErrorBuilder.New() + .SetMessage( + ThrowHelper_Link_Url_CannotBeEmpty, + type.FullName ?? type.Name) + .Build()); + + /// + /// The contact attribute is used on the schema without specifying the name. + /// + public static SchemaException Contact_Name_CannotBeEmpty( + Type type) => + new SchemaException( + SchemaErrorBuilder.New() + .SetMessage( + ThrowHelper_Contact_Name_CannotBeEmpty, + type.FullName ?? type.Name) + .Build()); + + /// + /// Specified federation version is not supported. + /// + public static SchemaException FederationVersion_Unknown( + FederationVersion version) => + new SchemaException( + SchemaErrorBuilder.New() + .SetMessage( + ThrowHelper_FederationVersion_Unknown, + version) + .Build()); } From 0a4deb3f22ea539285404b337f3b2cdeed1e4df2 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 12:10:38 +0200 Subject: [PATCH 17/89] Resources designer regenerated --- .../FederationResources.Designer.cs | 296 +++++++++++++----- 1 file changed, 212 insertions(+), 84 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 1bbd18098fb..9f38a328547 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -11,32 +11,46 @@ namespace HotChocolate.ApolloFederation.Properties { using System; - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class FederationResources { - private static System.Resources.ResourceManager resourceMan; + private static global::System.Resources.ResourceManager resourceMan; - private static System.Globalization.CultureInfo resourceCulture; + private static global::System.Globalization.CultureInfo resourceCulture; - [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal FederationResources() { } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager { + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { get { - if (object.Equals(null, resourceMan)) { - System.Resources.ResourceManager temp = new System.Resources.ResourceManager("HotChocolate.ApolloFederation.Properties.FederationResources", typeof(FederationResources).Assembly); + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HotChocolate.ApolloFederation.Properties.FederationResources", typeof(FederationResources).Assembly); resourceMan = temp; } return resourceMan; } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture { + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -45,231 +59,345 @@ internal static System.Globalization.CultureInfo Culture { } } - internal static string AuthenticatedDirective_Description { + /// + /// Looks up a localized string similar to The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema.. + /// + internal static string Any_Description { get { - return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); + return ResourceManager.GetString("Any_Description", resourceCulture); } } - internal static string ContactDirective_Description { + /// + /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users.. + /// + internal static string AuthenticatedDirective_Description { get { - return ResourceManager.GetString("ContactDirective_Description", resourceCulture); + return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); } } + /// + /// Looks up a localized string similar to Marks underlying custom directive to be included in the Supergraph schema.. + /// internal static string ComposeDirective_Description { get { return ResourceManager.GetString("ComposeDirective_Description", resourceCulture); } } - internal static string ExtendsDirective_Description { + /// + /// Looks up a localized string similar to Provides contact information of the owner responsible for this subgraph schema.. + /// + internal static string ContactDirective_Description { get { - return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); + return ResourceManager.GetString("ContactDirective_Description", resourceCulture); } } - internal static string ExternalDirective_Description { + /// + /// Looks up a localized string similar to The EntityResolver must be a method. Please check if the EntityResolverAttribute is correctly set to a method.. + /// + internal static string EntityResolver_MustBeMethod { get { - return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); + return ResourceManager.GetString("EntityResolver_MustBeMethod", resourceCulture); } } - internal static string FieldsetType_Description { + /// + /// Looks up a localized string similar to Union of all types that key directive applied. This information is needed by the Apollo federation gateway.. + /// + internal static string EntityType_Description { get { - return ResourceManager.GetString("FieldsetType_Description", resourceCulture); + return ResourceManager.GetString("EntityType_Description", resourceCulture); } } - internal static string InaccessibleDirective_Description { + /// + /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ScopedContextData`.. + /// + internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue { get { - return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); + return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture); } } - internal static string InterfaceObjectDirective_Description { + /// + /// Looks up a localized string similar to Directive to indicate that marks target object as extending part of the federated schema.. + /// + internal static string ExtendsDirective_Description { get { - return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); + return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); } } - internal static string KeyDirective_Description { + /// + /// Looks up a localized string similar to Directive to indicate that a field is owned by another service, for example via Apollo federation.. + /// + internal static string ExternalDirective_Description { get { - return ResourceManager.GetString("KeyDirective_Description", resourceCulture); + return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); } } - internal static string OverrideDirective_Description { + /// + /// Looks up a localized string similar to Value cannot be null or empty.. + /// + internal static string FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - internal static string ProvidesDirective_Description { + /// + /// Looks up a localized string similar to Value cannot be null or empty.. + /// + internal static string FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty", resourceCulture); } } - internal static string RequiresDirective_Description { + /// + /// Looks up a localized string similar to Value cannot be null or empty.. + /// + internal static string FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - internal static string RequiresScopesDirective_Description { + /// + /// Looks up a localized string similar to Value cannot be null or empty.. + /// + internal static string FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - internal static string ScopeType_Description { + /// + /// Looks up a localized string similar to Scalar representing a set of fields.. + /// + internal static string FieldsetType_Description { get { - return ResourceManager.GetString("ScopeType_Description", resourceCulture); + return ResourceManager.GetString("FieldsetType_Description", resourceCulture); } } - internal static string ShareableDirective_Description { + /// + /// Looks up a localized string similar to Marks location within schema as inaccessible from the GraphQL Gateway. + /// + internal static string InaccessibleDirective_Description { get { - return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); + return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); } } - internal static string TagDirective_Description { + /// + /// Looks up a localized string similar to Provides meta information to the router that this entity type is an interface in the supergraph.. + /// + internal static string InterfaceObjectDirective_Description { get { - return ResourceManager.GetString("TagDirective_Description", resourceCulture); + return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); } } - internal static string EntityType_Description { + /// + /// Looks up a localized string similar to Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface.. + /// + internal static string KeyDirective_Description { get { - return ResourceManager.GetString("EntityType_Description", resourceCulture); + return ResourceManager.GetString("KeyDirective_Description", resourceCulture); } } - internal static string ThrowHelper_FieldSet_HasInvalidFormat { + /// + /// Looks up a localized string similar to Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another.. + /// + internal static string OverrideDirective_Description { get { - return ResourceManager.GetString("ThrowHelper_FieldSet_HasInvalidFormat", resourceCulture); + return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); } } - internal static string ThrowHelper_Scalar_CannotParseValue { + /// + /// Looks up a localized string similar to Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway.. + /// + internal static string ProvidesDirective_Description { get { - return ResourceManager.GetString("ThrowHelper_Scalar_CannotParseValue", resourceCulture); + return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); } } - internal static string ThrowHelper_Key_FieldSet_CannotBeEmpty { + /// + /// Looks up a localized string similar to Used to annotate the required input fieldset from a base type for a resolver.. + /// + internal static string RequiresDirective_Description { get { - return ResourceManager.GetString("ThrowHelper_Key_FieldSet_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); } } - internal static string ThrowHelper_Provides_FieldSet_CannotBeEmpty { + /// + /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes.. + /// + internal static string RequiresScopesDirective_Description { get { - return ResourceManager.GetString("ThrowHelper_Provides_FieldSet_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); } } - internal static string ThrowHelper_Requires_FieldSet_CannotBeEmpty { + /// + /// Looks up a localized string similar to The expression must refer to a method representing the reference resolver.. + /// + internal static string ResolveReference_MustBeMethod { get { - return ResourceManager.GetString("ThrowHelper_Requires_FieldSet_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("ResolveReference_MustBeMethod", resourceCulture); } } - internal static string ThrowHelper_ComposeDirective_Name_CannotBeEmpty { + /// + /// Looks up a localized string similar to Scalar representing a JWT scope. + /// + internal static string ScopeType_Description { get { - return ResourceManager.GetString("ThrowHelper_ComposeDirective_Name_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("ScopeType_Description", resourceCulture); } } - internal static string ThrowHelper_Link_Url_CannotBeEmpty { + /// + /// Looks up a localized string similar to This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec.. + /// + internal static string ServiceType_Description { get { - return ResourceManager.GetString("ThrowHelper_Link_Url_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("ServiceType_Description", resourceCulture); } } - internal static string ThrowHelper_Contact_Name_CannotBeEmpty { + /// + /// Looks up a localized string similar to Indicates that given object and/or field can be resolved by multiple subgraphs.. + /// + internal static string ShareableDirective_Description { get { - return ResourceManager.GetString("ThrowHelper_Contact_Name_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); } } - internal static string ThrowHelper_FederationVersion_Unknown { + /// + /// Looks up a localized string similar to Allows users to annotate fields and types with additional metadata information.. + /// + internal static string TagDirective_Description { get { - return ResourceManager.GetString("ThrowHelper_FederationVersion_Unknown", resourceCulture); + return ResourceManager.GetString("TagDirective_Description", resourceCulture); } } - internal static string FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty { + /// + /// Looks up a localized string similar to The given any representation has an invalid format.. + /// + internal static string ThrowHelper_Any_HasInvalidFormat { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Any_HasInvalidFormat", resourceCulture); } } - internal static string FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty { + /// + /// Looks up a localized string similar to The compose directive attribute is used on `{0}` without specifying the name.. + /// + internal static string ThrowHelper_ComposeDirective_Name_CannotBeEmpty { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("ThrowHelper_ComposeDirective_Name_CannotBeEmpty", resourceCulture); } } - internal static string FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty { + /// + /// Looks up a localized string similar to The contact attribute is used on `{0}` without specifying the name.. + /// + internal static string ThrowHelper_Contact_Name_CannotBeEmpty { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Contact_Name_CannotBeEmpty", resourceCulture); } } - internal static string FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty { + /// + /// Looks up a localized string similar to The apollo gateway tries to resolve an entity for which no EntityResolver method was found.. + /// + internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("ThrowHelper_EntityResolver_NoEntityResolverFound", resourceCulture); } } + /// + /// Looks up a localized string similar to The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least on entity.. + /// internal static string ThrowHelper_EntityType_NoEntities { get { return ResourceManager.GetString("ThrowHelper_EntityType_NoEntities", resourceCulture); } } - internal static string ServiceType_Description { + /// + /// Looks up a localized string similar to Specified federation version `{0}` is not supported.. + /// + internal static string ThrowHelper_FederationVersion_Unknown { get { - return ResourceManager.GetString("ServiceType_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_FederationVersion_Unknown", resourceCulture); } } - internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { + /// + /// Looks up a localized string similar to The fieldset has an invalid format.. + /// + internal static string ThrowHelper_FieldSet_HasInvalidFormat { get { - return ResourceManager.GetString("ThrowHelper_EntityResolver_NoEntityResolverFound", resourceCulture); + return ResourceManager.GetString("ThrowHelper_FieldSet_HasInvalidFormat", resourceCulture); } } - internal static string EntityResolver_MustBeMethod { + /// + /// Looks up a localized string similar to The key attribute is used on `{0}` without specifying the field set.. + /// + internal static string ThrowHelper_Key_FieldSet_CannotBeEmpty { get { - return ResourceManager.GetString("EntityResolver_MustBeMethod", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Key_FieldSet_CannotBeEmpty", resourceCulture); } } - internal static string ThrowHelper_Any_HasInvalidFormat { + /// + /// Looks up a localized string similar to The link attribute is used on `{0}` without specifying the url.. + /// + internal static string ThrowHelper_Link_Url_CannotBeEmpty { get { - return ResourceManager.GetString("ThrowHelper_Any_HasInvalidFormat", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Link_Url_CannotBeEmpty", resourceCulture); } } - internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue { + /// + /// Looks up a localized string similar to FieldSet is null or empty on type. + /// + internal static string ThrowHelper_Provides_FieldSet_CannotBeEmpty { get { - return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Provides_FieldSet_CannotBeEmpty", resourceCulture); } } - internal static string Any_Description { + /// + /// Looks up a localized string similar to FieldSet is null or empty on type. + /// + internal static string ThrowHelper_Requires_FieldSet_CannotBeEmpty { get { - return ResourceManager.GetString("Any_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Requires_FieldSet_CannotBeEmpty", resourceCulture); } } - internal static string ResolveReference_MustBeMethod { + /// + /// Looks up a localized string similar to {0} cannot parse the given value of type `{1}`. + /// + internal static string ThrowHelper_Scalar_CannotParseValue { get { - return ResourceManager.GetString("ResolveReference_MustBeMethod", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Scalar_CannotParseValue", resourceCulture); } } } From 1483a0fa3d45a526a7e9416b5212406b5b90ff78 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 12:51:17 +0200 Subject: [PATCH 18/89] Add virtual method into ScopedStateParameterExpressionBuilder, cache reflection in statics --- .../LocalStateParameterExpressionBuilder.cs | 19 +++++++---- .../ScopedStateParameterExpressionBuilder.cs | 34 ++++++++++++++----- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/LocalStateParameterExpressionBuilder.cs b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/LocalStateParameterExpressionBuilder.cs index 93752c90718..80d8f0bed91 100644 --- a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/LocalStateParameterExpressionBuilder.cs +++ b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/LocalStateParameterExpressionBuilder.cs @@ -6,19 +6,26 @@ namespace HotChocolate.Resolvers.Expressions.Parameters; -internal sealed class LocalStateParameterExpressionBuilder +internal class LocalStateParameterExpressionBuilder : ScopedStateParameterExpressionBuilder { public override ArgumentKind Kind => ArgumentKind.LocalState; - protected override PropertyInfo ContextDataProperty { get; } = + private static readonly PropertyInfo _localContextDataProperty = ContextType.GetProperty(nameof(IResolverContext.LocalContextData))!; - protected override MethodInfo SetStateMethod { get; } = - typeof(ExpressionHelper).GetMethod(nameof(ExpressionHelper.SetLocalState))!; + protected override PropertyInfo ContextDataProperty => _localContextDataProperty; - protected override MethodInfo SetStateGenericMethod { get; } = - typeof(ExpressionHelper).GetMethod(nameof(ExpressionHelper.SetLocalStateGeneric))!; + private static readonly MethodInfo _setLocalState = + typeof(ExpressionHelper).GetMethod( + nameof(ExpressionHelper.SetLocalState))!; + private static readonly MethodInfo _setLocalStateGeneric = + typeof(ExpressionHelper).GetMethod( + nameof(ExpressionHelper.SetLocalStateGeneric))!; + + protected override MethodInfo SetStateMethod => _setLocalState; + + protected override MethodInfo SetStateGenericMethod => _setLocalStateGeneric; public override bool CanHandle(ParameterInfo parameter) => parameter.IsDefined(typeof(LocalStateAttribute)); diff --git a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs index fa2d86ea8e4..a5d3ba79a85 100644 --- a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs +++ b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs @@ -18,17 +18,21 @@ internal class ScopedStateParameterExpressionBuilder : IParameterExpressionBuild private static readonly MethodInfo _getScopedStateWithDefault = typeof(ExpressionHelper).GetMethod( nameof(ExpressionHelper.GetScopedStateWithDefault))!; + private static readonly MethodInfo _setScopedState = + typeof(ExpressionHelper).GetMethod( + nameof(ExpressionHelper.SetScopedState))!; + private static readonly MethodInfo _setScopedStateGeneric = + typeof(ExpressionHelper).GetMethod( + nameof(ExpressionHelper.SetScopedStateGeneric))!; - protected virtual PropertyInfo ContextDataProperty { get; } = + private static readonly PropertyInfo _contextDataProperty = ContextType.GetProperty(nameof(IResolverContext.ScopedContextData))!; - protected virtual MethodInfo SetStateMethod { get; } = - typeof(ExpressionHelper) - .GetMethod(nameof(ExpressionHelper.SetScopedState))!; + protected virtual PropertyInfo ContextDataProperty => _contextDataProperty; + + protected virtual MethodInfo SetStateMethod => _setScopedState; - protected virtual MethodInfo SetStateGenericMethod { get; } = - typeof(ExpressionHelper) - .GetMethod(nameof(ExpressionHelper.SetScopedStateGeneric))!; + protected virtual MethodInfo SetStateGenericMethod => _setScopedStateGeneric; public virtual ArgumentKind Kind => ArgumentKind.ScopedState; @@ -103,7 +107,21 @@ protected Expression BuildGetter( contextData, key, Expression.Constant( - new NullableHelper(targetType).GetFlags(parameter).FirstOrDefault() ?? false, + ResolveDefaultIfNotExistsParameterValue(targetType, parameter), typeof(bool))); } + + protected virtual bool ResolveDefaultIfNotExistsParameterValue( + Type? targetType, + ParameterInfo parameter) + { + var helper = new NullableHelper(targetType); + var nullabilityFlags = helper.GetFlags(parameter); + if (nullabilityFlags.Length > 0 && + nullabilityFlags[0] is { } f) + { + return f; + } + return false; + } } From 04ce6110b5ec283ff8f49e106887c77c9915db94 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 12:51:41 +0200 Subject: [PATCH 19/89] Refactor ReferenceResolverArgumentExpressionBuilder properly --- ...erenceResolverArgumentExpressionBuilder.cs | 87 +++++++++---------- 1 file changed, 40 insertions(+), 47 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs index fdeebcf9e19..9fe03182638 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs @@ -3,74 +3,67 @@ using System.Reflection; using HotChocolate.Internal; using HotChocolate.Language; -using HotChocolate.Resolvers; -using HotChocolate.Resolvers.Expressions; using HotChocolate.Resolvers.Expressions.Parameters; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; -using static HotChocolate.Resolvers.Expressions.Parameters.ParameterExpressionBuilderHelpers; +using ApolloContextData = HotChocolate.ApolloFederation.Constants.WellKnownContextData; namespace HotChocolate.ApolloFederation.Helpers; -internal sealed class ReferenceResolverArgumentExpressionBuilder - : ScopedStateParameterExpressionBuilder +internal sealed class ReferenceResolverArgumentExpressionBuilder : + LocalStateParameterExpressionBuilder { private readonly MethodInfo _getValue = typeof(ArgumentParser).GetMethod( nameof(ArgumentParser.GetValue), BindingFlags.Static | BindingFlags.Public)!; - public override ArgumentKind Kind => ArgumentKind.LocalState; - - protected override PropertyInfo ContextDataProperty { get; } = - ContextType.GetProperty(nameof(IResolverContext.LocalContextData))!; - - protected override MethodInfo SetStateMethod { get; } = - typeof(ExpressionHelper).GetMethod(nameof(ExpressionHelper.SetLocalState))!; - - protected override MethodInfo SetStateGenericMethod { get; } = - typeof(ExpressionHelper).GetMethod(nameof(ExpressionHelper.SetLocalStateGeneric))!; - - public override bool IsDefaultHandler => true; - - public IReadOnlyList Required { get; private set; } = Array.Empty(); - - public override bool CanHandle(ParameterInfo parameter) => true; - - protected override string GetKey(ParameterInfo parameter) => DataField; - public override Expression Build(ParameterExpressionBuilderContext context) { var param = context.Parameter; - var path = Expression.Constant(GetPath(param), typeof(string[])); - var dataKey = Expression.Constant(DataField, typeof(string)); - var typeKey = Expression.Constant(TypeField, typeof(string)); - var value = BuildGetter(param, dataKey, context.ResolverContext, typeof(IValueNode)); - var objectType = BuildGetter(param, typeKey, context.ResolverContext, typeof(ObjectType)); + var path = Expression.Constant( + RequirePathAndGetSeparatedPath(param), + typeof(string[])); + var dataKey = Expression.Constant( + ApolloContextData.DataField, + typeof(string)); + var typeKey = Expression.Constant( + ApolloContextData.TypeField, + typeof(string)); + var value = BuildGetter( + param, + dataKey, + context.ResolverContext, + typeof(IValueNode)); + var objectType = BuildGetter( + param, + typeKey, + context.ResolverContext, + typeof(ObjectType)); var getValueMethod = _getValue.MakeGenericMethod(param.ParameterType); - Expression getValue = Expression.Call(getValueMethod, value, objectType, path); + var getValue = Expression.Call( + getValueMethod, + value, + objectType, + path); return getValue; } - private string[] GetPath(ParameterInfo parameter) + private string[] RequirePathAndGetSeparatedPath(ParameterInfo parameter) { var path = parameter.GetCustomAttribute() is { } attr - ? attr.Path.Split('.') - : new[] { parameter.Name! }; + ? attr.Path.Split('.') + : new[] { parameter.Name! }; - if (Required.Count == 0) - { - Required = new[] { path }; - } - else if (Required.Count == 1) - { - var required = new List(Required) { path }; - Required = required; - } - else if (Required is List list) - { - list.Add(path); - } + _requiredPaths.Add(path); return path; } + + private readonly List _requiredPaths = new(); + public IReadOnlyList Required => _requiredPaths; + + protected override bool ResolveDefaultIfNotExistsParameterValue( + Type? targetType, + ParameterInfo parameter) + => false; + } From 2e1871a7bc32d6f5a53a4e3247f135302ba51a5e Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 13:22:34 +0200 Subject: [PATCH 20/89] Fix initialization of version values --- .../FederationVersioning/FederationUtils.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs index 06b14ca84fd..6f0943711e7 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs @@ -47,8 +47,8 @@ internal sealed class FederationUtils { private const string _federationSpecBaseUrl = "https://specs.apollo.dev/federation/v"; - private static FederationVersionValues> _imports; - private static FederationVersionValues _urls; + private static readonly FederationVersionValues> _imports; + private static readonly FederationVersionValues _urls; private static FederationVersionValues CreateFederationValues() { @@ -90,10 +90,12 @@ static FederationUtils() Debug.Assert(_imports.AllSet); + _urls = CreateFederationValues(); for (FederationVersion i = 0; i < FederationVersion.Count; i++) { - _urls[i] = _federationSpecBaseUrl + "2." + (int)i; + _urls[i] = $"{_federationSpecBaseUrl}2.{(int)i}"; } + Debug.Assert(_urls.AllSet); } From b4fc2b091ad882d228b11e90e9712c4c6d0fe358 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 14:29:43 +0200 Subject: [PATCH 21/89] Fix typo in comment --- .../ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs index ad38d811cb1..c5bca71b144 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs @@ -11,7 +11,7 @@ namespace HotChocolate.ApolloFederation.Helpers; /// -/// This class contains helpers to genereate external field setters. +/// This class contains helpers to generate external field setters. /// internal static class ExternalSetterExpressionHelper { From 73e52ef5398abb180bee1d2a17e3bbd19c3d83de Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 14:37:29 +0200 Subject: [PATCH 22/89] Make maxDepth a const --- .../Core/src/Types/Types/Extensions/TypeExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HotChocolate/Core/src/Types/Types/Extensions/TypeExtensions.cs b/src/HotChocolate/Core/src/Types/Types/Extensions/TypeExtensions.cs index 0a50f690226..4cc073bcb97 100644 --- a/src/HotChocolate/Core/src/Types/Types/Extensions/TypeExtensions.cs +++ b/src/HotChocolate/Core/src/Types/Types/Extensions/TypeExtensions.cs @@ -476,7 +476,8 @@ public static INamedType NamedType(this IType type) return (INamedType) current; } - for (var i = 0; i < 6; i++) + const int maxDepth = 6; + for (var i = 0; i < maxDepth; i++) { current = current.InnerType(); From d65f5327448af47a0423976b7af2470a0172fdf0 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 14:38:04 +0200 Subject: [PATCH 23/89] The type should not be nullable in the new method --- .../Helpers/ReferenceResolverArgumentExpressionBuilder.cs | 2 +- .../Parameters/ScopedStateParameterExpressionBuilder.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs index 9fe03182638..0b7472f53e8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs @@ -62,7 +62,7 @@ private string[] RequirePathAndGetSeparatedPath(ParameterInfo parameter) public IReadOnlyList Required => _requiredPaths; protected override bool ResolveDefaultIfNotExistsParameterValue( - Type? targetType, + Type targetType, ParameterInfo parameter) => false; diff --git a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs index a5d3ba79a85..bd09df904a9 100644 --- a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs +++ b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ScopedStateParameterExpressionBuilder.cs @@ -112,7 +112,7 @@ protected Expression BuildGetter( } protected virtual bool ResolveDefaultIfNotExistsParameterValue( - Type? targetType, + Type targetType, ParameterInfo parameter) { var helper = new NullableHelper(targetType); From 207240867c0c989d4ba405c5ae3615b14974e370 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 14:38:39 +0200 Subject: [PATCH 24/89] Fix / clarify interceptor --- .../FederationTypeInterceptor.cs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index e1eb918dd60..4c75af78035 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -105,8 +105,8 @@ private void CompleteExternalFieldSetters(ObjectType type, ObjectTypeDefinition private void CompleteReferenceResolver(ObjectTypeDefinition typeDef) { - if (!typeDef.GetContextData().TryGetValue(EntityResolver, out var value) || - value is not IReadOnlyList resolvers) + if (!typeDef.GetContextData().TryGetValue(EntityResolver, out var resolversObject) || + resolversObject is not IReadOnlyList resolvers) { return; } @@ -179,8 +179,7 @@ private void AddServiceTypeToQueryType( c.Schema, c.ArgumentValue>( WellKnownArgumentNames.Representations), - c - )); + c)); objectTypeDefinition.Fields.Add(entitiesFieldDescriptor.CreateDefinition()); } @@ -207,7 +206,7 @@ private void ApplyMethodLevelReferenceResolvers( { if (attribute is ReferenceResolverAttribute casted) { - casted.Configure(_context, descriptor, possibleReferenceResolver); + casted.TryConfigure(_context, descriptor, possibleReferenceResolver); } } } @@ -290,7 +289,7 @@ private void ApplyFederationDirectives(DefinitionBase? definition) private void ApplyEnumDirectives(EnumTypeDefinition enumTypeDefinition) { - var requiresScopes = new List>(); + var requiredScopes = new List>(); var descriptor = EnumTypeDescriptor.From(_context, enumTypeDefinition); foreach (var attribute in enumTypeDefinition.RuntimeType.GetCustomAttributes(true)) { @@ -313,16 +312,19 @@ private void ApplyEnumDirectives(EnumTypeDefinition enumTypeDefinition) } case RequiresScopesAttribute scopes: { - requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); + var addedScopes = scopes.Scopes + .Select(scope => new Scope(scope)) + .ToList(); + requiredScopes.Add(addedScopes); break; } default: break; } } - if (requiresScopes.Count > 0) + if (requiredScopes.Count > 0) { - descriptor.RequiresScopes(requiresScopes); + descriptor.RequiresScopes(requiredScopes); } } From 83ac7b1a6a3e86aa06242fadbaa089bb2e6359db Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 22:44:06 +0200 Subject: [PATCH 25/89] Attributes --- .../Configuration/Attributes/KeyAttribute.cs | 4 + .../Attributes/ReferenceResolverAttribute.cs | 76 ++++++++++++++++++- 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs index c4625ba4572..d05b89c6eef 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs @@ -34,6 +34,10 @@ namespace HotChocolate.ApolloFederation; /// /// /// +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Property + AllowMultiple = true)] public sealed class KeyAttribute : DescriptorAttribute { /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs index c2c9eebb219..f7444142df3 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs @@ -1,6 +1,7 @@ using System.Reflection; using HotChocolate.ApolloFederation.Descriptors; using HotChocolate.Types.Descriptors; +using static HotChocolate.ApolloFederation.ThrowHelper; namespace HotChocolate.ApolloFederation; @@ -8,10 +9,79 @@ namespace HotChocolate.ApolloFederation; /// The reference resolver enables your gateway's query planner to resolve a particular /// entity by whatever unique identifier your other subgraphs use to reference it. /// -[AttributeUsage(AttributeTargets.Method)] -public class ReferenceResolverAttribute : Attribute +[AttributeUsage( + AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method, + AllowMultiple = true)] +public class ReferenceResolverAttribute : DescriptorAttribute { - public void Configure(IDescriptorContext context, IObjectTypeDescriptor descriptor, MethodInfo method) + public string? EntityResolver { get; set; } + + public Type? EntityResolverType { get; set; } + + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + if (descriptor is IObjectTypeDescriptor objectTypeDescriptor) + { + switch (element) + { + case Type type: + OnConfigure(objectTypeDescriptor, type); + break; + + case MethodInfo method: + OnConfigure(objectTypeDescriptor, method); + break; + } + } + } + + private void OnConfigure(IObjectTypeDescriptor descriptor, Type type) + { + var entityResolverDescriptor = new EntityResolverDescriptor(descriptor); + + if (EntityResolverType is not null) + { + if (EntityResolver is not null) + { + var method = EntityResolverType.GetMethod(EntityResolver); + + if (method is null) + { + throw ReferenceResolverAttribute_EntityResolverNotFound( + EntityResolverType, + EntityResolver); + } + + entityResolverDescriptor.ResolveReferenceWith(method); + } + else + { + entityResolverDescriptor.ResolveReferenceWith(EntityResolverType); + } + } + else if (EntityResolver is not null) + { + var method = type.GetMethod(EntityResolver); + + if (method is null) + { + throw ReferenceResolverAttribute_EntityResolverNotFound( + type, + EntityResolver); + } + + entityResolverDescriptor.ResolveReferenceWith(method); + } + else + { + entityResolverDescriptor.ResolveReferenceWith(type); + } + } + + private void OnConfigure(IObjectTypeDescriptor descriptor, MethodInfo method) { var entityResolverDescriptor = new EntityResolverDescriptor(descriptor); entityResolverDescriptor.ResolveReferenceWith(method); From efc589ed244d7d3067b9d9e31767fa8e49a65db2 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 22:44:34 +0200 Subject: [PATCH 26/89] Restore descriptor overloads --- .../Descriptors/EntityResolverDescriptor.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs index 67b76c1d7e4..4d92f047fd0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs @@ -63,6 +63,11 @@ private void OnCompleteDefinition(ObjectTypeDefinition definition) } } + /// + public IObjectTypeDescriptor ResolveReference( + FieldResolverDelegate fieldResolver) + => ResolveReference(fieldResolver, Array.Empty()); + /// public IObjectTypeDescriptor ResolveReferenceWith( Expression> method) @@ -109,6 +114,17 @@ public IObjectTypeDescriptor ResolveReferenceWith(MethodInfo method) return ResolveReference(resolver.Resolver!, argumentBuilder.Required); } + /// + public IObjectTypeDescriptor ResolveReferenceWith() + => ResolveReferenceWith(typeof(TResolver)); + + /// + public IObjectTypeDescriptor ResolveReferenceWith(Type type) + => ResolveReferenceWith( + Context.TypeInspector.GetNodeResolverMethod( + Definition.EntityType ?? type, + type)!); + private IObjectTypeDescriptor ResolveReference( FieldResolverDelegate fieldResolver, IReadOnlyList required) From 3625f0d58b3dc74b6dd505cc18cf8ec48d83644a Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 22:45:05 +0200 Subject: [PATCH 27/89] Fix descriptor extensions --- .../Extensions/ApolloFederationDescriptorExtensions.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 7fe61ff9dea..38021e78e0b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -21,11 +21,10 @@ public static partial class ApolloFederationDescriptorExtensions /// Subgraph Contact Information /// for additional details. /// - /// + /// /// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ /// query: Query /// } - /// /// /// /// @@ -399,7 +398,7 @@ public static IInterfaceTypeDescriptor Key( public static ISchemaTypeDescriptor Link( this ISchemaTypeDescriptor descriptor, string url, - string?[]? import) + string[]? import) { if (descriptor is null) { From 47c53e3ebce724a27644e39eaa9360ee128abe4d Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Fri, 8 Dec 2023 22:48:16 +0200 Subject: [PATCH 28/89] Insert braces to scope locals --- .../src/ApolloFederation/Helpers/ArgumentParser.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ArgumentParser.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ArgumentParser.cs index 1331d199419..f5a6994343a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ArgumentParser.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ArgumentParser.cs @@ -35,6 +35,7 @@ private static bool TryGetValue( switch (valueNode.Kind) { case SyntaxKind.ObjectValue: + { var current = path[i]; if (type is not IComplexOutputType complexType || @@ -56,15 +57,17 @@ private static bool TryGetValue( } } break; - + } case SyntaxKind.NullValue: - value = default(T); + { + value = default; return true; - + } case SyntaxKind.StringValue: case SyntaxKind.IntValue: case SyntaxKind.FloatValue: case SyntaxKind.BooleanValue: + { if (type.NamedType() is not ScalarType scalarType) { break; @@ -72,8 +75,10 @@ private static bool TryGetValue( value = (T)scalarType.ParseLiteral(valueNode)!; return true; + } case SyntaxKind.EnumValue: + { if (type.NamedType() is not EnumType enumType) { break; @@ -81,6 +86,7 @@ private static bool TryGetValue( value = (T)enumType.ParseLiteral(valueNode)!; return true; + } } value = default; @@ -117,6 +123,7 @@ private static bool Matches(IValueNode valueNode, string[] path, int i) switch (valueNode.Kind) { case SyntaxKind.ObjectValue: + { var current = path[i]; foreach (var fieldValue in ((ObjectValueNode)valueNode).Fields) @@ -131,6 +138,7 @@ private static bool Matches(IValueNode valueNode, string[] path, int i) } } break; + } case SyntaxKind.NullValue: case SyntaxKind.StringValue: From fe724d1dee9d2c0de1e15d58c5278290024fdfdc Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Sat, 9 Dec 2023 13:09:30 +0200 Subject: [PATCH 29/89] Fix V1 code --- .../Configuration/Attributes/KeyAttribute.cs | 2 +- .../Configuration/Attributes/LinkAttribute.cs | 9 ++++++--- .../Configuration/Directives/ProvidesDirectiveType.cs | 2 +- .../Configuration/Directives/RequiresDirectiveType.cs | 2 +- .../Configuration/ObjectTypes/FieldSetType.cs | 2 +- .../FederationVersioning/FederatedSchema.cs | 4 ++-- .../Data/test/Data.Projections.Tests/IntegrationTests.cs | 6 +++++- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs index d05b89c6eef..c188fdc241c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs @@ -36,7 +36,7 @@ namespace HotChocolate.ApolloFederation; /// [AttributeUsage( AttributeTargets.Class | - AttributeTargets.Property + AttributeTargets.Property, AllowMultiple = true)] public sealed class KeyAttribute : DescriptorAttribute { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs index 17c8d835dec..7db21bf1d64 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs @@ -56,7 +56,7 @@ public LinkAttribute(string url) /// /// Optional list of imported elements. /// - public LinkAttribute(string url, string?[]? import) + public LinkAttribute(string url, string[]? import) { Url = url; Import = import; @@ -70,9 +70,12 @@ public LinkAttribute(string url, string?[]? import) /// /// Gets optional list of imported element names. /// - public string?[]? Import { get; } + public string[]? Import { get; } - public override void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type) + public override void OnConfigure( + IDescriptorContext context, + ISchemaTypeDescriptor descriptor, + Type type) { if (string.IsNullOrEmpty(Url)) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs index 5d7488a49cf..01c52685c87 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs @@ -37,5 +37,5 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) .Name(WellKnownTypeNames.Provides) .Description(FederationResources.ProvidesDirective_Description) .Location(DirectiveLocation.FieldDefinition) - .FieldsArgumentV1(); + .FieldsArgument(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs index 616eb6c9a1d..a69ec16f437 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs @@ -30,5 +30,5 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) .Name(WellKnownTypeNames.Requires) .Description(FederationResources.RequiresDirective_Description) .Location(DirectiveLocation.FieldDefinition) - .FieldsArgumentV1(); + .FieldsArgument(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs index 25fb5cca2fb..b437c896633 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs @@ -47,7 +47,7 @@ protected override SelectionSetNode ParseLiteral(StringValueNode valueSyntax) } catch (SyntaxException) { - throw FieldSetV1_InvalidFormat(this); + throw FieldSet_InvalidFormat(this); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs index 6d073d68247..578cf2cf449 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs @@ -7,7 +7,7 @@ namespace HotChocolate.ApolloFederation; /// /// Apollo Federation base schema object that allows users to apply custom schema directives (e.g. @composeDirective) /// -public sealed class FederatedSchema : Schema +public abstract class FederatedSchema : Schema { /// /// Initializes new instance of @@ -15,7 +15,7 @@ public sealed class FederatedSchema : Schema /// /// Supported Apollo Federation version /// - public FederatedSchema(FederationVersion version = FederationVersion.Latest) + protected FederatedSchema(FederationVersion version = FederationVersion.Latest) { FederationVersion = version; } diff --git a/src/HotChocolate/Data/test/Data.Projections.Tests/IntegrationTests.cs b/src/HotChocolate/Data/test/Data.Projections.Tests/IntegrationTests.cs index cbc7f84922d..111a2dcf01d 100644 --- a/src/HotChocolate/Data/test/Data.Projections.Tests/IntegrationTests.cs +++ b/src/HotChocolate/Data/test/Data.Projections.Tests/IntegrationTests.cs @@ -486,7 +486,11 @@ public IQueryable ModifySingleOrDefault() [UseProjection] public IQueryable CreateRecord(bool throwError) { - if (throwError) throw new AnError("this is only a test"); + if (throwError) + { + throw new AnError("this is only a test"); + } + return new Foo[] { new() { Bar = "A" }, new() { Bar = "B" } }.AsQueryable(); } From 323db7cd294f42771445053efbcc123035416635 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Sat, 9 Dec 2023 14:43:15 +0200 Subject: [PATCH 30/89] sealing classes in tests --- .../ApolloFederation.Tests/EntityTypeTests.cs | 70 +++++++++---------- .../FederationSchemaPrinterTests.cs | 29 ++++---- .../FederationTypesTestBase.cs | 2 +- .../FieldSetTypeTests.cs | 15 ++-- .../ReferenceResolverAttributeTests.cs | 30 ++++---- 5 files changed, 74 insertions(+), 72 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs index a210ab4ee27..fe01b3e01af 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs @@ -11,23 +11,22 @@ public void TestEntityTypeSchemaFirstSingleKey() var schema = SchemaBuilder.New() .AddApolloFederation() .AddDocumentFromString( - @" - type Query { - user(a: Int!): User - } - - type Review @key(fields: ""id"") { - id: Int! - author: User - } - - type User @key(fields: ""id"") { - id: Int! - idCode: String! - reviews: [Review!]! - } - " - ) + """ + type Query { + user(a: Int!): User + } + + type Review @key(fields: "id") { + id: Int! + author: User + } + + type User @key(fields: "id") { + id: Int! + idCode: String! + reviews: [Review!]! + } + """) .Use(_ => _ => default) .Create(); @@ -47,17 +46,16 @@ public void TestEntityTypeSchemaFirstMultiKey() var schema = SchemaBuilder.New() .AddApolloFederation() .AddDocumentFromString( - @" - type Query { - user(a: Int!): User - } - - type User @key(fields: ""id idCode"") { - id: Int! - idCode: String! - } - " - ) + """ + type Query { + user(a: Int!): User + } + + type User @key(fields: "id idCode") { + id: Int! + idCode: String! + } + """) .Use(_ => _ => default) .Create(); @@ -75,7 +73,7 @@ public void TestEntityTypeSchemaFirstNestedKey() var schema = SchemaBuilder.New() .AddApolloFederation() .AddDocumentFromString( - @" + """ type Query { user(a: Int!): User } @@ -88,7 +86,7 @@ type User @key(fields: ""id address { matchCode }"") { type Address { matchCode: String! } - ") + """) .Use(_ => _ => default) .Create(); @@ -186,20 +184,20 @@ public void TestEntityTypeCodeFirstClassKeyAttributeNestedKey() } } -public class Query +public sealed class Query { public T GetEntity(int id) => default!; } [Key("id idCode")] -public class UserWithClassAttribute +public sealed class UserWithClassAttribute { public int Id { get; set; } public string IdCode { get; set; } = default!; public Review[] Reviews { get; set; } = default!; } -public class UserWithPropertyAttributes +public sealed class UserWithPropertyAttributes { [Key] public int Id { get; set; } @@ -208,19 +206,19 @@ public class UserWithPropertyAttributes } [Key("id address { matchCode }")] -public class UserWithNestedKeyClassAttribute +public sealed class UserWithNestedKeyClassAttribute { public int Id { get; set; } public Address Address { get; set; } = default!; } -public class Address +public sealed class Address { public string MatchCode { get; set; } = default!; } [Key("id")] -public class Review +public sealed class Review { public int Id { get; set; } } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs index 6140cd3d5ef..436190dfa9d 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs @@ -26,15 +26,16 @@ public void TestFederationPrinterApolloDirectivesSchemaFirst() // arrange var schema = SchemaBuilder.New() .AddApolloFederation() - .AddDocumentFromString( - @"type TestType @key(fields: ""id"") { + .AddDocumentFromString(""" + type TestType @key(fields: ""id"") { id: Int! name: String! } type Query { someField(a: Int): TestType - }") + } + """) .Use(_ => _ => default) .Create(); @@ -49,7 +50,7 @@ public void TestFederationPrinterSchemaFirst() // arrange var schema = SchemaBuilder.New() .AddApolloFederation() - .AddDocumentFromString(@" + .AddDocumentFromString(""" type TestType @key(fields: ""id"") { id: Int! name: String! @@ -89,7 +90,7 @@ type Query implements iQuery { interface iQuery { someField(a: Int): TestType } - ") + """) .Use(_ => _ => default) .Create(); @@ -104,7 +105,7 @@ public void TestFederationPrinterSchemaFirst_With_DateTime() // arrange var schema = SchemaBuilder.New() .AddApolloFederation() - .AddDocumentFromString(@" + .AddDocumentFromString(""" type TestType @key(fields: ""id"") { id: Int! name: String! @@ -147,7 +148,7 @@ interface iQuery { } scalar DateTime - ") + """) .Use(_ => _ => default) .Create(); @@ -212,12 +213,12 @@ public void CustomDirective_IsInternal() FederationSchemaPrinter.Print(schema).MatchSnapshot(); } - public class QueryRoot + public sealed class QueryRoot { public T GetEntity(int id) => default!; } - public class User + public sealed class User { [Key] public int Id { get; set; } @@ -229,20 +230,20 @@ public class User public Address Address { get; set; } = default!; } - public class Address + public sealed class Address { [External] public string Zipcode { get; set; } = default!; } [ExtendServiceType] - public class Product + public sealed class Product { [Key] public string Upc { get; set; } = default!; } - public class QueryWithDirective : ObjectType + public sealed class QueryWithDirective : ObjectType { protected override void Configure(IObjectTypeDescriptor descriptor) { @@ -267,7 +268,7 @@ protected override void Configure(IObjectTypeDescriptor descriptor) } } - public class CustomDirectiveType : DirectiveType + public sealed class CustomDirectiveType : DirectiveType { private readonly bool _isPublic; @@ -306,7 +307,7 @@ public enum EnumWithDeprecatedValue Active, } - public class CustomDirectiveAttribute : DescriptorAttribute + public sealed class CustomDirectiveAttribute : DescriptorAttribute { protected override void TryConfigure( IDescriptorContext context, diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs index 1c4c2d8abfe..39733fb7cd3 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs @@ -3,7 +3,7 @@ namespace HotChocolate.ApolloFederation; -public class FederationTypesTestBase +public abstract class FederationTypesTestBase { protected ISchema CreateSchema(Action configure) { diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs index 6e69749eb81..72c1362af90 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs @@ -110,13 +110,14 @@ public void Serialize() { // arrange var type = new FieldSetType(); - var selectionSet = Syntax.ParseSelectionSet("{ a b c d e(d: $b) }"); + const string query = "{ a b c d e(d: $b) }"; + var selectionSet = Syntax.ParseSelectionSet(query); // act var serialized = type.Serialize(selectionSet); // assert - Assert.Equal("a b c d e(d: $b)", serialized); + Assert.Equal(query, serialized); } [Fact] @@ -137,14 +138,15 @@ public void TrySerialize() { // arrange var type = new FieldSetType(); - var selectionSet = Syntax.ParseSelectionSet("{ a b c d e(d: $b) }"); + const string query = "{ a b c d e(d: $b) }"; + var selectionSet = Syntax.ParseSelectionSet(query); // act var success = type.TrySerialize(selectionSet, out var serialized); // assert Assert.True(success); - Assert.Equal("a b c d e(d: $b)", serialized); + Assert.Equal(query, serialized); } [Fact] @@ -166,14 +168,15 @@ public void ParseValue() { // arrange var type = new FieldSetType(); - var selectionSet = Syntax.ParseSelectionSet("{ a b c d e(d: $b) }"); + const string query = "{ a b c d e(d: $b) }"; + var selectionSet = Syntax.ParseSelectionSet(query); // act var valueSyntax = type.ParseValue(selectionSet); // assert Assert.Equal( - "a b c d e(d: $b)", + query, Assert.IsType(valueSyntax).Value); } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs index af8515c9f43..5117f826f1f 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs @@ -209,18 +209,18 @@ void SchemaCreation() return entity; } - public class Query_InClass_Invalid + public sealed class Query_InClass_Invalid { public InvalidInClassRefResolver InvalidInClassRefResolver { get; set; } = default!; } - public class Query_ExternalClass_Invalid + public sealed class Query_ExternalClass_Invalid { public ExternalRefResolver_Invalid ExternalRefResolver_Invalid { get; set; } = default!; } [ReferenceResolver(EntityResolver = "non-existing-method")] - public class InvalidInClassRefResolver + public sealed class InvalidInClassRefResolver { [Key] public string? Id { get; set; } @@ -229,19 +229,19 @@ public class InvalidInClassRefResolver [ReferenceResolver( EntityResolverType = typeof(InvalidExternalRefResolver), EntityResolver = "non-existing-method")] - public class ExternalRefResolver_Invalid + public sealed class ExternalRefResolver_Invalid { [Key] public string? Id { get; set; } } - public class InvalidExternalRefResolver + public sealed class InvalidExternalRefResolver { [Key] public string? Id { get; set; } } - public class Query + public sealed class Query { public InClassRefResolver InClassRefResolver { get; set; } = default!; public ExternalRefResolver ExternalRefResolver { get; set; } = default!; @@ -249,23 +249,23 @@ public class Query default!; } - public class QueryWithSingleKeyResolver + public sealed class QueryWithSingleKeyResolver { public ExternalSingleKeyResolver ExternalRefResolver { get; set; } = default!; } - public class QueryWithMultiKeyResolver + public sealed class QueryWithMultiKeyResolver { public ExternalMultiKeyResolver ExternalRefResolver { get; set; } = default!; } - public class QueryWithExternalField + public sealed class QueryWithExternalField { public ExternalFields ExternalRefResolver { get; set; } = default!; } [ReferenceResolver(EntityResolver = nameof(GetAsync))] - public class InClassRefResolver + public sealed class InClassRefResolver { [Key] public string? Id { get; set; } @@ -281,14 +281,14 @@ public Task GetAsync([LocalState] ObjectValueNode data) } [ReferenceResolver(EntityResolverType = typeof(ExternalReferenceResolver))] - public class ExternalRefResolver + public sealed class ExternalRefResolver { [Key] public string Id { get; set; } = default!; } [ReferenceResolver(EntityResolver = nameof(GetAsync))] - public class ExternalSingleKeyResolver + public sealed class ExternalSingleKeyResolver { [Key] public string Id { get; set; } = default!; @@ -298,7 +298,7 @@ public static Task GetAsync(string id) } [ReferenceResolver(EntityResolver = nameof(GetAsync))] - public class ExternalFields + public sealed class ExternalFields { [Key] public string Id { get; set; } = default!; @@ -313,7 +313,7 @@ public static Task GetAsync(string id) [Key("id")] [Key("sku")] - public class ExternalMultiKeyResolver + public sealed class ExternalMultiKeyResolver { public string Id { get; set; } = default!; @@ -331,7 +331,7 @@ public static Task GetBySkuAsync(string sku) [ReferenceResolver( EntityResolverType = typeof(ExternalReferenceResolverRenamedMethod), EntityResolver = nameof(ExternalReferenceResolverRenamedMethod.SomeRenamedMethod))] - public class ExternalRefResolverRenamedMethod + public sealed class ExternalRefResolverRenamedMethod { [Key] public string Id { get; set; } = default!; From 84ff5467e28c386ba745b155a12d2b2e68f77b7e Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Sat, 9 Dec 2023 17:22:05 +0200 Subject: [PATCH 31/89] Restore some old code that's been removed --- .../FederationTypeInterceptor.cs | 106 +++++++++++++++--- 1 file changed, 93 insertions(+), 13 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index 4c75af78035..289299aeeed 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Linq.Expressions; using System.Reflection; +using System.Text; using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Descriptors; @@ -11,8 +12,10 @@ using HotChocolate.Resolvers; using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; +using HotChocolate.Types.Helpers; using static HotChocolate.ApolloFederation.ThrowHelper; using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.Types.TagHelper; namespace HotChocolate.ApolloFederation; @@ -40,12 +43,19 @@ internal sealed class FederationTypeInterceptor : TypeInterceptor private readonly List _entityTypes = new(); private IDescriptorContext _context = default!; - - [Obsolete("This hook is deprecated and will be removed in the next release.")] - internal override void OnBeforeCreateSchema(IDescriptorContext context, ISchemaBuilder schemaBuilder) + private ITypeInspector _typeInspector = default!; + private ObjectType _queryType = default!; + + internal override void InitializeContext( + IDescriptorContext context, + TypeInitializer typeInitializer, + TypeRegistry typeRegistry, + TypeLookup typeLookup, + TypeReferenceResolver typeReferenceResolver) { - base.OnBeforeCreateSchema(context, schemaBuilder); + _typeInspector = context.TypeInspector; _context = context; + ModifyOptions(context, o => o.Mode = TagMode.ApolloFederation); } public override void OnAfterInitialize( @@ -62,6 +72,22 @@ public override void OnAfterInitialize( AddToUnionIfHasTypeLevelKeyDirective( objectType, objectTypeDefinition); + + AggregatePropertyLevelKeyDirectives( + objectType, + objectTypeDefinition, + discoveryContext); + } + } + + internal override void OnAfterResolveRootType( + ITypeCompletionContext completionContext, + ObjectTypeDefinition definition, + OperationType operationType) + { + if (operationType is OperationType.Query) + { + _queryType = (ObjectType) completionContext.Type; } } @@ -105,8 +131,12 @@ private void CompleteExternalFieldSetters(ObjectType type, ObjectTypeDefinition private void CompleteReferenceResolver(ObjectTypeDefinition typeDef) { - if (!typeDef.GetContextData().TryGetValue(EntityResolver, out var resolversObject) || - resolversObject is not IReadOnlyList resolvers) + if (!typeDef.GetContextData().TryGetValue(EntityResolver, out var resolversObject)) + { + return; + } + + if (resolversObject is not IReadOnlyList resolvers) { return; } @@ -152,12 +182,13 @@ private void AddServiceTypeToQueryType( ITypeCompletionContext completionContext, DefinitionBase? definition) { - if (definition is not ObjectTypeDefinition objectTypeDefinition || - _context.Options.QueryTypeName != definition.Name) + if (!ReferenceEquals(completionContext.Type, _queryType)) { return; } + var objectTypeDefinition = (ObjectTypeDefinition)definition!; + var serviceFieldDescriptor = ObjectFieldDescriptor.New( _context, WellKnownFieldNames.Service); @@ -226,15 +257,64 @@ private void AddToUnionIfHasTypeLevelKeyDirective( } } + private void AggregatePropertyLevelKeyDirectives( + ObjectType objectType, + ObjectTypeDefinition objectTypeDefinition, + ITypeDiscoveryContext discoveryContext) + { + // if we find key markers on our fields, we need to construct the key directive + // from the annotated fields. + { + bool foundMarkers = objectTypeDefinition.Fields + .Any(f => f.ContextData.ContainsKey(KeyMarker)); + if (!foundMarkers) + { + return; + } + } + + IReadOnlyList fields = objectTypeDefinition.Fields; + var fieldSet = new StringBuilder(); + + foreach (var fieldDefinition in fields) + { + if (fieldDefinition.ContextData.ContainsKey(KeyMarker)) + { + if (fieldSet.Length > 0) + { + fieldSet.Append(' '); + } + + fieldSet.Append(fieldDefinition.Name); + } + } + + // add the key directive with the dynamically generated field set. + AddKeyDirective(objectTypeDefinition, fieldSet.ToString()); + + // register dependency to the key directive so that it is completed before + // we complete this type. + foreach (var directiveDefinition in objectTypeDefinition.Directives) + { + discoveryContext.Dependencies.Add( + new TypeDependency( + directiveDefinition.Type, + TypeDependencyFulfilled.Completed)); + + discoveryContext.Dependencies.Add(new(directiveDefinition.Type)); + } + + // since this type has now a key directive we also need to add this type to + // the _Entity union type. + _entityTypes.Add(objectType); + } + private void AddMemberTypesToTheEntityUnionType( ITypeCompletionContext completionContext, DefinitionBase? definition) { - if (completionContext.Type is not EntityType) - { - return; - } - if (definition is UnionTypeDefinition unionTypeDefinition) + if (completionContext.Type is EntityType && + definition is UnionTypeDefinition unionTypeDefinition) { foreach (var objectType in _entityTypes) { From 8390a6a3a2434c61630879eea78c9fb960dfd6ca Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Sat, 9 Dec 2023 17:22:56 +0200 Subject: [PATCH 32/89] Try and generalize the apollo attributes code in my sort of way --- .../FederationTypeInterceptor.cs | 501 ++++++++---------- 1 file changed, 225 insertions(+), 276 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index 289299aeeed..a3b07bdfeb3 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -323,6 +323,102 @@ private void AddMemberTypesToTheEntityUnionType( } } + private static void AddKeyDirective( + ObjectTypeDefinition objectTypeDefinition, + string fieldSet) + { + var directiveNode = new DirectiveNode( + WellKnownTypeNames.Key, + new ArgumentNode( + WellKnownArgumentNames.Fields, + fieldSet)); + + objectTypeDefinition.Directives.Add( + new DirectiveDefinition(directiveNode)); + } + + private enum ApplicableToDefinition + { + Enum, + EnumValue = Enum + 1, + + Interface, + InterfaceField = Interface + 1, + + InputObject, + InputField = InputObject + 1, + + Object, + ObjectField = Object + 1, + + Union, + + Count = Union, + } + + private struct ApplicableToDefinitionValues + { + public readonly T[] Values; + + public ApplicableToDefinitionValues(T[] values) + { + Values = values; + } + + public ref T Enum => ref Values[(int)ApplicableToDefinition.Enum]; + public ref T EnumValue => ref Values[(int)ApplicableToDefinition.EnumValue]; + public ref T Interface => ref Values[(int)ApplicableToDefinition.Interface]; + public ref T InterfaceField => ref Values[(int)ApplicableToDefinition.InterfaceField]; + public ref T InputObject => ref Values[(int)ApplicableToDefinition.InputObject]; + public ref T InputField => ref Values[(int)ApplicableToDefinition.InputField]; + public ref T Object => ref Values[(int)ApplicableToDefinition.Object]; + public ref T ObjectField => ref Values[(int)ApplicableToDefinition.ObjectField]; + public ref T Union => ref Values[(int)ApplicableToDefinition.Union]; + public ref T this[ApplicableToDefinition index] => ref Values[(int)index]; + } + + private static ApplicableToDefinitionValues CreateApplicable() + { + return new(new T[(int)ApplicableToDefinition.Count]); + } + + private static readonly ApplicableToDefinitionValues _applicableAttributesByType = CreateDefaultApplicable(); + + private static ApplicableToDefinitionValues CreateDefaultApplicable() + { + var result = CreateApplicable(); + + var basic = new ApplicableApolloAttributes + { + ApolloTag = true, + Inaccessible = true, + }; + var authentication = new ApplicableApolloAttributes + { + ApolloAuthenticated = true, + RequiresScopes = true, + }; + + result.Enum = basic | authentication; + result.EnumValue = basic; + + result.Interface = basic | authentication; + result.InterfaceField = result.Interface; + + result.InputObject = basic; + result.InputField = basic; + + result.Object = new() + { + All = true, + }; + result.ObjectField = result.Object; + + result.Union = basic; + return result; + } + + /// /// Apply Apollo Federation directives based on the custom attributes. /// @@ -331,35 +427,77 @@ private void AddMemberTypesToTheEntityUnionType( /// private void ApplyFederationDirectives(DefinitionBase? definition) { + void Apply( + IHasDirectiveDefinition def, + MemberInfo target, + ApplicableToDefinition applicable, + IEnumerable<(IHasDirectiveDefinition, MemberInfo?)> children) + { + { + var attributesToApply = _applicableAttributesByType[applicable]; + ApplyAttributes(def, target, attributesToApply); + } + + { + var attributesToApply = _applicableAttributesByType[applicable + 1]; + foreach (var (childDefinition, childTarget) in children) + { + if (childTarget is not null) + { + ApplyAttributes(childDefinition, childTarget, attributesToApply); + } + } + } + } + switch (definition) { case EnumTypeDefinition enumTypeDefinition: { - ApplyEnumDirectives(enumTypeDefinition); - ApplyEnumValueDirectives(enumTypeDefinition.Values); + Apply( + enumTypeDefinition, + enumTypeDefinition.RuntimeType, + ApplicableToDefinition.Enum, + enumTypeDefinition.Values + .Select(v => ((IHasDirectiveDefinition) v, v.Member))); break; } case InterfaceTypeDefinition interfaceTypeDefinition: { - ApplyInterfaceDirectives(interfaceTypeDefinition); - ApplyInterfaceFieldDirectives(interfaceTypeDefinition.Fields); + Apply( + interfaceTypeDefinition, + interfaceTypeDefinition.RuntimeType, + ApplicableToDefinition.Interface, + interfaceTypeDefinition.Fields + .Select(f => ((IHasDirectiveDefinition) f, f.Member))); break; } case InputObjectTypeDefinition inputObjectTypeDefinition: { - ApplyInputObjectDirectives(inputObjectTypeDefinition); - ApplyInputFieldDirectives(inputObjectTypeDefinition.Fields); + Apply( + inputObjectTypeDefinition, + inputObjectTypeDefinition.RuntimeType, + ApplicableToDefinition.Interface, + inputObjectTypeDefinition.Fields + .Select(f => ((IHasDirectiveDefinition) f, (MemberInfo?) f.Property))); break; } case ObjectTypeDefinition objectTypeDefinition: { - ApplyObjectDirectives(objectTypeDefinition); - ApplyObjectFieldDirectives(objectTypeDefinition.Fields); + Apply( + objectTypeDefinition, + objectTypeDefinition.RuntimeType, + ApplicableToDefinition.Object, + objectTypeDefinition.Fields + .Select(f => ((IHasDirectiveDefinition) f, f.Member))); break; } case UnionTypeDefinition unionTypeDefinition: { - ApplyUnionDirectives(unionTypeDefinition); + ApplyAttributes( + unionTypeDefinition, + unionTypeDefinition.RuntimeType, + _applicableAttributesByType.Union); break; } default: @@ -367,322 +505,133 @@ private void ApplyFederationDirectives(DefinitionBase? definition) } } - private void ApplyEnumDirectives(EnumTypeDefinition enumTypeDefinition) + [Flags] + private enum ApolloAttributeFlags { - var requiredScopes = new List>(); - var descriptor = EnumTypeDescriptor.From(_context, enumTypeDefinition); - foreach (var attribute in enumTypeDefinition.RuntimeType.GetCustomAttributes(true)) - { - switch (attribute) - { - case ApolloTagAttribute tag: - { - descriptor.ApolloTag(tag.Name); - break; - } - case ApolloAuthenticatedAttribute: - { - descriptor.ApolloAuthenticated(); - break; - } - case InaccessibleAttribute: - { - descriptor.Inaccessible(); - break; - } - case RequiresScopesAttribute scopes: - { - var addedScopes = scopes.Scopes - .Select(scope => new Scope(scope)) - .ToList(); - requiredScopes.Add(addedScopes); - break; - } - default: break; - } - } - - if (requiredScopes.Count > 0) - { - descriptor.RequiresScopes(requiredScopes); - } + ApolloTag = 1 << 0, + ApolloAuthenticated = 1 << 1, + Inaccessible = 1 << 2, + RequiresScopes = 1 << 3, + Shareable = 1 << 4, + All = ApolloTag | ApolloAuthenticated | Inaccessible | RequiresScopes | Shareable, } - private void ApplyEnumValueDirectives(IList enumValues) + private struct ApplicableApolloAttributes { - foreach (var enumValueDefinition in enumValues) + public ApolloAttributeFlags Flags; + + private readonly bool Get(ApolloAttributeFlags flag) + => (Flags & flag) == flag; + private void Set(ApolloAttributeFlags flag, bool set) { - if (enumValueDefinition.Member == null) + if (set) { - continue; + Flags |= flag; } - - var enumValueDescriptor = EnumValueDescriptor.From(_context, enumValueDefinition); - foreach (var attribute in enumValueDefinition.Member.GetCustomAttributes(true)) + else { - switch (attribute) - { - case InaccessibleAttribute: - { - enumValueDescriptor.Inaccessible(); - break; - } - case ApolloTagAttribute casted: - { - enumValueDescriptor.ApolloTag(casted.Name); - break; - } - } + Flags &= ~flag; } } - } - private void ApplyInterfaceDirectives(InterfaceTypeDefinition interfaceTypeDefinition) - { - var descriptor = InterfaceTypeDescriptor.From(_context, interfaceTypeDefinition); - var requiresScopes = new List>(); - foreach (var attribute in interfaceTypeDefinition.RuntimeType.GetCustomAttributes(true)) + public static ApplicableApolloAttributes operator |(ApplicableApolloAttributes left, ApplicableApolloAttributes right) { - switch (attribute) + return new() { - case ApolloTagAttribute tag: - { - descriptor.ApolloTag(tag.Name); - break; - } - case ApolloAuthenticatedAttribute: - { - descriptor.ApolloAuthenticated(); - break; - } - case InaccessibleAttribute: - { - descriptor.Inaccessible(); - break; - } - case RequiresScopesAttribute scopes: - { - requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); - break; - } - default: break; - } + Flags = left.Flags | right.Flags, + }; } - if (requiresScopes.Count > 0) + public bool ApolloTag { - descriptor.RequiresScopes(requiresScopes); + readonly get => Get(ApolloAttributeFlags.ApolloTag); + set => Set(ApolloAttributeFlags.ApolloTag, value); } - } - - private void ApplyInterfaceFieldDirectives(IList fields) - { - foreach (var fieldDefinition in fields) + public bool ApolloAuthenticated { - var descriptor = InterfaceFieldDescriptor.From(_context, fieldDefinition); - if (fieldDefinition.Member == null) - { - continue; - } - - var requiresScopes = new List>(); - foreach (var attribute in fieldDefinition.Member.GetCustomAttributes(true)) - { - switch (attribute) - { - case ApolloTagAttribute tag: - { - descriptor.ApolloTag(tag.Name); - break; - } - case ApolloAuthenticatedAttribute: - { - descriptor.ApolloAuthenticated(); - break; - } - case InaccessibleAttribute: - { - descriptor.Inaccessible(); - break; - } - case RequiresScopesAttribute scopes: - { - requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); - break; - } - default: break; - } - } - - if (requiresScopes.Count > 0) - { - descriptor.RequiresScopes(requiresScopes); - } + readonly get => Get(ApolloAttributeFlags.ApolloAuthenticated); + set => Set(ApolloAttributeFlags.ApolloAuthenticated, value); } - } - - private void ApplyInputObjectDirectives(InputObjectTypeDefinition inputObjectTypeDefinition) - { - var descriptor = InputObjectTypeDescriptor.From(_context, inputObjectTypeDefinition); - foreach (var attribute in inputObjectTypeDefinition.RuntimeType.GetCustomAttributes(true)) + public bool Inaccessible { - switch (attribute) - { - case InaccessibleAttribute: - { - descriptor.Inaccessible(); - break; - } - case ApolloTagAttribute casted: - { - descriptor.ApolloTag(casted.Name); - break; - } - } + readonly get => Get(ApolloAttributeFlags.Inaccessible); + set => Set(ApolloAttributeFlags.Inaccessible, value); + } + public bool RequiresScopes + { + readonly get => Get(ApolloAttributeFlags.RequiresScopes); + set => Set(ApolloAttributeFlags.RequiresScopes, value); + } + public bool Shareable + { + readonly get => Get(ApolloAttributeFlags.Shareable); + set => Set(ApolloAttributeFlags.Shareable, value); + } + public bool All + { + readonly get => Get(ApolloAttributeFlags.All); + set => Set(ApolloAttributeFlags.All, value); } } - private void ApplyInputFieldDirectives(IList inputFields) + private void ApplyAttributes( + IHasDirectiveDefinition definition, + MemberInfo target, + ApplicableApolloAttributes applicable) { - foreach (var fieldDefinition in inputFields) - { - if (fieldDefinition.RuntimeType == null) - { - continue; - } + var customAttributes = target.GetCustomAttributes(inherit: true); - var fieldDescriptor = InputFieldDescriptor.From(_context, fieldDefinition); - foreach (var attribute in fieldDefinition.RuntimeType.GetCustomAttributes(true)) - { - switch (attribute) - { - case InaccessibleAttribute: - { - fieldDescriptor.Inaccessible(); - break; - } - case ApolloTagAttribute casted: - { - fieldDescriptor.ApolloTag(casted.Name); - break; - } - } - } + List>? requiredScopes = null; + + void AddDirective(T directive) + where T : class + { + definition.AddDirective(directive, _typeInspector); } - } - private void ApplyObjectDirectives(ObjectTypeDefinition objectTypeDefinition) - { - var descriptor = ObjectTypeDescriptor.From(_context, objectTypeDefinition); - var requiresScopes = new List>(); - foreach (var attribute in objectTypeDefinition.RuntimeType.GetCustomAttributes(true)) + foreach (var attribute in customAttributes) { switch (attribute) { - case ApolloTagAttribute tag: + case ApolloTagAttribute tag + when applicable.ApolloTag: { - descriptor.ApolloTag(tag.Name); + AddDirective(new TagValue(tag.Name)); break; } - case ApolloAuthenticatedAttribute: + case ApolloAuthenticatedAttribute + when applicable.ApolloAuthenticated: { - descriptor.ApolloAuthenticated(); + AddDirective(WellKnownTypeNames.AuthenticatedDirective); break; } - case InaccessibleAttribute: + case InaccessibleAttribute + when applicable.Inaccessible: { - descriptor.Inaccessible(); + AddDirective(WellKnownTypeNames.Inaccessible); break; } - case RequiresScopesAttribute scopes: + case RequiresScopesAttribute scopes + when applicable.RequiresScopes: { - requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); + var addedScopes = scopes.Scopes + .Select(scope => new Scope(scope)) + .ToList(); + (requiredScopes ??= new()).Add(addedScopes); break; } - case ShareableAttribute: + case ShareableAttribute + when applicable.Shareable: { - descriptor.Shareable(); + AddDirective(WellKnownTypeNames.Shareable); break; } - default: break; } } - if (requiresScopes.Count > 0) + if (requiredScopes is not null) { - descriptor.RequiresScopes(requiresScopes); - } - } - - private void ApplyObjectFieldDirectives(IEnumerable fields) - { - foreach (var fieldDefinition in fields) - { - if (fieldDefinition.Member == null) - { - continue; - } - - var requiresScopes = new List>(); - var descriptor = ObjectFieldDescriptor.From(_context, fieldDefinition); - foreach (var attribute in fieldDefinition.Member.GetCustomAttributes(true)) - { - switch (attribute) - { - case ApolloTagAttribute tag: - { - descriptor.ApolloTag(tag.Name); - break; - } - case ApolloAuthenticatedAttribute: - { - descriptor.ApolloAuthenticated(); - break; - } - case InaccessibleAttribute: - { - descriptor.Inaccessible(); - break; - } - case RequiresScopesAttribute scopes: - { - requiresScopes.Add(scopes.Scopes.Select(scope => new Scope(scope)).ToList()); - break; - } - case ShareableAttribute: - { - descriptor.Shareable(); - break; - } - default: break; - } - } - - if (requiresScopes.Count > 0) - { - descriptor.RequiresScopes(requiresScopes); - } - } - } - - private void ApplyUnionDirectives(UnionTypeDefinition unionTypeDefinition) - { - var descriptor = UnionTypeDescriptor.From(_context, unionTypeDefinition); - foreach (var attribute in unionTypeDefinition.RuntimeType.GetCustomAttributes(true)) - { - switch (attribute) - { - case InaccessibleAttribute: - { - descriptor.Inaccessible(); - break; - } - case ApolloTagAttribute casted: - { - descriptor.ApolloTag(casted.Name); - break; - } - } + AddDirective(new RequiresScopes(requiredScopes)); } } } From 86a28d9420aa11e84ef9d1923fa1d28e48d1915f Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Sat, 9 Dec 2023 17:23:06 +0200 Subject: [PATCH 33/89] Fix typo in error --- .../ApolloFederation/Properties/FederationResources.Designer.cs | 2 +- .../src/ApolloFederation/Properties/FederationResources.resx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 9f38a328547..96bbc5555a0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -330,7 +330,7 @@ internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { } /// - /// Looks up a localized string similar to The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least on entity.. + /// Looks up a localized string similar to The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least one entity.. /// internal static string ThrowHelper_EntityType_NoEntities { get { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index 0d564009fde..91cd70244bc 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -208,7 +208,7 @@ Value cannot be null or empty. - The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least on entity. + The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least one entity. This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec. From 73bbf2a484cd4f4f73f67d4f8b5c08c173c598ff Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Sat, 9 Dec 2023 21:48:22 +0200 Subject: [PATCH 34/89] Forsake my code for DirectiveAttribute --- .../ApolloAuthenticatedAttribute.cs | 39 ++- .../Attributes/ApolloTagAttribute.cs | 50 ++- .../Attributes/InaccessibleAttribute.cs | 59 +++- .../Attributes/RequiresScopesAttribute.cs | 63 +++- .../Attributes/ShareableAttribute.cs | 24 +- .../FederationTypeInterceptor.cs | 300 ------------------ 6 files changed, 230 insertions(+), 305 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs index b837b5f8454..714f74cb9d2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs @@ -1,3 +1,6 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + namespace HotChocolate.ApolloFederation; /// @@ -28,6 +31,40 @@ namespace HotChocolate.ApolloFederation; AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct)] -public sealed class ApolloAuthenticatedAttribute : Attribute +public sealed class ApolloAuthenticatedAttribute : DescriptorAttribute { + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + switch (descriptor) + { + case IEnumTypeDescriptor enumTypeDescriptor: + { + enumTypeDescriptor.ApolloAuthenticated(); + break; + } + case IObjectTypeDescriptor objectFieldDescriptor: + { + objectFieldDescriptor.ApolloAuthenticated(); + break; + } + case IObjectFieldDescriptor objectFieldDescriptor: + { + objectFieldDescriptor.ApolloAuthenticated(); + break; + } + case IInterfaceTypeDescriptor interfaceTypeDescriptor: + { + interfaceTypeDescriptor.ApolloAuthenticated(); + break; + } + case IInterfaceFieldDescriptor interfaceFieldDescriptor: + { + interfaceFieldDescriptor.ApolloAuthenticated(); + break; + } + } + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs index c5ec13fb36a..50856188db9 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs @@ -1,3 +1,6 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + namespace HotChocolate.ApolloFederation; /// @@ -34,7 +37,7 @@ namespace HotChocolate.ApolloFederation; AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple = true)] -public sealed class ApolloTagAttribute : Attribute +public sealed class ApolloTagAttribute : DescriptorAttribute { /// /// Initializes new instance of @@ -51,4 +54,49 @@ public ApolloTagAttribute(string name) /// Retrieves tag metadata value /// public string Name { get; } + + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + switch (descriptor) + { + case IEnumTypeDescriptor enumDescriptor: + { + enumDescriptor.ApolloTag(Name); + break; + } + case IEnumValueDescriptor enumValueDescriptor: + { + enumValueDescriptor.ApolloTag(Name); + break; + } + case IInputObjectTypeDescriptor inputObjectTypeDescriptor: + { + inputObjectTypeDescriptor.ApolloTag(Name); + break; + } + case IInputFieldDescriptor inputFieldDescriptor: + { + inputFieldDescriptor.ApolloTag(Name); + break; + } + case IInterfaceTypeDescriptor interfaceTypeDescriptor: + { + interfaceTypeDescriptor.ApolloTag(Name); + break; + } + case IObjectFieldDescriptor objectFieldDescriptor: + { + objectFieldDescriptor.ApolloTag(Name); + break; + } + case IUnionTypeDescriptor unionTypeDescriptor: + { + unionTypeDescriptor.ApolloTag(Name); + break; + } + } + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs index 13b5125b986..c2d4300bcf5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs @@ -1,3 +1,6 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + namespace HotChocolate.ApolloFederation; /// @@ -41,6 +44,60 @@ namespace HotChocolate.ApolloFederation; | AttributeTargets.Property | AttributeTargets.Struct )] -public sealed class InaccessibleAttribute : Attribute +public sealed class InaccessibleAttribute : DescriptorAttribute { + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + switch (descriptor) + { + case IEnumTypeDescriptor enumTypeDescriptor: + { + enumTypeDescriptor.Inaccessible(); + break; + } + case IObjectTypeDescriptor objectFieldDescriptor: + { + objectFieldDescriptor.Inaccessible(); + break; + } + case IObjectFieldDescriptor objectFieldDescriptor: + { + objectFieldDescriptor.Inaccessible(); + break; + } + case IInterfaceTypeDescriptor interfaceTypeDescriptor: + { + interfaceTypeDescriptor.Inaccessible(); + break; + } + case IInterfaceFieldDescriptor interfaceFieldDescriptor: + { + interfaceFieldDescriptor.Inaccessible(); + break; + } + case IInputObjectTypeDescriptor inputObjectTypeDescriptor: + { + inputObjectTypeDescriptor.Inaccessible(); + break; + } + case IInputFieldDescriptor inputFieldDescriptor: + { + inputFieldDescriptor.Inaccessible(); + break; + } + case IUnionTypeDescriptor unionTypeDescriptor: + { + unionTypeDescriptor.Inaccessible(); + break; + } + case IEnumValueDescriptor enumValueDescriptor: + { + enumValueDescriptor.Inaccessible(); + break; + } + } + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs index 8879cf9801e..60ccfedad2a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs @@ -1,3 +1,10 @@ +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using HotChocolate.Types.Descriptors; +using HotChocolate.Types.Descriptors.Definitions; +using HotChocolate.Types.Helpers; + namespace HotChocolate.ApolloFederation; /// @@ -28,7 +35,7 @@ namespace HotChocolate.ApolloFederation; | AttributeTargets.Struct, AllowMultiple = true )] -public sealed class RequiresScopesAttribute : Attribute +public sealed class RequiresScopesAttribute : DescriptorAttribute { /// /// Initializes new instance of @@ -45,4 +52,58 @@ public RequiresScopesAttribute(string[] scopes) /// Retrieves array of required JWT scopes. /// public string[] Scopes { get; } + + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + void AddScopes( + IHasDirectiveDefinition definition) + { + var existingScopes = definition + .Directives + .Select(t => t.Value) + .OfType() + .FirstOrDefault(); + + if (existingScopes is null) + { + existingScopes = new(new()); + definition.AddDirective(existingScopes, context.TypeInspector); + } + + var newScopes = Scopes.Select(s => new Scope(s)).ToList(); + existingScopes.Scopes.Add(newScopes); + } + + switch (descriptor) + { + case IEnumTypeDescriptor enumTypeDescriptor: + { + AddScopes(enumTypeDescriptor.ToDefinition()); + break; + } + case IObjectTypeDescriptor objectFieldDescriptor: + { + AddScopes(objectFieldDescriptor.ToDefinition()); + break; + } + case IObjectFieldDescriptor objectFieldDescriptor: + { + AddScopes(objectFieldDescriptor.ToDefinition()); + break; + } + case IInterfaceTypeDescriptor interfaceTypeDescriptor: + { + AddScopes(interfaceTypeDescriptor.ToDefinition()); + break; + } + case IInterfaceFieldDescriptor interfaceFieldDescriptor: + { + AddScopes(interfaceFieldDescriptor.ToDefinition()); + break; + } + } + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs index dc99e1450d0..52a40bafcec 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs @@ -1,3 +1,6 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + namespace HotChocolate.ApolloFederation; /// @@ -29,6 +32,25 @@ namespace HotChocolate.ApolloFederation; | AttributeTargets.Method | AttributeTargets.Property )] -public sealed class ShareableAttribute : Attribute +public sealed class ShareableAttribute : DescriptorAttribute { + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + switch (descriptor) + { + case IObjectTypeDescriptor objectTypeDescriptor: + { + objectTypeDescriptor.Shareable(); + break; + } + case IObjectFieldDescriptor objectFieldDescriptor: + { + objectFieldDescriptor.Shareable(); + break; + } + } + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index a3b07bdfeb3..4c306e18586 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -110,8 +110,6 @@ public override void OnBeforeCompleteType( AddServiceTypeToQueryType( completionContext, definition); - - ApplyFederationDirectives(definition); } public override void OnAfterCompleteType( @@ -336,302 +334,4 @@ private static void AddKeyDirective( objectTypeDefinition.Directives.Add( new DirectiveDefinition(directiveNode)); } - - private enum ApplicableToDefinition - { - Enum, - EnumValue = Enum + 1, - - Interface, - InterfaceField = Interface + 1, - - InputObject, - InputField = InputObject + 1, - - Object, - ObjectField = Object + 1, - - Union, - - Count = Union, - } - - private struct ApplicableToDefinitionValues - { - public readonly T[] Values; - - public ApplicableToDefinitionValues(T[] values) - { - Values = values; - } - - public ref T Enum => ref Values[(int)ApplicableToDefinition.Enum]; - public ref T EnumValue => ref Values[(int)ApplicableToDefinition.EnumValue]; - public ref T Interface => ref Values[(int)ApplicableToDefinition.Interface]; - public ref T InterfaceField => ref Values[(int)ApplicableToDefinition.InterfaceField]; - public ref T InputObject => ref Values[(int)ApplicableToDefinition.InputObject]; - public ref T InputField => ref Values[(int)ApplicableToDefinition.InputField]; - public ref T Object => ref Values[(int)ApplicableToDefinition.Object]; - public ref T ObjectField => ref Values[(int)ApplicableToDefinition.ObjectField]; - public ref T Union => ref Values[(int)ApplicableToDefinition.Union]; - public ref T this[ApplicableToDefinition index] => ref Values[(int)index]; - } - - private static ApplicableToDefinitionValues CreateApplicable() - { - return new(new T[(int)ApplicableToDefinition.Count]); - } - - private static readonly ApplicableToDefinitionValues _applicableAttributesByType = CreateDefaultApplicable(); - - private static ApplicableToDefinitionValues CreateDefaultApplicable() - { - var result = CreateApplicable(); - - var basic = new ApplicableApolloAttributes - { - ApolloTag = true, - Inaccessible = true, - }; - var authentication = new ApplicableApolloAttributes - { - ApolloAuthenticated = true, - RequiresScopes = true, - }; - - result.Enum = basic | authentication; - result.EnumValue = basic; - - result.Interface = basic | authentication; - result.InterfaceField = result.Interface; - - result.InputObject = basic; - result.InputField = basic; - - result.Object = new() - { - All = true, - }; - result.ObjectField = result.Object; - - result.Union = basic; - return result; - } - - - /// - /// Apply Apollo Federation directives based on the custom attributes. - /// - /// - /// Type definition - /// - private void ApplyFederationDirectives(DefinitionBase? definition) - { - void Apply( - IHasDirectiveDefinition def, - MemberInfo target, - ApplicableToDefinition applicable, - IEnumerable<(IHasDirectiveDefinition, MemberInfo?)> children) - { - { - var attributesToApply = _applicableAttributesByType[applicable]; - ApplyAttributes(def, target, attributesToApply); - } - - { - var attributesToApply = _applicableAttributesByType[applicable + 1]; - foreach (var (childDefinition, childTarget) in children) - { - if (childTarget is not null) - { - ApplyAttributes(childDefinition, childTarget, attributesToApply); - } - } - } - } - - switch (definition) - { - case EnumTypeDefinition enumTypeDefinition: - { - Apply( - enumTypeDefinition, - enumTypeDefinition.RuntimeType, - ApplicableToDefinition.Enum, - enumTypeDefinition.Values - .Select(v => ((IHasDirectiveDefinition) v, v.Member))); - break; - } - case InterfaceTypeDefinition interfaceTypeDefinition: - { - Apply( - interfaceTypeDefinition, - interfaceTypeDefinition.RuntimeType, - ApplicableToDefinition.Interface, - interfaceTypeDefinition.Fields - .Select(f => ((IHasDirectiveDefinition) f, f.Member))); - break; - } - case InputObjectTypeDefinition inputObjectTypeDefinition: - { - Apply( - inputObjectTypeDefinition, - inputObjectTypeDefinition.RuntimeType, - ApplicableToDefinition.Interface, - inputObjectTypeDefinition.Fields - .Select(f => ((IHasDirectiveDefinition) f, (MemberInfo?) f.Property))); - break; - } - case ObjectTypeDefinition objectTypeDefinition: - { - Apply( - objectTypeDefinition, - objectTypeDefinition.RuntimeType, - ApplicableToDefinition.Object, - objectTypeDefinition.Fields - .Select(f => ((IHasDirectiveDefinition) f, f.Member))); - break; - } - case UnionTypeDefinition unionTypeDefinition: - { - ApplyAttributes( - unionTypeDefinition, - unionTypeDefinition.RuntimeType, - _applicableAttributesByType.Union); - break; - } - default: - break; - } - } - - [Flags] - private enum ApolloAttributeFlags - { - ApolloTag = 1 << 0, - ApolloAuthenticated = 1 << 1, - Inaccessible = 1 << 2, - RequiresScopes = 1 << 3, - Shareable = 1 << 4, - All = ApolloTag | ApolloAuthenticated | Inaccessible | RequiresScopes | Shareable, - } - - private struct ApplicableApolloAttributes - { - public ApolloAttributeFlags Flags; - - private readonly bool Get(ApolloAttributeFlags flag) - => (Flags & flag) == flag; - private void Set(ApolloAttributeFlags flag, bool set) - { - if (set) - { - Flags |= flag; - } - else - { - Flags &= ~flag; - } - } - - public static ApplicableApolloAttributes operator |(ApplicableApolloAttributes left, ApplicableApolloAttributes right) - { - return new() - { - Flags = left.Flags | right.Flags, - }; - } - - public bool ApolloTag - { - readonly get => Get(ApolloAttributeFlags.ApolloTag); - set => Set(ApolloAttributeFlags.ApolloTag, value); - } - public bool ApolloAuthenticated - { - readonly get => Get(ApolloAttributeFlags.ApolloAuthenticated); - set => Set(ApolloAttributeFlags.ApolloAuthenticated, value); - } - public bool Inaccessible - { - readonly get => Get(ApolloAttributeFlags.Inaccessible); - set => Set(ApolloAttributeFlags.Inaccessible, value); - } - public bool RequiresScopes - { - readonly get => Get(ApolloAttributeFlags.RequiresScopes); - set => Set(ApolloAttributeFlags.RequiresScopes, value); - } - public bool Shareable - { - readonly get => Get(ApolloAttributeFlags.Shareable); - set => Set(ApolloAttributeFlags.Shareable, value); - } - public bool All - { - readonly get => Get(ApolloAttributeFlags.All); - set => Set(ApolloAttributeFlags.All, value); - } - } - - private void ApplyAttributes( - IHasDirectiveDefinition definition, - MemberInfo target, - ApplicableApolloAttributes applicable) - { - var customAttributes = target.GetCustomAttributes(inherit: true); - - List>? requiredScopes = null; - - void AddDirective(T directive) - where T : class - { - definition.AddDirective(directive, _typeInspector); - } - - foreach (var attribute in customAttributes) - { - switch (attribute) - { - case ApolloTagAttribute tag - when applicable.ApolloTag: - { - AddDirective(new TagValue(tag.Name)); - break; - } - case ApolloAuthenticatedAttribute - when applicable.ApolloAuthenticated: - { - AddDirective(WellKnownTypeNames.AuthenticatedDirective); - break; - } - case InaccessibleAttribute - when applicable.Inaccessible: - { - AddDirective(WellKnownTypeNames.Inaccessible); - break; - } - case RequiresScopesAttribute scopes - when applicable.RequiresScopes: - { - var addedScopes = scopes.Scopes - .Select(scope => new Scope(scope)) - .ToList(); - (requiredScopes ??= new()).Add(addedScopes); - break; - } - case ShareableAttribute - when applicable.Shareable: - { - AddDirective(WellKnownTypeNames.Shareable); - break; - } - } - } - - if (requiredScopes is not null) - { - AddDirective(new RequiresScopes(requiredScopes)); - } - } } From 7c4c7ba50cad65bcfe16fffe505fae1f6af0478e Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:08:22 +0200 Subject: [PATCH 35/89] Make it obvious that the link imports will be copied --- .../Extensions/ApolloFederationDescriptorExtensions.cs | 2 +- .../Extensions/ApolloFederationSchemaBuilderExtensions.cs | 4 +++- .../ApolloFederation/FederationVersioning/FederatedSchema.cs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 38021e78e0b..b9fdc433e0b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -398,7 +398,7 @@ public static IInterfaceTypeDescriptor Key( public static ISchemaTypeDescriptor Link( this ISchemaTypeDescriptor descriptor, string url, - string[]? import) + IEnumerable? import) { if (descriptor is null) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index 4a887ceeaea..bf485b72955 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -20,6 +20,7 @@ public static partial class ApolloFederationSchemaBuilderExtensions /// /// Target Federation version /// + /// /// /// The is null. /// @@ -36,7 +37,7 @@ public static ISchemaBuilder AddApolloFederation( builder.SetSchema(s => { var link = FederationUtils.GetFederationLink(version); - s.Link(link.Url, link.Import?.ToArray()); + s.Link(link.Url, link.Import); schemaConfiguration?.Invoke(s); }); return AddApolloFederationDefinitions(builder, version); @@ -82,6 +83,7 @@ public static ISchemaBuilder AddApolloFederation(this ISchemaBuilder builder, Fe /// /// The . /// + /// /// /// Returns the . /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs index 578cf2cf449..d1703bf543c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs @@ -46,6 +46,6 @@ protected override void Configure(ISchemaTypeDescriptor descriptor) } } var link = FederationUtils.GetFederationLink(FederationVersion); - descriptor.Link(link.Url, link.Import?.ToArray()); + descriptor.Link(link.Url, link.Import); } } From 769aa7f7adfebd07a0c85d35c37df280d279353c Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:09:56 +0200 Subject: [PATCH 36/89] Fix wrong tests --- .../ApolloFederation.Tests/EntityTypeTests.cs | 2 +- .../FederationSchemaPrinterTests.cs | 14 +++++++------ .../FieldSetTypeTests.cs | 20 ++++++++++--------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs index fe01b3e01af..fab9f2c86a7 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs @@ -78,7 +78,7 @@ type Query { user(a: Int!): User } - type User @key(fields: ""id address { matchCode }"") { + type User @key(fields: "id address { matchCode }") { id: Int! address: Address } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs index 436190dfa9d..8d4b6a9595d 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs @@ -27,7 +27,7 @@ public void TestFederationPrinterApolloDirectivesSchemaFirst() var schema = SchemaBuilder.New() .AddApolloFederation() .AddDocumentFromString(""" - type TestType @key(fields: ""id"") { + type TestType @key(fields: "id") { id: Int! name: String! } @@ -51,7 +51,7 @@ public void TestFederationPrinterSchemaFirst() var schema = SchemaBuilder.New() .AddApolloFederation() .AddDocumentFromString(""" - type TestType @key(fields: ""id"") { + type TestType @key(fields: "id") { id: Int! name: String! enum: SomeEnum @@ -61,7 +61,7 @@ type TestTypeTwo { id: Int! } - interface iTestType @key(fields: ""id"") { + interface iTestType @key(fields: "id") { id: Int! external: String! @external } @@ -106,7 +106,7 @@ public void TestFederationPrinterSchemaFirst_With_DateTime() var schema = SchemaBuilder.New() .AddApolloFederation() .AddDocumentFromString(""" - type TestType @key(fields: ""id"") { + type TestType @key(fields: "id") { id: Int! name: String! enum: SomeEnum @@ -116,7 +116,7 @@ type TestTypeTwo { id: Int! } - interface iTestType @key(fields: ""id"") { + interface iTestType @key(fields: "id") { id: Int! external: String! @external } @@ -206,11 +206,13 @@ public void CustomDirective_IsInternal() var schema = SchemaBuilder.New() .AddQueryType() .AddDirectiveType(new CustomDirectiveType(false)) + .ModifyOptions(o => o.UseXmlDocumentation = true) .Create(); // act // assert - FederationSchemaPrinter.Print(schema).MatchSnapshot(); + var s = FederationSchemaPrinter.Print(schema); + s.MatchSnapshot(); } public sealed class QueryRoot diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs index 72c1362af90..7ea691a392a 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs @@ -110,14 +110,14 @@ public void Serialize() { // arrange var type = new FieldSetType(); - const string query = "{ a b c d e(d: $b) }"; - var selectionSet = Syntax.ParseSelectionSet(query); + const string selection = "a b c d e(d: $b)"; + var selectionSet = Syntax.ParseSelectionSet(Braces(selection)); // act var serialized = type.Serialize(selectionSet); // assert - Assert.Equal(query, serialized); + Assert.Equal(selection, serialized); } [Fact] @@ -138,15 +138,15 @@ public void TrySerialize() { // arrange var type = new FieldSetType(); - const string query = "{ a b c d e(d: $b) }"; - var selectionSet = Syntax.ParseSelectionSet(query); + const string selection = "a b c d e(d: $b)"; + var selectionSet = Syntax.ParseSelectionSet(Braces(selection)); // act var success = type.TrySerialize(selectionSet, out var serialized); // assert Assert.True(success); - Assert.Equal(query, serialized); + Assert.Equal(selection, serialized); } [Fact] @@ -163,20 +163,22 @@ public void TrySerialize_Invalid_Format() Assert.Null(serialized); } + private static string Braces(string s) => $"{{ {s} }}"; + [Fact] public void ParseValue() { // arrange var type = new FieldSetType(); - const string query = "{ a b c d e(d: $b) }"; - var selectionSet = Syntax.ParseSelectionSet(query); + const string selection = "a b c d e(d: $b)"; + var selectionSet = Syntax.ParseSelectionSet(Braces(selection)); // act var valueSyntax = type.ParseValue(selectionSet); // assert Assert.Equal( - query, + selection, Assert.IsType(valueSyntax).Value); } From e5ee1aaf953064129167a19a6f84b4fc49b91b3b Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:10:57 +0200 Subject: [PATCH 37/89] Add a helper function for representing input as object --- .../EntitiesResolverTests.cs | 31 +++++++++--------- .../test/ApolloFederation.Tests/TestHelper.cs | 32 +++++++++++++++++++ 2 files changed, 47 insertions(+), 16 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs index 5ca0809ef9b..cc5d8916c98 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs @@ -12,7 +12,7 @@ namespace HotChocolate.ApolloFederation; public class EntitiesResolverTests { [Fact] - public async void TestResolveViaForeignServiceType() + public async Task TestResolveViaForeignServiceType() { // arrange var schema = SchemaBuilder.New() @@ -23,17 +23,17 @@ public async void TestResolveViaForeignServiceType() var context = CreateResolverContext(schema); // act - var representations = new List - { - new("ForeignType", - new ObjectValueNode( - new ObjectFieldNode("id", "1"), - new ObjectFieldNode("someExternalField", "someExternalField"))), - }; - - // assert + var representations = RepresentationsOf( + nameof(ForeignType), + new + { + id = "1", + someExternalField = "someExternalField", + }); var result = await EntitiesResolver.ResolveAsync(schema, representations, context); + + // assert var obj = Assert.IsType(result[0]); Assert.Equal("1", obj.Id); Assert.Equal("someExternalField", obj.SomeExternalField); @@ -112,12 +112,11 @@ public async void TestResolveViaEntityResolver_WithDataLoader() mock.Setup(c => c.Service()).Returns(dataLoader); }); - var representations = new List - { - new("FederatedType", new ObjectValueNode(new ObjectFieldNode("Id", "1"))), - new("FederatedType", new ObjectValueNode(new ObjectFieldNode("Id", "2"))), - new("FederatedType", new ObjectValueNode(new ObjectFieldNode("Id", "3"))), - }; + var representations = RepresentationsOf( + nameof(FederatedType), + new { Id = "1" }, + new { Id = "2" }, + new { Id = "3" }); // act var resultTask = EntitiesResolver.ResolveAsync(schema, representations, context); diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs index 03fc64c7415..db67bbf2150 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs @@ -40,4 +40,36 @@ public static IResolverContext CreateResolverContext( context.LocalContextData = ImmutableDictionary.Empty; return context; } + + public static Representation RepresentationOf(string typeName, T anonymousObject) + where T : class + { + var fields = anonymousObject + .GetType() + .GetProperties() + .Select(p => + { + var value = p.GetValue(anonymousObject); + var result = value switch + { + null => new ObjectFieldNode(p.Name, NullValueNode.Default), + string s => new ObjectFieldNode(p.Name, s), + int i => new ObjectFieldNode(p.Name, i), + bool b => new ObjectFieldNode(p.Name, b), + _ => throw new NotSupportedException($"Type {p.PropertyType} is not supported"), + }; + return result; + }) + .ToArray(); + + return new Representation(typeName, new ObjectValueNode(fields)); + } + + public static List RepresentationsOf(string typeName, params T[] anonymousObjects) + where T : class + { + return anonymousObjects + .Select(o => RepresentationOf(typeName, o)) + .ToList(); + } } From 51f3fa4e6e909bef4b0ad25e531e125f0c80d205 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:11:40 +0200 Subject: [PATCH 38/89] Clear out some things in the interceptor --- .../FederationTypeInterceptor.cs | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index 4c306e18586..6fb5363900f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -129,14 +129,20 @@ private void CompleteExternalFieldSetters(ObjectType type, ObjectTypeDefinition private void CompleteReferenceResolver(ObjectTypeDefinition typeDef) { - if (!typeDef.GetContextData().TryGetValue(EntityResolver, out var resolversObject)) + IReadOnlyList resolvers; { - return; - } + var contextData = typeDef.GetContextData(); + if (!contextData.TryGetValue(EntityResolver, out var resolversObject)) + { + return; + } - if (resolversObject is not IReadOnlyList resolvers) - { - return; + if (resolversObject is not IReadOnlyList r) + { + return; + } + + resolvers = r; } if (resolvers.Count == 1) @@ -223,8 +229,13 @@ private void ApplyMethodLevelReferenceResolvers( var descriptor = ObjectTypeDescriptor.From(_context, objectTypeDefinition); - foreach (var possibleReferenceResolver in - objectType.RuntimeType.GetMethods(BindingFlags.Static | BindingFlags.Public)) + // Static methods won't end up in the schema as fields. + // The default initialization system only considers instance methods, + // so we have to handle the attributes for those manually. + var potentiallyUnregisteredReferenceResolvers = objectType.RuntimeType + .GetMethods(BindingFlags.Static | BindingFlags.Public); + + foreach (var possibleReferenceResolver in potentiallyUnregisteredReferenceResolvers) { if (!possibleReferenceResolver.IsDefined(typeof(ReferenceResolverAttribute))) { @@ -240,6 +251,7 @@ private void ApplyMethodLevelReferenceResolvers( } } + // This seems to re-detect the entity resolver and save it into the context data. descriptor.CreateDefinition(); } From c651e40a71f2deaa28826c2c59fc1e761c19d900 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:11:57 +0200 Subject: [PATCH 39/89] Formatting in tests --- .../EntitiesResolverTests.cs | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs index cc5d8916c98..36654fee60b 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs @@ -217,7 +217,10 @@ public async Task TestDetailFieldResolver_Optional() new ObjectValueNode(new[] { new ObjectFieldNode("detail", - new ObjectValueNode(new[] { new ObjectFieldNode("id", "testId") })), + new ObjectValueNode(new[] + { + new ObjectFieldNode("id", "testId"), + })), })), }; @@ -279,7 +282,7 @@ public static ForeignType GetById(string id, string someExternalField) => new(id, someExternalField); } - [ExtendServiceType] + [Extends] public class MixedFieldTypes { public MixedFieldTypes(string id, int intField) @@ -357,7 +360,15 @@ public class FederatedTypeWithRequiredDetail public FederatedTypeDetail Detail { get; set; } = default!; [ReferenceResolver] - public static FederatedTypeWithRequiredDetail ReferenceResolver([Map("detail.id")] string detailId) => new() { Id = detailId, Detail = new FederatedTypeDetail { Id = detailId } }; + public static FederatedTypeWithRequiredDetail ReferenceResolver([Map("detail.id")] string detailId) + => new() + { + Id = detailId, + Detail = new FederatedTypeDetail + { + Id = detailId, + }, + }; } public class FederatedTypeWithOptionalDetail @@ -367,8 +378,15 @@ public class FederatedTypeWithOptionalDetail public FederatedTypeDetail? Detail { get; set; } = default!; [ReferenceResolver] - public static FederatedTypeWithOptionalDetail ReferenceResolver([Map("detail.id")] string detailId) => new() { Id = detailId, Detail = new FederatedTypeDetail { Id = detailId } }; - + public static FederatedTypeWithOptionalDetail ReferenceResolver([Map("detail.id")] string detailId) + => new() + { + Id = detailId, + Detail = new FederatedTypeDetail + { + Id = detailId, + }, + }; } public class FederatedTypeDetail From 38f2eaec31715b3cdcbb9443e536712072983488 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:12:40 +0200 Subject: [PATCH 40/89] Chop attribute formatting --- .../Configuration/Attributes/ReferenceResolverAttribute.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs index f7444142df3..6f9ab52062a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs @@ -10,7 +10,9 @@ namespace HotChocolate.ApolloFederation; /// entity by whatever unique identifier your other subgraphs use to reference it. /// [AttributeUsage( - AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method, + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Method, AllowMultiple = true)] public class ReferenceResolverAttribute : DescriptorAttribute { From 7cdb4bb243f3dec34d93b76a96734c1f6a4338d4 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:13:05 +0200 Subject: [PATCH 41/89] Make sure our builder is in fact invoked --- .../Helpers/ReferenceResolverArgumentExpressionBuilder.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs index 0b7472f53e8..9a8ddfc5c94 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs @@ -47,6 +47,10 @@ public override Expression Build(ParameterExpressionBuilderContext context) return getValue; } + // NOTE: It will use the default handler without these two. + public override bool IsDefaultHandler => true; + public override bool CanHandle(ParameterInfo parameter) => true; + private string[] RequirePathAndGetSeparatedPath(ParameterInfo parameter) { var path = parameter.GetCustomAttribute() is { } attr From 38ce671879c0fa6b750de52b13a128889d07293f Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:13:24 +0200 Subject: [PATCH 42/89] Required imports --- .../ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs index db67bbf2150..baad0d09fa4 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.Collections.Immutable; +using System.Linq; using System.Threading; +using HotChocolate.Language; using HotChocolate.Resolvers; using HotChocolate.Types; using Moq; From 5c2a8d25f7f0968c4fa121c678cf6827159e5fe6 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:13:41 +0200 Subject: [PATCH 43/89] Packages? --- .../ApolloFederation.Tests/packages.lock.json | 447 +++++++++++++++++- 1 file changed, 434 insertions(+), 13 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json index 6c070a403d9..aadd933c074 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json @@ -76,6 +76,14 @@ "resolved": "2.4.3", "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" }, + "BananaCakePop.Middleware": { + "type": "Transitive", + "resolved": "10.0.7", + "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", + "dependencies": { + "Yarp.ReverseProxy": "2.0.1" + } + }, "Castle.Core": { "type": "Transitive", "resolved": "5.0.0", @@ -84,6 +92,20 @@ "System.Diagnostics.EventLog": "6.0.0" } }, + "DiffPlex": { + "type": "Transitive", + "resolved": "1.7.1", + "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" + }, + "Microsoft.AspNetCore.WebUtilities": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "9ErxAAKaDzxXASB/b5uLEkLgUWv1QbeVxyJYEHQwMaxXOeFFVkQxiq8RyfVcifLU7NR0QY0p3acqx4ZpYfhHDg==", + "dependencies": { + "Microsoft.Net.Http.Headers": "2.2.0", + "System.Text.Encodings.Web": "4.5.0" + } + }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", "resolved": "1.1.1", @@ -107,6 +129,33 @@ "resolved": "7.0.0", "contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw==" }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "9Pq9f/CvOSz0t9yQa6g1uWpxa2sm13daLFm8EZwy9MaQUjKXWdNUXQwIxwhmba5N83UIqURiPHSNqGK1vfWF2w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", + "Microsoft.Extensions.Logging": "7.0.0", + "Microsoft.Extensions.Logging.Abstractions": "7.0.0", + "Microsoft.Extensions.Options": "7.0.0" + } + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "7.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", + "Microsoft.Extensions.Logging.Abstractions": "7.0.0", + "Microsoft.Extensions.Options": "7.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==" + }, "Microsoft.Extensions.ObjectPool": { "type": "Transitive", "resolved": "7.0.0", @@ -126,6 +175,15 @@ "resolved": "7.0.0", "contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==" }, + "Microsoft.Net.Http.Headers": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "iZNkjYqlo8sIOI0bQfpsSoMTmB/kyvmV2h225ihyZT33aTp48ZpF6qYnXxzSXmHt8DpBAwBTX+1s1UFLbYfZKg==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.2.0", + "System.Buffers": "4.5.0" + } + }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "1.1.0", @@ -222,8 +280,8 @@ }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "12.0.1", - "contentHash": "pBR3wCgYWZGiaZDYP+HHYnalVnPJlpP1q55qvVb+adrDHmFMDc1NAKio61xTwftK3Pw5h7TZJPJEEVMd6ty8rg==" + "resolved": "13.0.2", + "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" }, "NuGet.Frameworks": { "type": "Transitive", @@ -355,15 +413,8 @@ }, "System.Buffers": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } + "resolved": "4.5.0", + "contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A==" }, "System.Collections": { "type": "Transitive", @@ -561,6 +612,21 @@ "System.Runtime": "4.3.0" } }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" + }, + "System.IO.Packaging": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "+j5ezLP7785/pd4taKQhXAWsymsIW2nTnE/U3/jpGZzcJx5lip6qkj6UrxSE7ZYZfL0GaLuymwGLqwJV/c7O7Q==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "jRn6JYnNPW6xgQazROBLSfpdoczRw694vO5kKvMcNnpXuolEixUyw6IBuBs2Y2mlSX/LdLvyyWmfXhaI3ND1Yg==" + }, "System.Linq": { "type": "Transitive", "resolved": "4.3.0", @@ -666,6 +732,11 @@ "System.Threading": "4.3.0" } }, + "System.Reactive": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" + }, "System.Reflection": { "type": "Transitive", "resolved": "4.3.0", @@ -1136,6 +1207,27 @@ "xunit.extensibility.core": "[2.4.1]" } }, + "Yarp.ReverseProxy": { + "type": "Transitive", + "resolved": "2.0.1", + "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", + "dependencies": { + "System.IO.Hashing": "7.0.0" + } + }, + "cookiecrumble": { + "type": "Project", + "dependencies": { + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.Fusion": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", + "Newtonsoft.Json": "[13.0.2, )", + "Xunit": "[2.4.1, )" + } + }, "greendonut": { "type": "Project", "dependencies": { @@ -1182,6 +1274,16 @@ "HotChocolate": "[0.0.0, )" } }, + "hotchocolate.aspnetcore": { + "type": "Project", + "dependencies": { + "BananaCakePop.Middleware": "[10.0.7, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" + } + }, "hotchocolate.authorization": { "type": "Project", "dependencies": { @@ -1214,6 +1316,27 @@ "HotChocolate.Types": "[0.0.0, )" } }, + "hotchocolate.fusion": { + "type": "Project", + "dependencies": { + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.Fusion.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", + "Microsoft.Extensions.Http": "[7.0.0, )", + "System.Reactive": "[5.0.0, )" + } + }, + "hotchocolate.fusion.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Packaging": "[7.0.0, )" + } + }, "hotchocolate.language": { "type": "Project", "dependencies": { @@ -1247,6 +1370,54 @@ "HotChocolate.Language.Utf8": "[0.0.0, )" } }, + "hotchocolate.subscriptions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )" + } + }, + "hotchocolate.subscriptions.inmemory": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Subscriptions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )" + } + }, + "hotchocolate.transport.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "System.Collections.Immutable": "[7.0.0, )", + "System.Text.Json": "[7.0.0, )" + } + }, + "hotchocolate.transport.http": { + "type": "Project", + "dependencies": { + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Pipelines": "[7.0.0, )" + } + }, + "hotchocolate.transport.sockets": { + "type": "Project", + "dependencies": { + "System.IO.Pipelines": "[7.0.0, )" + } + }, + "hotchocolate.transport.sockets.client": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.Collections.Immutable": "[7.0.0, )", + "System.Text.Json": "[7.0.0, )" + } + }, "hotchocolate.types": { "type": "Project", "dependencies": { @@ -1280,6 +1451,12 @@ "HotChocolate.Types": "[0.0.0, )" } }, + "hotchocolate.types.scalars.upload": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )" + } + }, "hotchocolate.types.shared": { "type": "Project", "dependencies": { @@ -1373,6 +1550,14 @@ "resolved": "2.4.3", "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" }, + "BananaCakePop.Middleware": { + "type": "Transitive", + "resolved": "10.0.7", + "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", + "dependencies": { + "Yarp.ReverseProxy": "2.0.1" + } + }, "Castle.Core": { "type": "Transitive", "resolved": "5.0.0", @@ -1381,6 +1566,20 @@ "System.Diagnostics.EventLog": "6.0.0" } }, + "DiffPlex": { + "type": "Transitive", + "resolved": "1.7.1", + "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" + }, + "Microsoft.AspNetCore.WebUtilities": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "z1SXKg5Bk02VmrrOab1TO2yxkZIfL4RyrS+yCpwxcLTqJwImYhEttz3LYbl1gQebkAAvx2Fm4NVXmopxXeLZgw==", + "dependencies": { + "Microsoft.Net.Http.Headers": "8.0.0", + "System.IO.Pipelines": "8.0.0" + } + }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", "resolved": "1.1.1", @@ -1391,6 +1590,31 @@ "resolved": "17.1.0", "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + } + }, "Microsoft.Extensions.DependencyInjection": { "type": "Transitive", "resolved": "8.0.0", @@ -1404,6 +1628,57 @@ "resolved": "8.0.0", "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" }, + "Microsoft.Extensions.Diagnostics": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "3PZp/YSkIXrF7QK7PfC1bkyRYwqOHpWFad8Qx+4wkuumAeXo1NHaxpS9LboNA9OvNSAu+QOVlXbMyoY+pHSqcw==", + "dependencies": { + "Microsoft.Extensions.Configuration": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", + "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" + } + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0" + } + }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "cWz4caHwvx0emoYe7NkHPxII/KkTI8R/LC9qdqJqnKv2poTJ4e2qqPGQqvRoQ5kaSA4FU5IV3qFAuLuOhoqULQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics": "8.0.0", + "Microsoft.Extensions.Logging": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" + } + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, "Microsoft.Extensions.ObjectPool": { "type": "Transitive", "resolved": "8.0.0", @@ -1418,11 +1693,31 @@ "Microsoft.Extensions.Primitives": "8.0.0" } }, + "Microsoft.Extensions.Options.ConfigurationExtensions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.Configuration.Binder": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, "Microsoft.Extensions.Primitives": { "type": "Transitive", "resolved": "8.0.0", "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" }, + "Microsoft.Net.Http.Headers": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "YlHqL8oWBX3H1LmdKUOxEMW8cVD8nUACEnE2Fu3Ze4k7mYf8yJ1o/uLqoequQV0GDupXyCBEzYhn7Zxdz7pqYQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "1.1.0", @@ -1519,8 +1814,8 @@ }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "12.0.1", - "contentHash": "pBR3wCgYWZGiaZDYP+HHYnalVnPJlpP1q55qvVb+adrDHmFMDc1NAKio61xTwftK3Pw5h7TZJPJEEVMd6ty8rg==" + "resolved": "13.0.2", + "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" }, "NuGet.Frameworks": { "type": "Transitive", @@ -1858,6 +2153,21 @@ "System.Runtime": "4.3.0" } }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" + }, + "System.IO.Packaging": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "8g1V4YRpdGAxFcK8v9OjuMdIOJSpF30Zb1JGicwVZhly3I994WFyBdV6mQEo8d3T+URQe55/M0U0eIH0Hts1bg==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" + }, "System.Linq": { "type": "Transitive", "resolved": "4.3.0", @@ -1963,6 +2273,11 @@ "System.Threading": "4.3.0" } }, + "System.Reactive": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" + }, "System.Reflection": { "type": "Transitive", "resolved": "4.3.0", @@ -2433,6 +2748,27 @@ "xunit.extensibility.core": "[2.4.1]" } }, + "Yarp.ReverseProxy": { + "type": "Transitive", + "resolved": "2.0.1", + "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", + "dependencies": { + "System.IO.Hashing": "7.0.0" + } + }, + "cookiecrumble": { + "type": "Project", + "dependencies": { + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.Fusion": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", + "Newtonsoft.Json": "[13.0.2, )", + "Xunit": "[2.4.1, )" + } + }, "greendonut": { "type": "Project", "dependencies": { @@ -2479,6 +2815,16 @@ "HotChocolate": "[0.0.0, )" } }, + "hotchocolate.aspnetcore": { + "type": "Project", + "dependencies": { + "BananaCakePop.Middleware": "[10.0.7, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" + } + }, "hotchocolate.authorization": { "type": "Project", "dependencies": { @@ -2511,6 +2857,27 @@ "HotChocolate.Types": "[0.0.0, )" } }, + "hotchocolate.fusion": { + "type": "Project", + "dependencies": { + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.Fusion.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", + "Microsoft.Extensions.Http": "[8.0.0, )", + "System.Reactive": "[5.0.0, )" + } + }, + "hotchocolate.fusion.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Packaging": "[8.0.0, )" + } + }, "hotchocolate.language": { "type": "Project", "dependencies": { @@ -2544,6 +2911,54 @@ "HotChocolate.Language.Utf8": "[0.0.0, )" } }, + "hotchocolate.subscriptions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )" + } + }, + "hotchocolate.subscriptions.inmemory": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Subscriptions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" + } + }, + "hotchocolate.transport.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.transport.http": { + "type": "Project", + "dependencies": { + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Pipelines": "[8.0.0, )" + } + }, + "hotchocolate.transport.sockets": { + "type": "Project", + "dependencies": { + "System.IO.Pipelines": "[8.0.0, )" + } + }, + "hotchocolate.transport.sockets.client": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, "hotchocolate.types": { "type": "Project", "dependencies": { @@ -2577,6 +2992,12 @@ "HotChocolate.Types": "[0.0.0, )" } }, + "hotchocolate.types.scalars.upload": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )" + } + }, "hotchocolate.types.shared": { "type": "Project", "dependencies": { From 91e67f4a956514b45e2d3190a4e7b30d1d5a0fbf Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:17:02 +0200 Subject: [PATCH 44/89] Update test snapshots --- .../CertificationTests.Schema_Snapshot.snap | 37 ++++++++-- .../CertificationTests.Subgraph_SDL.snap | 71 +++++++++++++++++-- .../CertificationTests.Schema_Snapshot.snap | 37 ++++++++-- .../CertificationTests.Subgraph_SDL.snap | 71 +++++++++++++++++-- ....AnnotateExternalToTypeFieldCodeFirst.snap | 3 +- ...otateExternalToTypeFieldPureCodeFirst.snap | 37 ++++++++-- ...nnotateExternalToTypeFieldSchemaFirst.snap | 3 +- ...otateKeyToClassAttributePureCodeFirst.snap | 37 ++++++++-- ...tateKeyToClassAttributesPureCodeFirst.snap | 37 ++++++++-- ...ests.AnnotateKeyToObjectTypeCodeFirst.snap | 5 +- ....AnnotateKeyToObjectTypePureCodeFirst.snap | 37 ++++++++-- ...ts.AnnotateKeyToObjectTypeSchemaFirst.snap | 5 +- ...ProvidesToClassAttributePureCodeFirst.snap | 37 ++++++++-- ...ests.AnnotateProvidesToFieldCodeFirst.snap | 5 +- ...ts.AnnotateProvidesToFieldSchemaFirst.snap | 5 +- ...ProvidesToClassAttributePureCodeFirst.snap | 37 ++++++++-- ...ests.AnnotateProvidesToFieldCodeFirst.snap | 5 +- ...ts.AnnotateProvidesToFieldSchemaFirst.snap | 5 +- ...erviceTypeEmptyQueryTypePureCodeFirst.snap | 70 +++++++++++++++++- ...tServiceTypeEmptyQueryTypeSchemaFirst.snap | 70 +++++++++++++++++- ...ests.TestServiceTypeTypePureCodeFirst.snap | 67 ++++++++++++++++- ...eTests.TestServiceTypeTypeSchemaFirst.snap | 67 ++++++++++++++++- 22 files changed, 672 insertions(+), 76 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Schema_Snapshot.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Schema_Snapshot.snap index 3c92eb9f309..32c88b6e885 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Schema_Snapshot.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Schema_Snapshot.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: Query } @@ -39,11 +39,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = Product | User +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -51,8 +71,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Subgraph_SDL.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Subgraph_SDL.snap index 25fe68ac632..32c88b6e885 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Subgraph_SDL.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/__snapshots__/CertificationTests.Subgraph_SDL.snap @@ -1,4 +1,8 @@ -type Product @key(fields: "id") @key(fields: "sku package") @key(fields: "sku variation { id }") { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { + query: Query +} + +type Product @key(fields: "id") @key(fields: "sku package") @key(fields: "sku variation { id }") { id: ID! sku: String package: String @@ -16,14 +20,71 @@ type ProductVariation { id: ID! } -extend type Query { +type Query { product(id: ID!): Product + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! } -extend type User @key(fields: "email") { +type User @key(fields: "email") { email: ID! @external totalProductsCreated: Int @external } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! +} + +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Product | User + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: _FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: _FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +"Scalar representing a set of fields." +scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Schema_Snapshot.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Schema_Snapshot.snap index 62e02748bc8..4c8d273de65 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Schema_Snapshot.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Schema_Snapshot.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: Query } @@ -39,11 +39,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = Product | User +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -51,8 +71,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Subgraph_SDL.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Subgraph_SDL.snap index 73d660dfb56..4c8d273de65 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Subgraph_SDL.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/__snapshots__/CertificationTests.Subgraph_SDL.snap @@ -1,4 +1,8 @@ -type Product @key(fields: "id") @key(fields: "sku package") @key(fields: "sku variation { id }") { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { + query: Query +} + +type Product @key(fields: "id") @key(fields: "sku package") @key(fields: "sku variation { id }") { id: ID! createdBy: User! @provides(fields: "totalProductsCreated") sku: String @@ -16,14 +20,71 @@ type ProductVariation { id: ID! } -extend type Query { +type Query { product(id: ID!): Product + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! } -extend type User @key(fields: "email") { +type User @key(fields: "email") { email: ID! @external totalProductsCreated: Int @external } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! +} + +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Product | User + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: _FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: _FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +"Scalar representing a set of fields." +scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldCodeFirst.snap index a38225c52f4..bda9ed952e7 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldCodeFirst.snap @@ -9,5 +9,4 @@ type Query { "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldPureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldPureCodeFirst.snap index ed784d8a802..242abe2b63e 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldPureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldPureCodeFirst.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: Query } @@ -21,11 +21,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = User +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -33,8 +53,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldSchemaFirst.snap index a7cf4efec5c..414365b5e8b 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ExternalDirectiveTests.AnnotateExternalToTypeFieldSchemaFirst.snap @@ -9,5 +9,4 @@ type Query { "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributePureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributePureCodeFirst.snap index 47d19ca088f..5970e9a7971 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributePureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributePureCodeFirst.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: QueryOfTestTypePropertyDirective } @@ -20,11 +20,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = TestTypePropertyDirective +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -32,8 +52,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributesPureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributesPureCodeFirst.snap index ecc38d780cf..484d4e8e405 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributesPureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToClassAttributesPureCodeFirst.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: QueryOfTestTypePropertyDirectives } @@ -21,11 +21,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = TestTypePropertyDirectives +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -33,8 +53,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeCodeFirst.snap index f22f1b65a23..1e7a3b3e599 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeCodeFirst.snap @@ -12,10 +12,9 @@ type TestType @key(fields: "id") { } "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION "Scalar representing a set of fields." scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypePureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypePureCodeFirst.snap index 9b09b754972..6726ab3e01d 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypePureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypePureCodeFirst.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: QueryOfTestTypeClassDirective } @@ -20,11 +20,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = TestTypeClassDirective +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -32,8 +52,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeSchemaFirst.snap index a2d996ebd0a..7ba5cb6bd0a 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/KeyDirectiveTests.AnnotateKeyToObjectTypeSchemaFirst.snap @@ -16,10 +16,9 @@ type TestType @key(fields: "id") { } "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION "Scalar representing a set of fields." scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap index 8a5fb51db97..c5e4650ab06 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: Query } @@ -25,11 +25,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = Review +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -37,8 +57,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap index d55d01d2381..4c1e888d3f8 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap @@ -16,13 +16,12 @@ type Review @key(fields: "id") { } "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION "Scalar representing a set of fields." scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap index 8392aeb810f..2404b57d973 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/ProvidesDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap @@ -16,13 +16,12 @@ type Review @key(fields: "id") { } "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION "Scalar representing a set of fields." scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap index c190bfb8097..ceb692edffa 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToClassAttributePureCodeFirst.snap @@ -1,4 +1,4 @@ -schema { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { query: Query } @@ -25,11 +25,31 @@ type _Service { "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = Review +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + "Directive to indicate that a field is owned by another service, for example via Apollo federation." directive @external on FIELD_DEFINITION +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION "Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." directive @provides(fields: _FieldSet!) on FIELD_DEFINITION @@ -37,8 +57,17 @@ directive @provides(fields: _FieldSet!) on FIELD_DEFINITION "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap index 59193887c11..2150fa3326b 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldCodeFirst.snap @@ -16,13 +16,12 @@ type Review @key(fields: "id") { } "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION "Scalar representing a set of fields." scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap index 029b7458a5c..3f6082aa497 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/RequiresDirectiveTests.AnnotateProvidesToFieldSchemaFirst.snap @@ -16,13 +16,12 @@ type Review @key(fields: "id") { } "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." -directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE "Used to annotate the required input fieldset from a base type for a resolver." directive @requires(fields: _FieldSet!) on FIELD_DEFINITION -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION "Scalar representing a set of fields." scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypePureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypePureCodeFirst.snap index 41405ebabe9..ab5045bd7ca 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypePureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypePureCodeFirst.snap @@ -1,6 +1,70 @@ -type Address @key(fields: "matchCode") { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { + query: EmptyQuery +} + +type Address @key(fields: "matchCode") { matchCode: String } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +type EmptyQuery { + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! +} + +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! +} + +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Address + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: _FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: _FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +"Scalar representing a set of fields." +scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypeSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypeSchemaFirst.snap index dcd7d4f7a36..d1920e1e401 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypeSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeEmptyQueryTypeSchemaFirst.snap @@ -1,6 +1,70 @@ -type Address @key(fields: "matchCode") { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { + query: Query +} + +type Address @key(fields: "matchCode") { matchCode: String! } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +type Query { + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! +} + +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! +} + +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Address + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: _FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: _FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +"Scalar representing a set of fields." +scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypePureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypePureCodeFirst.snap index 8bba415f87c..12227e708ca 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypePureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypePureCodeFirst.snap @@ -1,10 +1,71 @@ -type Address @key(fields: "matchCode") { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { + query: Query +} + +type Address @key(fields: "matchCode") { matchCode: String } type Query { address(id: Int!): Address! + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! +} + +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Address + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: _FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: _FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +"Scalar representing a set of fields." +scalar _FieldSet diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypeSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypeSchemaFirst.snap index 71ba88c265b..9b168546676 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypeSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/ServiceTypeTests.TestServiceTypeTypeSchemaFirst.snap @@ -1,10 +1,71 @@ -type Address @key(fields: "matchCode") { +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.5", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy" ]) { + query: Query +} + +type Address @key(fields: "matchCode") { matchCode: String! } type Query { address: Address! + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! +} + +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Address + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: _FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: _FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: _FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +"Scalar representing a set of fields." +scalar _FieldSet From ae9e2f2d9cfdc075d991a8c12c4b295fe12a8bee Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:23:46 +0200 Subject: [PATCH 45/89] Update schema printer snapshots --- ...interTests.CustomDirective_IsInternal.snap | 3 +- ...PrinterTests.CustomDirective_IsPublic.snap | 3 +- ...nPrinterApolloDirectivesPureCodeFirst.snap | 33 +++++++++++++++++-- ...ionPrinterApolloDirectivesSchemaFirst.snap | 33 +++++++++++++++++-- ...ests.TestFederationPrinterSchemaFirst.snap | 33 +++++++++++++++++-- ...ationPrinterSchemaFirst_With_DateTime.snap | 33 +++++++++++++++++-- ...tionPrinterTypeExtensionPureCodeFirst.snap | 33 +++++++++++++++++-- 7 files changed, 157 insertions(+), 14 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsInternal.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsInternal.snap index 5a6898f83b6..974b511d5d2 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsInternal.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsInternal.snap @@ -10,5 +10,4 @@ type Query { deprecated2: EnumWithDeprecatedValue @deprecated(reason: "deprecated") } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsPublic.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsPublic.snap index c3ca5df9bb3..803416b6241 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsPublic.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.CustomDirective_IsPublic.snap @@ -12,5 +12,4 @@ type Query { directive @custom on FIELD_DEFINITION | ENUM_VALUE -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesPureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesPureCodeFirst.snap index bfdd008876b..8020b4f3a75 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesPureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesPureCodeFirst.snap @@ -6,6 +6,9 @@ type QueryRootOfUser { entity(id: Int!): User! } +"Scalar representing a JWT scope" +scalar Scope + type User @key(fields: "id") { id: Int! idCode: String! @external @@ -13,5 +16,31 @@ type User @key(fields: "id") { address: Address! @provides(fields: "zipcode") } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesSchemaFirst.snap index 14ef1fd1524..c4bcaa65d05 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterApolloDirectivesSchemaFirst.snap @@ -2,10 +2,39 @@ someField(a: Int): TestType } +"Scalar representing a JWT scope" +scalar Scope + type TestType @key(fields: "id") { id: Int! name: String! } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst.snap index 48ef5f4c24c..9473ae63753 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst.snap @@ -6,6 +6,9 @@ type Query implements iQuery { someField(a: Int): TestType } +"Scalar representing a JWT scope" +scalar Scope + enum SomeEnum { FOO BAR @@ -38,5 +41,31 @@ interface iTestType @key(fields: "id") { external: String! @external } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst_With_DateTime.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst_With_DateTime.snap index 84c53335416..b1372176064 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst_With_DateTime.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterSchemaFirst_With_DateTime.snap @@ -9,6 +9,9 @@ type Query implements iQuery { someField(a: Int): TestType } +"Scalar representing a JWT scope" +scalar Scope + enum SomeEnum { FOO BAR @@ -42,5 +45,31 @@ interface iTestType @key(fields: "id") { external: String! @external } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterTypeExtensionPureCodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterTypeExtensionPureCodeFirst.snap index f87457144ba..cd609a28fe2 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterTypeExtensionPureCodeFirst.snap +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/__snapshots__/FederationSchemaPrinterTests.TestFederationPrinterTypeExtensionPureCodeFirst.snap @@ -6,5 +6,34 @@ type QueryRootOfProduct { entity(id: Int!): Product! } -"The @tag directive is used to apply arbitrary string\nmetadata to a schema location. Custom tooling can use\nthis metadata during any step of the schema delivery flow,\nincluding composition, static analysis, and documentation.\n \n\ninterface Book {\n id: ID! @tag(name: \"your-value\")\n title: String!\n author: String!\n}" -directive @tag("The name of the tag." name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +"Scalar representing a JWT scope" +scalar Scope + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION From ff8ac9ef57278ac7c5e8211e329e53b219a2d891 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 11:25:38 +0200 Subject: [PATCH 46/89] Ignore last argument of key directive --- .../ApolloFederation.Tests/Directives/KeyDirectiveTests.cs | 4 ++-- .../Directives/ProvidesDirectiveTests.cs | 2 +- .../Directives/RequiresDirectiveTests.cs | 2 +- .../test/ApolloFederation.Tests/FederationTypesTestBase.cs | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs index f32d1a37442..310cbf5ed20 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs @@ -26,8 +26,8 @@ public void AddKeyDirective_EnsureAvailableInSchema() Assert.NotNull(directive); Assert.IsType(directive); Assert.Equal(WellKnownTypeNames.Key, directive!.Name); - Assert.Single(directive.Arguments); - AssertDirectiveHasFieldsArgument(directive); + Assert.Equal(2, directive.Arguments.Count); + AssertDirectiveHasFieldsArgument(directive.Arguments.Take(1)); Assert.True(directive.Locations.HasFlag(DirectiveLocation.Object)); Assert.True(directive.Locations.HasFlag(DirectiveLocation.Interface)); } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs index 5e38f963f45..7c6fc133621 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs @@ -24,7 +24,7 @@ public void AddProvidesDirective_EnsureAvailableInSchema() Assert.IsType(directive); Assert.Equal(WellKnownTypeNames.Provides, directive!.Name); Assert.Single(directive.Arguments); - AssertDirectiveHasFieldsArgument(directive); + AssertDirectiveHasFieldsArgument(directive.Arguments); Assert.Equal(DirectiveLocation.FieldDefinition, directive.Locations); } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs index 33614a89332..b47a5cd3fc0 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs @@ -24,7 +24,7 @@ public void AddRequiresDirective_EnsureAvailableInSchema() Assert.IsType(directive); Assert.Equal(WellKnownTypeNames.Requires, directive!.Name); Assert.Single(directive.Arguments); - AssertDirectiveHasFieldsArgument(directive); + AssertDirectiveHasFieldsArgument(directive.Arguments); Assert.Equal(DirectiveLocation.FieldDefinition, directive.Locations); } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs index 39733fb7cd3..353b4baaede 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using HotChocolate.Types; namespace HotChocolate.ApolloFederation; @@ -21,10 +22,10 @@ protected ISchema CreateSchema(Action configure) return builder.Create(); } - protected void AssertDirectiveHasFieldsArgument(DirectiveType directive) + protected void AssertDirectiveHasFieldsArgument(IEnumerable directiveArguments) { Assert.Collection( - directive.Arguments, + directiveArguments, t => { Assert.Equal("fields", t.Name); From 6f08792a8f4549976d22fb4bade5c070a2ed78d3 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 14:12:57 +0200 Subject: [PATCH 47/89] Factor out argument node creation for Key directive --- .../ApolloFederationDescriptorExtensions.cs | 53 +++++++++---------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index b9fdc433e0b..86dcd83f268 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -291,24 +291,9 @@ public static IEntityResolverDescriptor Key( nameof(fieldSet)); } - var arguments = new List - { - new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet)), - }; - if (false == resolvable) - { - arguments.Add( - new ArgumentNode( - WellKnownArgumentNames.Resolvable, - new BooleanValueNode(false)) - ); - } + var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); - descriptor.Directive( - WellKnownTypeNames.Key, - arguments.ToArray()); + descriptor.Directive(WellKnownTypeNames.Key, arguments); return new EntityResolverDescriptor(descriptor); } @@ -331,24 +316,34 @@ public static IInterfaceTypeDescriptor Key( nameof(fieldSet)); } - var arguments = new List + var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); + + return descriptor.Directive(WellKnownTypeNames.Key, arguments); + } + + private static ArgumentNode[] CreateKeyArgumentNodes(string fieldSet, bool? resolvable) + { + bool notResolvable = resolvable is false; + + int argumentCount = 1; + if (notResolvable) { - new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet)), - }; - if (false == resolvable) + argumentCount++; + } + + var arguments = new ArgumentNode[argumentCount]; + arguments[0] = new ArgumentNode( + WellKnownArgumentNames.Fields, + new StringValueNode(fieldSet)); + if (notResolvable) { - arguments.Add( + arguments[1] = new ArgumentNode( WellKnownArgumentNames.Resolvable, - new BooleanValueNode(false)) - ); + new BooleanValueNode(false)); } - return descriptor.Directive( - WellKnownTypeNames.Key, - arguments.ToArray()); + return arguments; } /// From 2b2d6024f97ad51caa261bf0dbf44d8446f768ad Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 14:22:20 +0200 Subject: [PATCH 48/89] Fix formatting for parens --- .../Extensions/ApolloFederationDescriptorExtensions.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 86dcd83f268..dba094f0aa8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -109,9 +109,7 @@ public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor WellKnownTypeNames.ComposeDirective, new ArgumentNode( WellKnownArgumentNames.Name, - new StringValueNode(name) - ) - ); + new StringValueNode(name))); } /// From e6ce03590e7641bc94bc0f751a42f9135eefd7d1 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Wed, 13 Dec 2023 14:22:31 +0200 Subject: [PATCH 49/89] Remove unused IsEmpty --- .../Configuration/SchemaPrinter/FederationSchemaPrinter.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs index 6f9fa2bfca2..7e1d6ad562a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs @@ -146,8 +146,6 @@ public IReadOnlyList ReadOnlyList return Array.Empty(); } } - - public bool IsEmpty => _list is null; } private static MaybeList SerializeDirectives( From 8999c4ae0ed4d2b87b940e2dfef8a231a93156e1 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 13 Dec 2023 21:31:52 +0100 Subject: [PATCH 50/89] Refinements --- .../Attributes/ApolloTagAttribute.cs | 102 - .../Attributes/ExtendServiceTypeAttribute.cs | 17 +- .../Attributes/ExtendsAttribute.cs | 27 - .../Configuration/Directives/Contact.cs | 67 + .../Directives/ContactDirectiveType.cs | 37 - ...ederationDescriptorExtensions.ApolloTag.cs | 108 - .../ApolloFederationDescriptorExtensions.cs | 176 +- .../EntitiesResolverTests.cs | 4 +- .../Types.Analyzers.Tests/packages.lock.json | 3041 ++++++++++++++++- .../Fusion/test/Shared/packages.lock.json | 1620 ++++++++- 10 files changed, 4781 insertions(+), 418 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/Contact.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs deleted file mode 100644 index 50856188db9..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloTagAttribute.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System.Reflection; -using HotChocolate.Types.Descriptors; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @tag(name: String!) repeatable on FIELD_DEFINITION -/// | OBJECT -/// | INTERFACE -/// | UNION -/// | ENUM -/// | ENUM_VALUE -/// | SCALAR -/// | INPUT_OBJECT -/// | INPUT_FIELD_DEFINITION -/// | ARGUMENT_DEFINITION -/// -/// -/// The @tag directive allows users to annotate fields and types with additional metadata information. -/// Tagging is commonly used for creating variants of the supergraph using contracts. -/// -/// -/// type Foo @tag(name: "internal") { -/// id: ID! -/// name: String -/// } -/// -/// -[AttributeUsage( - AttributeTargets.Class | - AttributeTargets.Enum | - AttributeTargets.Field | - AttributeTargets.Interface | - AttributeTargets.Method | - AttributeTargets.Parameter | - AttributeTargets.Property | - AttributeTargets.Struct, - AllowMultiple = true)] -public sealed class ApolloTagAttribute : DescriptorAttribute -{ - /// - /// Initializes new instance of - /// - /// - /// Tag metadata value - /// - public ApolloTagAttribute(string name) - { - Name = name; - } - - /// - /// Retrieves tag metadata value - /// - public string Name { get; } - - protected internal override void TryConfigure( - IDescriptorContext context, - IDescriptor descriptor, - ICustomAttributeProvider element) - { - switch (descriptor) - { - case IEnumTypeDescriptor enumDescriptor: - { - enumDescriptor.ApolloTag(Name); - break; - } - case IEnumValueDescriptor enumValueDescriptor: - { - enumValueDescriptor.ApolloTag(Name); - break; - } - case IInputObjectTypeDescriptor inputObjectTypeDescriptor: - { - inputObjectTypeDescriptor.ApolloTag(Name); - break; - } - case IInputFieldDescriptor inputFieldDescriptor: - { - inputFieldDescriptor.ApolloTag(Name); - break; - } - case IInterfaceTypeDescriptor interfaceTypeDescriptor: - { - interfaceTypeDescriptor.ApolloTag(Name); - break; - } - case IObjectFieldDescriptor objectFieldDescriptor: - { - objectFieldDescriptor.ApolloTag(Name); - break; - } - case IUnionTypeDescriptor unionTypeDescriptor: - { - unionTypeDescriptor.ApolloTag(Name); - break; - } - } - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs index 80227a12991..aa927f9bb21 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs @@ -3,15 +3,24 @@ namespace HotChocolate.ApolloFederation; /// -/// This attribute is used to mark types as an extended type -/// of a type that is defined by another service when -/// using apollo federation. +/// +/// directive @extends on OBJECT | INTERFACE +/// +/// +/// The @extends directive is used to represent type extensions in the schema. Federated extended types should have +/// corresponding @key directive defined that specifies primary key required to fetch the underlying object. +/// +/// # extended from the Users service +/// type Foo @extends @key(fields: "id") { +/// id: ID +/// description: String +/// } +/// /// [AttributeUsage( AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)] -[Obsolete("Use ExtendsAttribute instead")] public sealed class ExtendServiceTypeAttribute : ObjectTypeDescriptorAttribute { protected override void OnConfigure( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs deleted file mode 100644 index f1ca583c3ca..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendsAttribute.cs +++ /dev/null @@ -1,27 +0,0 @@ -using HotChocolate.Types.Descriptors; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @extends on OBJECT | INTERFACE -/// -/// -/// The @extends directive is used to represent type extensions in the schema. Federated extended types should have -/// corresponding @key directive defined that specifies primary key required to fetch the underlying object. -/// -/// # extended from the Users service -/// type Foo @extends @key(fields: "id") { -/// id: ID -/// description: String -/// } -/// -/// -public sealed class ExtendsAttribute : ObjectTypeDescriptorAttribute -{ - protected override void OnConfigure( - IDescriptorContext context, - IObjectTypeDescriptor descriptor, - Type type) - => descriptor.ExtendsType(); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/Contact.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/Contact.cs new file mode 100644 index 00000000000..815dac3400c --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/Contact.cs @@ -0,0 +1,67 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @contact( +/// "Contact title of the subgraph owner" +/// name: String! +/// "URL where the subgraph's owner can be reached" +/// url: String +/// "Other relevant notes can be included here; supports markdown links" +/// description: String +/// ) on SCHEMA +/// +/// +/// Contact schema directive can be used to provide team contact information to your subgraph +/// schema. This information is automatically parsed and displayed by Apollo Studio. +/// See +/// Subgraph Contact Information for additional details. +/// +/// +/// +/// +/// schema +/// @contact( +/// description: "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall)." +/// name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url") { +/// query: Query +/// } +/// +/// +/// +public sealed class Contact +{ + /// + /// Initializes new instance of + /// + /// + /// Contact title of the subgraph owner + /// + /// + /// URL where the subgraph's owner can be reached + /// + /// + /// Other relevant notes can be included here; supports markdown links + /// + public Contact(string name, string? url, string? description) + { + Name = name; + Url = url; + Description = description; + } + + /// + /// Gets the contact title of the subgraph owner. + /// + public string Name { get; } + + /// + /// Gets the url where the subgraph's owner can be reached. + /// + public string? Url { get; } + + /// + /// Gets other relevant notes about subgraph contact information. Can include markdown links. + /// + public string? Description { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs index bb77fc8f3f0..5ca58534a60 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs @@ -35,40 +35,3 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) .Description(FederationResources.ContactDirective_Description) .Location(DirectiveLocation.Schema); } - -public sealed class Contact -{ - /// - /// Initializes new instance of - /// - /// - /// Contact title of the subgraph owner - /// - /// - /// URL where the subgraph's owner can be reached - /// - /// - /// Other relevant notes can be included here; supports markdown links - /// - public Contact(string name, string? url, string? description) - { - Name = name; - Url = url; - Description = description; - } - - /// - /// Gets the contact title of the subgraph owner. - /// - public string Name { get; } - - /// - /// Gets the url where the subgraph's owner can be reached. - /// - public string? Url { get; } - - /// - /// Gets other relevant notes about subgraph contact information. Can include markdown links. - /// - public string? Description { get; } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs deleted file mode 100644 index e20532f0e23..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloTag.cs +++ /dev/null @@ -1,108 +0,0 @@ -using HotChocolate.ApolloFederation; - -namespace HotChocolate.Types; - -/// -/// Provides extensions for applying @tag directive on type system descriptors. -/// -public static partial class ApolloFederationDescriptorExtensions -{ - /// - /// Applies @tag directive to annotate fields and types with additional metadata information. - /// Tagging is commonly used for creating variants of the supergraph using contracts. - /// - /// type Foo @tag(name: "internal") { - /// id: ID! - /// name: String - /// } - /// - /// - /// - /// The type descriptor on which this directive shall be annotated. - /// - /// - /// Tag value to be applied on the target - /// - /// - /// Returns the type descriptor. - /// - /// - /// The is null. - /// - /// - /// The is null. - /// - public static IEnumTypeDescriptor ApolloTag(this IEnumTypeDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IEnumValueDescriptor ApolloTag(this IEnumValueDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IInterfaceFieldDescriptor ApolloTag(this IInterfaceFieldDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IInterfaceTypeDescriptor ApolloTag(this IInterfaceTypeDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IInputObjectTypeDescriptor ApolloTag(this IInputObjectTypeDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IInputFieldDescriptor ApolloTag(this IInputFieldDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IObjectFieldDescriptor ApolloTag(this IObjectFieldDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IObjectTypeDescriptor ApolloTag(this IObjectTypeDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - /// - public static IUnionTypeDescriptor ApolloTag(this IUnionTypeDescriptor descriptor, string name) - { - ValidateTagExtensionParams(descriptor, name); - return descriptor.Directive(new TagValue(name)); - } - - private static void ValidateTagExtensionParams(IDescriptor descriptor, string name) - { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - if (name is null) - { - throw new ArgumentNullException(nameof(name)); - } - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index dba094f0aa8..8be271df1ad 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -18,11 +18,16 @@ public static partial class ApolloFederationDescriptorExtensions /// /// Applies @contact directive which can be used to prpvode team contact information to your subgraph schema. /// This information is automatically parsed and displayed by Apollo Studio. See - /// Subgraph Contact Information + /// + /// Subgraph Contact Information /// for additional details. /// /// - /// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ + /// schema + /// @contact( + /// description: "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall)." + /// name: "My Team Name" + /// url: "https://myteam.slack.com/archives/teams-chat-room-url") { /// query: Query /// } /// @@ -48,18 +53,13 @@ public static partial class ApolloFederationDescriptorExtensions /// /// is null. /// - public static ISchemaTypeDescriptor Contact(this ISchemaTypeDescriptor descriptor, string name, string? url = null, string? description = null) + public static ISchemaTypeDescriptor Contact( + this ISchemaTypeDescriptor descriptor, + string name, string? url = null, + string? description = null) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - if (name is null) - { - throw new ArgumentNullException(nameof(name)); - } - + ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentException.ThrowIfNullOrEmpty(nameof(name)); return descriptor.Directive(new ContactDirective(name, url, description)); } @@ -95,15 +95,8 @@ public static ISchemaTypeDescriptor Contact(this ISchemaTypeDescriptor descripto /// public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor descriptor, string name) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - if (name is null) - { - throw new ArgumentNullException(nameof(name)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentException.ThrowIfNullOrEmpty(nameof(name)); return descriptor.Directive( WellKnownTypeNames.ComposeDirective, @@ -112,26 +105,6 @@ public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor new StringValueNode(name))); } - /// - /// Mark the type as an extension of a type that is defined by another service when - /// using Apollo Federation. - /// - [Obsolete("Use ExtendsType type instead")] - public static IObjectTypeDescriptor ExtendServiceType( - this IObjectTypeDescriptor descriptor) - { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - descriptor - .Extend() - .OnBeforeCreate(d => d.ContextData[ExtendMarker] = true); - - return descriptor; - } - /// /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. @@ -155,15 +128,16 @@ public static IObjectTypeDescriptor ExtendServiceType( /// /// is null. /// - public static IObjectTypeDescriptor ExtendsType( + public static IObjectTypeDescriptor ExtendServiceType( this IObjectTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); + + descriptor + .Extend() + .OnBeforeCreate(d => d.ContextData[ExtendMarker] = true); - return descriptor.Directive(WellKnownTypeNames.Extends); + return descriptor; } /// @@ -196,10 +170,7 @@ public static IObjectTypeDescriptor ExtendsType( public static IObjectFieldDescriptor External( this IObjectFieldDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); return descriptor.Directive(WellKnownTypeNames.External); } @@ -226,10 +197,7 @@ public static IObjectFieldDescriptor External( /// public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); return descriptor.Directive(WellKnownTypeNames.InterfaceObject); } @@ -277,10 +245,7 @@ public static IEntityResolverDescriptor Key( string fieldSet, bool? resolvable = null) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); if (string.IsNullOrEmpty(fieldSet)) { @@ -302,10 +267,7 @@ public static IInterfaceTypeDescriptor Key( string fieldSet, bool? resolvable = null) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); if (string.IsNullOrEmpty(fieldSet)) { @@ -321,9 +283,9 @@ public static IInterfaceTypeDescriptor Key( private static ArgumentNode[] CreateKeyArgumentNodes(string fieldSet, bool? resolvable) { - bool notResolvable = resolvable is false; + var notResolvable = resolvable is false; - int argumentCount = 1; + var argumentCount = 1; if (notResolvable) { argumentCount++; @@ -393,15 +355,8 @@ public static ISchemaTypeDescriptor Link( string url, IEnumerable? import) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - if (url is null) - { - throw new ArgumentNullException(nameof(url)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentException.ThrowIfNullOrEmpty(nameof(url)); return descriptor.Directive(new LinkDirective(url, import?.ToList())); } @@ -437,17 +392,8 @@ public static IObjectFieldDescriptor Override( this IObjectFieldDescriptor descriptor, string from) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - if (string.IsNullOrEmpty(from)) - { - throw new ArgumentException( - FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty, - nameof(from)); - } + ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentException.ThrowIfNullOrEmpty(nameof(from)); return descriptor.Directive( WellKnownTypeNames.Override, @@ -648,39 +594,6 @@ public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descrip return descriptor.Directive(WellKnownTypeNames.Shareable); } - /// - /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have - /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. - /// - /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends - /// directive should be removed from your Federation v2 schemas. - /// - /// # extended from the Users service - /// type Foo @extends @key(fields: "id") { - /// id: ID - /// description: String - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - public static IObjectTypeDescriptor ExtendsType( - this IObjectTypeDescriptor descriptor) - { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } - - return descriptor.Directive(WellKnownTypeNames.Extends); - } /// /// Adds the @key directive which is used to indicate a combination of fields that can be used to uniquely @@ -734,11 +647,28 @@ public static IEntityResolverDescriptor Key( } /// - /// Mark the type as an extension - /// of a type that is defined by another service when - /// using apollo federation. + /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have + /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. + /// + /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends + /// directive should be removed from your Federation v2 schemas. + /// + /// # extended from the Users service + /// type Foo @extends @key(fields: "id") { + /// id: ID + /// description: String + /// } + /// /// - [Obsolete("Use ExtendsType type instead")] + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// public static IObjectTypeDescriptor ExtendServiceType( this IObjectTypeDescriptor descriptor) { diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs index 36654fee60b..f978b3fdefe 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs @@ -259,7 +259,7 @@ public static TypeWithReferenceResolver Get([LocalState] ObjectValueNode data) } } - [Extends] + [ExtendServiceType] public class ForeignType { public ForeignType(string id, string someExternalField) @@ -282,7 +282,7 @@ public static ForeignType GetById(string id, string someExternalField) => new(id, someExternalField); } - [Extends] + [ExtendServiceType] public class MixedFieldTypes { public MixedFieldTypes(string id, int intField) diff --git a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json index 1b7d57684b6..0a36aa0a1b4 100644 --- a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json +++ b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json @@ -1208,8 +1208,8 @@ "dependencies": { "DiffPlex": "[1.7.1, )", "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", "Newtonsoft.Json": "[13.0.2, )", "Xunit": "[2.4.1, )" @@ -1250,7 +1250,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -1431,6 +1431,3041 @@ "Microsoft.Extensions.Options": "[6.0.0, )" } } + }, + "net7.0": { + "ChilliCream.Testing.Utilities": { + "type": "Direct", + "requested": "[0.2.0, )", + "resolved": "0.2.0", + "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", + "dependencies": { + "Newtonsoft.Json": "11.0.2", + "xunit": "2.3.1" + } + }, + "coverlet.msbuild": { + "type": "Direct", + "requested": "[3.1.2, )", + "resolved": "3.1.2", + "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" + }, + "DiffPlex": { + "type": "Direct", + "requested": "[1.7.1, )", + "resolved": "1.7.1", + "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" + }, + "Microsoft.NET.Test.Sdk": { + "type": "Direct", + "requested": "[17.1.0, )", + "resolved": "17.1.0", + "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", + "dependencies": { + "Microsoft.CodeCoverage": "17.1.0", + "Microsoft.TestPlatform.TestHost": "17.1.0" + } + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[1.1.1, )", + "resolved": "1.1.1", + "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Moq": { + "type": "Direct", + "requested": "[4.18.1, )", + "resolved": "4.18.1", + "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", + "dependencies": { + "Castle.Core": "5.0.0", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, + "Snapshooter.Xunit": { + "type": "Direct", + "requested": "[0.5.4, )", + "resolved": "0.5.4", + "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", + "dependencies": { + "Snapshooter": "0.5.4", + "xunit.assert": "2.4.1", + "xunit.core": "2.4.1" + } + }, + "xunit": { + "type": "Direct", + "requested": "[2.4.1, )", + "resolved": "2.4.1", + "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", + "dependencies": { + "xunit.analyzers": "0.10.0", + "xunit.assert": "[2.4.1]", + "xunit.core": "[2.4.1]" + } + }, + "xunit.runner.visualstudio": { + "type": "Direct", + "requested": "[2.4.3, )", + "resolved": "2.4.3", + "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" + }, + "BananaCakePop.Middleware": { + "type": "Transitive", + "resolved": "10.0.7", + "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", + "dependencies": { + "Yarp.ReverseProxy": "2.0.1" + } + }, + "Castle.Core": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", + "dependencies": { + "System.Diagnostics.EventLog": "6.0.0" + } + }, + "Microsoft.AspNetCore.WebUtilities": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "9ErxAAKaDzxXASB/b5uLEkLgUWv1QbeVxyJYEHQwMaxXOeFFVkQxiq8RyfVcifLU7NR0QY0p3acqx4ZpYfhHDg==", + "dependencies": { + "Microsoft.Net.Http.Headers": "2.2.0", + "System.Text.Encodings.Web": "4.5.0" + } + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" + }, + "Microsoft.CodeCoverage": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw==" + }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "9Pq9f/CvOSz0t9yQa6g1uWpxa2sm13daLFm8EZwy9MaQUjKXWdNUXQwIxwhmba5N83UIqURiPHSNqGK1vfWF2w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", + "Microsoft.Extensions.Logging": "7.0.0", + "Microsoft.Extensions.Logging.Abstractions": "7.0.0", + "Microsoft.Extensions.Options": "7.0.0" + } + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "7.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", + "Microsoft.Extensions.Logging.Abstractions": "7.0.0", + "Microsoft.Extensions.Options": "7.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==" + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "udvKco0sAVgYGTBnHUb0tY9JQzJ/nPDiv/8PIyz69wl1AibeCDZOLVVI+6156dPfHmJH7ws5oUJRiW4ZmAvuuA==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", + "Microsoft.Extensions.Primitives": "7.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==" + }, + "Microsoft.Net.Http.Headers": { + "type": "Transitive", + "resolved": "2.2.0", + "contentHash": "iZNkjYqlo8sIOI0bQfpsSoMTmB/kyvmV2h225ihyZT33aTp48ZpF6qYnXxzSXmHt8DpBAwBTX+1s1UFLbYfZKg==", + "dependencies": { + "Microsoft.Extensions.Primitives": "2.2.0", + "System.Buffers": "4.5.0" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" + }, + "Microsoft.NETCore.Targets": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", + "dependencies": { + "NuGet.Frameworks": "5.11.0", + "System.Reflection.Metadata": "1.6.0" + } + }, + "Microsoft.TestPlatform.TestHost": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.1.0", + "Newtonsoft.Json": "9.0.1" + } + }, + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "NETStandard.Library": { + "type": "Transitive", + "resolved": "1.6.1", + "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "System.AppContext": "4.3.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Console": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tools": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.Compression": "4.3.0", + "System.IO.Compression.ZipFile": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Net.Http": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Net.Sockets": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Timer": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0", + "System.Xml.XDocument": "4.3.0" + } + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.2", + "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" + }, + "NuGet.Frameworks": { + "type": "Transitive", + "resolved": "5.11.0", + "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.native.System": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.IO.Compression": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "Snapshooter": { + "type": "Transitive", + "resolved": "0.5.4", + "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", + "dependencies": { + "Newtonsoft.Json": "12.0.1" + } + }, + "System.AppContext": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.5.0", + "contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A==" + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Collections.Concurrent": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ==" + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" + }, + "System.Console": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "9W0ewWDuAyDqS2PigdTxk6jDKonfgscY/hP8hm7VpxYhNHZHKvZTdRckberlFk3VnCmr3xBUyMBut12Q+T2aOw==" + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" + }, + "System.Diagnostics.Tools": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.Compression": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Buffers": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.IO.Compression": "4.3.0" + } + }, + "System.IO.Compression.ZipFile": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", + "dependencies": { + "System.Buffers": "4.3.0", + "System.IO": "4.3.0", + "System.IO.Compression": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" + }, + "System.IO.Packaging": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "+j5ezLP7785/pd4taKQhXAWsymsIW2nTnE/U3/jpGZzcJx5lip6qkj6UrxSE7ZYZfL0GaLuymwGLqwJV/c7O7Q==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "jRn6JYnNPW6xgQazROBLSfpdoczRw694vO5kKvMcNnpXuolEixUyw6IBuBs2Y2mlSX/LdLvyyWmfXhaI3ND1Yg==" + }, + "System.Linq": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Expressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Emit.Lightweight": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Net.Sockets": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.ObjectModel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Reactive": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.Lightweight": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.InteropServices.RuntimeInformation": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Runtime.Numerics": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg==" + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "DaGSsVqKsn/ia6RG8frjwmJonfos0srquhw09TlT8KRw5I43E+4gs+/bZj4K0vShJ5H9imCuXupb4RmS+dBy3w==", + "dependencies": { + "System.Text.Encodings.Web": "7.0.0" + } + }, + "System.Text.RegularExpressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Channels": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "qmeeYNROMsONF6ndEZcIQ+VxR4Q/TX/7uIVLJqtwIWL7dDWeh0l1UIqgo4wYyjG//5lUNhwkLDSFl+pAWO6oiA==" + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" + }, + "System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Xml.ReaderWriter": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Tasks.Extensions": "4.3.0" + } + }, + "System.Xml.XDocument": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tools": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0" + } + }, + "xunit.abstractions": { + "type": "Transitive", + "resolved": "2.0.3", + "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" + }, + "xunit.analyzers": { + "type": "Transitive", + "resolved": "0.10.0", + "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" + }, + "xunit.assert": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", + "dependencies": { + "NETStandard.Library": "1.6.1" + } + }, + "xunit.core": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", + "dependencies": { + "xunit.extensibility.core": "[2.4.1]", + "xunit.extensibility.execution": "[2.4.1]" + } + }, + "xunit.extensibility.core": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", + "dependencies": { + "NETStandard.Library": "1.6.1", + "xunit.abstractions": "2.0.3" + } + }, + "xunit.extensibility.execution": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", + "dependencies": { + "NETStandard.Library": "1.6.1", + "xunit.extensibility.core": "[2.4.1]" + } + }, + "Yarp.ReverseProxy": { + "type": "Transitive", + "resolved": "2.0.1", + "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", + "dependencies": { + "System.IO.Hashing": "7.0.0" + } + }, + "cookiecrumble": { + "type": "Project", + "dependencies": { + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.Fusion": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", + "Newtonsoft.Json": "[13.0.2, )", + "Xunit": "[2.4.1, )" + } + }, + "greendonut": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "[7.0.0, )", + "System.Diagnostics.DiagnosticSource": "[7.0.0, )", + "System.Threading.Tasks.Extensions": "[4.5.0, )" + } + }, + "HotChocolate": { + "type": "Project", + "dependencies": { + "HotChocolate.Authorization": "[0.0.0, )", + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Fetching": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )", + "HotChocolate.Types.CursorPagination": "[0.0.0, )", + "HotChocolate.Types.Mutations": "[0.0.0, )", + "HotChocolate.Types.OffsetPagination": "[0.0.0, )", + "HotChocolate.Validation": "[0.0.0, )" + } + }, + "hotchocolate.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "System.Collections.Immutable": "[7.0.0, )" + } + }, + "hotchocolate.aspnetcore": { + "type": "Project", + "dependencies": { + "BananaCakePop.Middleware": "[10.0.7, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" + } + }, + "hotchocolate.authorization": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )" + } + }, + "hotchocolate.execution": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Fetching": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )", + "HotChocolate.Validation": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection": "[7.0.0, )", + "System.Threading.Channels": "[7.0.0, )" + } + }, + "hotchocolate.execution.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )" + } + }, + "hotchocolate.fetching": { + "type": "Project", + "dependencies": { + "GreenDonut": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.fusion": { + "type": "Project", + "dependencies": { + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.Fusion.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", + "Microsoft.Extensions.Http": "[7.0.0, )", + "System.Reactive": "[5.0.0, )" + } + }, + "hotchocolate.fusion.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Packaging": "[7.0.0, )" + } + }, + "hotchocolate.language": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Language.Utf8": "[0.0.0, )", + "HotChocolate.Language.Visitors": "[0.0.0, )", + "HotChocolate.Language.Web": "[0.0.0, )" + } + }, + "hotchocolate.language.syntaxtree": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "[7.0.0, )" + } + }, + "hotchocolate.language.utf8": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.language.visitors": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.language.web": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.Utf8": "[0.0.0, )" + } + }, + "HotChocolate.StarWars": { + "type": "Project", + "dependencies": { + "ChilliCream.Testing.Utilities": "[0.2.0, )", + "CookieCrumble": "[0.0.0, )", + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "Microsoft.NET.Test.Sdk": "[17.1.0, )", + "Moq": "[4.18.1, )", + "Snapshooter.Xunit": "[0.5.4, )", + "xunit": "[2.4.1, )" + } + }, + "hotchocolate.subscriptions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )" + } + }, + "hotchocolate.subscriptions.inmemory": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Subscriptions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )" + } + }, + "hotchocolate.tests.utilities": { + "type": "Project", + "dependencies": { + "ChilliCream.Testing.Utilities": "[0.2.0, )", + "CookieCrumble": "[0.0.0, )", + "DiffPlex": "[1.7.1, )", + "HotChocolate.StarWars": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "Microsoft.NET.Test.Sdk": "[17.1.0, )", + "Moq": "[4.18.1, )", + "Snapshooter.Xunit": "[0.5.4, )", + "xunit": "[2.4.1, )" + } + }, + "hotchocolate.transport.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "System.Collections.Immutable": "[7.0.0, )", + "System.Text.Json": "[7.0.0, )" + } + }, + "hotchocolate.transport.http": { + "type": "Project", + "dependencies": { + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Pipelines": "[7.0.0, )" + } + }, + "hotchocolate.transport.sockets": { + "type": "Project", + "dependencies": { + "System.IO.Pipelines": "[7.0.0, )" + } + }, + "hotchocolate.transport.sockets.client": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.Collections.Immutable": "[7.0.0, )", + "System.Text.Json": "[7.0.0, )" + } + }, + "hotchocolate.types": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Types.Shared": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", + "Microsoft.Extensions.ObjectPool": "[7.0.0, )", + "System.ComponentModel.Annotations": "[5.0.0, )", + "System.Text.Json": "[7.0.0, )" + } + }, + "hotchocolate.types.cursorpagination": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.mutations": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.offsetpagination": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.scalars.upload": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.shared": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.utilities": { + "type": "Project" + }, + "hotchocolate.validation": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", + "Microsoft.Extensions.Options": "[7.0.0, )" + } + } + }, + "net8.0": { + "ChilliCream.Testing.Utilities": { + "type": "Direct", + "requested": "[0.2.0, )", + "resolved": "0.2.0", + "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", + "dependencies": { + "Newtonsoft.Json": "11.0.2", + "xunit": "2.3.1" + } + }, + "coverlet.msbuild": { + "type": "Direct", + "requested": "[3.1.2, )", + "resolved": "3.1.2", + "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" + }, + "DiffPlex": { + "type": "Direct", + "requested": "[1.7.1, )", + "resolved": "1.7.1", + "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" + }, + "Microsoft.NET.Test.Sdk": { + "type": "Direct", + "requested": "[17.1.0, )", + "resolved": "17.1.0", + "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", + "dependencies": { + "Microsoft.CodeCoverage": "17.1.0", + "Microsoft.TestPlatform.TestHost": "17.1.0" + } + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[1.1.1, )", + "resolved": "1.1.1", + "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Moq": { + "type": "Direct", + "requested": "[4.18.1, )", + "resolved": "4.18.1", + "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", + "dependencies": { + "Castle.Core": "5.0.0", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, + "Snapshooter.Xunit": { + "type": "Direct", + "requested": "[0.5.4, )", + "resolved": "0.5.4", + "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", + "dependencies": { + "Snapshooter": "0.5.4", + "xunit.assert": "2.4.1", + "xunit.core": "2.4.1" + } + }, + "xunit": { + "type": "Direct", + "requested": "[2.4.1, )", + "resolved": "2.4.1", + "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", + "dependencies": { + "xunit.analyzers": "0.10.0", + "xunit.assert": "[2.4.1]", + "xunit.core": "[2.4.1]" + } + }, + "xunit.runner.visualstudio": { + "type": "Direct", + "requested": "[2.4.3, )", + "resolved": "2.4.3", + "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" + }, + "BananaCakePop.Middleware": { + "type": "Transitive", + "resolved": "10.0.7", + "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", + "dependencies": { + "Yarp.ReverseProxy": "2.0.1" + } + }, + "Castle.Core": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", + "dependencies": { + "System.Diagnostics.EventLog": "6.0.0" + } + }, + "Microsoft.AspNetCore.WebUtilities": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "z1SXKg5Bk02VmrrOab1TO2yxkZIfL4RyrS+yCpwxcLTqJwImYhEttz3LYbl1gQebkAAvx2Fm4NVXmopxXeLZgw==", + "dependencies": { + "Microsoft.Net.Http.Headers": "8.0.0", + "System.IO.Pipelines": "8.0.0" + } + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" + }, + "Microsoft.CodeCoverage": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" + }, + "Microsoft.Extensions.Diagnostics": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "3PZp/YSkIXrF7QK7PfC1bkyRYwqOHpWFad8Qx+4wkuumAeXo1NHaxpS9LboNA9OvNSAu+QOVlXbMyoY+pHSqcw==", + "dependencies": { + "Microsoft.Extensions.Configuration": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", + "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" + } + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0" + } + }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "cWz4caHwvx0emoYe7NkHPxII/KkTI8R/LC9qdqJqnKv2poTJ4e2qqPGQqvRoQ5kaSA4FU5IV3qFAuLuOhoqULQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics": "8.0.0", + "Microsoft.Extensions.Logging": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" + } + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "4pm+XgxSukskwjzDDfSjG4KNUIOdFF2VaqZZDtTzoyQMOVSnlV6ZM8a9aVu5dg9LVZTB//utzSc8fOi0b0Mb2Q==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Options.ConfigurationExtensions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.Configuration.Binder": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" + }, + "Microsoft.Net.Http.Headers": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "YlHqL8oWBX3H1LmdKUOxEMW8cVD8nUACEnE2Fu3Ze4k7mYf8yJ1o/uLqoequQV0GDupXyCBEzYhn7Zxdz7pqYQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" + }, + "Microsoft.NETCore.Targets": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", + "dependencies": { + "NuGet.Frameworks": "5.11.0", + "System.Reflection.Metadata": "1.6.0" + } + }, + "Microsoft.TestPlatform.TestHost": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.1.0", + "Newtonsoft.Json": "9.0.1" + } + }, + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "NETStandard.Library": { + "type": "Transitive", + "resolved": "1.6.1", + "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "System.AppContext": "4.3.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Console": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tools": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.Compression": "4.3.0", + "System.IO.Compression.ZipFile": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Net.Http": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Net.Sockets": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Timer": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0", + "System.Xml.XDocument": "4.3.0" + } + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.2", + "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" + }, + "NuGet.Frameworks": { + "type": "Transitive", + "resolved": "5.11.0", + "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.native.System": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.IO.Compression": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "Snapshooter": { + "type": "Transitive", + "resolved": "0.5.4", + "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", + "dependencies": { + "Newtonsoft.Json": "12.0.1" + } + }, + "System.AppContext": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Collections.Concurrent": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" + }, + "System.Console": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" + }, + "System.Diagnostics.Tools": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.Compression": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Buffers": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.IO.Compression": "4.3.0" + } + }, + "System.IO.Compression.ZipFile": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", + "dependencies": { + "System.Buffers": "4.3.0", + "System.IO": "4.3.0", + "System.IO.Compression": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" + }, + "System.IO.Packaging": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "8g1V4YRpdGAxFcK8v9OjuMdIOJSpF30Zb1JGicwVZhly3I994WFyBdV6mQEo8d3T+URQe55/M0U0eIH0Hts1bg==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" + }, + "System.Linq": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Expressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Emit.Lightweight": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Net.Sockets": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.ObjectModel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Reactive": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.Lightweight": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.InteropServices.RuntimeInformation": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Runtime.Numerics": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==" + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Text.Encodings.Web": "8.0.0" + } + }, + "System.Text.RegularExpressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Channels": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "CMaFr7v+57RW7uZfZkPExsPB6ljwzhjACWW1gfU35Y56rk72B/Wu+sTqxVmGSk4SFUlPc3cjeKND0zktziyjBA==" + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" + }, + "System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Xml.ReaderWriter": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Tasks.Extensions": "4.3.0" + } + }, + "System.Xml.XDocument": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tools": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0" + } + }, + "xunit.abstractions": { + "type": "Transitive", + "resolved": "2.0.3", + "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" + }, + "xunit.analyzers": { + "type": "Transitive", + "resolved": "0.10.0", + "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" + }, + "xunit.assert": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", + "dependencies": { + "NETStandard.Library": "1.6.1" + } + }, + "xunit.core": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", + "dependencies": { + "xunit.extensibility.core": "[2.4.1]", + "xunit.extensibility.execution": "[2.4.1]" + } + }, + "xunit.extensibility.core": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", + "dependencies": { + "NETStandard.Library": "1.6.1", + "xunit.abstractions": "2.0.3" + } + }, + "xunit.extensibility.execution": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", + "dependencies": { + "NETStandard.Library": "1.6.1", + "xunit.extensibility.core": "[2.4.1]" + } + }, + "Yarp.ReverseProxy": { + "type": "Transitive", + "resolved": "2.0.1", + "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", + "dependencies": { + "System.IO.Hashing": "7.0.0" + } + }, + "cookiecrumble": { + "type": "Project", + "dependencies": { + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.Fusion": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", + "Newtonsoft.Json": "[13.0.2, )", + "Xunit": "[2.4.1, )" + } + }, + "greendonut": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "[8.0.0, )", + "System.Diagnostics.DiagnosticSource": "[8.0.0, )", + "System.Threading.Tasks.Extensions": "[4.5.0, )" + } + }, + "HotChocolate": { + "type": "Project", + "dependencies": { + "HotChocolate.Authorization": "[0.0.0, )", + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Fetching": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )", + "HotChocolate.Types.CursorPagination": "[0.0.0, )", + "HotChocolate.Types.Mutations": "[0.0.0, )", + "HotChocolate.Types.OffsetPagination": "[0.0.0, )", + "HotChocolate.Validation": "[0.0.0, )" + } + }, + "hotchocolate.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )" + } + }, + "hotchocolate.aspnetcore": { + "type": "Project", + "dependencies": { + "BananaCakePop.Middleware": "[10.0.7, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" + } + }, + "hotchocolate.authorization": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )" + } + }, + "hotchocolate.execution": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Fetching": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )", + "HotChocolate.Validation": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", + "System.Threading.Channels": "[8.0.0, )" + } + }, + "hotchocolate.execution.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" + } + }, + "hotchocolate.fetching": { + "type": "Project", + "dependencies": { + "GreenDonut": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.fusion": { + "type": "Project", + "dependencies": { + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.Fusion.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", + "Microsoft.Extensions.Http": "[8.0.0, )", + "System.Reactive": "[5.0.0, )" + } + }, + "hotchocolate.fusion.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Packaging": "[8.0.0, )" + } + }, + "hotchocolate.language": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Language.Utf8": "[0.0.0, )", + "HotChocolate.Language.Visitors": "[0.0.0, )", + "HotChocolate.Language.Web": "[0.0.0, )" + } + }, + "hotchocolate.language.syntaxtree": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "[8.0.0, )" + } + }, + "hotchocolate.language.utf8": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.language.visitors": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.language.web": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.Utf8": "[0.0.0, )" + } + }, + "HotChocolate.StarWars": { + "type": "Project", + "dependencies": { + "ChilliCream.Testing.Utilities": "[0.2.0, )", + "CookieCrumble": "[0.0.0, )", + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "Microsoft.NET.Test.Sdk": "[17.1.0, )", + "Moq": "[4.18.1, )", + "Snapshooter.Xunit": "[0.5.4, )", + "xunit": "[2.4.1, )" + } + }, + "hotchocolate.subscriptions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )" + } + }, + "hotchocolate.subscriptions.inmemory": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Subscriptions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" + } + }, + "hotchocolate.tests.utilities": { + "type": "Project", + "dependencies": { + "ChilliCream.Testing.Utilities": "[0.2.0, )", + "CookieCrumble": "[0.0.0, )", + "DiffPlex": "[1.7.1, )", + "HotChocolate.StarWars": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "Microsoft.NET.Test.Sdk": "[17.1.0, )", + "Moq": "[4.18.1, )", + "Snapshooter.Xunit": "[0.5.4, )", + "xunit": "[2.4.1, )" + } + }, + "hotchocolate.transport.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.transport.http": { + "type": "Project", + "dependencies": { + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Pipelines": "[8.0.0, )" + } + }, + "hotchocolate.transport.sockets": { + "type": "Project", + "dependencies": { + "System.IO.Pipelines": "[8.0.0, )" + } + }, + "hotchocolate.transport.sockets.client": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.types": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Types.Shared": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", + "Microsoft.Extensions.ObjectPool": "[8.0.0, )", + "System.ComponentModel.Annotations": "[5.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.types.cursorpagination": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.mutations": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.offsetpagination": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.scalars.upload": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.shared": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.utilities": { + "type": "Project" + }, + "hotchocolate.validation": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", + "Microsoft.Extensions.Options": "[8.0.0, )" + } + } } } } \ No newline at end of file diff --git a/src/HotChocolate/Fusion/test/Shared/packages.lock.json b/src/HotChocolate/Fusion/test/Shared/packages.lock.json index f2ae213e6b7..7da95b22359 100644 --- a/src/HotChocolate/Fusion/test/Shared/packages.lock.json +++ b/src/HotChocolate/Fusion/test/Shared/packages.lock.json @@ -1226,9 +1226,9 @@ "dependencies": { "DiffPlex": "[1.7.1, )", "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", "Newtonsoft.Json": "[13.0.2, )", "Xunit": "[2.4.1, )" @@ -1268,7 +1268,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -1276,11 +1276,11 @@ "type": "Project", "dependencies": { "CookieCrumble": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.StarWars": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", "HotChocolate.Tests.Utilities": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", "Microsoft.AspNetCore.TestHost": "[7.0.0, )", "Microsoft.NET.Test.Sdk": "[17.1.0, )", @@ -1324,10 +1324,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", "Microsoft.Extensions.Http": "[7.0.0, )", "System.Reactive": "[5.0.0, )" @@ -1442,7 +1442,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[7.0.0, )" } @@ -1457,8 +1457,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[7.0.0, )", "System.Text.Json": "[7.0.0, )" @@ -1516,7 +1516,7 @@ "type": "Project", "dependencies": { "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", "HotChocolate.Types.Shared": "[0.0.0, )", "System.Text.Json": "[7.0.0, )" } @@ -1529,6 +1529,1602 @@ "Microsoft.Extensions.Options": "[7.0.0, )" } } + }, + "net8.0": { + "coverlet.msbuild": { + "type": "Direct", + "requested": "[3.1.2, )", + "resolved": "3.1.2", + "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" + }, + "Microsoft.NET.Test.Sdk": { + "type": "Direct", + "requested": "[17.1.0, )", + "resolved": "17.1.0", + "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", + "dependencies": { + "Microsoft.CodeCoverage": "17.1.0", + "Microsoft.TestPlatform.TestHost": "17.1.0" + } + }, + "Microsoft.SourceLink.GitHub": { + "type": "Direct", + "requested": "[1.1.1, )", + "resolved": "1.1.1", + "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Moq": { + "type": "Direct", + "requested": "[4.18.1, )", + "resolved": "4.18.1", + "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", + "dependencies": { + "Castle.Core": "5.0.0", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, + "xunit": { + "type": "Direct", + "requested": "[2.4.1, )", + "resolved": "2.4.1", + "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", + "dependencies": { + "xunit.analyzers": "0.10.0", + "xunit.assert": "[2.4.1]", + "xunit.core": "[2.4.1]" + } + }, + "xunit.runner.visualstudio": { + "type": "Direct", + "requested": "[2.4.3, )", + "resolved": "2.4.3", + "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" + }, + "BananaCakePop.Middleware": { + "type": "Transitive", + "resolved": "10.0.7", + "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", + "dependencies": { + "Yarp.ReverseProxy": "2.0.1" + } + }, + "Castle.Core": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", + "dependencies": { + "System.Diagnostics.EventLog": "6.0.0" + } + }, + "ChilliCream.Testing.Utilities": { + "type": "Transitive", + "resolved": "0.2.0", + "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", + "dependencies": { + "Newtonsoft.Json": "11.0.2", + "xunit": "2.3.1" + } + }, + "DiffPlex": { + "type": "Transitive", + "resolved": "1.7.1", + "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" + }, + "Microsoft.AspNetCore.TestHost": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "Rk6Ai9bFf1KubVY5oEbEPN5fiKWW2oeU+easjokyUqqYyTHRsXlkjFeMvwecgoXsoTfXMSwEHzJp8FCjQcyYTQ==", + "dependencies": { + "System.IO.Pipelines": "8.0.0" + } + }, + "Microsoft.AspNetCore.WebUtilities": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "z1SXKg5Bk02VmrrOab1TO2yxkZIfL4RyrS+yCpwxcLTqJwImYhEttz3LYbl1gQebkAAvx2Fm4NVXmopxXeLZgw==", + "dependencies": { + "Microsoft.Net.Http.Headers": "8.0.0", + "System.IO.Pipelines": "8.0.0" + } + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" + }, + "Microsoft.CodeCoverage": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Configuration.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" + }, + "Microsoft.Extensions.Diagnostics": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "3PZp/YSkIXrF7QK7PfC1bkyRYwqOHpWFad8Qx+4wkuumAeXo1NHaxpS9LboNA9OvNSAu+QOVlXbMyoY+pHSqcw==", + "dependencies": { + "Microsoft.Extensions.Configuration": "8.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", + "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" + } + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "System.Diagnostics.DiagnosticSource": "8.0.0" + } + }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "cWz4caHwvx0emoYe7NkHPxII/KkTI8R/LC9qdqJqnKv2poTJ4e2qqPGQqvRoQ5kaSA4FU5IV3qFAuLuOhoqULQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Diagnostics": "8.0.0", + "Microsoft.Extensions.Logging": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" + } + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" + } + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "4pm+XgxSukskwjzDDfSjG4KNUIOdFF2VaqZZDtTzoyQMOVSnlV6ZM8a9aVu5dg9LVZTB//utzSc8fOi0b0Mb2Q==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Options.ConfigurationExtensions": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.Configuration.Binder": "8.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" + }, + "Microsoft.Net.Http.Headers": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "YlHqL8oWBX3H1LmdKUOxEMW8cVD8nUACEnE2Fu3Ze4k7mYf8yJ1o/uLqoequQV0GDupXyCBEzYhn7Zxdz7pqYQ==", + "dependencies": { + "Microsoft.Extensions.Primitives": "8.0.0" + } + }, + "Microsoft.NETCore.Platforms": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" + }, + "Microsoft.NETCore.Targets": { + "type": "Transitive", + "resolved": "1.1.0", + "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" + }, + "Microsoft.TestPlatform.ObjectModel": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", + "dependencies": { + "NuGet.Frameworks": "5.11.0", + "System.Reflection.Metadata": "1.6.0" + } + }, + "Microsoft.TestPlatform.TestHost": { + "type": "Transitive", + "resolved": "17.1.0", + "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", + "dependencies": { + "Microsoft.TestPlatform.ObjectModel": "17.1.0", + "Newtonsoft.Json": "9.0.1" + } + }, + "Microsoft.Win32.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "NETStandard.Library": { + "type": "Transitive", + "resolved": "1.6.1", + "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.Win32.Primitives": "4.3.0", + "System.AppContext": "4.3.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Console": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tools": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.Compression": "4.3.0", + "System.IO.Compression.ZipFile": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.Net.Http": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Net.Sockets": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Timer": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0", + "System.Xml.XDocument": "4.3.0" + } + }, + "Newtonsoft.Json": { + "type": "Transitive", + "resolved": "13.0.2", + "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" + }, + "NuGet.Frameworks": { + "type": "Transitive", + "resolved": "5.11.0", + "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" + }, + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" + }, + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" + }, + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" + }, + "runtime.native.System": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.IO.Compression": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", + "dependencies": { + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" + } + }, + "runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", + "dependencies": { + "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" + }, + "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" + }, + "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" + }, + "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" + }, + "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" + }, + "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" + }, + "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" + }, + "Snapshooter": { + "type": "Transitive", + "resolved": "0.5.4", + "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", + "dependencies": { + "Newtonsoft.Json": "12.0.1" + } + }, + "Snapshooter.Xunit": { + "type": "Transitive", + "resolved": "0.5.4", + "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", + "dependencies": { + "Snapshooter": "0.5.4", + "xunit.assert": "2.4.1", + "xunit.core": "2.4.1" + } + }, + "System.AppContext": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Buffers": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Collections": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Collections.Concurrent": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" + }, + "System.ComponentModel.Annotations": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" + }, + "System.Console": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Diagnostics.Debug": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.DiagnosticSource": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" + }, + "System.Diagnostics.Tools": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Diagnostics.Tracing": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Calendars": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Globalization.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0" + } + }, + "System.IO": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.Compression": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Buffers": "4.3.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.IO.Compression": "4.3.0" + } + }, + "System.IO.Compression.ZipFile": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", + "dependencies": { + "System.Buffers": "4.3.0", + "System.IO": "4.3.0", + "System.IO.Compression": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.IO.FileSystem": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.IO.FileSystem.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "7.0.0", + "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" + }, + "System.IO.Packaging": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "8g1V4YRpdGAxFcK8v9OjuMdIOJSpF30Zb1JGicwVZhly3I994WFyBdV6mQEo8d3T+URQe55/M0U0eIH0Hts1bg==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" + }, + "System.Linq": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Linq.Expressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Linq": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Emit.Lightweight": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Net.Http": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.DiagnosticSource": "4.3.0", + "System.Diagnostics.Tracing": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Extensions": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Security.Cryptography.X509Certificates": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Net.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Net.Sockets": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Net.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.ObjectModel": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Reactive": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" + }, + "System.Reflection": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", + "dependencies": { + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.ILGeneration": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Emit.Lightweight": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, + "System.Reflection.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Reflection.TypeExtensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Resources.ResourceManager": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Globalization": "4.3.0", + "System.Reflection": "4.3.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0" + } + }, + "System.Runtime.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.Handles": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Runtime.InteropServices": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Reflection": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Handles": "4.3.0" + } + }, + "System.Runtime.InteropServices.RuntimeInformation": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", + "dependencies": { + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0" + } + }, + "System.Runtime.Numerics": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", + "dependencies": { + "System.Globalization": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0" + } + }, + "System.Security.Cryptography.Algorithms": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.Apple": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Cng": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Security.Cryptography.Csp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0" + } + }, + "System.Security.Cryptography.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Collections.Concurrent": "4.3.0", + "System.Linq": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.OpenSsl": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", + "dependencies": { + "System.Collections": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Security.Cryptography.Primitives": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", + "dependencies": { + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Threading": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Security.Cryptography.X509Certificates": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.Globalization.Calendars": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.Handles": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Runtime.Numerics": "4.3.0", + "System.Security.Cryptography.Algorithms": "4.3.0", + "System.Security.Cryptography.Cng": "4.3.0", + "System.Security.Cryptography.Csp": "4.3.0", + "System.Security.Cryptography.Encoding": "4.3.0", + "System.Security.Cryptography.OpenSsl": "4.3.0", + "System.Security.Cryptography.Primitives": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "runtime.native.System": "4.3.0", + "runtime.native.System.Net.Http": "4.3.0", + "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" + } + }, + "System.Text.Encoding": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Text.Encoding.Extensions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0", + "System.Text.Encoding": "4.3.0" + } + }, + "System.Text.Encodings.Web": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==" + }, + "System.Text.Json": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", + "dependencies": { + "System.Text.Encodings.Web": "8.0.0" + } + }, + "System.Text.RegularExpressions": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", + "dependencies": { + "System.Runtime": "4.3.0" + } + }, + "System.Threading": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", + "dependencies": { + "System.Runtime": "4.3.0", + "System.Threading.Tasks": "4.3.0" + } + }, + "System.Threading.Channels": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "CMaFr7v+57RW7uZfZkPExsPB6ljwzhjACWW1gfU35Y56rk72B/Wu+sTqxVmGSk4SFUlPc3cjeKND0zktziyjBA==" + }, + "System.Threading.Tasks": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Threading.Tasks.Extensions": { + "type": "Transitive", + "resolved": "4.5.4", + "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" + }, + "System.Threading.Timer": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0", + "Microsoft.NETCore.Targets": "1.1.0", + "System.Runtime": "4.3.0" + } + }, + "System.Xml.ReaderWriter": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.IO.FileSystem": "4.3.0", + "System.IO.FileSystem.Primitives": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Text.Encoding.Extensions": "4.3.0", + "System.Text.RegularExpressions": "4.3.0", + "System.Threading.Tasks": "4.3.0", + "System.Threading.Tasks.Extensions": "4.3.0" + } + }, + "System.Xml.XDocument": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Diagnostics.Tools": "4.3.0", + "System.Globalization": "4.3.0", + "System.IO": "4.3.0", + "System.Reflection": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Text.Encoding": "4.3.0", + "System.Threading": "4.3.0", + "System.Xml.ReaderWriter": "4.3.0" + } + }, + "xunit.abstractions": { + "type": "Transitive", + "resolved": "2.0.3", + "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" + }, + "xunit.analyzers": { + "type": "Transitive", + "resolved": "0.10.0", + "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" + }, + "xunit.assert": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", + "dependencies": { + "NETStandard.Library": "1.6.1" + } + }, + "xunit.core": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", + "dependencies": { + "xunit.extensibility.core": "[2.4.1]", + "xunit.extensibility.execution": "[2.4.1]" + } + }, + "xunit.extensibility.core": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", + "dependencies": { + "NETStandard.Library": "1.6.1", + "xunit.abstractions": "2.0.3" + } + }, + "xunit.extensibility.execution": { + "type": "Transitive", + "resolved": "2.4.1", + "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", + "dependencies": { + "NETStandard.Library": "1.6.1", + "xunit.extensibility.core": "[2.4.1]" + } + }, + "Yarp.ReverseProxy": { + "type": "Transitive", + "resolved": "2.0.1", + "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", + "dependencies": { + "System.IO.Hashing": "7.0.0" + } + }, + "cookiecrumble": { + "type": "Project", + "dependencies": { + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.Fusion": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", + "Newtonsoft.Json": "[13.0.2, )", + "Xunit": "[2.4.1, )" + } + }, + "greendonut": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "[8.0.0, )", + "System.Diagnostics.DiagnosticSource": "[8.0.0, )", + "System.Threading.Tasks.Extensions": "[4.5.0, )" + } + }, + "HotChocolate": { + "type": "Project", + "dependencies": { + "HotChocolate.Authorization": "[0.0.0, )", + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Fetching": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )", + "HotChocolate.Types.CursorPagination": "[0.0.0, )", + "HotChocolate.Types.Mutations": "[0.0.0, )", + "HotChocolate.Types.OffsetPagination": "[0.0.0, )", + "HotChocolate.Validation": "[0.0.0, )" + } + }, + "hotchocolate.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )" + } + }, + "hotchocolate.aspnetcore": { + "type": "Project", + "dependencies": { + "BananaCakePop.Middleware": "[10.0.7, )", + "HotChocolate": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" + } + }, + "hotchocolate.aspnetcore.tests.utilities": { + "type": "Project", + "dependencies": { + "CookieCrumble": "[0.0.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.StarWars": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "HotChocolate.Tests.Utilities": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", + "Microsoft.AspNetCore.TestHost": "[8.0.0, )", + "Microsoft.NET.Test.Sdk": "[17.1.0, )", + "Moq": "[4.18.1, )", + "xunit": "[2.4.1, )" + } + }, + "hotchocolate.authorization": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )" + } + }, + "hotchocolate.execution": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Fetching": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )", + "HotChocolate.Validation": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", + "System.Threading.Channels": "[8.0.0, )" + } + }, + "hotchocolate.execution.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" + } + }, + "hotchocolate.fetching": { + "type": "Project", + "dependencies": { + "GreenDonut": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.fusion": { + "type": "Project", + "dependencies": { + "HotChocolate": "[0.0.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", + "HotChocolate.Fusion.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", + "Microsoft.Extensions.Http": "[8.0.0, )", + "System.Reactive": "[5.0.0, )" + } + }, + "hotchocolate.fusion.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Packaging": "[8.0.0, )" + } + }, + "hotchocolate.fusion.composition": { + "type": "Project", + "dependencies": { + "HotChocolate.Fusion.Abstractions": "[0.0.0, )", + "HotChocolate.Skimmed": "[0.0.0, )" + } + }, + "hotchocolate.language": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Language.Utf8": "[0.0.0, )", + "HotChocolate.Language.Visitors": "[0.0.0, )", + "HotChocolate.Language.Web": "[0.0.0, )" + } + }, + "hotchocolate.language.syntaxtree": { + "type": "Project", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "[8.0.0, )" + } + }, + "hotchocolate.language.utf8": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.language.visitors": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.language.web": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.Utf8": "[0.0.0, )" + } + }, + "HotChocolate.Skimmed": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Language": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )" + } + }, + "HotChocolate.StarWars": { + "type": "Project", + "dependencies": { + "ChilliCream.Testing.Utilities": "[0.2.0, )", + "CookieCrumble": "[0.0.0, )", + "DiffPlex": "[1.7.1, )", + "HotChocolate": "[0.0.0, )", + "Microsoft.NET.Test.Sdk": "[17.1.0, )", + "Moq": "[4.18.1, )", + "Snapshooter.Xunit": "[0.5.4, )", + "xunit": "[2.4.1, )" + } + }, + "hotchocolate.subscriptions": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Execution.Abstractions": "[0.0.0, )" + } + }, + "hotchocolate.subscriptions.inmemory": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution.Abstractions": "[0.0.0, )", + "HotChocolate.Subscriptions": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" + } + }, + "hotchocolate.tests.utilities": { + "type": "Project", + "dependencies": { + "ChilliCream.Testing.Utilities": "[0.2.0, )", + "CookieCrumble": "[0.0.0, )", + "DiffPlex": "[1.7.1, )", + "HotChocolate.StarWars": "[0.0.0, )", + "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", + "Microsoft.NET.Test.Sdk": "[17.1.0, )", + "Moq": "[4.18.1, )", + "Snapshooter.Xunit": "[0.5.4, )", + "xunit": "[2.4.1, )" + } + }, + "hotchocolate.transport.abstractions": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.transport.http": { + "type": "Project", + "dependencies": { + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.IO.Pipelines": "[8.0.0, )" + } + }, + "hotchocolate.transport.sockets": { + "type": "Project", + "dependencies": { + "System.IO.Pipelines": "[8.0.0, )" + } + }, + "hotchocolate.transport.sockets.client": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "System.Collections.Immutable": "[8.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.types": { + "type": "Project", + "dependencies": { + "HotChocolate.Abstractions": "[0.0.0, )", + "HotChocolate.Types.Shared": "[0.0.0, )", + "HotChocolate.Utilities": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", + "Microsoft.Extensions.ObjectPool": "[8.0.0, )", + "System.ComponentModel.Annotations": "[5.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.types.cursorpagination": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.mutations": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.offsetpagination": { + "type": "Project", + "dependencies": { + "HotChocolate.Execution": "[0.0.0, )", + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.scalars.upload": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )" + } + }, + "hotchocolate.types.shared": { + "type": "Project", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "[0.0.0, )" + } + }, + "hotchocolate.utilities": { + "type": "Project" + }, + "hotchocolate.utilities.introspection": { + "type": "Project", + "dependencies": { + "HotChocolate.Language": "[0.0.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Types.Shared": "[0.0.0, )", + "System.Text.Json": "[8.0.0, )" + } + }, + "hotchocolate.validation": { + "type": "Project", + "dependencies": { + "HotChocolate.Types": "[0.0.0, )", + "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", + "Microsoft.Extensions.Options": "[8.0.0, )" + } + } } } } \ No newline at end of file From 695de79e5006898d829008f121bd69737eb84abb Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 13 Dec 2023 21:35:37 +0100 Subject: [PATCH 51/89] Refinements --- .../Extensions/ApolloFederationSchemaBuilderExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index bf485b72955..e5d80c18e7f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -3,6 +3,7 @@ namespace HotChocolate; +// TODO : This we need to completly rewrite. /// /// Provides extensions to . /// @@ -34,6 +35,7 @@ public static ISchemaBuilder AddApolloFederation( throw new ArgumentNullException(nameof(builder)); } + // TODO : we will move this to the type interceptor. builder.SetSchema(s => { var link = FederationUtils.GetFederationLink(version); From 057be97dda47565c598f553d4945c0bcf0e67dde Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Sun, 17 Dec 2023 17:04:15 +0200 Subject: [PATCH 52/89] Started doing the policy api --- .../Directives/PolicyDirectiveType.cs | 31 +++++ .../Configuration/ObjectTypes/FieldSetType.cs | 2 +- .../Configuration/ObjectTypes/PolicyType.cs | 122 ++++++++++++++++++ .../Constants/WellKnownTypeNames.cs | 4 +- .../FederationResources.Designer.cs | 99 +++++++------- .../Properties/FederationResources.resx | 3 + 6 files changed, 213 insertions(+), 48 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs new file mode 100644 index 00000000000..fd641e11c79 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs @@ -0,0 +1,31 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @policy(policies: [[Policy!]!]!) on +/// | FIELD_DEFINITION +/// | OBJECT +/// | INTERFACE +/// | SCALAR +/// | ENUM +/// +/// Indicates to composition that the target element is restricted based on authorization policies +/// that are evaluated in a Rhai script or coprocessor. +/// +/// +public sealed class PolicyDirectiveType : DirectiveType +{ + protected override void Configure(IDirectiveTypeDescriptor descriptor) + => descriptor + .Name(WellKnownTypeNames.PolicyDirective) + .Description(FederationResources.PolicyDirective_Description) + .Location( + DirectiveLocation.FieldDefinition | + DirectiveLocation.Object | + DirectiveLocation.Interface | + DirectiveLocation.Scalar | + DirectiveLocation.Enum); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs index b437c896633..79b39004270 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs @@ -134,6 +134,6 @@ private static SelectionSetNode ParseSelectionSet(string s) private static string SerializeSelectionSet(SelectionSetNode selectionSet) { var s = selectionSet.ToString(false); - return s.Substring(1, s.Length - 2).Trim(); + return s.AsSpan()[1 .. ^1].Trim().ToString(); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyType.cs new file mode 100644 index 00000000000..61f3da85601 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyType.cs @@ -0,0 +1,122 @@ +using System.Collections.Generic; +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; +using HotChocolate.Language; + +namespace HotChocolate.ApolloFederation; + +/// +/// A union called _Entity which is a union of all types that use the @key directive, +/// including both types native to the schema and extended types. +/// +public sealed class PolicyType : ScalarType +{ + public PolicyType(string name, BindingBehavior bind = BindingBehavior.Explicit) : base(name, bind) + { + } + + public override IValueNode ParseResult(object? resultValue) + { + if (resultValue is null) + { + return NullValueNode.Default; + } + if (resultValue is PolicyCollection policyCollection) + { + return ParseValue(policyCollection); + } + throw new Exception("object of unexpected type"); + } + + protected override PolicyCollection ParseLiteral(ListValueNode valueSyntax) + { + var policySetNodes = valueSyntax.Items; + int policySetCount = policySetNodes.Count; + + var policySets = new PolicySet[policySetCount]; + for (int policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + { + var item = policySetNodes[policySetIndex]; + if (item is not ListValueNode policySetNode) + { + throw new Exception("Expected list of strings"); + } + + var policyNameNodes = policySetNode.Items; + int policyNameCount = policyNameNodes.Count; + var policies = new Policy[policyNameCount]; + for (int policyNameIndex = 0; policyNameIndex < policyNameCount; policyNameIndex++) + { + var policyNameNode = policyNameNodes[policyNameIndex]; + if (policyNameNode is not StringValueNode stringPolicyNameNode) + { + throw new Exception("Expected string"); + } + policies[policyNameIndex] = new Policy + { + Name = stringPolicyNameNode.Value, + }; + } + + policySets[policySetIndex] = new PolicySet + { + PolicyNames = policies, + }; + } + var result = new PolicyCollection + { + PolicySets = policySets, + }; + + return result; + } + + protected override ListValueNode ParseValue(PolicyCollection runtimeValue) + { + var policySets = runtimeValue.PolicySets; + var policySetCount = policySets.Length; + + var policySetNodes = new IValueNode[policySetCount]; + for (int policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + { + var policySet = policySets[policySetIndex]; + var policies = policySet.PolicyNames; + var policyCount = policies.Length; + + var policyNameNodes = new IValueNode[policyCount]; + for (int policyIndex = 0; policyIndex < policyCount; policyIndex++) + { + var policyName = policies[policyIndex].Name; + policyNameNodes[policyIndex] = new StringValueNode(policyName); + } + policySetNodes[policySetIndex] = new ListValueNode(policyNameNodes); + } + var result = new ListValueNode(policySetNodes); + + return result; + } +} + +public struct Policy +{ + public required string Name { get; init; } +} + +/// +/// Represents a set of multiple policies. +/// +public struct PolicySet +{ + /// + /// Includes names of policies included in this set. + /// + public required Policy[] PolicyNames { get; init; } +} + +public sealed class PolicyCollection +{ + /// + /// Either of the policy sets listed here must be satisfied. + /// + public required PolicySet[] PolicySets { get; init; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs index 3fc06312517..c9b7f6571f2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs @@ -17,10 +17,10 @@ internal static class WellKnownTypeNames public const string RequiresScopes = "requiresScopes"; public const string Shareable = "shareable"; public const string Tag = "tag"; - public const string FieldSet = "_FieldSet"; - public const string FieldSetV2 = "FieldSet"; + public const string FieldSet = "FieldSet"; public const string Scope = "Scope"; public const string Any = "_Any"; public const string Entity = "_Entity"; public const string Service = "_Service"; + public const string PolicyDirective = "Policy"; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 96bbc5555a0..c1a9f40983a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -9,8 +9,8 @@ namespace HotChocolate.ApolloFederation.Properties { using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -22,15 +22,15 @@ namespace HotChocolate.ApolloFederation.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class FederationResources { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal FederationResources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -44,7 +44,7 @@ internal FederationResources() { return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -58,7 +58,7 @@ internal FederationResources() { resourceCulture = value; } } - + /// /// Looks up a localized string similar to The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema.. /// @@ -67,7 +67,7 @@ internal static string Any_Description { return ResourceManager.GetString("Any_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users.. /// @@ -76,7 +76,7 @@ internal static string AuthenticatedDirective_Description { return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Marks underlying custom directive to be included in the Supergraph schema.. /// @@ -85,7 +85,7 @@ internal static string ComposeDirective_Description { return ResourceManager.GetString("ComposeDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Provides contact information of the owner responsible for this subgraph schema.. /// @@ -94,7 +94,7 @@ internal static string ContactDirective_Description { return ResourceManager.GetString("ContactDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The EntityResolver must be a method. Please check if the EntityResolverAttribute is correctly set to a method.. /// @@ -103,7 +103,7 @@ internal static string EntityResolver_MustBeMethod { return ResourceManager.GetString("EntityResolver_MustBeMethod", resourceCulture); } } - + /// /// Looks up a localized string similar to Union of all types that key directive applied. This information is needed by the Apollo federation gateway.. /// @@ -112,7 +112,7 @@ internal static string EntityType_Description { return ResourceManager.GetString("EntityType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ScopedContextData`.. /// @@ -121,7 +121,7 @@ internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture); } } - + /// /// Looks up a localized string similar to Directive to indicate that marks target object as extending part of the federated schema.. /// @@ -130,7 +130,7 @@ internal static string ExtendsDirective_Description { return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Directive to indicate that a field is owned by another service, for example via Apollo federation.. /// @@ -139,7 +139,7 @@ internal static string ExternalDirective_Description { return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -148,7 +148,7 @@ internal static string FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpt return ResourceManager.GetString("FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -157,7 +157,7 @@ internal static string FieldDescriptorExtensions_Override_From_CannotBeNullOrEmp return ResourceManager.GetString("FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -166,7 +166,7 @@ internal static string FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullO return ResourceManager.GetString("FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -175,7 +175,7 @@ internal static string FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullO return ResourceManager.GetString("FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Scalar representing a set of fields.. /// @@ -184,7 +184,7 @@ internal static string FieldsetType_Description { return ResourceManager.GetString("FieldsetType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Marks location within schema as inaccessible from the GraphQL Gateway. /// @@ -193,7 +193,7 @@ internal static string InaccessibleDirective_Description { return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Provides meta information to the router that this entity type is an interface in the supergraph.. /// @@ -202,7 +202,7 @@ internal static string InterfaceObjectDirective_Description { return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface.. /// @@ -211,7 +211,7 @@ internal static string KeyDirective_Description { return ResourceManager.GetString("KeyDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another.. /// @@ -220,7 +220,16 @@ internal static string OverrideDirective_Description { return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); } } - + + /// + /// Looks up a localized string similar to Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor.. + /// + internal static string PolicyDirective_Description { + get { + return ResourceManager.GetString("PolicyDirective_Description", resourceCulture); + } + } + /// /// Looks up a localized string similar to Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway.. /// @@ -229,7 +238,7 @@ internal static string ProvidesDirective_Description { return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Used to annotate the required input fieldset from a base type for a resolver.. /// @@ -238,7 +247,7 @@ internal static string RequiresDirective_Description { return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes.. /// @@ -247,7 +256,7 @@ internal static string RequiresScopesDirective_Description { return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The expression must refer to a method representing the reference resolver.. /// @@ -256,7 +265,7 @@ internal static string ResolveReference_MustBeMethod { return ResourceManager.GetString("ResolveReference_MustBeMethod", resourceCulture); } } - + /// /// Looks up a localized string similar to Scalar representing a JWT scope. /// @@ -265,7 +274,7 @@ internal static string ScopeType_Description { return ResourceManager.GetString("ScopeType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec.. /// @@ -274,7 +283,7 @@ internal static string ServiceType_Description { return ResourceManager.GetString("ServiceType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates that given object and/or field can be resolved by multiple subgraphs.. /// @@ -283,7 +292,7 @@ internal static string ShareableDirective_Description { return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Allows users to annotate fields and types with additional metadata information.. /// @@ -292,7 +301,7 @@ internal static string TagDirective_Description { return ResourceManager.GetString("TagDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The given any representation has an invalid format.. /// @@ -301,7 +310,7 @@ internal static string ThrowHelper_Any_HasInvalidFormat { return ResourceManager.GetString("ThrowHelper_Any_HasInvalidFormat", resourceCulture); } } - + /// /// Looks up a localized string similar to The compose directive attribute is used on `{0}` without specifying the name.. /// @@ -310,7 +319,7 @@ internal static string ThrowHelper_ComposeDirective_Name_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_ComposeDirective_Name_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to The contact attribute is used on `{0}` without specifying the name.. /// @@ -319,7 +328,7 @@ internal static string ThrowHelper_Contact_Name_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Contact_Name_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to The apollo gateway tries to resolve an entity for which no EntityResolver method was found.. /// @@ -328,7 +337,7 @@ internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { return ResourceManager.GetString("ThrowHelper_EntityResolver_NoEntityResolverFound", resourceCulture); } } - + /// /// Looks up a localized string similar to The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least one entity.. /// @@ -337,7 +346,7 @@ internal static string ThrowHelper_EntityType_NoEntities { return ResourceManager.GetString("ThrowHelper_EntityType_NoEntities", resourceCulture); } } - + /// /// Looks up a localized string similar to Specified federation version `{0}` is not supported.. /// @@ -346,7 +355,7 @@ internal static string ThrowHelper_FederationVersion_Unknown { return ResourceManager.GetString("ThrowHelper_FederationVersion_Unknown", resourceCulture); } } - + /// /// Looks up a localized string similar to The fieldset has an invalid format.. /// @@ -355,7 +364,7 @@ internal static string ThrowHelper_FieldSet_HasInvalidFormat { return ResourceManager.GetString("ThrowHelper_FieldSet_HasInvalidFormat", resourceCulture); } } - + /// /// Looks up a localized string similar to The key attribute is used on `{0}` without specifying the field set.. /// @@ -364,7 +373,7 @@ internal static string ThrowHelper_Key_FieldSet_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Key_FieldSet_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to The link attribute is used on `{0}` without specifying the url.. /// @@ -373,7 +382,7 @@ internal static string ThrowHelper_Link_Url_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Link_Url_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to FieldSet is null or empty on type. /// @@ -382,7 +391,7 @@ internal static string ThrowHelper_Provides_FieldSet_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Provides_FieldSet_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to FieldSet is null or empty on type. /// @@ -391,7 +400,7 @@ internal static string ThrowHelper_Requires_FieldSet_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Requires_FieldSet_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to {0} cannot parse the given value of type `{1}`. /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index 91cd70244bc..f22af71bfd7 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -168,6 +168,9 @@ Union of all types that key directive applied. This information is needed by the Apollo federation gateway. + + Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor. + The fieldset has an invalid format. From 604a62cb1eba2395ed70d1bf83bf9a11884f8181 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 18 Dec 2023 13:09:47 +0200 Subject: [PATCH 53/89] Move MaybeList to helpers --- .../FederationSchemaPrinter.OutputTypes.cs | 8 +- .../SchemaPrinter/FederationSchemaPrinter.cs | 27 +- .../src/ApolloFederation/Helpers/MaybeList.cs | 25 + .../Types.Analyzers.Tests/packages.lock.json | 3035 ----------------- .../Fusion/src/CommandLine/packages.lock.json | 28 +- .../Fusion/test/Shared/packages.lock.json | 1596 --------- 6 files changed, 47 insertions(+), 4672 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs index ace34a68b68..018a121aa73 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs @@ -28,7 +28,7 @@ public static partial class FederationSchemaPrinter if (objectType.ContextData.ContainsKey(Constants.WellKnownContextData.ExtendMarker)) { return new ObjectTypeExtensionNode( - null, + location: null, new NameNode(objectType.Name), directives.ReadOnlyList, interfaces, @@ -36,7 +36,7 @@ public static partial class FederationSchemaPrinter } return new ObjectTypeDefinitionNode( - null, + location: null, new NameNode(objectType.Name), SerializeDescription(objectType.Description), directives.ReadOnlyList, @@ -55,7 +55,7 @@ private static InterfaceTypeDefinitionNode SerializeInterfaceType( .ToList(); return new InterfaceTypeDefinitionNode( - null, + location: null, new NameNode(interfaceType.Name), SerializeDescription(interfaceType.Description), directives.ReadOnlyList, @@ -74,7 +74,7 @@ private static UnionTypeDefinitionNode SerializeUnionType( .ToList(); return new UnionTypeDefinitionNode( - null, + location: null, new NameNode(unionType.Name), SerializeDescription(unionType.Description), directives.ReadOnlyList, diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs index 7e1d6ad562a..eebd62bcda0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs @@ -2,6 +2,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Helpers; using HotChocolate.Language; using HotChocolate.Types.Introspection; using HotChocolate.Utilities; @@ -123,29 +124,9 @@ private static NamedTypeNode SerializeNamedType( Context context) { context.TypeNames.Add(namedType.Name); - return new NamedTypeNode(null, new NameNode(namedType.Name)); - } - - internal struct MaybeList - { - public MaybeList(List? list) - { - _list = list; - } - - private List? _list; - public List GetOrCreateList() => _list ??= new(); - public IReadOnlyList ReadOnlyList - { - get - { - if (_list is not null) - { - return _list; - } - return Array.Empty(); - } - } + return new NamedTypeNode( + location: null, + new NameNode(namedType.Name)); } private static MaybeList SerializeDirectives( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs new file mode 100644 index 00000000000..be6036790c7 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; + +namespace HotChocolate.ApolloFederation.Helpers; + +internal struct MaybeList +{ + public MaybeList(List? list) + { + _list = list; + } + + private List? _list; + public List GetOrCreateList() => _list ??= new(); + public readonly IReadOnlyList ReadOnlyList + { + get + { + if (_list is not null) + { + return _list; + } + return Array.Empty(); + } + } +} diff --git a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json index 0a36aa0a1b4..69f4c8701a9 100644 --- a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json +++ b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json @@ -1431,3041 +1431,6 @@ "Microsoft.Extensions.Options": "[6.0.0, )" } } - }, - "net7.0": { - "ChilliCream.Testing.Utilities": { - "type": "Direct", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "DiffPlex": { - "type": "Direct", - "requested": "[1.7.1, )", - "resolved": "1.7.1", - "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Snapshooter.Xunit": { - "type": "Direct", - "requested": "[0.5.4, )", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "BananaCakePop.Middleware": { - "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", - "dependencies": { - "Yarp.ReverseProxy": "2.0.1" - } - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "Microsoft.AspNetCore.WebUtilities": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "9ErxAAKaDzxXASB/b5uLEkLgUWv1QbeVxyJYEHQwMaxXOeFFVkQxiq8RyfVcifLU7NR0QY0p3acqx4ZpYfhHDg==", - "dependencies": { - "Microsoft.Net.Http.Headers": "2.2.0", - "System.Text.Encodings.Web": "4.5.0" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw==" - }, - "Microsoft.Extensions.Http": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "9Pq9f/CvOSz0t9yQa6g1uWpxa2sm13daLFm8EZwy9MaQUjKXWdNUXQwIxwhmba5N83UIqURiPHSNqGK1vfWF2w==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", - "Microsoft.Extensions.Logging": "7.0.0", - "Microsoft.Extensions.Logging.Abstractions": "7.0.0", - "Microsoft.Extensions.Options": "7.0.0" - } - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "7.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", - "Microsoft.Extensions.Logging.Abstractions": "7.0.0", - "Microsoft.Extensions.Options": "7.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==" - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "udvKco0sAVgYGTBnHUb0tY9JQzJ/nPDiv/8PIyz69wl1AibeCDZOLVVI+6156dPfHmJH7ws5oUJRiW4ZmAvuuA==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0", - "Microsoft.Extensions.Primitives": "7.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==" - }, - "Microsoft.Net.Http.Headers": { - "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "iZNkjYqlo8sIOI0bQfpsSoMTmB/kyvmV2h225ihyZT33aTp48ZpF6qYnXxzSXmHt8DpBAwBTX+1s1UFLbYfZKg==", - "dependencies": { - "Microsoft.Extensions.Primitives": "2.2.0", - "System.Buffers": "4.5.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.2", - "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A==" - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "dQPcs0U1IKnBdRDBkrCTi1FoajSTBzLcVTpjO4MBCMC7f4pDOIPzgBoX8JjG7X6uZRJ8EBxsi8+DR1JuwjnzOQ==" - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "9W0ewWDuAyDqS2PigdTxk6jDKonfgscY/hP8hm7VpxYhNHZHKvZTdRckberlFk3VnCmr3xBUyMBut12Q+T2aOw==" - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" - }, - "System.IO.Packaging": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "+j5ezLP7785/pd4taKQhXAWsymsIW2nTnE/U3/jpGZzcJx5lip6qkj6UrxSE7ZYZfL0GaLuymwGLqwJV/c7O7Q==" - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "jRn6JYnNPW6xgQazROBLSfpdoczRw694vO5kKvMcNnpXuolEixUyw6IBuBs2Y2mlSX/LdLvyyWmfXhaI3ND1Yg==" - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reactive": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg==" - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "DaGSsVqKsn/ia6RG8frjwmJonfos0srquhw09TlT8KRw5I43E+4gs+/bZj4K0vShJ5H9imCuXupb4RmS+dBy3w==", - "dependencies": { - "System.Text.Encodings.Web": "7.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "qmeeYNROMsONF6ndEZcIQ+VxR4Q/TX/7uIVLJqtwIWL7dDWeh0l1UIqgo4wYyjG//5lUNhwkLDSFl+pAWO6oiA==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "Yarp.ReverseProxy": { - "type": "Transitive", - "resolved": "2.0.1", - "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", - "dependencies": { - "System.IO.Hashing": "7.0.0" - } - }, - "cookiecrumble": { - "type": "Project", - "dependencies": { - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", - "Newtonsoft.Json": "[13.0.2, )", - "Xunit": "[2.4.1, )" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[7.0.0, )", - "System.Diagnostics.DiagnosticSource": "[7.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "System.Collections.Immutable": "[7.0.0, )" - } - }, - "hotchocolate.aspnetcore": { - "type": "Project", - "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[7.0.0, )", - "System.Threading.Channels": "[7.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.fusion": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", - "Microsoft.Extensions.Http": "[7.0.0, )", - "System.Reactive": "[5.0.0, )" - } - }, - "hotchocolate.fusion.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Packaging": "[7.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[7.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "HotChocolate.StarWars": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.subscriptions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )" - } - }, - "hotchocolate.subscriptions.inmemory": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Subscriptions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )" - } - }, - "hotchocolate.tests.utilities": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.transport.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "System.Collections.Immutable": "[7.0.0, )", - "System.Text.Json": "[7.0.0, )" - } - }, - "hotchocolate.transport.http": { - "type": "Project", - "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Pipelines": "[7.0.0, )" - } - }, - "hotchocolate.transport.sockets": { - "type": "Project", - "dependencies": { - "System.IO.Pipelines": "[7.0.0, )" - } - }, - "hotchocolate.transport.sockets.client": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.Collections.Immutable": "[7.0.0, )", - "System.Text.Json": "[7.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", - "Microsoft.Extensions.ObjectPool": "[7.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[7.0.0, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.scalars.upload": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", - "Microsoft.Extensions.Options": "[7.0.0, )" - } - } - }, - "net8.0": { - "ChilliCream.Testing.Utilities": { - "type": "Direct", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "DiffPlex": { - "type": "Direct", - "requested": "[1.7.1, )", - "resolved": "1.7.1", - "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Snapshooter.Xunit": { - "type": "Direct", - "requested": "[0.5.4, )", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "BananaCakePop.Middleware": { - "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", - "dependencies": { - "Yarp.ReverseProxy": "2.0.1" - } - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "Microsoft.AspNetCore.WebUtilities": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "z1SXKg5Bk02VmrrOab1TO2yxkZIfL4RyrS+yCpwxcLTqJwImYhEttz3LYbl1gQebkAAvx2Fm4NVXmopxXeLZgw==", - "dependencies": { - "Microsoft.Net.Http.Headers": "8.0.0", - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Binder": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" - }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3PZp/YSkIXrF7QK7PfC1bkyRYwqOHpWFad8Qx+4wkuumAeXo1NHaxpS9LboNA9OvNSAu+QOVlXbMyoY+pHSqcw==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Diagnostics.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "System.Diagnostics.DiagnosticSource": "8.0.0" - } - }, - "Microsoft.Extensions.Http": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cWz4caHwvx0emoYe7NkHPxII/KkTI8R/LC9qdqJqnKv2poTJ4e2qqPGQqvRoQ5kaSA4FU5IV3qFAuLuOhoqULQ==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Diagnostics": "8.0.0", - "Microsoft.Extensions.Logging": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "4pm+XgxSukskwjzDDfSjG4KNUIOdFF2VaqZZDtTzoyQMOVSnlV6ZM8a9aVu5dg9LVZTB//utzSc8fOi0b0Mb2Q==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" - }, - "Microsoft.Net.Http.Headers": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "YlHqL8oWBX3H1LmdKUOxEMW8cVD8nUACEnE2Fu3Ze4k7mYf8yJ1o/uLqoequQV0GDupXyCBEzYhn7Zxdz7pqYQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.2", - "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" - }, - "System.IO.Packaging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "8g1V4YRpdGAxFcK8v9OjuMdIOJSpF30Zb1JGicwVZhly3I994WFyBdV6mQEo8d3T+URQe55/M0U0eIH0Hts1bg==" - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reactive": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==" - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", - "dependencies": { - "System.Text.Encodings.Web": "8.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "CMaFr7v+57RW7uZfZkPExsPB6ljwzhjACWW1gfU35Y56rk72B/Wu+sTqxVmGSk4SFUlPc3cjeKND0zktziyjBA==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "Yarp.ReverseProxy": { - "type": "Transitive", - "resolved": "2.0.1", - "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", - "dependencies": { - "System.IO.Hashing": "7.0.0" - } - }, - "cookiecrumble": { - "type": "Project", - "dependencies": { - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", - "Newtonsoft.Json": "[13.0.2, )", - "Xunit": "[2.4.1, )" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.Diagnostics.DiagnosticSource": "[8.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )" - } - }, - "hotchocolate.aspnetcore": { - "type": "Project", - "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "System.Threading.Channels": "[8.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.fusion": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "Microsoft.Extensions.Http": "[8.0.0, )", - "System.Reactive": "[5.0.0, )" - } - }, - "hotchocolate.fusion.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Packaging": "[8.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "HotChocolate.StarWars": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.subscriptions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )" - } - }, - "hotchocolate.subscriptions.inmemory": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Subscriptions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.tests.utilities": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.transport.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.transport.http": { - "type": "Project", - "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets": { - "type": "Project", - "dependencies": { - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets.client": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.scalars.upload": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.Options": "[8.0.0, )" - } - } } } } \ No newline at end of file diff --git a/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json b/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json index b97fb59ea01..ec5167c15e9 100644 --- a/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json +++ b/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json @@ -223,7 +223,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -263,10 +263,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", "Microsoft.Extensions.Http": "[7.0.0, )", "System.Reactive": "[5.0.0, )" @@ -354,7 +354,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[7.0.0, )" } @@ -369,8 +369,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[7.0.0, )", "System.Text.Json": "[7.0.0, )" @@ -716,7 +716,7 @@ "BananaCakePop.Middleware": "[10.0.7, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" } }, @@ -756,10 +756,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", "Microsoft.Extensions.Http": "[8.0.0, )", "System.Reactive": "[5.0.0, )" @@ -847,7 +847,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[8.0.0, )" } @@ -862,8 +862,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[8.0.0, )", "System.Text.Json": "[8.0.0, )" diff --git a/src/HotChocolate/Fusion/test/Shared/packages.lock.json b/src/HotChocolate/Fusion/test/Shared/packages.lock.json index 7da95b22359..0c7aa3420be 100644 --- a/src/HotChocolate/Fusion/test/Shared/packages.lock.json +++ b/src/HotChocolate/Fusion/test/Shared/packages.lock.json @@ -1529,1602 +1529,6 @@ "Microsoft.Extensions.Options": "[7.0.0, )" } } - }, - "net8.0": { - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "BananaCakePop.Middleware": { - "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", - "dependencies": { - "Yarp.ReverseProxy": "2.0.1" - } - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "ChilliCream.Testing.Utilities": { - "type": "Transitive", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "DiffPlex": { - "type": "Transitive", - "resolved": "1.7.1", - "contentHash": "a0fSO2p8ykrcfzgG0sjpZAMZPthXXz4l6UIVuM9uyIYIh5yga4sq3aydSGt6n+MkdSBKvMurjjaKnxIqZtfG1g==" - }, - "Microsoft.AspNetCore.TestHost": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "Rk6Ai9bFf1KubVY5oEbEPN5fiKWW2oeU+easjokyUqqYyTHRsXlkjFeMvwecgoXsoTfXMSwEHzJp8FCjQcyYTQ==", - "dependencies": { - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.AspNetCore.WebUtilities": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "z1SXKg5Bk02VmrrOab1TO2yxkZIfL4RyrS+yCpwxcLTqJwImYhEttz3LYbl1gQebkAAvx2Fm4NVXmopxXeLZgw==", - "dependencies": { - "Microsoft.Net.Http.Headers": "8.0.0", - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.Configuration": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Configuration.Binder": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "mBMoXLsr5s1y2zOHWmKsE9veDcx8h1x/c3rz4baEdQKTeDcmQAPNbB54Pi/lhFO3K431eEq6PFbMgLaa6PHFfA==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==" - }, - "Microsoft.Extensions.Diagnostics": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "3PZp/YSkIXrF7QK7PfC1bkyRYwqOHpWFad8Qx+4wkuumAeXo1NHaxpS9LboNA9OvNSAu+QOVlXbMyoY+pHSqcw==", - "dependencies": { - "Microsoft.Extensions.Configuration": "8.0.0", - "Microsoft.Extensions.Diagnostics.Abstractions": "8.0.0", - "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0" - } - }, - "Microsoft.Extensions.Diagnostics.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JHYCQG7HmugNYUhOl368g+NMxYE/N/AiclCYRNlgCY9eVyiBkOHMwK4x60RYMxv9EL3+rmj1mqHvdCiPpC+D4Q==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "System.Diagnostics.DiagnosticSource": "8.0.0" - } - }, - "Microsoft.Extensions.Http": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "cWz4caHwvx0emoYe7NkHPxII/KkTI8R/LC9qdqJqnKv2poTJ4e2qqPGQqvRoQ5kaSA4FU5IV3qFAuLuOhoqULQ==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Diagnostics": "8.0.0", - "Microsoft.Extensions.Logging": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "tvRkov9tAJ3xP51LCv3FJ2zINmv1P8Hi8lhhtcKGqM+ImiTCC84uOPEI4z8Cdq2C3o9e+Aa0Gw0rmrsJD77W+w==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "8.0.0", - "Microsoft.Extensions.Logging.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "arDBqTgFCyS0EvRV7O3MZturChstm50OJ0y9bDJvAcmEPJm0FFpFyjU/JLYyStNGGey081DvnQYlncNX5SJJGA==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0" - } - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "4pm+XgxSukskwjzDDfSjG4KNUIOdFF2VaqZZDtTzoyQMOVSnlV6ZM8a9aVu5dg9LVZTB//utzSc8fOi0b0Mb2Q==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JOVOfqpnqlVLUzINQ2fox8evY2SKLYJ3BV8QDe/Jyp21u1T7r45x/R/5QdteURMR5r01GxeJSBBUOCOyaNXA3g==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Options.ConfigurationExtensions": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "0f4DMRqEd50zQh+UyJc+/HiBsZ3vhAQALgdkcQEalSH1L2isdC7Yj54M3cyo5e+BeO5fcBQ7Dxly8XiBBcvRgw==", - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", - "Microsoft.Extensions.Configuration.Binder": "8.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", - "Microsoft.Extensions.Options": "8.0.0", - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" - }, - "Microsoft.Net.Http.Headers": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "YlHqL8oWBX3H1LmdKUOxEMW8cVD8nUACEnE2Fu3Ze4k7mYf8yJ1o/uLqoequQV0GDupXyCBEzYhn7Zxdz7pqYQ==", - "dependencies": { - "Microsoft.Extensions.Primitives": "8.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.2", - "contentHash": "R2pZ3B0UjeyHShm9vG+Tu0EBb2lC8b0dFzV9gVn50ofHXh9Smjk6kTn7A/FdAsC8B5cKib1OnGYOXxRBz5XQDg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "Snapshooter.Xunit": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "c9xLpVz6PL9lp/djOWtk5KPDZq3cSYpmXoJQY524EOtuFl5z9ZtsotpsyrDW40U1DRnQSYvcPKEUV0X//u6gkQ==" - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "sDnWM0N3AMCa86LrKTWeF3BZLD2sgWyYUc7HL6z4+xyDZNQRwzmxbo4qP2rX2MqC+Sy1/gOSRDah5ltxY5jPxw==" - }, - "System.IO.Packaging": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "8g1V4YRpdGAxFcK8v9OjuMdIOJSpF30Zb1JGicwVZhly3I994WFyBdV6mQEo8d3T+URQe55/M0U0eIH0Hts1bg==" - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reactive": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==" - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ==" - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "OdrZO2WjkiEG6ajEFRABTRCi/wuXQPxeV6g8xvUJqdxMvvuCCEk86zPla8UiIQJz3durtUEbNyY/3lIhS0yZvQ==", - "dependencies": { - "System.Text.Encodings.Web": "8.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "CMaFr7v+57RW7uZfZkPExsPB6ljwzhjACWW1gfU35Y56rk72B/Wu+sTqxVmGSk4SFUlPc3cjeKND0zktziyjBA==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "Yarp.ReverseProxy": { - "type": "Transitive", - "resolved": "2.0.1", - "contentHash": "op7vBwONPFeR1PYxeLw+RLqSodODDX8RWd0OinLGMVIq6yi1q9mv1j56ImuyZgiAToksiC0Dc7jbRUZ9I+jvFA==", - "dependencies": { - "System.IO.Hashing": "7.0.0" - } - }, - "cookiecrumble": { - "type": "Project", - "dependencies": { - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", - "Newtonsoft.Json": "[13.0.2, )", - "Xunit": "[2.4.1, )" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.Diagnostics.DiagnosticSource": "[8.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )" - } - }, - "hotchocolate.aspnetcore": { - "type": "Project", - "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", - "HotChocolate": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" - } - }, - "hotchocolate.aspnetcore.tests.utilities": { - "type": "Project", - "dependencies": { - "CookieCrumble": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Tests.Utilities": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", - "Microsoft.AspNetCore.TestHost": "[8.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "System.Threading.Channels": "[8.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.fusion": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[0.0.0, )", - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", - "Microsoft.Extensions.Http": "[8.0.0, )", - "System.Reactive": "[5.0.0, )" - } - }, - "hotchocolate.fusion.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Packaging": "[8.0.0, )" - } - }, - "hotchocolate.fusion.composition": { - "type": "Project", - "dependencies": { - "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Skimmed": "[0.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[8.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "HotChocolate.Skimmed": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )" - } - }, - "HotChocolate.StarWars": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.subscriptions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )" - } - }, - "hotchocolate.subscriptions.inmemory": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Subscriptions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )" - } - }, - "hotchocolate.tests.utilities": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "CookieCrumble": "[0.0.0, )", - "DiffPlex": "[1.7.1, )", - "HotChocolate.StarWars": "[0.0.0, )", - "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "xunit": "[2.4.1, )" - } - }, - "hotchocolate.transport.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.transport.http": { - "type": "Project", - "dependencies": { - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets": { - "type": "Project", - "dependencies": { - "System.IO.Pipelines": "[8.0.0, )" - } - }, - "hotchocolate.transport.sockets.client": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "System.Collections.Immutable": "[8.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.ObjectPool": "[8.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.scalars.upload": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.utilities.introspection": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "HotChocolate.Transport.Http": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "System.Text.Json": "[8.0.0, )" - } - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.0, )", - "Microsoft.Extensions.Options": "[8.0.0, )" - } - } } } } \ No newline at end of file From eb5f525efc50ab1e82988057e3be9989f2ff75de Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 18 Dec 2023 13:38:09 +0200 Subject: [PATCH 54/89] Designer --- .../FederationResources.Designer.cs | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index c1a9f40983a..be0d13368ce 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -9,8 +9,8 @@ namespace HotChocolate.ApolloFederation.Properties { using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -22,15 +22,15 @@ namespace HotChocolate.ApolloFederation.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class FederationResources { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal FederationResources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -44,7 +44,7 @@ internal FederationResources() { return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -58,7 +58,7 @@ internal FederationResources() { resourceCulture = value; } } - + /// /// Looks up a localized string similar to The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema.. /// @@ -67,7 +67,7 @@ internal static string Any_Description { return ResourceManager.GetString("Any_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users.. /// @@ -76,7 +76,7 @@ internal static string AuthenticatedDirective_Description { return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Marks underlying custom directive to be included in the Supergraph schema.. /// @@ -85,7 +85,7 @@ internal static string ComposeDirective_Description { return ResourceManager.GetString("ComposeDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Provides contact information of the owner responsible for this subgraph schema.. /// @@ -94,7 +94,7 @@ internal static string ContactDirective_Description { return ResourceManager.GetString("ContactDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The EntityResolver must be a method. Please check if the EntityResolverAttribute is correctly set to a method.. /// @@ -103,7 +103,7 @@ internal static string EntityResolver_MustBeMethod { return ResourceManager.GetString("EntityResolver_MustBeMethod", resourceCulture); } } - + /// /// Looks up a localized string similar to Union of all types that key directive applied. This information is needed by the Apollo federation gateway.. /// @@ -112,7 +112,7 @@ internal static string EntityType_Description { return ResourceManager.GetString("EntityType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ScopedContextData`.. /// @@ -121,7 +121,7 @@ internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture); } } - + /// /// Looks up a localized string similar to Directive to indicate that marks target object as extending part of the federated schema.. /// @@ -130,7 +130,7 @@ internal static string ExtendsDirective_Description { return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Directive to indicate that a field is owned by another service, for example via Apollo federation.. /// @@ -139,7 +139,7 @@ internal static string ExternalDirective_Description { return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -148,7 +148,7 @@ internal static string FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpt return ResourceManager.GetString("FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -157,7 +157,7 @@ internal static string FieldDescriptorExtensions_Override_From_CannotBeNullOrEmp return ResourceManager.GetString("FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -166,7 +166,7 @@ internal static string FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullO return ResourceManager.GetString("FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Value cannot be null or empty.. /// @@ -175,7 +175,7 @@ internal static string FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullO return ResourceManager.GetString("FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to Scalar representing a set of fields.. /// @@ -184,7 +184,7 @@ internal static string FieldsetType_Description { return ResourceManager.GetString("FieldsetType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Marks location within schema as inaccessible from the GraphQL Gateway. /// @@ -193,7 +193,7 @@ internal static string InaccessibleDirective_Description { return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Provides meta information to the router that this entity type is an interface in the supergraph.. /// @@ -202,7 +202,7 @@ internal static string InterfaceObjectDirective_Description { return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface.. /// @@ -211,7 +211,7 @@ internal static string KeyDirective_Description { return ResourceManager.GetString("KeyDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another.. /// @@ -220,7 +220,7 @@ internal static string OverrideDirective_Description { return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor.. /// @@ -229,7 +229,7 @@ internal static string PolicyDirective_Description { return ResourceManager.GetString("PolicyDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway.. /// @@ -238,7 +238,7 @@ internal static string ProvidesDirective_Description { return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Used to annotate the required input fieldset from a base type for a resolver.. /// @@ -247,7 +247,7 @@ internal static string RequiresDirective_Description { return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes.. /// @@ -256,7 +256,7 @@ internal static string RequiresScopesDirective_Description { return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The expression must refer to a method representing the reference resolver.. /// @@ -265,7 +265,7 @@ internal static string ResolveReference_MustBeMethod { return ResourceManager.GetString("ResolveReference_MustBeMethod", resourceCulture); } } - + /// /// Looks up a localized string similar to Scalar representing a JWT scope. /// @@ -274,7 +274,7 @@ internal static string ScopeType_Description { return ResourceManager.GetString("ScopeType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec.. /// @@ -283,7 +283,7 @@ internal static string ServiceType_Description { return ResourceManager.GetString("ServiceType_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Indicates that given object and/or field can be resolved by multiple subgraphs.. /// @@ -292,7 +292,7 @@ internal static string ShareableDirective_Description { return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to Allows users to annotate fields and types with additional metadata information.. /// @@ -301,7 +301,7 @@ internal static string TagDirective_Description { return ResourceManager.GetString("TagDirective_Description", resourceCulture); } } - + /// /// Looks up a localized string similar to The given any representation has an invalid format.. /// @@ -310,7 +310,7 @@ internal static string ThrowHelper_Any_HasInvalidFormat { return ResourceManager.GetString("ThrowHelper_Any_HasInvalidFormat", resourceCulture); } } - + /// /// Looks up a localized string similar to The compose directive attribute is used on `{0}` without specifying the name.. /// @@ -319,7 +319,7 @@ internal static string ThrowHelper_ComposeDirective_Name_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_ComposeDirective_Name_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to The contact attribute is used on `{0}` without specifying the name.. /// @@ -328,7 +328,7 @@ internal static string ThrowHelper_Contact_Name_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Contact_Name_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to The apollo gateway tries to resolve an entity for which no EntityResolver method was found.. /// @@ -337,7 +337,7 @@ internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { return ResourceManager.GetString("ThrowHelper_EntityResolver_NoEntityResolverFound", resourceCulture); } } - + /// /// Looks up a localized string similar to The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least one entity.. /// @@ -346,7 +346,7 @@ internal static string ThrowHelper_EntityType_NoEntities { return ResourceManager.GetString("ThrowHelper_EntityType_NoEntities", resourceCulture); } } - + /// /// Looks up a localized string similar to Specified federation version `{0}` is not supported.. /// @@ -355,7 +355,7 @@ internal static string ThrowHelper_FederationVersion_Unknown { return ResourceManager.GetString("ThrowHelper_FederationVersion_Unknown", resourceCulture); } } - + /// /// Looks up a localized string similar to The fieldset has an invalid format.. /// @@ -364,7 +364,7 @@ internal static string ThrowHelper_FieldSet_HasInvalidFormat { return ResourceManager.GetString("ThrowHelper_FieldSet_HasInvalidFormat", resourceCulture); } } - + /// /// Looks up a localized string similar to The key attribute is used on `{0}` without specifying the field set.. /// @@ -373,7 +373,7 @@ internal static string ThrowHelper_Key_FieldSet_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Key_FieldSet_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to The link attribute is used on `{0}` without specifying the url.. /// @@ -382,7 +382,7 @@ internal static string ThrowHelper_Link_Url_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Link_Url_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to FieldSet is null or empty on type. /// @@ -391,7 +391,7 @@ internal static string ThrowHelper_Provides_FieldSet_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Provides_FieldSet_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to FieldSet is null or empty on type. /// @@ -400,7 +400,7 @@ internal static string ThrowHelper_Requires_FieldSet_CannotBeEmpty { return ResourceManager.GetString("ThrowHelper_Requires_FieldSet_CannotBeEmpty", resourceCulture); } } - + /// /// Looks up a localized string similar to {0} cannot parse the given value of type `{1}`. /// From 33ad2bd29ba58c6f991f8864847c15f8875e40f9 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 18 Dec 2023 14:11:51 +0200 Subject: [PATCH 55/89] Trailing commas (to be moved to another PR) --- ...hocolateAuthorizeRequestExecutorBuilder.cs | 2 +- .../src/AspNetCore/AcceptMediaTypeKind.cs | 2 +- .../src/AspNetCore/AllowedGetOperations.cs | 2 +- .../AspNetCore/src/AspNetCore/ContentType.cs | 4 +- .../src/AspNetCore/DefaultHttpMethod.cs | 2 +- .../AspNetCore/src/AspNetCore/ErrorHelper.cs | 6 +- .../EndpointRouteBuilderExtensions.cs | 2 +- ...NetCoreServiceCollectionExtensions.Http.cs | 4 +- ...teAspNetCoreServiceCollectionExtensions.cs | 4 +- .../Extensions/HttpResponseExtensions.cs | 2 +- .../src/AspNetCore/HeaderUtilities.cs | 2 +- .../src/AspNetCore/HttpGetSchemaMiddleware.cs | 2 +- .../src/AspNetCore/HttpTransportVersion.cs | 2 +- .../Instrumentation/HttpRequestKind.cs | 2 +- .../src/AspNetCore/MiddlewareRoutingType.cs | 2 +- .../src/AspNetCore/RequestContentType.cs | 2 +- .../src/AspNetCore/ResponseContentType.cs | 2 +- .../DefaultHttpResponseFormatter.cs | 8 +- .../Subscriptions/ConnectionCloseReason.cs | 2 +- .../ApolloSubscriptionProtocolHandler.cs | 2 +- .../Protocols/Apollo/Utf8MessageBodies.cs | 2 +- .../Protocols/Apollo/Utf8Messages.cs | 14 +-- .../GraphQLOverWebSocketProtocolHandler.cs | 2 +- .../GraphQLOverWebSocket/Utf8Messages.cs | 16 +-- .../Subscriptions/WebSocketConnection.cs | 2 +- .../DefaultGraphQLHttpClient.cs | 6 +- .../GraphQLHttpClientExtensions.cs | 10 +- .../GraphQLHttpEventStreamProcessor.cs | 2 +- .../GraphQLOverWebSocket/Utf8Messages.cs | 16 +-- .../Transport.Sockets.Client/SocketClient.cs | 2 +- .../AuthorizationAttributeTestData.cs | 2 +- .../ServerTestBase.cs | 2 +- .../Apollo/WebSocketExtensions.cs | 2 +- .../TestServerExtensions.cs | 2 +- .../GraphQLOverHttpSpecTests.cs | 28 ++--- .../HttpGetMiddlewareTests.cs | 76 ++++++------- .../HttpGetSchemaMiddlewareTests.cs | 2 +- .../HttpMultipartMiddlewareTests.cs | 36 +++---- .../HttpPostMiddlewareTests.cs | 100 +++++++++--------- .../AspNetCore.Tests/PersistedQueryTests.cs | 6 +- .../Apollo/WebSocketProtocolTests.cs | 8 +- .../WebSocketProtocolTests.cs | 22 ++-- .../ToolConfigurationFileMiddlewareTests.cs | 8 +- .../GraphQLHttpClientTests.cs | 32 +++--- .../OperationRequestTests.cs | 2 +- .../WebSocketClientProtocolTests.cs | 2 +- .../src/Diagnostics/ActivityEnricher.cs | 2 +- .../src/Diagnostics/ActivityScopes.cs | 2 +- .../ServerInstrumentationTests.cs | 24 ++--- .../QueryableFilterVisitorBooleanTests.cs | 2 +- .../QueryableFilterVisitorComparableTests.cs | 4 +- .../QueryableFilterVisitorEnumTests.cs | 6 +- .../QueryableFilterVisitorExecutableTests.cs | 4 +- .../QueryableFilterVisitorInterfacesTests.cs | 2 +- .../QueryableFilterVisitorListTests.cs | 22 ++-- .../QueryableFilterVisitorObjectTests.cs | 42 ++++---- .../QueryableFilterVisitorStringTests.cs | 4 +- .../QueryableSortVisitorBooleanTests.cs | 2 +- .../QueryableSortVisitorComparableTests.cs | 4 +- .../QueryableSortVisitorEnumTests.cs | 6 +- .../QueryableSortVisitorExecutableTests.cs | 2 +- .../QueryableSortVisitorExpressionTests.cs | 4 +- .../QueryableSortVisitorObjectTests.cs | 76 ++++++------- .../QueryableSortVisitorStringTests.cs | 4 +- .../src/Data/Driver/AndFilterDefinition.cs | 4 +- .../List/MongoDbListAllOperationHandler.cs | 2 +- .../List/MongoDbListAnyOperationHandler.cs | 4 +- .../List/MongoDbListNoneOperationHandler.cs | 2 +- .../Data/Filters/MongoDbFilterCombinator.cs | 2 +- .../Data/Paging/MongoDbCursorPagingHandler.cs | 2 +- .../Data/Paging/MongoDbOffsetPagingHandler.cs | 2 +- .../MongoDbAggregateFluentTests.cs | 4 +- .../MongoDbCollectionTests.cs | 4 +- .../MongoDbFilterCombinatorTests.cs | 2 +- .../MongoDbFilterVisitorBooleanTests.cs | 4 +- .../MongoDbFilterVisitorComparableTests.cs | 16 +-- .../MongoDbFilterVisitorDateOnlyTests.cs | 4 +- .../MongoDbFilterVisitorEnumTests.cs | 6 +- .../MongoDbFilterVisitorListTests.cs | 44 ++++---- .../MongoDbFilterVisitorObjectIdTests.cs | 4 +- .../MongoDbFilterVisitorObjectTests.cs | 42 ++++---- .../MongoDbFilterVisitorStringTests.cs | 4 +- .../MongoDbFilterVisitorTimeOnlyTests.cs | 4 +- .../MongoDbFindFluentTests.cs | 6 +- ...MongoDbCursorPagingAggregateFluentTests.cs | 2 +- .../MongoDbCursorPagingFindFluentTests.cs | 2 +- .../MongoDbOffsetPagingAggregateTests.cs | 2 +- .../MongoDbOffsetPagingFindFluentTests.cs | 2 +- .../MongoDbProjectionObjectsTests.cs | 12 +-- ...ongoDbProjectionVisitorIsProjectedTests.cs | 4 +- .../MongoDbProjectionVisitorPagingTests.cs | 4 +- .../MongoDbProjectionVisitorScalarTests.cs | 4 +- .../MongoDbAggregateFluentTests.cs | 8 +- .../MongoDbCollectionTests.cs | 4 +- .../MongoDbFindFluentTests.cs | 6 +- .../MongoDbSortVisitorBooleanTests.cs | 4 +- .../MongoDbSortVisitorComparableTests.cs | 4 +- .../MongoDbSortVisitorEnumTests.cs | 6 +- .../MongoDbSortVisitorObjectTests.cs | 42 ++++---- .../MongoDbSortVisitorStringTests.cs | 4 +- .../test/Types.MongoDb/BsonTypeTests.cs | 22 ++-- .../Helpers/ObjectTypeFactory.cs | 6 +- .../Pipeline/CreateMutationTypeMiddleware.cs | 2 +- .../Pipeline/CreatePayloadTypesMiddleware.cs | 2 +- .../Pipeline/CreateQueryTypeMiddleware.cs | 2 +- .../Pipeline/DiscoverOperationsMiddleware.cs | 2 +- .../HotChocolate.OpenApi/SchemaTypeInfo.cs | 2 +- .../Controller/UberController.cs | 2 +- .../Handlers/RavenFilterExpressionBuilder.cs | 4 +- .../Filtering/RavenQueryableFilterProvider.cs | 2 +- .../Pagination/RavenCursorPagingHandler.cs | 2 +- .../Pagination/RavenOffsetPagingHandler.cs | 2 +- .../RavenQueryableProjectionProvider.cs | 2 +- .../Sorting/RavenQueryableSortProvider.cs | 2 +- .../ConventionTests.cs | 4 +- .../FilteringAndPaging.cs | 2 +- .../QueryableFilterVisitorBooleanTests.cs | 4 +- .../QueryableFilterVisitorComparableTests.cs | 4 +- .../QueryableFilterVisitorEnumTests.cs | 6 +- .../QueryableFilterVisitorExecutableTests.cs | 4 +- .../QueryableFilterVisitorInterfacesTests.cs | 2 +- .../QueryableFilterVisitorListTests.cs | 22 ++-- .../QueryableFilterVisitorObjectTests.cs | 42 ++++---- .../QueryableFilterVisitorStringTests.cs | 4 +- .../RavenAsyncDocumentQueryTests.cs | 2 +- .../RavenDocumentQueryTests.cs | 2 +- .../QueryableFirstOrDefaultTests.cs | 44 ++++---- .../QueryableProjectionFilterTests.cs | 54 +++++----- .../QueryableProjectionHashSetTest.cs | 20 ++-- .../QueryableProjectionInterfaceTypeTests.cs | 10 +- .../QueryableProjectionNestedTests.cs | 4 +- .../QueryableProjectionSetTest.cs | 16 +-- .../QueryableProjectionSortedSetTest.cs | 20 ++-- .../QueryableProjectionSortingTests.cs | 44 ++++---- .../QueryableProjectionUnionTypeTests.cs | 10 +- ...eryableProjectionVisitorExecutableTests.cs | 2 +- ...ryableProjectionVisitorIsProjectedTests.cs | 6 +- .../QueryableProjectionVisitorPagingTests.cs | 6 +- .../QueryableProjectionVisitorScalarTests.cs | 2 +- .../QueryableSingleOrDefaultTests.cs | 44 ++++---- .../QueryableSortVisitorBooleanTests.cs | 2 +- .../QueryableSortVisitorComparableTests.cs | 4 +- .../QueryableSortVisitorEnumTests.cs | 6 +- .../QueryableSortVisitorExecutableTests.cs | 2 +- .../QueryableSortVisitorExpressionTests.cs | 4 +- .../QueryableSortVisitorObjectTests.cs | 76 ++++++------- .../QueryableSortVisitorStringTests.cs | 4 +- .../test/Data.Raven.Tests/FluentApiTests.cs | 4 +- .../Spatial/src/Types/GeoJsonGeometryType.cs | 2 +- .../Spatial/src/Types/GeoJsonResolvers.cs | 2 +- .../GeoJsonInputObjectSerializer.cs | 6 +- .../GeoJsonMultiLineStringSerializer.cs | 2 +- .../GeoJsonMultiPolygonSerializer.cs | 2 +- .../Serialization/GeoJsonPolygonSerializer.cs | 2 +- .../GeoJsonPositionSerializer.cs | 8 +- .../Types/Serialization/GeoJsonSerializers.cs | 4 +- .../Serialization/GeoJsonTypeSerializer.cs | 2 +- .../QueryableFilterVisitorContainsTests.cs | 6 +- .../QueryableFilterVisitorDistanceTests.cs | 6 +- .../QueryableFilterVisitorIntersectTests.cs | 2 +- .../QueryableFilterVisitorOverlapsTests.cs | 4 +- .../QueryableFilterVisitorTouchesTests.cs | 4 +- .../QueryableFilterVisitorWithinTests.cs | 2 +- .../QueryableFilterVisitorTests.cs | 6 +- .../QueryableFilterVisitorGeometryTests.cs | 80 +++++++------- .../GeoJsonLineStringSerializerTests.cs | 16 +-- .../Types.Tests/GeoJsonLineStringTypeTests.cs | 2 +- .../GeoJsonMultiLineStringSerializerTests.cs | 22 ++-- .../GeoJsonMultiLineStringTypeTests.cs | 6 +- .../GeoJsonMultiPointSerializerTests.cs | 10 +- .../GeoJsonMultiPolygonSerializerTests.cs | 26 ++--- .../GeoJsonMultiPolygonTypeTests.cs | 6 +- .../GeoJsonPointSerializerTests.cs | 8 +- .../GeoJsonPolygonSerializerTests.cs | 28 ++--- .../Types.Tests/GeoJsonPolygonTypeTests.cs | 2 +- .../TransformationIntegrationTests.cs | 16 +-- .../Client/src/Core/ExecutionStrategy.cs | 2 +- .../Client/src/Core/Json/JsonErrorParser.cs | 2 +- .../Client/src/Core/Json/JsonResultPatcher.cs | 2 +- .../Client/src/Core/OperationKind.cs | 2 +- .../Client/src/Core/OperationResultBuilder.cs | 8 +- .../Client/src/Core/OperationStore.cs | 2 +- .../Client/src/Core/OperationUpdateKind.cs | 2 +- .../Client/src/Core/RequestStrategy.cs | 2 +- .../src/Core/Serialization/TimeSpanFormat.cs | 2 +- .../Client/src/Core/ThrowHelper.cs | 4 +- .../Client/src/Core/ValueKind.cs | 2 +- .../src/Persistence.SQLite/DatabaseHelper.cs | 4 +- .../Persistence.SQLite/SQLitePersistence.cs | 6 +- .../DependencyInjection/InMemoryClient.cs | 2 +- ...lientFactoryServiceCollectionExtensions.cs | 2 +- .../Messages/OperationMessageType.cs | 2 +- .../GraphQLWebSocketMessageParser.cs | 6 +- .../GraphQLWebSocketMessageType.cs | 2 +- .../GraphQLWebSocketMessageTypeSpans.cs | 20 ++-- .../GraphQLWebSocketProtocol.cs | 2 +- .../GraphQLWebSocketWriterExtension.cs | 2 +- .../Transport.WebSockets/SocketCloseStatus.cs | 2 +- .../Transport.WebSockets/WebSocketClient.cs | 2 +- .../JsonOperationRequestSerializerTests.cs | 6 +- .../test/Core.Tests/OperationRequestTests.cs | 40 +++---- .../Serialization/Iso8601DurationTests.cs | 2 +- .../Serialization/SerializerResolverTests.cs | 36 +++---- .../GraphQLWebSocketProtocolTests.cs | 2 +- .../Builders/Inheritance.cs | 2 +- .../Builders/MethodCallBuilder.cs | 2 +- .../Builders/TypeReferenceBuilder.cs | 2 +- .../CodeGeneration.CSharp/CSharpGenerator.cs | 2 +- .../CSharpGeneratorSettings.cs | 2 +- .../Extensions/ClassBuilderExtensions.cs | 2 +- .../Extensions/DescriptorExtensions.cs | 4 +- .../Extensions/HashCodeBuilderExtensions.cs | 2 +- .../DependencyInjectionGenerator.cs | 10 +- .../InputValueFormatterGenerator.cs | 2 +- .../Generators/JsonResultBuilderGenerator.cs | 4 +- .../Generators/OperationDocumentGenerator.cs | 2 +- .../TypeMapperGenerator_EntityHandler.cs | 4 +- .../TypeMapperGenerator_MapMethodMeta.cs | 4 +- .../src/CodeGeneration.CSharp/JsonUtils.cs | 4 +- .../SourceDocumentKind.cs | 2 +- .../src/CodeGeneration/AccessModifier.cs | 2 +- .../Analyzers/FragmentHelper.cs | 2 +- .../CodeGeneration/Analyzers/FragmentKind.cs | 2 +- .../Analyzers/Models/OutputModelKind.cs | 2 +- .../src/CodeGeneration/BuiltInScalarNames.cs | 2 +- .../Descriptors/TypeDescriptors/TypeKind.cs | 2 +- .../Extensions/TypeDescriptorExtensions.cs | 4 +- .../src/CodeGeneration/Keywords.cs | 2 +- .../Mappers/OperationDescriptorMapper.cs | 2 +- .../src/CodeGeneration/TypeInfos.cs | 2 +- .../Utilities/DocumentHelper.cs | 2 +- .../CSharpCompiler.cs | 2 +- .../DependencyInjectionGeneratorTests.cs | 12 +-- .../GeneratorTestHelper.cs | 8 +- .../Integration/EntityIdOrDataTest.cs | 2 +- .../Integration/MultiProfileTest.Client.cs | 4 +- .../StarWarsIntrospectionTest.Client.cs | 2 +- ...tarWarsOnReviewSubCompletionTest.Client.cs | 2 +- .../Integration/TestGeneration.cs | 12 +-- .../Integration/UploadScalarTest.cs | 24 ++--- .../Integration/UploadScalar_InMemoryTest.cs | 26 ++--- .../PersistedQueryGeneratorTests.cs | 2 +- .../StarWarsGeneratorTests.cs | 2 +- .../CSharpCompiler.cs | 2 +- .../GeneratorTestHelper.cs | 8 +- .../Analyzers/DocumentAnalyzerTests.cs | 4 +- .../Mappers/ClientDescriptorMapperTests.cs | 2 +- .../Mappers/DataTypeMapperTests.cs | 6 +- .../Mappers/EnumDescriptorMapperTests.cs | 2 +- .../Mappers/OperationDescriptorMapperTests.cs | 2 +- .../ResultBuilderDescriptorMapperTests.cs | 2 +- .../Mappers/TestDataHelper.cs | 4 +- .../Mappers/TypeDescriptorMapperTests.cs | 2 +- .../Utilities/QueryDocumentRewriterTests.cs | 2 +- .../Utilities/SchemaHelperTests.cs | 2 +- .../src/Configuration/GraphQLConfig.cs | 4 +- .../src/Configuration/RequestStrategy.cs | 2 +- .../Configuration/StrawberryShakeSettings.cs | 2 +- .../src/Configuration/TransportType.cs | 2 +- .../src/dotnet-graphql/GeneratorHelpers.cs | 4 +- .../src/dotnet-graphql/InitCommandHandler.cs | 6 +- .../JsonConsoleOutputCommand.cs | 2 +- .../src/dotnet-graphql/OAuth/TokenClient.cs | 2 +- 263 files changed, 1081 insertions(+), 1081 deletions(-) diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization.Opa/Extensions/HotChocolateAuthorizeRequestExecutorBuilder.cs b/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization.Opa/Extensions/HotChocolateAuthorizeRequestExecutorBuilder.cs index 1e3b5f79d30..3193d3e350b 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization.Opa/Extensions/HotChocolateAuthorizeRequestExecutorBuilder.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore.Authorization.Opa/Extensions/HotChocolateAuthorizeRequestExecutorBuilder.cs @@ -43,7 +43,7 @@ public static IRequestExecutorBuilder AddOpaAuthorization( var jsonOptions = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, }; jsonOptions.Converters.Add( new JsonStringEnumConverter( diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/AcceptMediaTypeKind.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/AcceptMediaTypeKind.cs index 18917b581a5..ab27453714f 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/AcceptMediaTypeKind.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/AcceptMediaTypeKind.cs @@ -43,5 +43,5 @@ public enum AcceptMediaTypeKind /// /// text/event-stream /// - EventStream + EventStream, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/AllowedGetOperations.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/AllowedGetOperations.cs index 193f94fdc26..7ddd6ce97ed 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/AllowedGetOperations.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/AllowedGetOperations.cs @@ -7,5 +7,5 @@ public enum AllowedGetOperations Mutation = 2, Subscription = 4, QueryAndMutation = Query | Mutation, - All = Query | Mutation | Subscription + All = Query | Mutation | Subscription, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/ContentType.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/ContentType.cs index f2c42773a3b..67ad8d35b46 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/ContentType.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/ContentType.cs @@ -15,13 +15,13 @@ internal static class ContentType private static readonly char[] _jsonArray = { - 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', '/', 'j', 's', 'o', 'n' + 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', '/', 'j', 's', 'o', 'n', }; private static readonly char[] _multiPartFormArray = { 'm', 'u', 'l', 't', 'i', 'p', 'a', 'r', 't', '/', 'f', 'o', 'r', 'm', '-', 'd', 'a', - 't', 'a' + 't', 'a', }; [MethodImpl(MethodImplOptions.AggressiveInlining)] diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/DefaultHttpMethod.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/DefaultHttpMethod.cs index fbc1de92891..5a4dee90c48 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/DefaultHttpMethod.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/DefaultHttpMethod.cs @@ -13,5 +13,5 @@ public enum DefaultHttpMethod /// /// Use a GraphQL HTTP Post request. /// - Post + Post, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/ErrorHelper.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/ErrorHelper.cs index 66fac473744..3b4d03f0b94 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/ErrorHelper.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/ErrorHelper.cs @@ -38,7 +38,7 @@ public static IQueryResult InvalidTypeName(string typeName) code: ErrorCodes.Server.InvalidTypeName, extensions: new Dictionary { - { nameof(typeName), typeName } + { nameof(typeName), typeName }, })); public static IQueryResult TypeNotFound(string typeName) @@ -48,7 +48,7 @@ public static IQueryResult TypeNotFound(string typeName) code: ErrorCodes.Server.TypeDoesNotExist, extensions: new Dictionary { - { nameof(typeName), typeName } + { nameof(typeName), typeName }, })); public static IQueryResult InvalidAcceptMediaType(string headerValue) @@ -58,6 +58,6 @@ public static IQueryResult InvalidAcceptMediaType(string headerValue) code: ErrorCodes.Server.InvalidAcceptHeaderValue, extensions: new Dictionary { - { nameof(headerValue), headerValue } + { nameof(headerValue), headerValue }, })); } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/EndpointRouteBuilderExtensions.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/EndpointRouteBuilderExtensions.cs index 8f6566568b2..a5f90cdbf3a 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/EndpointRouteBuilderExtensions.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/EndpointRouteBuilderExtensions.cs @@ -443,7 +443,7 @@ public static GraphQLHttpEndpointConventionBuilder WithOptions( { AllowedGetOperations = httpOptions.AllowedGetOperations, EnableGetRequests = httpOptions.EnableGetRequests, - EnableMultipartRequests = httpOptions.EnableMultipartRequests + EnableMultipartRequests = httpOptions.EnableMultipartRequests, }); /// diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Http.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Http.cs index 0366e4b9d56..6af796e1524 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Http.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.Http.cs @@ -108,8 +108,8 @@ public static IServiceCollection AddHttpResponseFormatter( { Json = new JsonResultFormatterOptions { - Indented = indented - } + Indented = indented, + }, })); return services; } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs index 20f0efbf252..f5e8b9513d5 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HotChocolateAspNetCoreServiceCollectionExtensions.cs @@ -46,7 +46,7 @@ public static IServiceCollection AddGraphQLServerCore( DefaultHttpResponseFormatter.Create( new HttpResponseFormatterOptions { - HttpTransportVersion = HttpTransportVersion.Latest + HttpTransportVersion = HttpTransportVersion.Latest, })); services.TryAddSingleton( sp => new DefaultHttpRequestParser( @@ -61,7 +61,7 @@ public static IServiceCollection AddGraphQLServerCore( { 0 => new NoopServerDiagnosticEventListener(), 1 => listeners[0], - _ => new AggregateServerDiagnosticEventListener(listeners) + _ => new AggregateServerDiagnosticEventListener(listeners), }; }); diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpResponseExtensions.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpResponseExtensions.cs index 263ee9b9905..e7b8ad90eb3 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpResponseExtensions.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Extensions/HttpResponseExtensions.cs @@ -13,7 +13,7 @@ internal static class HttpResponseExtensions private static readonly JsonSerializerOptions _serializerOptions = new() { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, - PropertyNamingPolicy = JsonNamingPolicy.CamelCase + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, }; internal static Task WriteAsJsonAsync( diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/HeaderUtilities.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/HeaderUtilities.cs index d2b0b9d2b20..b3e54e35597 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/HeaderUtilities.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/HeaderUtilities.cs @@ -22,7 +22,7 @@ internal static class HeaderUtilities ContentType.Types.Application, ContentType.SubTypes.GraphQLResponse, null, - StringSegment.Empty) + StringSegment.Empty), }; /// diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/HttpGetSchemaMiddleware.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/HttpGetSchemaMiddleware.cs index 2692966cc20..f410a8d4481 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/HttpGetSchemaMiddleware.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/HttpGetSchemaMiddleware.cs @@ -17,7 +17,7 @@ public sealed class HttpGetSchemaMiddleware : MiddlewareBase ContentType.Types.Application, ContentType.SubTypes.GraphQLResponse, null, - default) + default), }; private readonly MiddlewareRoutingType _routing; private readonly IServerDiagnosticEvents _diagnosticEvents; diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/HttpTransportVersion.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/HttpTransportVersion.cs index ee38bf3aebe..433292d1916 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/HttpTransportVersion.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/HttpTransportVersion.cs @@ -18,5 +18,5 @@ public enum HttpTransportVersion /// /// Represents the GraphQL over HTTP spec version with the commit on 2023-01-27. /// - Draft20230127 = 2 + Draft20230127 = 2, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Instrumentation/HttpRequestKind.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Instrumentation/HttpRequestKind.cs index b3b6094f45f..24b3d4d5484 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Instrumentation/HttpRequestKind.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Instrumentation/HttpRequestKind.cs @@ -29,5 +29,5 @@ public enum HttpRequestKind /// /// HTTP POST GraphQL-SSE /// - HttpSse + HttpSse, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/MiddlewareRoutingType.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/MiddlewareRoutingType.cs index 24bdcadf041..36fd723847c 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/MiddlewareRoutingType.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/MiddlewareRoutingType.cs @@ -14,5 +14,5 @@ public enum MiddlewareRoutingType /// /// Explicitly hosted e.g. MapGraphQLSchema() /// - Explicit + Explicit, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/RequestContentType.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/RequestContentType.cs index c853670233d..f0744d1f190 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/RequestContentType.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/RequestContentType.cs @@ -18,5 +18,5 @@ public enum RequestContentType /// /// multipart/mixed /// - Form + Form, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/ResponseContentType.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/ResponseContentType.cs index 6dff9b22d44..bc35d43635d 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/ResponseContentType.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/ResponseContentType.cs @@ -28,5 +28,5 @@ public enum ResponseContentType /// /// text/event-stream /// - EventStream + EventStream, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Serialization/DefaultHttpResponseFormatter.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Serialization/DefaultHttpResponseFormatter.cs index b098dc0f786..dd3b6150003 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Serialization/DefaultHttpResponseFormatter.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Serialization/DefaultHttpResponseFormatter.cs @@ -50,8 +50,8 @@ public DefaultHttpResponseFormatter( Json = new JsonResultFormatterOptions { Indented = indented, - Encoder = encoder - } + Encoder = encoder, + }, }) { } @@ -409,7 +409,7 @@ protected virtual void OnWriteResponseHeaders( { SingleResult => ResultKind.Single, SubscriptionResult => ResultKind.Subscription, - _ => ResultKind.Stream + _ => ResultKind.Stream, }; ref var start = ref MemoryMarshal.GetArrayDataReference(acceptMediaTypes); @@ -568,7 +568,7 @@ private enum ResultKind { Single, Stream, - Subscription + Subscription, } private sealed class SealedDefaultHttpResponseFormatter : DefaultHttpResponseFormatter diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/ConnectionCloseReason.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/ConnectionCloseReason.cs index a6f91ebeb4a..51e250fdca1 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/ConnectionCloseReason.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/ConnectionCloseReason.cs @@ -10,5 +10,5 @@ public enum ConnectionCloseReason PolicyViolation, MessageTooBig, MandatoryExtension, - InternalServerError + InternalServerError, } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/ApolloSubscriptionProtocolHandler.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/ApolloSubscriptionProtocolHandler.cs index 66b0b2b5990..5ee913ec0db 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/ApolloSubscriptionProtocolHandler.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/ApolloSubscriptionProtocolHandler.cs @@ -166,7 +166,7 @@ await connection.CloseAsync( ex.Message, locations: new[] { - new Location(ex.Line, ex.Column) + new Location(ex.Line, ex.Column), }); await SendErrorMessageAsync( diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8MessageBodies.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8MessageBodies.cs index f57118ae1f3..8be273daa5d 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8MessageBodies.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8MessageBodies.cs @@ -16,7 +16,7 @@ internal static class Utf8MessageBodies (byte)'k', (byte)'a', (byte)'"', - (byte)'}' + (byte)'}', }; public static ReadOnlyMemory KeepAlive => _keepAlive; diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8Messages.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8Messages.cs index 765b456ed8b..53f5dfa137b 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8Messages.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/Apollo/Utf8Messages.cs @@ -20,7 +20,7 @@ internal static class Utf8Messages (byte)'i', (byte)'n', (byte)'i', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan ConnectionAccept => @@ -39,7 +39,7 @@ internal static class Utf8Messages (byte)'_', (byte)'a', (byte)'c', - (byte)'k' + (byte)'k', }; public static ReadOnlySpan ConnectionError => @@ -60,7 +60,7 @@ internal static class Utf8Messages (byte)'r', (byte)'r', (byte)'o', - (byte)'r' + (byte)'r', }; public static ReadOnlySpan ConnectionTerminate => @@ -85,7 +85,7 @@ internal static class Utf8Messages (byte)'n', (byte)'a', (byte)'t', - (byte)'e' + (byte)'e', }; public static ReadOnlySpan Start => @@ -95,7 +95,7 @@ internal static class Utf8Messages (byte)'t', (byte)'a', (byte)'r', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan Stop => @@ -123,7 +123,7 @@ internal static class Utf8Messages (byte)'r', (byte)'r', (byte)'o', - (byte)'r' + (byte)'r', }; public static ReadOnlySpan Complete => @@ -136,6 +136,6 @@ internal static class Utf8Messages (byte)'l', (byte)'e', (byte)'t', - (byte)'e' + (byte)'e', }; } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/GraphQLOverWebSocketProtocolHandler.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/GraphQLOverWebSocketProtocolHandler.cs index dc1a1033822..0e0df1c949c 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/GraphQLOverWebSocketProtocolHandler.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/GraphQLOverWebSocketProtocolHandler.cs @@ -161,7 +161,7 @@ idProp.ValueKind is not JsonValueKind.String || ex.Message, locations: new[] { - new Location(ex.Line, ex.Column) + new Location(ex.Line, ex.Column), }); await SendErrorMessageAsync( diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/Utf8Messages.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/Utf8Messages.cs index 9bbf4ca8dfb..bcb88a077f7 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/Utf8Messages.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/Protocols/GraphQLOverWebSocket/Utf8Messages.cs @@ -20,7 +20,7 @@ internal static class Utf8Messages (byte)'i', (byte)'n', (byte)'i', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan ConnectionAccept => @@ -39,7 +39,7 @@ internal static class Utf8Messages (byte)'_', (byte)'a', (byte)'c', - (byte)'k' + (byte)'k', }; public static ReadOnlySpan Subscribe => @@ -53,7 +53,7 @@ internal static class Utf8Messages (byte)'r', (byte)'i', (byte)'b', - (byte)'e' + (byte)'e', }; public static ReadOnlySpan Next => @@ -62,7 +62,7 @@ internal static class Utf8Messages (byte)'n', (byte)'e', (byte)'x', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan Error => @@ -72,7 +72,7 @@ internal static class Utf8Messages (byte)'r', (byte)'r', (byte)'o', - (byte)'r' + (byte)'r', }; public static ReadOnlySpan Complete => @@ -85,7 +85,7 @@ internal static class Utf8Messages (byte)'l', (byte)'e', (byte)'t', - (byte)'e' + (byte)'e', }; public static ReadOnlySpan Ping => @@ -94,7 +94,7 @@ internal static class Utf8Messages (byte)'p', (byte)'i', (byte)'n', - (byte)'g' + (byte)'g', }; public static ReadOnlySpan Pong => @@ -103,6 +103,6 @@ internal static class Utf8Messages (byte)'p', (byte)'o', (byte)'n', - (byte)'g' + (byte)'g', }; } diff --git a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/WebSocketConnection.cs b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/WebSocketConnection.cs index 829a81b4d32..824a284ed6c 100644 --- a/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/WebSocketConnection.cs +++ b/src/HotChocolate/AspNetCore/src/AspNetCore/Subscriptions/WebSocketConnection.cs @@ -185,7 +185,7 @@ private static WebSocketCloseStatus MapCloseStatus(ConnectionCloseReason closeRe ConnectionCloseReason.NormalClosure => WebSocketCloseStatus.NormalClosure, ConnectionCloseReason.PolicyViolation => WebSocketCloseStatus.PolicyViolation, ConnectionCloseReason.ProtocolError => WebSocketCloseStatus.ProtocolError, - _ => WebSocketCloseStatus.Empty + _ => WebSocketCloseStatus.Empty, }; public void Dispose() diff --git a/src/HotChocolate/AspNetCore/src/Transport.Http/DefaultGraphQLHttpClient.cs b/src/HotChocolate/AspNetCore/src/Transport.Http/DefaultGraphQLHttpClient.cs index 44202b00784..88883963582 100644 --- a/src/HotChocolate/AspNetCore/src/Transport.Http/DefaultGraphQLHttpClient.cs +++ b/src/HotChocolate/AspNetCore/src/Transport.Http/DefaultGraphQLHttpClient.cs @@ -127,9 +127,9 @@ private static HttpRequestMessage CreateRequestMessage( { new MediaTypeWithQualityHeaderValue(ContentType.GraphQL), new MediaTypeWithQualityHeaderValue(ContentType.Json), - new MediaTypeWithQualityHeaderValue(ContentType.EventStream) - } - } + new MediaTypeWithQualityHeaderValue(ContentType.EventStream), + }, + }, }; if (method == GraphQLHttpMethod.Post) diff --git a/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpClientExtensions.cs b/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpClientExtensions.cs index 032353caa56..be60bc6b100 100644 --- a/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpClientExtensions.cs +++ b/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpClientExtensions.cs @@ -217,7 +217,7 @@ public static Task GetAsync( var request = new GraphQLHttpRequest(operation) { - Method = GraphQLHttpMethod.Get + Method = GraphQLHttpMethod.Get, }; return client.SendAsync(request, cancellationToken); @@ -259,7 +259,7 @@ public static Task GetAsync( var request = new GraphQLHttpRequest(operation, new Uri(uri)) { - Method = GraphQLHttpMethod.Get + Method = GraphQLHttpMethod.Get, }; return client.SendAsync(request, cancellationToken); @@ -301,7 +301,7 @@ public static Task GetAsync( var request = new GraphQLHttpRequest(operation, uri) { - Method = GraphQLHttpMethod.Get + Method = GraphQLHttpMethod.Get, }; return client.SendAsync(request, cancellationToken); @@ -552,7 +552,7 @@ public static Task PostAsync( var request = new GraphQLHttpRequest(operation, new Uri(uri)) { - Method = GraphQLHttpMethod.Post + Method = GraphQLHttpMethod.Post, }; return client.SendAsync(request, cancellationToken); @@ -594,7 +594,7 @@ public static Task PostAsync( var request = new GraphQLHttpRequest(operation, uri) { - Method = GraphQLHttpMethod.Post + Method = GraphQLHttpMethod.Post, }; return client.SendAsync(request, cancellationToken); diff --git a/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpEventStreamProcessor.cs b/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpEventStreamProcessor.cs index 0cd1c733c25..162b4abbd0f 100644 --- a/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpEventStreamProcessor.cs +++ b/src/HotChocolate/AspNetCore/src/Transport.Http/GraphQLHttpEventStreamProcessor.cs @@ -354,6 +354,6 @@ private static void SkipWhitespaces(ref ReadOnlySpan span) private enum EventType { Next, - Complete + Complete, } } \ No newline at end of file diff --git a/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/Protocols/GraphQLOverWebSocket/Utf8Messages.cs b/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/Protocols/GraphQLOverWebSocket/Utf8Messages.cs index 3d79ffe23f0..43d6fac2c75 100644 --- a/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/Protocols/GraphQLOverWebSocket/Utf8Messages.cs +++ b/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/Protocols/GraphQLOverWebSocket/Utf8Messages.cs @@ -22,7 +22,7 @@ internal static class Utf8Messages (byte)'i', (byte)'n', (byte)'i', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan ConnectionAccept => @@ -41,7 +41,7 @@ internal static class Utf8Messages (byte)'_', (byte)'a', (byte)'c', - (byte)'k' + (byte)'k', }; public static ReadOnlySpan Subscribe => @@ -55,7 +55,7 @@ internal static class Utf8Messages (byte)'r', (byte)'i', (byte)'b', - (byte)'e' + (byte)'e', }; public static ReadOnlySpan Next => @@ -64,7 +64,7 @@ internal static class Utf8Messages (byte)'n', (byte)'e', (byte)'x', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan Error => @@ -74,7 +74,7 @@ internal static class Utf8Messages (byte)'r', (byte)'r', (byte)'o', - (byte)'r' + (byte)'r', }; public static ReadOnlySpan Complete => @@ -87,7 +87,7 @@ internal static class Utf8Messages (byte)'l', (byte)'e', (byte)'t', - (byte)'e' + (byte)'e', }; public static ReadOnlySpan Ping => @@ -96,7 +96,7 @@ internal static class Utf8Messages (byte)'p', (byte)'i', (byte)'n', - (byte)'g' + (byte)'g', }; public static ReadOnlySpan Pong => @@ -105,6 +105,6 @@ internal static class Utf8Messages (byte)'p', (byte)'o', (byte)'n', - (byte)'g' + (byte)'g', }; } diff --git a/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/SocketClient.cs b/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/SocketClient.cs index b00672dede6..b3912bb39ff 100644 --- a/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/SocketClient.cs +++ b/src/HotChocolate/AspNetCore/src/Transport.Sockets.Client/SocketClient.cs @@ -14,7 +14,7 @@ public sealed class SocketClient : ISocket { private static readonly IProtocolHandler[] _protocolHandlers = { - new GraphQLOverWebSocketProtocolHandler() + new GraphQLOverWebSocketProtocolHandler(), }; private readonly CancellationTokenSource _cts = new(); diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Opa.Tests/AuthorizationAttributeTestData.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Opa.Tests/AuthorizationAttributeTestData.cs index 6e0257657b0..dd540ad45e4 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Opa.Tests/AuthorizationAttributeTestData.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Opa.Tests/AuthorizationAttributeTestData.cs @@ -50,7 +50,7 @@ public IEnumerator GetEnumerator() { yield return new object[] { - CreateSchema() + CreateSchema(), }; } diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/ServerTestBase.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/ServerTestBase.cs index ef7e71fb008..1658532380a 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/ServerTestBase.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/ServerTestBase.cs @@ -100,7 +100,7 @@ protected virtual TestServer CreateStarWarsServer( .WithOptions(new GraphQLServerOptions { EnableBatching = true, - AllowedGetOperations = AllowedGetOperations.Query | AllowedGetOperations.Subscription + AllowedGetOperations = AllowedGetOperations.Query | AllowedGetOperations.Subscription, }); configureConventions?.Invoke(builder); diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/Subscriptions/Apollo/WebSocketExtensions.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/Subscriptions/Apollo/WebSocketExtensions.cs index 2497f85dbbb..c710fc896a9 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/Subscriptions/Apollo/WebSocketExtensions.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/Subscriptions/Apollo/WebSocketExtensions.cs @@ -19,7 +19,7 @@ public static class WebSocketExtensions new() { ContractResolver = new CamelCasePropertyNamesContractResolver(), - NullValueHandling = NullValueHandling.Ignore + NullValueHandling = NullValueHandling.Ignore, }; public static Task SendConnectionInitializeAsync( diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerExtensions.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerExtensions.cs index 1db35c26f7a..b2e808621e8 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerExtensions.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/TestServerExtensions.cs @@ -208,7 +208,7 @@ await SendPostRequestAsync( { StatusCode = response.StatusCode, ContentType = response.Content.Headers.ContentType!.ToString(), - Content = await response.Content.ReadAsStringAsync() + Content = await response.Content.ReadAsStringAsync(), }; } diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/GraphQLOverHttpSpecTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/GraphQLOverHttpSpecTests.cs index aea68e43832..92bac53afa8 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/GraphQLOverHttpSpecTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/GraphQLOverHttpSpecTests.cs @@ -61,7 +61,7 @@ public async Task SingleResult_Success(string? acceptHeader, HttpTransportVersio using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ __typename }" }) + new ClientQueryRequest { Query = "{ __typename }" }), }; AddAcceptHeader(request, acceptHeader); @@ -97,8 +97,8 @@ public async Task SingleResult_MultipartAcceptHeader(string acceptHeader) new ClientQueryRequest { Query = "{ __typename }" }), Headers = { - { "Accept", acceptHeader } - } + { "Accept", acceptHeader }, + }, }; using var response = await client.SendAsync(request); @@ -144,8 +144,8 @@ public async Task Query_No_Body(string? acceptHeader, HttpTransportVersion trans { Content = new ByteArrayContent(Array.Empty()) { - Headers = { ContentType = new("application/json") { CharSet = "utf-8" } } - } + Headers = { ContentType = new("application/json") { CharSet = "utf-8" } }, + }, }; AddAcceptHeader(request, acceptHeader); @@ -186,7 +186,7 @@ public async Task ValidationError(string? acceptHeader, HttpTransportVersion tra using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ __typ$ename }" }) + new ClientQueryRequest { Query = "{ __typ$ename }" }), }; AddAcceptHeader(request, acceptHeader); @@ -229,7 +229,7 @@ public async Task ValidationError2(string? acceptHeader, HttpTransportVersion tr using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ __type name }" }) + new ClientQueryRequest { Query = "{ __type name }" }), }; AddAcceptHeader(request, acceptHeader); @@ -275,7 +275,7 @@ public async Task UnsupportedAcceptHeaderValue() using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ __typename }" }) + new ClientQueryRequest { Query = "{ __typename }" }), }; request.Headers.TryAddWithoutValidation("Accept", "unsupported"); @@ -308,7 +308,7 @@ public async Task UnsupportedApplicationAcceptHeaderValue() using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ __typename }" }) + new ClientQueryRequest { Query = "{ __typename }" }), }; request.Headers.TryAddWithoutValidation("Accept", "application/unsupported"); @@ -346,7 +346,7 @@ public async Task DeferredQuery_Multipart(string? acceptHeader) using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ ... @defer { __typename } }" }) + new ClientQueryRequest { Query = "{ ... @defer { __typename } }" }), }; AddAcceptHeader(request, acceptHeader); @@ -391,7 +391,7 @@ public async Task DeferredQuery_EventStream(string acceptHeader) { Content = JsonContent.Create( new ClientQueryRequest { Query = "{ ... @defer { __typename } }" }), - Headers = { { "Accept", acceptHeader } } + Headers = { { "Accept", acceptHeader } }, }; using var response = await client.SendAsync(request, ResponseHeadersRead); @@ -431,7 +431,7 @@ public async Task DefferedQuery_NoStreamableAcceptHeader() { Content = JsonContent.Create( new ClientQueryRequest { Query = "{ ... @defer { __typename } }" }), - Headers = { { "Accept", ContentType.GraphQLResponse } } + Headers = { { "Accept", ContentType.GraphQLResponse } }, }; using var response = await client.SendAsync(request, ResponseHeadersRead); @@ -464,7 +464,7 @@ public async Task EventStream_Sends_KeepAlive() { Content = JsonContent.Create( new ClientQueryRequest { Query = "subscription {delay(count: 2, delay:15000)}" }), - Headers = { { "Accept", "text/event-stream" } } + Headers = { { "Accept", "text/event-stream" } }, }; using var response = await client.SendAsync(request, ResponseHeadersRead); @@ -502,7 +502,7 @@ private HttpClient GetClient(HttpTransportVersion serverTransportVersion) configureServices: s => s.AddHttpResponseFormatter( new HttpResponseFormatterOptions { - HttpTransportVersion = serverTransportVersion + HttpTransportVersion = serverTransportVersion, })); return server.CreateClient(); diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetMiddlewareTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetMiddlewareTests.cs index 4563bafb367..8118109df15 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetMiddlewareTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetMiddlewareTests.cs @@ -88,7 +88,7 @@ await server.GetAsync( hero { name } - }" + }", }); // assert @@ -111,7 +111,7 @@ await server.GetAsync( HERO: hero { name } - }" + }", }); // assert @@ -133,7 +133,7 @@ await server.GetAsync( query ($d: Float) { double_arg(d: $d) }", - Variables = new Dictionary { { "d", 1.539 } } + Variables = new Dictionary { { "d", 1.539 } }, }, "/arguments"); @@ -156,7 +156,7 @@ await server.GetAsync( query ($d: Float) { double_arg(d: $d) }", - Variables = new Dictionary { { "d", double.MaxValue } } + Variables = new Dictionary { { "d", double.MaxValue } }, }, "/arguments"); @@ -164,7 +164,7 @@ await server.GetAsync( new { double.MaxValue, - result + result, }.MatchSnapshot(); } @@ -183,7 +183,7 @@ await server.GetAsync( query ($d: Float) { double_arg(d: $d) }", - Variables = new Dictionary { { "d", double.MinValue } } + Variables = new Dictionary { { "d", double.MinValue } }, }, "/arguments"); @@ -191,7 +191,7 @@ await server.GetAsync( new { double.MinValue, - result + result, }.MatchSnapshot(); } @@ -210,7 +210,7 @@ await server.GetAsync( query ($d: Decimal) { decimal_arg(d: $d) }", - Variables = new Dictionary { { "d", decimal.MaxValue } } + Variables = new Dictionary { { "d", decimal.MaxValue } }, }, "/arguments"); @@ -218,7 +218,7 @@ await server.GetAsync( new { decimal.MaxValue, - result + result, }.MatchSnapshot(); } @@ -237,7 +237,7 @@ await server.GetAsync( query ($d: Decimal) { decimal_arg(d: $d) }", - Variables = new Dictionary { { "d", decimal.MinValue } } + Variables = new Dictionary { { "d", decimal.MinValue } }, }, "/arguments"); @@ -245,7 +245,7 @@ await server.GetAsync( new { decimal.MinValue, - result + result, }.MatchSnapshot(); } @@ -268,8 +268,8 @@ await server.GetAsync( }", Variables = new Dictionary { - { "episode", "NEW_HOPE" } - } + { "episode", "NEW_HOPE" }, + }, }); // assert @@ -295,8 +295,8 @@ query h($id: String!) { }", Variables = new Dictionary { - { "id", "1000" } - } + { "id", "1000" }, + }, }); // assert @@ -311,7 +311,7 @@ public async Task SingleRequest_CreateReviewForEpisode_With_ObjectVariable() configureConventions: e => e.WithOptions( new GraphQLServerOptions { - AllowedGetOperations = AllowedGetOperations.QueryAndMutation + AllowedGetOperations = AllowedGetOperations.QueryAndMutation, })); // act @@ -338,8 +338,8 @@ mutation CreateReviewForEpisode( { "stars", 5 }, { "commentary", "This is a great movie!" }, } - } - } + }, + }, }); // assert @@ -354,7 +354,7 @@ public async Task SingleRequest_CreateReviewForEpisode_Omit_NonNull_Variable() configureConventions: e => e.WithOptions( new GraphQLServerOptions { - AllowedGetOperations = AllowedGetOperations.QueryAndMutation + AllowedGetOperations = AllowedGetOperations.QueryAndMutation, })); // act @@ -380,8 +380,8 @@ mutation CreateReviewForEpisode( { "stars", 5 }, { "commentary", "This is a great movie!" }, } - } - } + }, + }, }); // assert @@ -396,7 +396,7 @@ public async Task SingleRequest_CreateReviewForEpisode_Variables_In_ObjectValue( configureConventions: e => e.WithOptions( new GraphQLServerOptions { - AllowedGetOperations = AllowedGetOperations.QueryAndMutation + AllowedGetOperations = AllowedGetOperations.QueryAndMutation, })); // act @@ -421,8 +421,8 @@ mutation CreateReviewForEpisode( { { "ep", "EMPIRE" }, { "stars", 5 }, - { "commentary", "This is a great movie!" } - } + { "commentary", "This is a great movie!" }, + }, }); // assert @@ -458,8 +458,8 @@ mutation CreateReviewForEpisode( { { "ep", "EMPIRE" }, { "stars", 5 }, - { "commentary", "This is a great movie!" } - } + { "commentary", "This is a great movie!" }, + }, }); // assert @@ -491,7 +491,7 @@ query b { name } }", - OperationName = operationName + OperationName = operationName, }); // assert @@ -515,7 +515,7 @@ await server.GetAsync( name } }", - Variables = new Dictionary { { "episode", "NEW_HOPE" } } + Variables = new Dictionary { { "episode", "NEW_HOPE" } }, }); // assert @@ -538,7 +538,7 @@ await server.GetAsync( ähero { name } - }" + }", }); // assert @@ -575,8 +575,8 @@ mutation CreateReviewForEpisode( { "stars", 5 }, { "commentary", "This is a great movie!" }, } - } - } + }, + }, }); // assert @@ -591,7 +591,7 @@ public async Task SingleRequest_Mutation_Set_To_Be_Allowed_on_Get() configureConventions: e => e.WithOptions( new GraphQLServerOptions { - AllowedGetOperations = AllowedGetOperations.QueryAndMutation + AllowedGetOperations = AllowedGetOperations.QueryAndMutation, })); // act @@ -618,8 +618,8 @@ mutation CreateReviewForEpisode( { "stars", 5 }, { "commentary", "This is a great movie!" }, } - } - } + }, + }, }); // assert @@ -635,7 +635,7 @@ public async Task Get_Middleware_Is_Disabled() new GraphQLServerOptions { EnableGetRequests = false, - Tool = { Enable = false } + Tool = { Enable = false }, })); // act @@ -648,7 +648,7 @@ await server.GetAsync( hero { name } - }" + }", }); // assert @@ -709,7 +709,7 @@ await server.GetStoreActivePersistedQueryAsync( new[] { resultA, - resultB + resultB, }.MatchSnapshot(); } @@ -755,7 +755,7 @@ await server.GetAsync( hero { name } - }" + }", }); // assert diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs index 0cfe17314ea..39848e16f62 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpGetSchemaMiddlewareTests.cs @@ -157,7 +157,7 @@ public async Task Download_GraphQL_SDL_Disabled() new GraphQLServerOptions { EnableSchemaRequests = false, - Tool = { Enable = false } + Tool = { Enable = false }, })); var url = TestServerExtensions.CreateUrl("/graphql?sdl"); var request = new HttpRequestMessage(HttpMethod.Get, url); diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpMultipartMiddlewareTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpMultipartMiddlewareTests.cs index e109f7325e7..56f47c7349d 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpMultipartMiddlewareTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpMultipartMiddlewareTests.cs @@ -244,8 +244,8 @@ public async Task Upload_File() Query = query, Variables = new Dictionary { - { "upload", null } - } + { "upload", null }, + }, }); // act @@ -281,8 +281,8 @@ public async Task Upload_Optional_File() Query = query, Variables = new Dictionary { - { "upload", null } - } + { "upload", null }, + }, }); // act @@ -318,8 +318,8 @@ public async Task Upload_Optional_File_In_InputObject() Query = query, Variables = new Dictionary { - { "input", new Dictionary { { "file", null } } } - } + { "input", new Dictionary { { "file", null } } }, + }, }); // act @@ -355,8 +355,8 @@ public async Task Upload_Optional_File_In_Inline_InputObject() Query = query, Variables = new Dictionary { - { "upload", null } - } + { "upload", null }, + }, }); // act @@ -392,8 +392,8 @@ public async Task Upload_File_In_InputObject() Query = query, Variables = new Dictionary { - { "input", new Dictionary { { "file", null } } } - } + { "input", new Dictionary { { "file", null } } }, + }, }); // act @@ -429,8 +429,8 @@ public async Task Upload_File_Inline_InputObject() Query = query, Variables = new Dictionary { - { "upload", null } - } + { "upload", null }, + }, }); // act @@ -472,11 +472,11 @@ public async Task Upload_File_In_List() { new List { - new Dictionary { { "file", null } } - } + new Dictionary { { "file", null } }, + }, } - } - } + }, + }, }); // act @@ -512,8 +512,8 @@ public async Task Upload_Too_Large_File_Test() Query = query, Variables = new Dictionary { - { "upload", null } - } + { "upload", null }, + }, }); var count = 1024 * 1024 * 129; diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpPostMiddlewareTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpPostMiddlewareTests.cs index 8b1b4d78bec..6716dd5d063 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpPostMiddlewareTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/HttpPostMiddlewareTests.cs @@ -160,7 +160,7 @@ await server.PostAsync( hero { name } - }" + }", }); // assert @@ -183,7 +183,7 @@ await server.PostAsync( HERO: hero { name } - }" + }", }); // assert @@ -212,7 +212,7 @@ await server.PostAsync( HERO: hero { name } - }" + }", }); // assert @@ -236,7 +236,7 @@ await server.PostAsync( name } }", - Variables = new Dictionary { { "episode", "NEW_HOPE" } } + Variables = new Dictionary { { "episode", "NEW_HOPE" } }, }); // assert @@ -261,7 +261,7 @@ await server.PostHttpAsync( name } }", - Variables = new Dictionary { { "episode", "NEW_HOPE" } } + Variables = new Dictionary { { "episode", "NEW_HOPE" } }, }); // assert @@ -305,7 +305,7 @@ query h($id: String!) { name } }", - Variables = new Dictionary { { "id", "1000" } } + Variables = new Dictionary { { "id", "1000" } }, }); // assert @@ -336,7 +336,7 @@ ... on Droid @defer(label: ""my_id"") id } } - }" + }", }); // assert @@ -371,7 +371,7 @@ ... on Droid @defer(label: ""my_id"") id } } - }" + }", }); // assert @@ -408,7 +408,7 @@ ... on Droid @defer(label: ""my_id"") id } } - }" + }", }); // assert @@ -435,7 +435,7 @@ public async Task Apollo_Tracing_Invalid_Field() { name } - }" + }", }, enableApolloTracing: true); @@ -467,7 +467,7 @@ ... on Droid @defer(label: ""my_id"") id } } - }" + }", }); // assert @@ -511,7 +511,7 @@ ... on Droid @defer(label: ""my_id"", if: $if) } } }", - Variables = new Dictionary { ["if"] = true } + Variables = new Dictionary { ["if"] = true }, }); // assert @@ -540,7 +540,7 @@ ... on Droid @defer(label: ""my_id"", if: $if) } } }", - Variables = new Dictionary { ["if"] = false } + Variables = new Dictionary { ["if"] = false }, }); // assert @@ -571,7 +571,7 @@ nodes @stream(initialCount: 1 label: ""foo"") { } } } - }" + }", }); // assert @@ -631,8 +631,8 @@ mutation CreateReviewForEpisode( { { "stars", 5 }, { "commentary", "This is a great movie!" }, } - } - } + }, + }, }); // assert @@ -667,8 +667,8 @@ mutation CreateReviewForEpisode( { { "stars", 5 }, { "commentary", "This is a great movie!" }, } - } - } + }, + }, }); // assert @@ -703,8 +703,8 @@ mutation CreateReviewForEpisode( { { "ep", "EMPIRE" }, { "stars", 5 }, - { "commentary", "This is a great movie!" } - } + { "commentary", "This is a great movie!" }, + }, }); // assert @@ -740,8 +740,8 @@ mutation CreateReviewForEpisode( { { "ep", "EMPIRE" }, { "stars", 5 }, - { "commentary", "This is a great movie!" } - } + { "commentary", "This is a great movie!" }, + }, }); // assert @@ -774,7 +774,7 @@ query b { name } }", - OperationName = operationName + OperationName = operationName, }); // assert @@ -798,7 +798,7 @@ await server.PostAsync( name } }", - Variables = new Dictionary { { "episode", "NEW_HOPE" } } + Variables = new Dictionary { { "episode", "NEW_HOPE" } }, }); // assert @@ -821,7 +821,7 @@ await server.PostAsync( ähero { name } - }" + }", }); // assert @@ -843,7 +843,7 @@ await server.PostAsync( query ($d: Float) { double_arg(d: $d) }", - Variables = new Dictionary { { "d", 1.539 } } + Variables = new Dictionary { { "d", 1.539 } }, }, "/arguments"); @@ -866,7 +866,7 @@ await server.PostAsync( query ($d: Float) { double_arg(d: $d) }", - Variables = new Dictionary { { "d", double.MaxValue } } + Variables = new Dictionary { { "d", double.MaxValue } }, }, "/arguments"); @@ -889,7 +889,7 @@ await server.PostAsync( query ($d: Float) { double_arg(d: $d) }", - Variables = new Dictionary { { "d", double.MinValue } } + Variables = new Dictionary { { "d", double.MinValue } }, }, "/arguments"); @@ -912,7 +912,7 @@ await server.PostAsync( query ($d: Decimal) { decimal_arg(d: $d) }", - Variables = new Dictionary { { "d", decimal.MaxValue } } + Variables = new Dictionary { { "d", decimal.MaxValue } }, }, "/arguments"); @@ -935,7 +935,7 @@ await server.PostAsync( query ($d: Decimal) { decimal_arg(d: $d) }", - Variables = new Dictionary { { "d", decimal.MinValue } } + Variables = new Dictionary { { "d", decimal.MinValue } }, }, "/arguments"); @@ -1034,7 +1034,7 @@ query getHero { hero(episode: EMPIRE) { id @export } - }" + }", }, new ClientQueryRequest { @@ -1043,8 +1043,8 @@ query getHuman { human(id: $id) { name } - }" - } + }", + }, }); // assert @@ -1071,7 +1071,7 @@ query getHero { hero(episode: EMPIRE) { id @export } - }" + }", }, new ClientQueryRequest { @@ -1080,8 +1080,8 @@ query getHuman { human(id: $id) { name } - }" - } + }", + }, }), "/graphql"); @@ -1118,7 +1118,7 @@ query getHuman { human(id: $id) { name } - }" + }", }, "getHero, getHuman"); @@ -1146,7 +1146,7 @@ query getHero { hero(episode: EMPIRE) { id @export } - }" + }", }, new ClientQueryRequest { @@ -1155,8 +1155,8 @@ query getHuman { human(id: $id) { name } - }" - } + }", + }, }), path: "/batching"); @@ -1193,7 +1193,7 @@ query getHuman { human(id: $id) { name } - }" + }", }, "getHero, getHuman", path: "/batching"); @@ -1225,7 +1225,7 @@ query getHuman { human(id: $id) { name } - }" + }", }, "getHero", createOperationParameter: s => "batchOperations=" + s); @@ -1256,7 +1256,7 @@ query getHuman { human(id: $id) { name } - }" + }", }, "getHero, getHuman", createOperationParameter: s => "batchOperations=[" + s); @@ -1287,7 +1287,7 @@ query getHuman { human(id: $id) { name } - }" + }", }, "getHero, getHuman", createOperationParameter: s => "batchOperations=" + s); @@ -1314,7 +1314,7 @@ await server.PostAsync( hero { name } - }" + }", }); // assert @@ -1335,7 +1335,7 @@ public async Task Strip_Null_Values_Variant_1() using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ __schema { description } }" }) + new ClientQueryRequest { Query = "{ __schema { description } }" }), }; using var response = await client.SendAsync(request); @@ -1363,7 +1363,7 @@ public async Task Strip_Null_Values_Variant_2() configureServices: s => s.AddHttpResponseFormatter( new HttpResponseFormatterOptions { - Json = new JsonResultFormatterOptions { NullIgnoreCondition = Fields } + Json = new JsonResultFormatterOptions { NullIgnoreCondition = Fields }, })); var client = server.CreateClient(); @@ -1371,7 +1371,7 @@ public async Task Strip_Null_Values_Variant_2() using var request = new HttpRequestMessage(HttpMethod.Post, _url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ __schema { description } }" }) + new ClientQueryRequest { Query = "{ __schema { description } }" }), }; using var response = await client.SendAsync(request); @@ -1405,7 +1405,7 @@ public async Task Strip_Null_Elements() .AddHttpResponseFormatter( new HttpResponseFormatterOptions { - Json = new JsonResultFormatterOptions { NullIgnoreCondition = Lists } + Json = new JsonResultFormatterOptions { NullIgnoreCondition = Lists }, })); var client = server.CreateClient(); @@ -1413,7 +1413,7 @@ public async Task Strip_Null_Elements() using var request = new HttpRequestMessage(HttpMethod.Post, url) { Content = JsonContent.Create( - new ClientQueryRequest { Query = "{ nullValues }" }) + new ClientQueryRequest { Query = "{ nullValues }" }), }; using var response = await client.SendAsync(request); diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/PersistedQueryTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/PersistedQueryTests.cs index 5aca3a22584..e853c6058e2 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/PersistedQueryTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/PersistedQueryTests.cs @@ -343,9 +343,9 @@ private ClientQueryRequest CreateApolloStyleRequest(string hashName, string key) ["persistedQuery"] = new Dictionary { ["version"] = 1, - [hashName] = key - } - } + [hashName] = key, + }, + }, }; private sealed class QueryStorage : IReadStoredQueries diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/Apollo/WebSocketProtocolTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/Apollo/WebSocketProtocolTests.cs index 85dd5eb20dd..33e0d0ba36d 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/Apollo/WebSocketProtocolTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/Apollo/WebSocketProtocolTests.cs @@ -68,7 +68,7 @@ public Task No_ConnectionInit_Timeout() new GraphQLServerOptions { Sockets = { ConnectionInitializationTimeout = TimeSpan.FromMilliseconds(50), - KeepAliveInterval = TimeSpan.FromMilliseconds(150) + KeepAliveInterval = TimeSpan.FromMilliseconds(150), }})); var client = CreateWebSocketClient(testServer); @@ -238,7 +238,7 @@ await testServer.SendPostRequestAsync( }) { stars } - }" + }", }); var message = await WaitForMessage(webSocket, "data", ct); @@ -397,7 +397,7 @@ await testServer.SendPostRequestAsync(new ClientQueryRequest }) { stars } - }" + }", }); await WaitForMessage(webSocket, "data", ct); @@ -415,7 +415,7 @@ await testServer.SendPostRequestAsync(new ClientQueryRequest }) { stars } - }" + }", }); // assert diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/GraphQLOverWebSocket/WebSocketProtocolTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/GraphQLOverWebSocket/WebSocketProtocolTests.cs index 05d47661920..7c1aa7b3e17 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/GraphQLOverWebSocket/WebSocketProtocolTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/GraphQLOverWebSocket/WebSocketProtocolTests.cs @@ -81,8 +81,8 @@ public Task Send_Connect_Accept_Ping() { ConnectionInitializationTimeout = TimeSpan.FromMilliseconds(1000), - KeepAliveInterval = TimeSpan.FromMilliseconds(150) - } + KeepAliveInterval = TimeSpan.FromMilliseconds(150), + }, })); var client = CreateWebSocketClient(testServer); using var webSocket = await client.ConnectAsync(SubscriptionUri, ct); @@ -114,8 +114,8 @@ public Task No_ConnectionInit_Timeout() Sockets = { ConnectionInitializationTimeout = TimeSpan.FromMilliseconds(50), - KeepAliveInterval = TimeSpan.FromMilliseconds(150) - } + KeepAliveInterval = TimeSpan.FromMilliseconds(150), + }, })); var client = CreateWebSocketClient(testServer); @@ -282,7 +282,7 @@ await testServer.SendPostRequestAsync( stars } } - """ + """, }); // assert @@ -413,7 +413,7 @@ await testServer.SendPostRequestAsync( }) { stars } - }" + }", }); await WaitForMessage(webSocket, Messages.Next, ct); @@ -432,7 +432,7 @@ await testServer.SendPostRequestAsync( }) { stars } - }" + }", }); // assert @@ -477,7 +477,7 @@ await testServer.SendPostRequestAsync( }) { stars } - }" + }", }); await WaitForMessage(webSocket, Messages.Next, ct); @@ -489,7 +489,7 @@ await testServer.SendPostRequestAsync( Query = @" mutation { complete(episode:NEW_HOPE) - }" + }", }); // assert @@ -545,7 +545,7 @@ await testServer.SendPostRequestAsync( }) { stars } - }" + }", }); for (var i = 0; i < 600; i++) @@ -557,7 +557,7 @@ await testServer.SendPostRequestAsync( await testServer.SendPostRequestAsync( new ClientQueryRequest { - Query = @"mutation { complete(episode:NEW_HOPE) }" + Query = @"mutation { complete(episode:NEW_HOPE) }", }); // assert diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/ToolConfigurationFileMiddlewareTests.cs b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/ToolConfigurationFileMiddlewareTests.cs index a7d0c8b696b..4d6ceefc484 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/ToolConfigurationFileMiddlewareTests.cs +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/ToolConfigurationFileMiddlewareTests.cs @@ -84,7 +84,7 @@ public async Task Fetch_Tool_When_Disabled(string version) // arrange var options = new GraphQLServerOptions { - Tool = { ServeMode = GraphQLToolServeMode.Version(version), Enable = false } + Tool = { ServeMode = GraphQLToolServeMode.Version(version), Enable = false }, }; var server = CreateStarWarsServer(configureConventions: e => e.WithOptions(options)); @@ -114,8 +114,8 @@ public async Task Fetch_Tool_Config_With_Options() GaTrackingId = "GA-FOO", GraphQLEndpoint = "/foo/bar", UseBrowserUrlAsGraphQLEndpoint = true, - DisableTelemetry = true - } + DisableTelemetry = true, + }, }; var server = CreateStarWarsServer("/graphql", configureConventions: builder => builder.WithOptions(options)); @@ -147,7 +147,7 @@ public async Task Fetch_MapBananaCakePop_Tool_FromCdn() // arrange var options = new GraphQLToolOptions { - ServeMode = GraphQLToolServeMode.Version("5.0.8") + ServeMode = GraphQLToolServeMode.Version("5.0.8"), }; var server = CreateServer(endpoint => endpoint.MapBananaCakePop().WithOptions(options)); diff --git a/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs b/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs index f6aabd5d12f..5adfb385ae7 100644 --- a/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs +++ b/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs @@ -125,7 +125,7 @@ public async Task Post_GraphQL_Query_With_Variables_With_RequestUri() var variables = new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }; var requestUri = new Uri(CreateUrl("/graphql")); @@ -162,7 +162,7 @@ public async Task Post_GraphQL_Query_With_Variables_With_RequestUriString() var variables = new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }; var requestUri = CreateUrl("/graphql"); @@ -199,7 +199,7 @@ public async Task Post_GraphQL_Query_With_JsonElement_Variable() var variables = new Dictionary { - ["traits"] = JsonSerializer.SerializeToElement(new { lastJedi = true }) + ["traits"] = JsonSerializer.SerializeToElement(new { lastJedi = true }), }; var requestUri = CreateUrl("/graphql"); @@ -237,7 +237,7 @@ public async Task Post_GraphQL_Query_With_Variables_With_BaseAddress() var variables = new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }; // act @@ -277,7 +277,7 @@ query B($episode: Episode!) { """, variables: new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }, operationName: "B"); @@ -409,7 +409,7 @@ public async Task Get_GraphQL_Query_With_Variables_With_RequestUri() var variables = new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }; var requestUri = new Uri(CreateUrl("/graphql")); @@ -446,7 +446,7 @@ public async Task Get_GraphQL_Query_With_Variables_With_RequestUriString() var variables = new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }; var requestUri = CreateUrl("/graphql"); @@ -484,7 +484,7 @@ public async Task Get_GraphQL_Query_With_Variables_With_BaseAddress() var variables = new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }; // act @@ -524,7 +524,7 @@ query B($episode: Episode!) { """, variables: new Dictionary { - ["episode"] = "JEDI" + ["episode"] = "JEDI", }, operationName: "B"); @@ -576,8 +576,8 @@ mutation CreateReviewForEpisode( ["review"] = new Dictionary { ["stars"] = 5, - ["commentary"] = "This is a great movie!" - } + ["commentary"] = "This is a great movie!", + }, }); var client = new DefaultGraphQLHttpClient(httpClient); @@ -634,8 +634,8 @@ mutation CreateReviewForEpisode( ["review"] = new Dictionary { ["stars"] = 5, - ["commentary"] = "This is a great movie!" - } + ["commentary"] = "This is a great movie!", + }, }); var client = new DefaultGraphQLHttpClient(httpClient); @@ -677,7 +677,7 @@ public async Task Post_GraphQL_FileUpload() """, variables: new Dictionary { - ["upload"] = new FileReference(() => stream, "test.txt") + ["upload"] = new FileReference(() => stream, "test.txt"), }); var requestUri = new Uri(CreateUrl("/upload")); @@ -686,7 +686,7 @@ public async Task Post_GraphQL_FileUpload() { Method = GraphQLHttpMethod.Post, EnableFileUploads = true, - OnMessageCreated = (_, m) => m.Headers.AddGraphQLPreflight() + OnMessageCreated = (_, m) => m.Headers.AddGraphQLPreflight(), }; // act @@ -732,7 +732,7 @@ public async Task Post_GraphQL_FileUpload_With_ObjectValueNode() { Method = GraphQLHttpMethod.Post, EnableFileUploads = true, - OnMessageCreated = (_, m) => m.Headers.AddGraphQLPreflight() + OnMessageCreated = (_, m) => m.Headers.AddGraphQLPreflight(), }; // act diff --git a/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/OperationRequestTests.cs b/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/OperationRequestTests.cs index ed07f32ab1a..d736d4bd9cd 100644 --- a/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/OperationRequestTests.cs +++ b/src/HotChocolate/AspNetCore/test/Transport.Http.Tests/OperationRequestTests.cs @@ -18,7 +18,7 @@ public async Task Should_WriteNullValues() variables: new Dictionary() { ["abc"] = "def", - ["hij"] = null + ["hij"] = null, }); using var memory = new MemoryStream(); diff --git a/src/HotChocolate/AspNetCore/test/Transport.Sockets.Client.Tests/GraphQLOverWebSocket/WebSocketClientProtocolTests.cs b/src/HotChocolate/AspNetCore/test/Transport.Sockets.Client.Tests/GraphQLOverWebSocket/WebSocketClientProtocolTests.cs index 5c799a16cf6..a4506a1b8fb 100644 --- a/src/HotChocolate/AspNetCore/test/Transport.Sockets.Client.Tests/GraphQLOverWebSocket/WebSocketClientProtocolTests.cs +++ b/src/HotChocolate/AspNetCore/test/Transport.Sockets.Client.Tests/GraphQLOverWebSocket/WebSocketClientProtocolTests.cs @@ -60,7 +60,7 @@ public Task Subscribe_ReceiveDataOnMutation() }) { stars } - }" + }", }; using var testServer = CreateStarWarsServer(output: _output); diff --git a/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityEnricher.cs b/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityEnricher.cs index 788a963fa7f..5fb8dad1b53 100644 --- a/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityEnricher.cs +++ b/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityEnricher.cs @@ -620,7 +620,7 @@ protected virtual void EnrichError(IError error, Activity activity) var tags = new List> { new("graphql.error.message", error.Message), - new("graphql.error.code", error.Code) + new("graphql.error.code", error.Code), }; if (error.Locations is { Count: > 0 }) diff --git a/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityScopes.cs b/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityScopes.cs index a1c3cac9a05..079231ce33d 100644 --- a/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityScopes.cs +++ b/src/HotChocolate/Diagnostics/src/Diagnostics/ActivityScopes.cs @@ -38,5 +38,5 @@ public enum ActivityScopes CompileOperation | ExecuteOperation | ResolveFieldValue | - DataLoaderBatch + DataLoaderBatch, } diff --git a/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ServerInstrumentationTests.cs b/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ServerInstrumentationTests.cs index a26ec38321a..69d822f6d61 100644 --- a/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ServerInstrumentationTests.cs +++ b/src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ServerInstrumentationTests.cs @@ -35,7 +35,7 @@ await server.PostAsync(new ClientQueryRequest hero { name } - }" + }", }); // assert @@ -64,7 +64,7 @@ await server.PostAsync(new ClientQueryRequest hero { name } - }" + }", }); // assert @@ -93,7 +93,7 @@ await server.GetAsync(new ClientQueryRequest hero { name } - }" + }", }); // assert @@ -123,7 +123,7 @@ await server.PostAsync(new ClientQueryRequest name } }", - Variables = new Dictionary { { "episode", "NEW_HOPE" } } + Variables = new Dictionary { { "episode", "NEW_HOPE" } }, }); // assert @@ -157,7 +157,7 @@ await server.PostAsync(new ClientQueryRequest name } }", - Variables = new Dictionary { { "episode", "NEW_HOPE" } } + Variables = new Dictionary { { "episode", "NEW_HOPE" } }, }); // assert @@ -191,7 +191,7 @@ await server.PostAsync(new ClientQueryRequest name } }", - Variables = new Dictionary { { "episode", "NEW_HOPE" } } + Variables = new Dictionary { { "episode", "NEW_HOPE" } }, }); // assert @@ -222,7 +222,7 @@ await server.PostAsync(new ClientQueryRequest } }", Variables = new Dictionary { { "episode", "NEW_HOPE" } }, - Extensions = new Dictionary { { "test", "abc" } } + Extensions = new Dictionary { { "test", "abc" } }, }); // assert @@ -280,7 +280,7 @@ ... on Droid @defer(label: ""my_id"") id } } - }" + }", }); // assert @@ -319,7 +319,7 @@ await server.PostRawAsync(new ClientQueryRequest } } } - }" + }", }); // assert @@ -358,7 +358,7 @@ await server.PostRawAsync(new ClientQueryRequest } } } - }" + }", }); // assert @@ -389,7 +389,7 @@ await server.PostRawAsync(new ClientQueryRequest Query = @" { 1 - }" + }", }); // assert @@ -420,7 +420,7 @@ await server.PostRawAsync(new ClientQueryRequest Query = @" { abc - }" + }", }); // assert diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorBooleanTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorBooleanTests.cs index 68b2c797ac7..c0a5ccabf06 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorBooleanTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorBooleanTests.cs @@ -11,7 +11,7 @@ public class QueryableFilterVisitorBooleanTests private static readonly FooNullable[] _fooNullableEntities = { - new() { Bar = true }, new() { Bar = null }, new() { Bar = false } + new() { Bar = true }, new() { Bar = null }, new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorComparableTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorComparableTests.cs index 8518f58a914..4735eb9e6e6 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorComparableTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorComparableTests.cs @@ -9,7 +9,7 @@ public class QueryableFilterVisitorComparableTests { private static readonly Foo[] _fooEntities = { - new() { BarShort = 12 }, new() { BarShort = 14 }, new() { BarShort = 13 } + new() { BarShort = 12 }, new() { BarShort = 14 }, new() { BarShort = 13 }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -17,7 +17,7 @@ public class QueryableFilterVisitorComparableTests new() { BarShort = 12 }, new() { BarShort = null }, new() { BarShort = 14 }, - new() { BarShort = 13 } + new() { BarShort = 13 }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorEnumTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorEnumTests.cs index 2fb165f3866..45c67a2ba24 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorEnumTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorEnumTests.cs @@ -12,7 +12,7 @@ public class QueryableFilterVisitorEnumTests new() { BarEnum = FooEnum.BAR }, new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -21,7 +21,7 @@ public class QueryableFilterVisitorEnumTests new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, new() { BarEnum = null }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private readonly SchemaCache _cache; @@ -323,7 +323,7 @@ public enum FooEnum FOO, BAR, BAZ, - QUX + QUX, } public class FooFilterInput : FilterInputType diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorExecutableTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorExecutableTests.cs index b74af7ec9fc..18e7e9e90b3 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorExecutableTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorExecutableTests.cs @@ -10,14 +10,14 @@ public class QueryableFilterVisitorExecutableTests private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = true }, new() { Bar = null }, - new() { Bar = false } + new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs index 6df80b84ce5..afa36e92773 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs @@ -12,7 +12,7 @@ public class QueryableFilterVisitorInterfacesTests private static readonly BarInterface[] _barEntities = { new() { Test = new InterfaceImpl1 { Prop = "a" } }, - new() { Test = new InterfaceImpl1 { Prop = "b" } } + new() { Test = new InterfaceImpl1 { Prop = "b" } }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorListTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorListTests.cs index 8fc6afe343a..de7cbef36ef 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorListTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorListTests.cs @@ -15,8 +15,8 @@ public class QueryableFilterVisitorListTests { new() { Bar = "a" }, new() { Bar = "a" }, - new() { Bar = "a" } - } + new() { Bar = "a" }, + }, }, new() { @@ -24,8 +24,8 @@ public class QueryableFilterVisitorListTests { new() { Bar = "c" }, new() { Bar = "a" }, - new() { Bar = "a" } - } + new() { Bar = "a" }, + }, }, new() { @@ -33,8 +33,8 @@ public class QueryableFilterVisitorListTests { new() { Bar = "a" }, new() { Bar = "d" }, - new() { Bar = "b" } - } + new() { Bar = "b" }, + }, }, new() { @@ -42,8 +42,8 @@ public class QueryableFilterVisitorListTests { new() { Bar = "c" }, new() { Bar = "d" }, - new() { Bar = "b" } - } + new() { Bar = "b" }, + }, }, new() { @@ -51,9 +51,9 @@ public class QueryableFilterVisitorListTests { new() { Bar = null! }, new() { Bar = "d" }, - new() { Bar = "b" } - } - } + new() { Bar = "b" }, + }, + }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorObjectTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorObjectTests.cs index 84cf3e2e171..0a6fc4b3b3a 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorObjectTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorObjectTests.cs @@ -19,9 +19,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new Foo { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -33,9 +33,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 14, BarString = "d" } } - } - } + new() { Foo = new Foo { BarShort = 14, BarString = "d" } }, + }, + }, }, new() { @@ -46,8 +46,8 @@ public class QueryableFilterVisitorObjectTests BarEnum = BarEnum.FOO, BarString = "testctest", ObjectArray = null, - } - } + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -62,9 +62,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 12 } } - } - } + new() { Foo = new FooNullable { BarShort = 12 } }, + }, + }, }, new() { @@ -76,9 +76,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = null } } - } - } + new() { Foo = new FooNullable { BarShort = null } }, + }, + }, }, new() { @@ -90,9 +90,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testctest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 14 } } - } - } + new() { Foo = new FooNullable { BarShort = 14 } }, + }, + }, }, new() { @@ -102,9 +102,9 @@ public class QueryableFilterVisitorObjectTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null - } - } + ObjectArray = null, + }, + }, }; private readonly SchemaCache _cache; @@ -726,6 +726,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorStringTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorStringTests.cs index 22aa92623b9..ad1fa87e099 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorStringTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorStringTests.cs @@ -10,14 +10,14 @@ public class QueryableFilterVisitorStringTests private static readonly Foo[] _fooEntities = { new() { Bar = "testatest" }, - new() { Bar = "testbtest" } + new() { Bar = "testbtest" }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = "testatest" }, new() { Bar = "testbtest" }, - new() { Bar = null } + new() { Bar = null }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorBooleanTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorBooleanTests.cs index fb87c91d349..888530d2c44 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorBooleanTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorBooleanTests.cs @@ -11,7 +11,7 @@ public class QueryableSortVisitorBooleanTests private static readonly FooNullable[] _fooNullableEntities = { - new() { Bar = true }, new() { Bar = null }, new() { Bar = false } + new() { Bar = true }, new() { Bar = null }, new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorComparableTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorComparableTests.cs index 963757be8a4..3cfe73a7dd1 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorComparableTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorComparableTests.cs @@ -9,7 +9,7 @@ public class QueryableSortVisitorComparableTests { private static readonly Foo[] _fooEntities = { - new() { BarShort = 12 }, new() { BarShort = 14 }, new() { BarShort = 13 } + new() { BarShort = 12 }, new() { BarShort = 14 }, new() { BarShort = 13 }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -17,7 +17,7 @@ public class QueryableSortVisitorComparableTests new() { BarShort = 12 }, new() { BarShort = null }, new() { BarShort = 14 }, - new() { BarShort = 13 } + new() { BarShort = 13 }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorEnumTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorEnumTests.cs index 517fd51ed2c..2a02067a3f5 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorEnumTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorEnumTests.cs @@ -12,7 +12,7 @@ public class QueryableSortVisitorEnumTests new() { BarEnum = FooEnum.BAR }, new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -21,7 +21,7 @@ public class QueryableSortVisitorEnumTests new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, new() { BarEnum = null }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private readonly SchemaCache _cache; @@ -109,7 +109,7 @@ public enum FooEnum FOO, BAR, BAZ, - QUX + QUX, } public class FooSortType : SortInputType diff --git a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExecutableTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExecutableTests.cs index 38eab08f82c..edce4fd6ea7 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExecutableTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExecutableTests.cs @@ -11,7 +11,7 @@ public class QueryableSortVisitorExecutableTests private static readonly FooNullable[] _fooNullableEntities = { - new() { Bar = true }, new() { Bar = null }, new() { Bar = false } + new() { Bar = true }, new() { Bar = null }, new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExpressionTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExpressionTests.cs index ab4ee82123d..2585afad4f3 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExpressionTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorExpressionTests.cs @@ -14,8 +14,8 @@ public class QueryableSortVisitorExpressionTests new Foo { Name = "Sam", LastName = "Sampleman", Bars = new List() }, new Foo { - Name = "Foo", LastName = "Galoo", Bars = new List() { new() { Value = "A" } } - } + Name = "Foo", LastName = "Galoo", Bars = new List() { new() { Value = "A" } }, + }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorObjectTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorObjectTests.cs index 640dcdc239e..5007b6d124c 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorObjectTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorObjectTests.cs @@ -19,9 +19,9 @@ public class QueryableSortVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new Foo { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -39,11 +39,11 @@ public class QueryableSortVisitorObjectTests Foo = new Foo { //ScalarArray = new[] { "c", "d", "b" } - BarShort = 14, BarString = "d" - } - } - } - } + BarShort = 14, BarString = "d", + }, + }, + }, + }, }, new() { @@ -55,8 +55,8 @@ public class QueryableSortVisitorObjectTests BarString = "testctest", //ScalarArray = null, ObjectArray = null, - } - } + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -78,10 +78,10 @@ public class QueryableSortVisitorObjectTests { //ScalarArray = new[] { "c", "d", "a" } BarShort = 12, - } - } - } - } + }, + }, + }, + }, }, new() { @@ -100,10 +100,10 @@ public class QueryableSortVisitorObjectTests { //ScalarArray = new[] { "c", "d", "b" } BarShort = null, - } - } - } - } + }, + }, + }, + }, }, new() { @@ -122,10 +122,10 @@ public class QueryableSortVisitorObjectTests { //ScalarArray = new[] { "c", "d", "b" } BarShort = 14, - } - } - } - } + }, + }, + }, + }, }, new() { @@ -136,10 +136,10 @@ public class QueryableSortVisitorObjectTests BarEnum = BarEnum.FOO, BarString = "testdtest", //ScalarArray = null, - ObjectArray = null - } + ObjectArray = null, + }, }, - new() { Foo = null } + new() { Foo = null }, }; private readonly SchemaCache _cache; @@ -519,10 +519,10 @@ query testSort($order: [BarSortInput!]) { "foo", new Dictionary { - { "barShort", "ASC" }, { "barBool", "ASC" } + { "barShort", "ASC" }, { "barBool", "ASC" }, } - } - } + }, + }, }) .Create()); @@ -546,14 +546,14 @@ query testSort($order: [BarSortInput!]) { { { "foo", new Dictionary { { "barShort", "ASC" } } - } + }, }, new() { { "foo", new Dictionary { { "barBool", "ASC" } } - } - } + }, + }, }) .Create()); @@ -579,10 +579,10 @@ query testSort($order: [BarSortInput!]) { "foo", new Dictionary { - { "barShort", "DESC" }, { "barBool", "DESC" } + { "barShort", "DESC" }, { "barBool", "DESC" }, } - } - } + }, + }, }) .Create()); @@ -606,14 +606,14 @@ query testSort($order: [BarSortInput!]) { { { "foo", new Dictionary { { "barShort", "DESC" } } - } + }, }, new() { { "foo", new Dictionary { { "barBool", "DESC" } } - } - } + }, + }, }) .Create()); @@ -700,6 +700,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorStringTests.cs b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorStringTests.cs index 60c591128c6..392f55b2889 100644 --- a/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorStringTests.cs +++ b/src/HotChocolate/Marten/test/Data.Marten.Sorting.Tests/QueryableSortVisitorStringTests.cs @@ -9,12 +9,12 @@ public class QueryableSortVisitorStringTests { private static readonly Foo[] _fooEntities = { - new() { Bar = "testatest" }, new() { Bar = "testbtest" } + new() { Bar = "testatest" }, new() { Bar = "testbtest" }, }; private static readonly FooNullable[] _fooNullableEntities = { - new() { Bar = "testatest" }, new() { Bar = "testbtest" }, new() { Bar = null } + new() { Bar = "testatest" }, new() { Bar = "testbtest" }, new() { Bar = null }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/MongoDb/src/Data/Driver/AndFilterDefinition.cs b/src/HotChocolate/MongoDb/src/Data/Driver/AndFilterDefinition.cs index f5f76cb9543..a4379781f75 100644 --- a/src/HotChocolate/MongoDb/src/Data/Driver/AndFilterDefinition.cs +++ b/src/HotChocolate/MongoDb/src/Data/Driver/AndFilterDefinition.cs @@ -16,8 +16,8 @@ public sealed class AndFilterDefinition : MongoDbFilterDefinition "$geoWithin", "$near", "$geoIntersects", - "$nearSphere" - }; + "$nearSphere", + }; private readonly MongoDbFilterDefinition[] _filters; diff --git a/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAllOperationHandler.cs b/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAllOperationHandler.cs index 008b0c255ee..268f18acea7 100644 --- a/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAllOperationHandler.cs +++ b/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAllOperationHandler.cs @@ -40,7 +40,7 @@ protected override MongoDbFilterDefinition HandleListOperation( new BsonDocument { { "$exists", true }, - { "$nin", new BsonArray { new BsonArray(), BsonNull.Value } } + { "$nin", new BsonArray { new BsonArray(), BsonNull.Value } }, }), new NotMongoDbFilterDefinition( new OrMongoDbFilterDefinition(negatedChilds) diff --git a/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAnyOperationHandler.cs b/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAnyOperationHandler.cs index 10c3c8df938..5d2a6620f97 100644 --- a/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAnyOperationHandler.cs +++ b/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListAnyOperationHandler.cs @@ -52,7 +52,7 @@ parsedValue is bool parsedBool && new BsonDocument { { "$exists", true }, - { "$nin", new BsonArray { new BsonArray(), BsonNull.Value } } + { "$nin", new BsonArray { new BsonArray(), BsonNull.Value } }, }); } @@ -62,7 +62,7 @@ parsedValue is bool parsedBool && new BsonDocument { { "$exists", true }, - { "$in", new BsonArray { new BsonArray(), BsonNull.Value } } + { "$in", new BsonArray { new BsonArray(), BsonNull.Value } }, }), new MongoDbFilterOperation( path, diff --git a/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListNoneOperationHandler.cs b/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListNoneOperationHandler.cs index d10259f7c3b..2d5831a02a2 100644 --- a/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListNoneOperationHandler.cs +++ b/src/HotChocolate/MongoDb/src/Data/Filters/Handlers/List/MongoDbListNoneOperationHandler.cs @@ -26,7 +26,7 @@ protected override MongoDbFilterDefinition HandleListOperation( new BsonDocument { { "$exists", true }, - { "$nin", new BsonArray { new BsonArray(), BsonNull.Value } } + { "$nin", new BsonArray { new BsonArray(), BsonNull.Value } }, }), new MongoDbFilterOperation( path, diff --git a/src/HotChocolate/MongoDb/src/Data/Filters/MongoDbFilterCombinator.cs b/src/HotChocolate/MongoDb/src/Data/Filters/MongoDbFilterCombinator.cs index 5a45be604ac..6bdde3b7272 100644 --- a/src/HotChocolate/MongoDb/src/Data/Filters/MongoDbFilterCombinator.cs +++ b/src/HotChocolate/MongoDb/src/Data/Filters/MongoDbFilterCombinator.cs @@ -25,7 +25,7 @@ public override bool TryCombineOperations( FilterCombinator.And => CombineWithAnd(operations), FilterCombinator.Or => CombineWithOr(operations), _ => throw ThrowHelper - .Filtering_MongoDbCombinator_InvalidCombinator(this, combinator) + .Filtering_MongoDbCombinator_InvalidCombinator(this, combinator), }; return true; diff --git a/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbCursorPagingHandler.cs b/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbCursorPagingHandler.cs index cb810e008d3..fa0b6a7c631 100644 --- a/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbCursorPagingHandler.cs +++ b/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbCursorPagingHandler.cs @@ -37,7 +37,7 @@ private IMongoPagingContainer CreatePagingContainer(object source) CreatePagingContainer(mae.BuildPipeline()), MongoDbFindFluentExecutable mfe => CreatePagingContainer(mfe.BuildPipeline()), - _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()) + _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()), }; } } diff --git a/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbOffsetPagingHandler.cs b/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbOffsetPagingHandler.cs index e929c8bb7cf..61eff376e09 100644 --- a/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbOffsetPagingHandler.cs +++ b/src/HotChocolate/MongoDb/src/Data/Paging/MongoDbOffsetPagingHandler.cs @@ -37,7 +37,7 @@ private IMongoPagingContainer CreatePagingContainer(object source) CreatePagingContainer(mae.BuildPipeline()), MongoDbFindFluentExecutable mfe => CreatePagingContainer(mfe.BuildPipeline()), - _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()) + _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()), }; } } diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbAggregateFluentTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbAggregateFluentTests.cs index 481104a0b79..40051b9868e 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbAggregateFluentTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbAggregateFluentTests.cs @@ -17,13 +17,13 @@ public class MongoDbAggregateFluentTests : IClassFixture private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly Bar[] _barEntities = { new() { Baz = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero) }, - new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) } + new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbCollectionTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbCollectionTests.cs index 5029890473f..b945d50d010 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbCollectionTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbCollectionTests.cs @@ -16,13 +16,13 @@ public class MongoDbCollectionTests : IClassFixture private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly Bar[] _barEntities = { new() { Baz = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero) }, - new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) } + new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterCombinatorTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterCombinatorTests.cs index 74e19db0aa9..495460f25ec 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterCombinatorTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterCombinatorTests.cs @@ -13,7 +13,7 @@ public class MongoDbFilterCombinatorTests private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; public MongoDbFilterCombinatorTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorBooleanTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorBooleanTests.cs index a2561fef5ab..e4174fe5591 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorBooleanTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorBooleanTests.cs @@ -13,14 +13,14 @@ public class MongoDbFilterVisitorBooleanTests private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = true }, new() { Bar = null }, - new() { Bar = false } + new() { Bar = false }, }; public MongoDbFilterVisitorBooleanTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorComparableTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorComparableTests.cs index 57b0109b894..4f0fb3e3662 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorComparableTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorComparableTests.cs @@ -16,18 +16,18 @@ public class MongoDbFilterVisitorComparableTests new() { BarShort = 12, - BarDateTime = new DateTime(2000, 1, 12, 0, 0, 0, DateTimeKind.Utc) + BarDateTime = new DateTime(2000, 1, 12, 0, 0, 0, DateTimeKind.Utc), }, new() { BarShort = 14, - BarDateTime = new DateTime(2000, 1, 14, 0, 0, 0, DateTimeKind.Utc) + BarDateTime = new DateTime(2000, 1, 14, 0, 0, 0, DateTimeKind.Utc), }, new() { BarShort = 13, - BarDateTime = new DateTime(2000, 1, 13, 0, 0, 0, DateTimeKind.Utc) - } + BarDateTime = new DateTime(2000, 1, 13, 0, 0, 0, DateTimeKind.Utc), + }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -35,19 +35,19 @@ public class MongoDbFilterVisitorComparableTests new() { BarShort = 12, - BarDateTime = new DateTime(2000, 1, 12, 0, 0, 0, DateTimeKind.Utc) + BarDateTime = new DateTime(2000, 1, 12, 0, 0, 0, DateTimeKind.Utc), }, new() { BarShort = null, BarDateTime = null }, new() { BarShort = 14, - BarDateTime = new DateTime(2000, 1, 14, 0, 0, 0, DateTimeKind.Utc) + BarDateTime = new DateTime(2000, 1, 14, 0, 0, 0, DateTimeKind.Utc), }, new() { BarShort = 13, - BarDateTime = new DateTime(2000, 1, 13, 0, 0, 0, DateTimeKind.Utc) - } + BarDateTime = new DateTime(2000, 1, 13, 0, 0, 0, DateTimeKind.Utc), + }, }; public MongoDbFilterVisitorComparableTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorDateOnlyTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorDateOnlyTests.cs index ce681999791..da2d5743565 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorDateOnlyTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorDateOnlyTests.cs @@ -16,14 +16,14 @@ public class MongoDbFilterVisitorDateOnlyTests private static readonly Foo[] _fooEntities = { new() { Bar = new DateOnly(2022, 01, 16) }, - new() { Bar = new DateOnly(2022, 01, 15) } + new() { Bar = new DateOnly(2022, 01, 15) }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = new DateOnly(2022, 01, 16) }, new() { Bar = null }, - new() { Bar = new DateOnly(2022, 01, 15) } + new() { Bar = new DateOnly(2022, 01, 15) }, }; public MongoDbFilterVisitorDateOnlyTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorEnumTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorEnumTests.cs index 9452298a5ae..2638e4e52c6 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorEnumTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorEnumTests.cs @@ -15,7 +15,7 @@ public class MongoDbFilterVisitorEnumTests new() { BarEnum = FooEnum.BAR }, new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -24,7 +24,7 @@ public class MongoDbFilterVisitorEnumTests new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, new() { BarEnum = null }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; public MongoDbFilterVisitorEnumTests(MongoResource resource) @@ -301,7 +301,7 @@ public enum FooEnum FOO, BAR, BAZ, - QUX + QUX, } public class FooFilterType : FilterInputType diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorListTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorListTests.cs index eb7352f9313..94f4b13940b 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorListTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorListTests.cs @@ -18,8 +18,8 @@ public class MongoDbFilterVisitorListTests { new FooNested { Bar = "a" }, new FooNested { Bar = "a" }, - new FooNested { Bar = "a" } - } + new FooNested { Bar = "a" }, + }, }, new() { @@ -27,8 +27,8 @@ public class MongoDbFilterVisitorListTests { new FooNested { Bar = "c" }, new FooNested { Bar = "a" }, - new FooNested { Bar = "a" } - } + new FooNested { Bar = "a" }, + }, }, new() { @@ -36,8 +36,8 @@ public class MongoDbFilterVisitorListTests { new FooNested { Bar = "a" }, new FooNested { Bar = "d" }, - new FooNested { Bar = "b" } - } + new FooNested { Bar = "b" }, + }, }, new() { @@ -45,8 +45,8 @@ public class MongoDbFilterVisitorListTests { new FooNested { Bar = "c" }, new FooNested { Bar = "d" }, - new FooNested { Bar = "b" } - } + new FooNested { Bar = "b" }, + }, }, new() { @@ -54,11 +54,11 @@ public class MongoDbFilterVisitorListTests { new FooNested { Bar = null }, new FooNested { Bar = "d" }, - new FooNested { Bar = "b" } - } + new FooNested { Bar = "b" }, + }, }, new() { FooNested = null }, - new() { FooNested = Array.Empty() } + new() { FooNested = Array.Empty() }, }; private static readonly FooSimple[] _fooSimple = @@ -69,8 +69,8 @@ public class MongoDbFilterVisitorListTests { "a", "a", - "a" - } + "a", + }, }, new() { @@ -78,8 +78,8 @@ public class MongoDbFilterVisitorListTests { "c", "a", - "a" - } + "a", + }, }, new() { @@ -87,8 +87,8 @@ public class MongoDbFilterVisitorListTests { "a", "d", - "b" - } + "b", + }, }, new() { @@ -96,8 +96,8 @@ public class MongoDbFilterVisitorListTests { "c", "d", - "b" - } + "b", + }, }, new() { @@ -105,11 +105,11 @@ public class MongoDbFilterVisitorListTests { null, "d", - "b" - } + "b", + }, }, new() { Bar = null }, - new() { Bar = Array.Empty() } + new() { Bar = Array.Empty() }, }; public MongoDbFilterVisitorListTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectIdTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectIdTests.cs index b50781eef73..0b5ef2e9162 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectIdTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectIdTests.cs @@ -15,7 +15,7 @@ public class MongoDbFilterVisitorObjectIdTests { new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f69") }, new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f6a") }, - new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f6b") } + new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f6b") }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -23,7 +23,7 @@ public class MongoDbFilterVisitorObjectIdTests new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f69") }, new() { }, new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f6a") }, - new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f6b") } + new() { ObjectId = new ObjectId("6124e80f3f5fc839830c1f6b") }, }; public MongoDbFilterVisitorObjectIdTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectTests.cs index f72f3c37135..ebdf807b32e 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorObjectTests.cs @@ -22,9 +22,9 @@ public class MongoDbFilterVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new Foo { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -36,9 +36,9 @@ public class MongoDbFilterVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 14, BarString = "d" } } - } - } + new() { Foo = new Foo { BarShort = 14, BarString = "d" } }, + }, + }, }, new() { @@ -50,8 +50,8 @@ public class MongoDbFilterVisitorObjectTests BarString = "testctest", //ScalarArray = null, ObjectArray = null, - } - } + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -66,9 +66,9 @@ public class MongoDbFilterVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 12 } } - } - } + new() { Foo = new FooNullable { BarShort = 12 } }, + }, + }, }, new() { @@ -80,9 +80,9 @@ public class MongoDbFilterVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = null } } - } - } + new() { Foo = new FooNullable { BarShort = null } }, + }, + }, }, new() { @@ -94,9 +94,9 @@ public class MongoDbFilterVisitorObjectTests BarString = "testctest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 14, } } - } - } + new() { Foo = new FooNullable { BarShort = 14 } }, + }, + }, }, new() { @@ -106,9 +106,9 @@ public class MongoDbFilterVisitorObjectTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null - } - } + ObjectArray = null, + }, + }, }; public MongoDbFilterVisitorObjectTests(MongoResource resource) @@ -694,6 +694,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorStringTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorStringTests.cs index 572879743d8..62b8755de1a 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorStringTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorStringTests.cs @@ -13,14 +13,14 @@ public class MongoDbFilterVisitorStringTests private static readonly Foo[] _fooEntities = { new() { Bar = "testatest" }, - new() { Bar = "testbtest" } + new() { Bar = "testbtest" }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = "testatest" }, new() { Bar = "testbtest" }, - new() { Bar = null } + new() { Bar = null }, }; public MongoDbFilterVisitorStringTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorTimeOnlyTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorTimeOnlyTests.cs index 1c800615eec..d2cf5ddfad3 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorTimeOnlyTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFilterVisitorTimeOnlyTests.cs @@ -16,14 +16,14 @@ public class MongoDbFilterVisitorTimeOnlyTests private static readonly Foo[] _fooEntities = { new() { Bar = new TimeOnly(06, 30) }, - new() { Bar = new TimeOnly(16, 00) } + new() { Bar = new TimeOnly(16, 00) }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = new TimeOnly(06, 30) }, new() { Bar = null }, - new() { Bar = new TimeOnly(16, 00) } + new() { Bar = new TimeOnly(16, 00) }, }; public MongoDbFilterVisitorTimeOnlyTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFindFluentTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFindFluentTests.cs index b6f69cd3378..cf20b9c7ac6 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFindFluentTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Filters.Tests/MongoDbFindFluentTests.cs @@ -17,20 +17,20 @@ public class MongoDbFindFluentTests : IClassFixture private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly Bar[] _barEntities = { new() { Baz = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero) }, - new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) } + new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) }, }; private static readonly Baz[] _bazEntities = { new() { Bar = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero) }, new() { Bar = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) }, - new() { Bar = new DateTimeOffset(1996, 1, 11, 0, 0, 0, TimeSpan.Zero) } + new() { Bar = new DateTimeOffset(1996, 1, 11, 0, 0, 0, TimeSpan.Zero) }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbCursorPagingAggregateFluentTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbCursorPagingAggregateFluentTests.cs index adcf114893b..b239fe72ff1 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbCursorPagingAggregateFluentTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbCursorPagingAggregateFluentTests.cs @@ -19,7 +19,7 @@ public class MongoDbCursorPagingAggregateFluentTests : IClassFixture new Foo { Bar = "b" }, new Foo { Bar = "d" }, new Foo { Bar = "e" }, - new Foo { Bar = "f" } + new Foo { Bar = "f" }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingAggregateTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingAggregateTests.cs index 714cc1e8e10..c0979da31c0 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingAggregateTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingAggregateTests.cs @@ -19,7 +19,7 @@ public class MongoDbOffsetPagingAggregateTests : IClassFixture new Foo { Bar = "b" }, new Foo { Bar = "d" }, new Foo { Bar = "e" }, - new Foo { Bar = "f" } + new Foo { Bar = "f" }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingFindFluentTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingFindFluentTests.cs index 373d9b93308..0befa1709f7 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingFindFluentTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbOffsetPagingFindFluentTests.cs @@ -18,7 +18,7 @@ public class MongoDbOffsetPagingFindFluentTests : IClassFixture new Foo { Bar = "b" }, new Foo { Bar = "d" }, new Foo { Bar = "e" }, - new Foo { Bar = "f" } + new Foo { Bar = "f" }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionObjectsTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionObjectsTests.cs index 8cb916cd24c..3cfc28595ec 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionObjectsTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionObjectsTests.cs @@ -18,15 +18,15 @@ public class MongoDbProjectionObjectTests : IClassFixture BarShort = 15, NestedObject = new BarNullableDeep { - Foo = new FooDeep { BarString = "Foo" } - } - } + Foo = new FooDeep { BarString = "Foo" }, + }, + }, }, new() { - Number = 2, Foo = new FooNullable { BarEnum = BarEnum.FOO, BarShort = 14 } + Number = 2, Foo = new FooNullable { BarEnum = BarEnum.FOO, BarShort = 14 }, }, - new() { Number = 2 } + new() { Number = 2 }, }; private readonly SchemaCache _cache; @@ -211,6 +211,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorIsProjectedTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorIsProjectedTests.cs index 20af9e721f0..b66884fc6fd 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorIsProjectedTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorIsProjectedTests.cs @@ -11,13 +11,13 @@ public class MongoDbProjectionVisitorIsProjectedTests private static readonly Foo[] _fooEntities = { new() { IsProjectedTrue = true, IsProjectedFalse = false }, - new() { IsProjectedTrue = true, IsProjectedFalse = false } + new() { IsProjectedTrue = true, IsProjectedFalse = false }, }; private static readonly Bar[] _barEntities = { new() { IsProjectedFalse = false }, - new() { IsProjectedFalse = false } + new() { IsProjectedFalse = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorPagingTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorPagingTests.cs index e6ffae1193a..57bb74ac91f 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorPagingTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorPagingTests.cs @@ -11,14 +11,14 @@ public class MongoDbProjectionVisitorPagingTests : IClassFixture private static readonly Foo[] _fooEntities = { new() { Bar = true, Baz = "a" }, - new() { Bar = false, Baz = "b" } + new() { Bar = false, Baz = "b" }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = true, Baz = "a" }, new() { Bar = null, Baz = null }, - new() { Bar = false, Baz = "c" } + new() { Bar = false, Baz = "c" }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorScalarTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorScalarTests.cs index 2c88acfe2a1..b82f0a3631c 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorScalarTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Projections.Tests/MongoDbProjectionVisitorScalarTests.cs @@ -11,7 +11,7 @@ public class MongoDbProjectionVisitorScalarTests : IClassFixture private static readonly Foo[] _fooEntities = { new() { Bar = true, Baz = "a" }, - new() { Bar = false, Baz = "b" } + new() { Bar = false, Baz = "b" }, }; private readonly SchemaCache _cache; @@ -71,7 +71,7 @@ public async Task Create_ProjectsOneProperty_WithResolver() .Resolve( new[] { - "foo" + "foo", }) .Type>())); diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbAggregateFluentTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbAggregateFluentTests.cs index bad746d8045..b587b3c9944 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbAggregateFluentTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbAggregateFluentTests.cs @@ -16,14 +16,14 @@ public class MongoDbAggregateFluentTests : IClassFixture { private static readonly Foo[] _fooEntities = { - new Foo { Bar = true }, new Foo { Bar = false } - }; + new Foo { Bar = true }, new Foo { Bar = false }, + }; private static readonly Bar[] _barEntities = { new Bar { Baz = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero) }, - new Bar { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) } - }; + new Bar { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) }, + }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbCollectionTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbCollectionTests.cs index 4484176212e..1a6e2abae53 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbCollectionTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbCollectionTests.cs @@ -16,13 +16,13 @@ public class MongoDbSortCollectionTests : IClassFixture private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly Bar[] _barEntities = { new() { Baz = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero) }, - new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) } + new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbFindFluentTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbFindFluentTests.cs index 0b317b3257f..eea83c72441 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbFindFluentTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbFindFluentTests.cs @@ -17,20 +17,20 @@ public class MongoDbFindFluentTests : IClassFixture private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly Bar[] _barEntities = { new() { Baz = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero) }, - new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) } + new() { Baz = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero) }, }; private static readonly Baz[] _bazEntities = { new() { Bar = new DateTimeOffset(2020, 1, 12, 0, 0, 0, TimeSpan.Zero), Qux = 1 }, new() { Bar = new DateTimeOffset(2020, 1, 11, 0, 0, 0, TimeSpan.Zero), Qux = 0 }, - new() { Bar = new DateTimeOffset(1996, 1, 11, 0, 0, 0, TimeSpan.Zero), Qux = -1 } + new() { Bar = new DateTimeOffset(1996, 1, 11, 0, 0, 0, TimeSpan.Zero), Qux = -1 }, }; private readonly MongoResource _resource; diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorBooleanTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorBooleanTests.cs index 5b704f251a4..352663bc9db 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorBooleanTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorBooleanTests.cs @@ -13,14 +13,14 @@ public class MongoDbSortVisitorBooleanTests private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = true }, new() { Bar = null }, - new() { Bar = false } + new() { Bar = false }, }; public MongoDbSortVisitorBooleanTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorComparableTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorComparableTests.cs index a69c2b1ffb6..c924aecfa9a 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorComparableTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorComparableTests.cs @@ -14,7 +14,7 @@ public class MongoDbSortVisitorComparableTests { new() { BarShort = 12 }, new() { BarShort = 14 }, - new() { BarShort = 13 } + new() { BarShort = 13 }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -22,7 +22,7 @@ public class MongoDbSortVisitorComparableTests new() { BarShort = 12 }, new() { BarShort = null }, new() { BarShort = 14 }, - new() { BarShort = 13 } + new() { BarShort = 13 }, }; public MongoDbSortVisitorComparableTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorEnumTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorEnumTests.cs index 57091b64296..832fb1aec83 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorEnumTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorEnumTests.cs @@ -15,7 +15,7 @@ public class MongoDbSortVisitorEnumTests new() { BarEnum = FooEnum.BAR }, new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -24,7 +24,7 @@ public class MongoDbSortVisitorEnumTests new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, new() { BarEnum = null }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; public MongoDbSortVisitorEnumTests(MongoResource resource) @@ -104,7 +104,7 @@ public enum FooEnum FOO, BAR, BAZ, - QUX + QUX, } public class FooSortType : SortInputType diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorObjectTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorObjectTests.cs index 0a0b2ed2916..35630de281e 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorObjectTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorObjectTests.cs @@ -22,9 +22,9 @@ public class MongoDbSortVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new Foo { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -36,9 +36,9 @@ public class MongoDbSortVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 14, BarString = "d" } } - } - } + new() { Foo = new Foo { BarShort = 14, BarString = "d" } }, + }, + }, }, new() { @@ -49,8 +49,8 @@ public class MongoDbSortVisitorObjectTests BarEnum = BarEnum.FOO, BarString = "testctest", ObjectArray = null!, - } - } + }, + }, }; private static readonly BarNullable?[] _barNullableEntities = @@ -65,9 +65,9 @@ public class MongoDbSortVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 12 } } - } - } + new() { Foo = new FooNullable { BarShort = 12 } }, + }, + }, }, new() { @@ -79,9 +79,9 @@ public class MongoDbSortVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = null } } - } - } + new() { Foo = new FooNullable { BarShort = null } }, + }, + }, }, new() { @@ -93,9 +93,9 @@ public class MongoDbSortVisitorObjectTests BarString = "testctest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 14 } } - } - } + new() { Foo = new FooNullable { BarShort = 14 } }, + }, + }, }, new() { @@ -105,10 +105,10 @@ public class MongoDbSortVisitorObjectTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null - } + ObjectArray = null, + }, }, - new() { Foo = null } + new() { Foo = null }, }; public MongoDbSortVisitorObjectTests(MongoResource resource) @@ -419,6 +419,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorStringTests.cs b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorStringTests.cs index 69f1cce3dfd..8008b24ace2 100644 --- a/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorStringTests.cs +++ b/src/HotChocolate/MongoDb/test/Data.MongoDb.Sorting.Tests/MongoDbSortVisitorStringTests.cs @@ -13,14 +13,14 @@ public class MongoDbSortVisitorStringTests private static readonly Foo[] _fooEntities = { new() { Bar = "testatest" }, - new() { Bar = "testbtest" } + new() { Bar = "testbtest" }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = "testatest" }, new() { Bar = "testbtest" }, - new() { Bar = null } + new() { Bar = null }, }; public MongoDbSortVisitorStringTests(MongoResource resource) diff --git a/src/HotChocolate/MongoDb/test/Types.MongoDb/BsonTypeTests.cs b/src/HotChocolate/MongoDb/test/Types.MongoDb/BsonTypeTests.cs index d24f3263112..a3583872149 100644 --- a/src/HotChocolate/MongoDb/test/Types.MongoDb/BsonTypeTests.cs +++ b/src/HotChocolate/MongoDb/test/Types.MongoDb/BsonTypeTests.cs @@ -113,8 +113,8 @@ await executor.ExecuteAsync( { ["val"] = new Dictionary { - ["foo"] = true - } + ["foo"] = true, + }, }); // assert @@ -146,7 +146,7 @@ await executor.ExecuteAsync( "query Test($val: Bson){ in(val:$val) }", new Dictionary { - ["val"] = new List { "foo", "bar" } + ["val"] = new List { "foo", "bar" }, }); // assert @@ -255,7 +255,7 @@ await executor.ExecuteAsync( "query Test($val: Bson){ in(val:$val) }", new Dictionary { - ["val"] = value + ["val"] = value, }); // assert @@ -1112,7 +1112,7 @@ public void Deserialize_Dictionary() var toDeserialize = new Dictionary { - { "Foo", new StringValueNode("Bar") } + { "Foo", new StringValueNode("Bar") }, }; // act @@ -1139,7 +1139,7 @@ public void Deserialize_NestedDictionary() var toDeserialize = new Dictionary { - { "Foo", new Dictionary { { "Bar", new StringValueNode("Baz") } } } + { "Foo", new Dictionary { { "Bar", new StringValueNode("Baz") } } }, }; // act @@ -1213,7 +1213,7 @@ public class OutputQuery 3, 4, 5, - 6 + 6, }); public BsonDecimal128 Decimal => new(42.123456789123456789123456789123456789123456789m); @@ -1225,7 +1225,7 @@ public class OutputQuery public BsonArray BsonArray => new(new[] { BsonBoolean.False, - BsonBoolean.True + BsonBoolean.True, }); public BsonString String => new("String"); @@ -1248,7 +1248,7 @@ public class OutputQuery 3, 4, 5, - 6 + 6, }), ["Double"] = new BsonDouble(42.23), ["Double"] = new BsonDouble(42.23), @@ -1256,7 +1256,7 @@ public class OutputQuery ["BsonArray"] = new BsonArray(new[] { BsonBoolean.False, - BsonBoolean.True + BsonBoolean.True, }), ["String"] = new BsonString("String"), ["Null"] = BsonNull.Value, @@ -1264,7 +1264,7 @@ public class OutputQuery { ["Int32"] = new BsonInt32(42), ["Int64"] = new BsonInt64(42), - } + }, }; } } diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Helpers/ObjectTypeFactory.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Helpers/ObjectTypeFactory.cs index 54d2943ecc4..fdd786cd6a3 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Helpers/ObjectTypeFactory.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Helpers/ObjectTypeFactory.cs @@ -31,7 +31,7 @@ public static INamedType ParseType(OpenApiWrapperContext context, string typeNam var type = new ObjectType(typeName) { - Description = schema.Description + Description = schema.Description, }; var typeInfo = context.GetSchemaTypeInfo(schema); @@ -70,8 +70,8 @@ private static OutputField CreateField(OpenApiWrapperContext context, OpenApiSch Description = property.Value.Description, ContextData = { - [OpenApiResources.OpenApiPropertyName] = property.Key - } + [OpenApiResources.OpenApiPropertyName] = property.Key, + }, }; ParseType(context, fieldType.NamedType().Name, typeInfo.RootSchema); diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs index 9bac554ab20..e34e3d3f33f 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs @@ -31,7 +31,7 @@ private static void CreateMutationType(OpenApiWrapperContext context) { var outputField = new OutputField(GetFieldName(operation.Value.OperationId)) { - Type = context.OperationPayloadTypeLookup[operation.Value.OperationId] + Type = context.OperationPayloadTypeLookup[operation.Value.OperationId], }; if (operation.Value.Parameters.Count > 0 || operation.Value.RequestBody is not null) diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreatePayloadTypesMiddleware.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreatePayloadTypesMiddleware.cs index 02b2dc346d6..06ba0da0789 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreatePayloadTypesMiddleware.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreatePayloadTypesMiddleware.cs @@ -33,7 +33,7 @@ private static void CreatePayloadType(OpenApiWrapperContext context, Operation o var payloadType = new ObjectType(typeName); var field = new OutputField(OpenApiResources.PayloadSuccessField) { - Type = new ObjectType(nameof(Boolean)) + Type = new ObjectType(nameof(Boolean)), }; payloadType.Fields.Add(field); context.MutableSchema.Types.Add(payloadType); diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateQueryTypeMiddleware.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateQueryTypeMiddleware.cs index 1842bb7a230..c97944aefc0 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateQueryTypeMiddleware.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateQueryTypeMiddleware.cs @@ -40,7 +40,7 @@ private static void CreateQueryType(OpenApiWrapperContext context) var outputField = new OutputField(OpenApiNamingHelper.GetFieldName(operation.Value.OperationId)) { - Type = type + Type = type, }; ObjectTypeFactory.ParseType(context, type.NamedType().Name, typeInfo.RootSchema); diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs index 49eb04cad2d..2b9d6fbee09 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs @@ -33,7 +33,7 @@ public void Invoke(OpenApiWrapperContext context, OpenApiWrapperDelegate next) ? operationKeyValue.Value.Summary : operationKeyValue.Value.Description, Response = response.Value, - RequestBody = operationKeyValue.Value.RequestBody + RequestBody = operationKeyValue.Value.RequestBody, }; foreach (var openApiParameter in operationKeyValue.Value.Parameters) diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/SchemaTypeInfo.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/SchemaTypeInfo.cs index e4d5b90363e..9de28724834 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/SchemaTypeInfo.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/SchemaTypeInfo.cs @@ -89,7 +89,7 @@ private static string GetGraphQLTypeName(string openApiSchemaTypeName, string? f "number" => ScalarNames.Float, "integer" => format == "int64" ? ScalarNames.Long : ScalarNames.Int, "boolean" => ScalarNames.Boolean, - _ => OpenApiNamingHelper.GetTypeName(openApiSchemaTypeName) + _ => OpenApiNamingHelper.GetTypeName(openApiSchemaTypeName), }; return typename ?? throw new InvalidOperationException(); } diff --git a/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/UberController.cs b/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/UberController.cs index e3f67946fad..b37c5bc4ab7 100644 --- a/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/UberController.cs +++ b/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/UberController.cs @@ -51,7 +51,7 @@ public class UberController private static readonly List _products = new() { new Product("ProductA", "Desc", "Product A", "Cap", "http://img.png"), - new Product("ProductB", "Desc", "Product B", "Cap", "http://img.png") + new Product("ProductB", "Desc", "Product B", "Cap", "http://img.png"), }; [HttpGet] diff --git a/src/HotChocolate/Raven/src/Data/Filtering/Handlers/RavenFilterExpressionBuilder.cs b/src/HotChocolate/Raven/src/Data/Filtering/Handlers/RavenFilterExpressionBuilder.cs index 057ddb6647f..7b9b15b7836 100644 --- a/src/HotChocolate/Raven/src/Data/Filtering/Handlers/RavenFilterExpressionBuilder.cs +++ b/src/HotChocolate/Raven/src/Data/Filtering/Handlers/RavenFilterExpressionBuilder.cs @@ -28,7 +28,7 @@ public static Expression In( { return Expression.Call( _inMethod.MakeGenericMethod(genericType), - new[] { property, Expression.Constant(parsedValue), }); + new[] { property, Expression.Constant(parsedValue) }); } public static Expression IsMatch( @@ -39,6 +39,6 @@ public static Expression IsMatch( return Expression.Call( _isMatch, - new[] { property, Expression.Constant(parsedValue), }); + new[] { property, Expression.Constant(parsedValue) }); } } diff --git a/src/HotChocolate/Raven/src/Data/Filtering/RavenQueryableFilterProvider.cs b/src/HotChocolate/Raven/src/Data/Filtering/RavenQueryableFilterProvider.cs index 3cbce68b17d..1e5a33d9e43 100644 --- a/src/HotChocolate/Raven/src/Data/Filtering/RavenQueryableFilterProvider.cs +++ b/src/HotChocolate/Raven/src/Data/Filtering/RavenQueryableFilterProvider.cs @@ -46,6 +46,6 @@ protected override void Configure(IFilterProviderDescriptor q => new RavenAsyncDocumentQueryExecutable( q.Query.ToQueryable().Where(where).ToAsyncDocumentQuery()), - _ => input + _ => input, }; } diff --git a/src/HotChocolate/Raven/src/Data/Pagination/RavenCursorPagingHandler.cs b/src/HotChocolate/Raven/src/Data/Pagination/RavenCursorPagingHandler.cs index aa8dc7c5fc0..e92a09a9814 100644 --- a/src/HotChocolate/Raven/src/Data/Pagination/RavenCursorPagingHandler.cs +++ b/src/HotChocolate/Raven/src/Data/Pagination/RavenCursorPagingHandler.cs @@ -30,6 +30,6 @@ private static RavenPagingContainer CreatePagingContainer(object source RavenAsyncDocumentQueryExecutable e => e.Query, IRavenQueryable e => e.ToAsyncDocumentQuery(), IAsyncDocumentQuery f => f, - _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()) + _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()), }); } diff --git a/src/HotChocolate/Raven/src/Data/Pagination/RavenOffsetPagingHandler.cs b/src/HotChocolate/Raven/src/Data/Pagination/RavenOffsetPagingHandler.cs index b7a7661f8db..81a1ff02711 100644 --- a/src/HotChocolate/Raven/src/Data/Pagination/RavenOffsetPagingHandler.cs +++ b/src/HotChocolate/Raven/src/Data/Pagination/RavenOffsetPagingHandler.cs @@ -31,7 +31,7 @@ private static RavenPagingContainer CreatePagingContainer(object source RavenAsyncDocumentQueryExecutable e => e.Query, IRavenQueryable e => e.ToAsyncDocumentQuery(), IAsyncDocumentQuery f => f, - _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()) + _ => throw ThrowHelper.PagingTypeNotSupported(source.GetType()), }); } } diff --git a/src/HotChocolate/Raven/src/Data/Projections/RavenQueryableProjectionProvider.cs b/src/HotChocolate/Raven/src/Data/Projections/RavenQueryableProjectionProvider.cs index a9c63d03d9c..d2ff7612816 100644 --- a/src/HotChocolate/Raven/src/Data/Projections/RavenQueryableProjectionProvider.cs +++ b/src/HotChocolate/Raven/src/Data/Projections/RavenQueryableProjectionProvider.cs @@ -35,7 +35,7 @@ protected override void Configure(IProjectionProviderDescriptor descriptor) RavenAsyncDocumentQueryExecutable q => new RavenAsyncDocumentQueryExecutable( q.Query.NoTracking().ToQueryable().Select(projection).ToAsyncDocumentQuery()), - _ => input + _ => input, }; /// diff --git a/src/HotChocolate/Raven/src/Data/Sorting/RavenQueryableSortProvider.cs b/src/HotChocolate/Raven/src/Data/Sorting/RavenQueryableSortProvider.cs index 46e97f73a67..a3a8912b024 100644 --- a/src/HotChocolate/Raven/src/Data/Sorting/RavenQueryableSortProvider.cs +++ b/src/HotChocolate/Raven/src/Data/Sorting/RavenQueryableSortProvider.cs @@ -30,6 +30,6 @@ public RavenQueryableSortProvider( RavenAsyncDocumentQueryExecutable q => new RavenAsyncDocumentQueryExecutable( sort(q.Query.ToQueryable()).ToAsyncDocumentQuery()), - _ => input + _ => input, }; } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/ConventionTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/ConventionTests.cs index 3de9673a752..ea6db66a39b 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/ConventionTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/ConventionTests.cs @@ -30,8 +30,8 @@ public class TypeWithList { new() { - List = new List() { new() { Foo = "Foo" }, new() { Foo = "Bar" } } - } + List = new List() { new() { Foo = "Foo" }, new() { Foo = "Bar" } }, + }, }; public string? Id { get; set; } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/FilteringAndPaging.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/FilteringAndPaging.cs index c34fe723957..664c6ce4494 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/FilteringAndPaging.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/FilteringAndPaging.cs @@ -9,7 +9,7 @@ public class FilteringAndPaging private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorBooleanTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorBooleanTests.cs index 46b59ab56e8..305395d35a9 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorBooleanTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorBooleanTests.cs @@ -9,14 +9,14 @@ public class QueryableFilterVisitorBooleanTests private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = true }, new() { Bar = null }, - new() { Bar = false } + new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorComparableTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorComparableTests.cs index 0e7d6ccae5e..60c299e1333 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorComparableTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorComparableTests.cs @@ -10,7 +10,7 @@ public class QueryableFilterVisitorComparableTests { new() { BarShort = 12 }, new() { BarShort = 14 }, - new() { BarShort = 13 } + new() { BarShort = 13 }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -18,7 +18,7 @@ public class QueryableFilterVisitorComparableTests new() { BarShort = 12 }, new() { BarShort = null }, new() { BarShort = 14 }, - new() { BarShort = 13 } + new() { BarShort = 13 }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorEnumTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorEnumTests.cs index baf0141e42e..466e35c778d 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorEnumTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorEnumTests.cs @@ -12,7 +12,7 @@ public class QueryableFilterVisitorEnumTests new() { BarEnum = FooEnum.BAR }, new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -21,7 +21,7 @@ public class QueryableFilterVisitorEnumTests new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, new() { BarEnum = null }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private readonly SchemaCache _cache; @@ -299,7 +299,7 @@ public enum FooEnum FOO, BAR, BAZ, - QUX + QUX, } public class FooFilterInput : FilterInputType diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorExecutableTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorExecutableTests.cs index fb142652cdc..37d063e1442 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorExecutableTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorExecutableTests.cs @@ -9,14 +9,14 @@ public class QueryableFilterVisitorExecutableTests private static readonly Foo[] _fooEntities = { new() { Bar = true }, - new() { Bar = false } + new() { Bar = false }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = true }, new() { Bar = null }, - new() { Bar = false } + new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs index 676956ef8bd..1bcda630d45 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorInterfacesTests.cs @@ -13,7 +13,7 @@ public class QueryableFilterVisitorInterfacesTests private static readonly BarInterface[] _barEntities = { new() { Test = new InterfaceImpl1 { Prop = "a" } }, - new() { Test = new InterfaceImpl1 { Prop = "b" } } + new() { Test = new InterfaceImpl1 { Prop = "b" } }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorListTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorListTests.cs index 0007c5d71e9..4ff921e5008 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorListTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorListTests.cs @@ -16,37 +16,37 @@ public class QueryableFilterVisitorListTests { FooNested = new List() { - new() { Bar = "a" }, new() { Bar = "a" }, new() { Bar = "a" } - } + new() { Bar = "a" }, new() { Bar = "a" }, new() { Bar = "a" }, + }, }, new() { FooNested = new List() { - new() { Bar = "c" }, new() { Bar = "a" }, new() { Bar = "a" } - } + new() { Bar = "c" }, new() { Bar = "a" }, new() { Bar = "a" }, + }, }, new() { FooNested = new List() { - new() { Bar = "a" }, new() { Bar = "d" }, new() { Bar = "b" } - } + new() { Bar = "a" }, new() { Bar = "d" }, new() { Bar = "b" }, + }, }, new() { FooNested = new List() { - new() { Bar = "c" }, new() { Bar = "d" }, new() { Bar = "b" } - } + new() { Bar = "c" }, new() { Bar = "d" }, new() { Bar = "b" }, + }, }, new() { FooNested = new List() { - new() { Bar = null! }, new() { Bar = "d" }, new() { Bar = "b" } - } - } + new() { Bar = null! }, new() { Bar = "d" }, new() { Bar = "b" }, + }, + }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorObjectTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorObjectTests.cs index d897f4fe366..e3fbf7052b5 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorObjectTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorObjectTests.cs @@ -21,9 +21,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new Foo { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -35,9 +35,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 14, BarString = "d" } } - } - } + new() { Foo = new Foo { BarShort = 14, BarString = "d" } }, + }, + }, }, new() { @@ -48,8 +48,8 @@ public class QueryableFilterVisitorObjectTests BarEnum = BarEnum.FOO, BarString = "testctest", ObjectArray = null, - } - } + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -64,9 +64,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 12 } } - } - } + new() { Foo = new FooNullable { BarShort = 12 } }, + }, + }, }, new() { @@ -78,9 +78,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = null } } - } - } + new() { Foo = new FooNullable { BarShort = null } }, + }, + }, }, new() { @@ -92,9 +92,9 @@ public class QueryableFilterVisitorObjectTests BarString = "testctest", ObjectArray = new List { - new() { Foo = new FooNullable { BarShort = 14 } } - } - } + new() { Foo = new FooNullable { BarShort = 14 } }, + }, + }, }, new() { @@ -104,9 +104,9 @@ public class QueryableFilterVisitorObjectTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null - } - } + ObjectArray = null, + }, + }, }; private readonly SchemaCache _cache; @@ -705,6 +705,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorStringTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorStringTests.cs index 8b0efeaf043..fde6bb967be 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorStringTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorStringTests.cs @@ -11,14 +11,14 @@ public class QueryableFilterVisitorStringTests private static readonly Foo[] _fooEntities = { new() { Bar = "testatest" }, - new() { Bar = "testbtest" } + new() { Bar = "testbtest" }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = "testatest" }, new() { Bar = "testbtest" }, - new() { Bar = null } + new() { Bar = null }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenAsyncDocumentQueryTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenAsyncDocumentQueryTests.cs index 237da87a813..4daa929b479 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenAsyncDocumentQueryTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenAsyncDocumentQueryTests.cs @@ -22,7 +22,7 @@ public class RavenAsyncDocumentQueryTests new Foo { Bar = "b" }, new Foo { Bar = "d" }, new Foo { Bar = "e" }, - new Foo { Bar = "f" } + new Foo { Bar = "f" }, }; private readonly SchemaCache _resource; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenDocumentQueryTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenDocumentQueryTests.cs index c6652a77d4a..f07e33c2057 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenDocumentQueryTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Paging.Tests/RavenDocumentQueryTests.cs @@ -22,7 +22,7 @@ public class RavenQueryableTests new Foo { Bar = "b" }, new Foo { Bar = "d" }, new Foo { Bar = "e" }, - new Foo { Bar = "f" } + new Foo { Bar = "f" }, }; private readonly SchemaCache _resource; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableFirstOrDefaultTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableFirstOrDefaultTests.cs index b5e4390e313..b4de68a7e99 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableFirstOrDefaultTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableFirstOrDefaultTests.cs @@ -21,13 +21,13 @@ public class QueryableFirstOrDefaultTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "a" } + Foo = new FooDeep { BarShort = 12, BarString = "a" }, }, ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -40,14 +40,14 @@ public class QueryableFirstOrDefaultTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "d" } + Foo = new FooDeep { BarShort = 12, BarString = "d" }, }, ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } } - } - } - } + new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } }, + }, + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -62,9 +62,9 @@ public class QueryableFirstOrDefaultTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 12 } } - } - } + new() { Foo = new FooDeep { BarShort = 12 } }, + }, + }, }, new() { @@ -76,9 +76,9 @@ public class QueryableFirstOrDefaultTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 9 } } - } - } + new() { Foo = new FooDeep { BarShort = 9 } }, + }, + }, }, new() { @@ -90,9 +90,9 @@ public class QueryableFirstOrDefaultTests BarString = "testctest", ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 14 } } - } - } + new() { Foo = new FooDeep { BarShort = 14 } }, + }, + }, }, new() { @@ -102,9 +102,9 @@ public class QueryableFirstOrDefaultTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null - } - } + ObjectArray = null, + }, + }, }; private readonly SchemaCache _cache; @@ -349,6 +349,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionFilterTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionFilterTests.cs index b28ebb9717e..23f9e39b67c 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionFilterTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionFilterTests.cs @@ -19,9 +19,9 @@ public class QueryableProjectionFilterTests NestedObject = new BarDeep { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -34,10 +34,10 @@ public class QueryableProjectionFilterTests NestedObject = new BarDeep { Foo = new FooDeep { BarShort = 12, BarString = "d" } }, ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } } - } - } - } + new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } }, + }, + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -52,9 +52,9 @@ public class QueryableProjectionFilterTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 12 } } - } - } + new() { Foo = new FooDeep { BarShort = 12 } }, + }, + }, }, new() { @@ -66,9 +66,9 @@ public class QueryableProjectionFilterTests BarString = "testbtest", ObjectArray = new List { - new BarNullableDeep { Foo = new FooDeep { BarShort = 9 } } - } - } + new BarNullableDeep { Foo = new FooDeep { BarShort = 9 } }, + }, + }, }, new() { @@ -80,9 +80,9 @@ public class QueryableProjectionFilterTests BarString = "testctest", ObjectArray = new List { - new BarNullableDeep { Foo = new FooDeep { BarShort = 14 } } - } - } + new BarNullableDeep { Foo = new FooDeep { BarShort = 14 } }, + }, + }, }, new() { @@ -92,9 +92,9 @@ public class QueryableProjectionFilterTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null - } - } + ObjectArray = null, + }, + }, }; private static readonly BarNullable[] _barWithoutRelation = @@ -109,20 +109,20 @@ public class QueryableProjectionFilterTests { Foo = new FooDeep { - BarString = "Foo" - } - } - } + BarString = "Foo", + }, + }, + }, }, new() { Foo = new FooNullable { BarEnum = BarEnum.FOO, - BarShort = 14 - } + BarShort = 14, + }, }, - new() + new(), }; private readonly SchemaCache _cache; @@ -447,6 +447,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionHashSetTest.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionHashSetTest.cs index 0c5ab6dae4b..5271193c92f 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionHashSetTest.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionHashSetTest.cs @@ -19,13 +19,13 @@ public class QueryableProjectionHashSetTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "a" } + Foo = new FooDeep { BarShort = 12, BarString = "a" }, }, ObjectSet = new HashSet { - new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -38,14 +38,14 @@ public class QueryableProjectionHashSetTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "d" } + Foo = new FooDeep { BarShort = 12, BarString = "d" }, }, ObjectSet = new HashSet { - new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } } - } - } - } + new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } }, + }, + }, + }, }; private readonly SchemaCache _cache; @@ -196,6 +196,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionInterfaceTypeTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionInterfaceTypeTests.cs index 8e90ee97969..26172eab2cd 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionInterfaceTypeTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionInterfaceTypeTests.cs @@ -15,7 +15,7 @@ public class QueryableProjectionInterfaceTypeTests private static readonly AbstractType[] _barEntities = { new Bar { Name = "Bar", BarProp = "BarProp" }, - new Foo { Name = "Foo", FooProp = "FooProp" } + new Foo { Name = "Foo", FooProp = "FooProp" }, }; private static readonly NestedObject[] _barNestedEntities = @@ -31,16 +31,16 @@ public class QueryableProjectionInterfaceTypeTests List = new() { new Foo { Name = "Foo", FooProp = "FooProp" }, - new Bar { Name = "Bar", BarProp = "BarProp" } - } + new Bar { Name = "Bar", BarProp = "BarProp" }, + }, }, new() { List = new() { new Bar { Name = "Bar", BarProp = "BarProp" }, - new Foo { Name = "Foo", FooProp = "FooProp" } - } + new Foo { Name = "Foo", FooProp = "FooProp" }, + }, }, }; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionNestedTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionNestedTests.cs index d170ab5da7c..99debc0c64c 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionNestedTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionNestedTests.cs @@ -8,8 +8,8 @@ public class QueryableProjectionNestedTests { private static readonly Bar[] _barEntities = { - new() { Foo = new Foo { BarString = "testatest", } }, - new() { Foo = new Foo { BarString = "testbtest", } } + new() { Foo = new Foo { BarString = "testatest" } }, + new() { Foo = new Foo { BarString = "testbtest" } }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSetTest.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSetTest.cs index 714680d5f40..99490a53aec 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSetTest.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSetTest.cs @@ -20,9 +20,9 @@ public class QueryableProjectionISetTests new BarDeep { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, ObjectSet = new HashSet { - new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -36,10 +36,10 @@ public class QueryableProjectionISetTests new BarDeep { Foo = new FooDeep { BarShort = 12, BarString = "d" } }, ObjectSet = new HashSet { - new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } } - } - } - } + new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } }, + }, + }, + }, }; private readonly SchemaCache _cache; @@ -190,6 +190,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortedSetTest.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortedSetTest.cs index 58c639d85ed..3e3ee3e3904 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortedSetTest.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortedSetTest.cs @@ -19,13 +19,13 @@ public class QueryableProjectionSortedSetTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "a" } + Foo = new FooDeep { BarShort = 12, BarString = "a" }, }, ObjectSet = new SortedSet { - new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -38,14 +38,14 @@ public class QueryableProjectionSortedSetTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "d" } + Foo = new FooDeep { BarShort = 12, BarString = "d" }, }, ObjectSet = new SortedSet { - new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } } - } - } - } + new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } }, + }, + }, + }, }; private readonly SchemaCache _cache; @@ -196,6 +196,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortingTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortingTests.cs index 664b5c09cd2..f742d004ad1 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortingTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionSortingTests.cs @@ -21,9 +21,9 @@ public class QueryableProjectionSortingTests { new() { Foo = new FooDeep { BarShort = 1, BarString = "a" } }, new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, - new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } }, + }, + }, }, new() { @@ -38,10 +38,10 @@ public class QueryableProjectionSortingTests { new() { Foo = new FooDeep { BarShort = 1, BarString = "a" } }, new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, - new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } } - } - } - } + new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } }, + }, + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -59,9 +59,9 @@ public class QueryableProjectionSortingTests { new() { Foo = new FooDeep { BarShort = 1, BarString = "a" } }, new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, - new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } }, + }, + }, }, new() { @@ -73,15 +73,15 @@ public class QueryableProjectionSortingTests BarString = "testbtest", NestedObject = new BarDeepNullable { - Foo = new FooDeep { BarShort = 12, BarString = "a" } + Foo = new FooDeep { BarShort = 12, BarString = "a" }, }, ObjectArray = new List { new() { Foo = new FooDeep { BarShort = 1, BarString = "a" } }, new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, - new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } }, + }, + }, }, new() { @@ -93,15 +93,15 @@ public class QueryableProjectionSortingTests BarString = "testctest", NestedObject = new BarDeepNullable { - Foo = new FooDeep { BarShort = 12, BarString = "a" } + Foo = new FooDeep { BarShort = 12, BarString = "a" }, }, ObjectArray = new List { new() { Foo = new FooDeep { BarShort = 1, BarString = "a" } }, new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, - new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 3, BarString = "a" } }, + }, + }, }, new() { @@ -111,9 +111,9 @@ public class QueryableProjectionSortingTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null! - } - } + ObjectArray = null!, + }, + }, }; private readonly SchemaCache _cache; @@ -356,6 +356,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionUnionTypeTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionUnionTypeTests.cs index c5f738009ec..948550df9ba 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionUnionTypeTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionUnionTypeTests.cs @@ -13,7 +13,7 @@ public class QueryableProjectionUnionTypeTests private static readonly AbstractType[] _barEntities = { new Bar { Name = "Bar", BarProp = "BarProp" }, - new Foo { Name = "Foo", FooProp = "FooProp" } + new Foo { Name = "Foo", FooProp = "FooProp" }, }; private static readonly NestedObject[] _barNestedEntities = @@ -29,16 +29,16 @@ public class QueryableProjectionUnionTypeTests List = new() { new Foo { Name = "Foo", FooProp = "FooProp" }, - new Bar { Name = "Bar", BarProp = "BarProp" } - } + new Bar { Name = "Bar", BarProp = "BarProp" }, + }, }, new() { List = new() { new Bar { Name = "Bar", BarProp = "BarProp" }, - new Foo { Name = "Foo", FooProp = "FooProp" } - } + new Foo { Name = "Foo", FooProp = "FooProp" }, + }, }, }; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorExecutableTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorExecutableTests.cs index 217451bb3af..f2842e2290f 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorExecutableTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorExecutableTests.cs @@ -11,7 +11,7 @@ public class QueryableProjectionVisitorExecutableTests private static readonly Foo[] _fooEntities = { new() { Bar = true, Baz = "a" }, - new() { Bar = false, Baz = "b" } + new() { Bar = false, Baz = "b" }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorIsProjectedTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorIsProjectedTests.cs index 817e4d51f45..6114e76cd1b 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorIsProjectedTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorIsProjectedTests.cs @@ -10,19 +10,19 @@ public class QueryableProjectionVisitorIsProjectedTests private static readonly Foo[] _fooEntities = { new() { IsProjectedTrue = true, IsProjectedFalse = false }, - new() { IsProjectedTrue = true, IsProjectedFalse = false } + new() { IsProjectedTrue = true, IsProjectedFalse = false }, }; private static readonly MultipleFoo[] _fooMultipleEntities = { new() { IsProjectedTrue1 = true, IsProjectedFalse = false }, - new() { IsProjectedTrue1 = true, IsProjectedFalse = false } + new() { IsProjectedTrue1 = true, IsProjectedFalse = false }, }; private static readonly Bar[] _barEntities = { new() { IsProjectedFalse = false }, - new() { IsProjectedFalse = false } + new() { IsProjectedFalse = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorPagingTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorPagingTests.cs index b390359ebfe..5b3fa13f46d 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorPagingTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorPagingTests.cs @@ -14,14 +14,14 @@ public class QueryableProjectionVisitorPagingTests private static readonly Foo[] _fooEntities = { new() { Bar = true, Baz = "a" }, - new() { Bar = false, Baz = "b" } + new() { Bar = false, Baz = "b" }, }; private static readonly FooNullable[] _fooNullableEntities = { new() { Bar = true, Baz = "a" }, new() { Bar = null, Baz = null }, - new() { Bar = false, Baz = "c" } + new() { Bar = false, Baz = "c" }, }; private readonly SchemaCache _cache; @@ -521,7 +521,7 @@ protected override void OnConfigure( new List { new() { BarBaz = "a_a", BarQux = "a_c" }, - new() { BarBaz = "a_b", BarQux = "a_d" } + new() { BarBaz = "a_b", BarQux = "a_d" }, }); } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorScalarTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorScalarTests.cs index 60de58493fe..37d6625cfd2 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorScalarTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableProjectionVisitorScalarTests.cs @@ -10,7 +10,7 @@ public class QueryableProjectionVisitorScalarTests { private static readonly Foo[] _fooEntities = { - new() { Bar = true, Baz = "a" }, new() { Bar = false, Baz = "b" } + new() { Bar = true, Baz = "a" }, new() { Bar = false, Baz = "b" }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableSingleOrDefaultTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableSingleOrDefaultTests.cs index d436ac2c9dd..d149e55d662 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableSingleOrDefaultTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Projections.Tests/QueryableSingleOrDefaultTests.cs @@ -19,13 +19,13 @@ public class QueryableSingleOrDefaultTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "a" } + Foo = new FooDeep { BarShort = 12, BarString = "a" }, }, ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new FooDeep { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -38,14 +38,14 @@ public class QueryableSingleOrDefaultTests NestedObject = new BarDeep { - Foo = new FooDeep { BarShort = 12, BarString = "d" } + Foo = new FooDeep { BarShort = 12, BarString = "d" }, }, ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } } - } - } - } + new() { Foo = new FooDeep { BarShort = 14, BarString = "d" } }, + }, + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -60,9 +60,9 @@ public class QueryableSingleOrDefaultTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 12 } } - } - } + new() { Foo = new FooDeep { BarShort = 12 } }, + }, + }, }, new() { @@ -74,9 +74,9 @@ public class QueryableSingleOrDefaultTests BarString = "testbtest", ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 9 } } - } - } + new() { Foo = new FooDeep { BarShort = 9 } }, + }, + }, }, new() { @@ -88,9 +88,9 @@ public class QueryableSingleOrDefaultTests BarString = "testctest", ObjectArray = new List { - new() { Foo = new FooDeep { BarShort = 14 } } - } - } + new() { Foo = new FooDeep { BarShort = 14 } }, + }, + }, }, new() { @@ -100,9 +100,9 @@ public class QueryableSingleOrDefaultTests BarBool = false, BarEnum = BarEnum.FOO, BarString = "testdtest", - ObjectArray = null - } - } + ObjectArray = null, + }, + }, }; private readonly SchemaCache _cache; @@ -347,6 +347,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorBooleanTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorBooleanTests.cs index a382e9c2927..2d666f52782 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorBooleanTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorBooleanTests.cs @@ -10,7 +10,7 @@ public class QueryableSortVisitorBooleanTests private static readonly FooNullable[] _fooNullableEntities = { - new() { Bar = true }, new() { Bar = null }, new() { Bar = false } + new() { Bar = true }, new() { Bar = null }, new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorComparableTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorComparableTests.cs index f9062e91f59..66c47a605c3 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorComparableTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorComparableTests.cs @@ -8,7 +8,7 @@ public class QueryableSortVisitorComparableTests { private static readonly Foo[] _fooEntities = { - new() { BarShort = 12 }, new() { BarShort = 14 }, new() { BarShort = 13 } + new() { BarShort = 12 }, new() { BarShort = 14 }, new() { BarShort = 13 }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -16,7 +16,7 @@ public class QueryableSortVisitorComparableTests new() { BarShort = 12 }, new() { BarShort = null }, new() { BarShort = 14 }, - new() { BarShort = 13 } + new() { BarShort = 13 }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorEnumTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorEnumTests.cs index 0a47c8346c9..19c5f4f4b4d 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorEnumTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorEnumTests.cs @@ -12,7 +12,7 @@ public class QueryableSortVisitorEnumTests new() { BarEnum = FooEnum.BAR }, new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private static readonly FooNullable[] _fooNullableEntities = @@ -21,7 +21,7 @@ public class QueryableSortVisitorEnumTests new() { BarEnum = FooEnum.BAZ }, new() { BarEnum = FooEnum.FOO }, new() { BarEnum = null }, - new() { BarEnum = FooEnum.QUX } + new() { BarEnum = FooEnum.QUX }, }; private readonly SchemaCache _cache; @@ -101,7 +101,7 @@ public enum FooEnum FOO, BAR, BAZ, - QUX + QUX, } public class FooSortType : SortInputType diff --git a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExecutableTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExecutableTests.cs index c23eccf04fe..bf2fcf29a88 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExecutableTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExecutableTests.cs @@ -11,7 +11,7 @@ public class QueryableSortVisitorExecutableTests private static readonly FooNullable[] _fooNullableEntities = { - new() { Bar = true }, new() { Bar = null }, new() { Bar = false } + new() { Bar = true }, new() { Bar = null }, new() { Bar = false }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExpressionTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExpressionTests.cs index 761175e9d9e..7cf0594bc38 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExpressionTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorExpressionTests.cs @@ -15,8 +15,8 @@ public class QueryableSortVisitorExpressionTests { Name = "Foo", LastName = "Galoo", - Bars = new List() { new() { Value = "A" } } - } + Bars = new List() { new() { Value = "A" } }, + }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorObjectTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorObjectTests.cs index 0df087648bb..6c6fb00ed60 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorObjectTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorObjectTests.cs @@ -18,9 +18,9 @@ public class QueryableSortVisitorObjectTests BarString = "testatest", ObjectArray = new List { - new() { Foo = new Foo { BarShort = 12, BarString = "a" } } - } - } + new() { Foo = new Foo { BarShort = 12, BarString = "a" } }, + }, + }, }, new() { @@ -38,11 +38,11 @@ public class QueryableSortVisitorObjectTests Foo = new Foo { //ScalarArray = new[] { "c", "d", "b" } - BarShort = 14, BarString = "d" - } - } - } - } + BarShort = 14, BarString = "d", + }, + }, + }, + }, }, new() { @@ -54,8 +54,8 @@ public class QueryableSortVisitorObjectTests BarString = "testctest", //ScalarArray = null, ObjectArray = null, - } - } + }, + }, }; private static readonly BarNullable[] _barNullableEntities = @@ -77,10 +77,10 @@ public class QueryableSortVisitorObjectTests { //ScalarArray = new[] { "c", "d", "a" } BarShort = 12, - } - } - } - } + }, + }, + }, + }, }, new() { @@ -99,10 +99,10 @@ public class QueryableSortVisitorObjectTests { //ScalarArray = new[] { "c", "d", "b" } BarShort = null, - } - } - } - } + }, + }, + }, + }, }, new() { @@ -121,10 +121,10 @@ public class QueryableSortVisitorObjectTests { //ScalarArray = new[] { "c", "d", "b" } BarShort = 14, - } - } - } - } + }, + }, + }, + }, }, new() { @@ -135,10 +135,10 @@ public class QueryableSortVisitorObjectTests BarEnum = BarEnum.FOO, BarString = "testdtest", //ScalarArray = null, - ObjectArray = null - } + ObjectArray = null, + }, }, - new() { Foo = null } + new() { Foo = null }, }; private readonly SchemaCache _cache; @@ -478,10 +478,10 @@ query testSort($order: [BarSortInput!]) { "foo", new Dictionary { - { "barShort", "ASC" }, { "barBool", "ASC" } + { "barShort", "ASC" }, { "barBool", "ASC" }, } - } - } + }, + }, }) .Create()); @@ -505,14 +505,14 @@ query testSort($order: [BarSortInput!]) { { { "foo", new Dictionary { { "barShort", "ASC" } } - } + }, }, new() { { "foo", new Dictionary { { "barBool", "ASC" } } - } - } + }, + }, }) .Create()); @@ -538,10 +538,10 @@ query testSort($order: [BarSortInput!]) { "foo", new Dictionary { - { "barShort", "DESC" }, { "barBool", "DESC" } + { "barShort", "DESC" }, { "barBool", "DESC" }, } - } - } + }, + }, }) .Create()); @@ -565,14 +565,14 @@ query testSort($order: [BarSortInput!]) { { { "foo", new Dictionary { { "barShort", "DESC" } } - } + }, }, new() { { "foo", new Dictionary { { "barBool", "DESC" } } - } - } + }, + }, }) .Create()); @@ -651,6 +651,6 @@ public enum BarEnum FOO, BAR, BAZ, - QUX + QUX, } } diff --git a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorStringTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorStringTests.cs index bf65032f8e4..4bf60466376 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorStringTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorStringTests.cs @@ -8,12 +8,12 @@ public class QueryableSortVisitorStringTests { private static readonly Foo[] _fooEntities = { - new() { Bar = "testatest" }, new() { Bar = "testbtest" } + new() { Bar = "testatest" }, new() { Bar = "testbtest" }, }; private static readonly FooNullable[] _fooNullableEntities = { - new() { Bar = "testatest" }, new() { Bar = "testbtest" }, new() { Bar = null } + new() { Bar = "testatest" }, new() { Bar = "testbtest" }, new() { Bar = null }, }; private readonly SchemaCache _cache; diff --git a/src/HotChocolate/Raven/test/Data.Raven.Tests/FluentApiTests.cs b/src/HotChocolate/Raven/test/Data.Raven.Tests/FluentApiTests.cs index 3eeef47a1a0..07561e20db4 100644 --- a/src/HotChocolate/Raven/test/Data.Raven.Tests/FluentApiTests.cs +++ b/src/HotChocolate/Raven/test/Data.Raven.Tests/FluentApiTests.cs @@ -261,7 +261,7 @@ protected override void Configure(IObjectTypeDescriptor descriptor) .Resolve(ctx => ctx.AsyncSession().Query()) .UsePaging>(options: new PagingOptions() { - ProviderName = RavenPagination.ProviderName, IncludeTotalCount = true + ProviderName = RavenPagination.ProviderName, IncludeTotalCount = true, }) .UseProjection() .UseSorting() @@ -271,7 +271,7 @@ protected override void Configure(IObjectTypeDescriptor descriptor) .Resolve(ctx => ctx.AsyncSession().Query().AsExecutable()) .UsePaging>(options: new PagingOptions() { - ProviderName = RavenPagination.ProviderName, IncludeTotalCount = true + ProviderName = RavenPagination.ProviderName, IncludeTotalCount = true, }); descriptor.Field("pagingRaven") diff --git a/src/HotChocolate/Spatial/src/Types/GeoJsonGeometryType.cs b/src/HotChocolate/Spatial/src/Types/GeoJsonGeometryType.cs index 83c02a89981..441cad5bd43 100644 --- a/src/HotChocolate/Spatial/src/Types/GeoJsonGeometryType.cs +++ b/src/HotChocolate/Spatial/src/Types/GeoJsonGeometryType.cs @@ -8,5 +8,5 @@ public enum GeoJsonGeometryType MultiLineString, Polygon, MultiPolygon, - GeometryCollection + GeometryCollection, } diff --git a/src/HotChocolate/Spatial/src/Types/GeoJsonResolvers.cs b/src/HotChocolate/Spatial/src/Types/GeoJsonResolvers.cs index 5941e3e77df..76f9d720b3c 100644 --- a/src/HotChocolate/Spatial/src/Types/GeoJsonResolvers.cs +++ b/src/HotChocolate/Spatial/src/Types/GeoJsonResolvers.cs @@ -27,7 +27,7 @@ public GeoJsonGeometryType GetType([Parent] Geometry geometry) => OgcGeometryType.MultiPoint => GeoJsonGeometryType.MultiPoint, OgcGeometryType.MultiLineString => GeoJsonGeometryType.MultiLineString, OgcGeometryType.MultiPolygon => GeoJsonGeometryType.MultiPolygon, - _ => throw Resolver_Type_InvalidGeometryType() + _ => throw Resolver_Type_InvalidGeometryType(), }; public IReadOnlyCollection GetBbox([Parent] Geometry geometry) diff --git a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonInputObjectSerializer.cs b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonInputObjectSerializer.cs index 83f13a052e9..162b2b27960 100644 --- a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonInputObjectSerializer.cs +++ b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonInputObjectSerializer.cs @@ -59,7 +59,7 @@ public override bool TrySerialize( GeoJsonTypeSerializer.Default.Serialize(type, _geometryType) ?? throw Serializer_CouldNotSerialize(type) }, - { CrsFieldName, g.SRID } + { CrsFieldName, g.SRID }, }; return true; @@ -151,7 +151,7 @@ public override IValueNode ParseResult(IType type, object? resultValue) { new ObjectFieldNode( TypeFieldName, - GeoJsonTypeSerializer.Default.ParseResult(type, _geometryType)) + GeoJsonTypeSerializer.Default.ParseResult(type, _geometryType)), }; if (dict.TryGetValue(CoordinatesFieldName, out var value) && @@ -211,7 +211,7 @@ public override IValueNode ParseValue(IType type, object? runtimeValue) ParseCoordinateValue(type, geometry)), new ObjectFieldNode( CrsFieldName, - new IntValueNode(geometry.SRID)) + new IntValueNode(geometry.SRID)), }; return new ObjectValueNode(list); diff --git a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiLineStringSerializer.cs b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiLineStringSerializer.cs index c75ee4ea6bc..8086007e336 100644 --- a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiLineStringSerializer.cs +++ b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiLineStringSerializer.cs @@ -139,7 +139,7 @@ public override IValueNode ParseValue(IType type, object? runtimeValue) ParseCoordinateValue(type, geometry)), new ObjectFieldNode( CrsFieldName, - new IntValueNode(geometry.SRID)) + new IntValueNode(geometry.SRID)), }; return new ObjectValueNode(list); diff --git a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiPolygonSerializer.cs b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiPolygonSerializer.cs index 41a114564e1..3f0a5cfbc20 100644 --- a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiPolygonSerializer.cs +++ b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonMultiPolygonSerializer.cs @@ -131,7 +131,7 @@ public override IValueNode ParseValue(IType type, object? runtimeValue) ParseCoordinateValue(type, geometry)), new ObjectFieldNode( CrsFieldName, - new IntValueNode(geometry.SRID)) + new IntValueNode(geometry.SRID)), }; return new ObjectValueNode(list); diff --git a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPolygonSerializer.cs b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPolygonSerializer.cs index 51da755ddbc..d5688574d4f 100644 --- a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPolygonSerializer.cs +++ b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPolygonSerializer.cs @@ -128,7 +128,7 @@ public override IValueNode ParseValue(IType type, object? runtimeValue) type, GeoJsonGeometryType.Polygon)), new(CoordinatesFieldName, ParseCoordinateValue(type, geometry)), - new(CrsFieldName, new IntValueNode(geometry.SRID)) + new(CrsFieldName, new IntValueNode(geometry.SRID)), }; return new ObjectValueNode(list); diff --git a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPositionSerializer.cs b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPositionSerializer.cs index 25a803f544a..a782a7d6757 100644 --- a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPositionSerializer.cs +++ b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonPositionSerializer.cs @@ -290,16 +290,16 @@ public override bool TrySerialize(IType type, object? value, out object? seriali { coordinate.X, coordinate.Y, - coordinate.Z - }; + coordinate.Z, + }; return true; } serialized = new[] { coordinate.X, - coordinate.Y - }; + coordinate.Y, + }; return true; } diff --git a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonSerializers.cs b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonSerializers.cs index 354b5272363..7682dada17e 100644 --- a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonSerializers.cs +++ b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonSerializers.cs @@ -16,7 +16,7 @@ public static readonly IReadOnlyDictionary @@ -28,7 +28,7 @@ public static readonly IReadOnlyDictionary ["LineString"] = GeoJsonLineStringSerializer.Default, ["MultiLineString"] = GeoJsonMultiLineStringSerializer.Default, ["Polygon"] = GeoJsonPolygonSerializer.Default, - ["MultiPolygon"] = GeoJsonMultiPolygonSerializer.Default + ["MultiPolygon"] = GeoJsonMultiPolygonSerializer.Default, }; public static readonly IReadOnlyDictionary diff --git a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonTypeSerializer.cs b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonTypeSerializer.cs index 224181cf18e..44941728677 100644 --- a/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonTypeSerializer.cs +++ b/src/HotChocolate/Spatial/src/Types/Serialization/GeoJsonTypeSerializer.cs @@ -17,7 +17,7 @@ internal class GeoJsonTypeSerializer : GeoJsonSerializerBase _valueLookup = diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorContainsTests.cs b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorContainsTests.cs index 39c833d07f1..21352c26408 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorContainsTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorContainsTests.cs @@ -16,7 +16,7 @@ public class QueryableFilterVisitorContainsTests : SchemaCache new Coordinate(0, 2), new Coordinate(2, 2), new Coordinate(2, 0), - new Coordinate(0, 0) + new Coordinate(0, 0), })); private static readonly Polygon _falsePolygon = new( @@ -26,13 +26,13 @@ public class QueryableFilterVisitorContainsTests : SchemaCache new Coordinate(0, -2), new Coordinate(-2, -2), new Coordinate(-2, 0), - new Coordinate(0, 0) + new Coordinate(0, 0), })); private static readonly Foo[] _fooEntities = { new() { Id = 1, Bar = _truePolygon }, - new() { Id = 2, Bar = _falsePolygon } + new() { Id = 2, Bar = _falsePolygon }, }; public QueryableFilterVisitorContainsTests(PostgreSqlResource resource) diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorDistanceTests.cs b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorDistanceTests.cs index 38b644461f8..5d443c9b32a 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorDistanceTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorDistanceTests.cs @@ -17,7 +17,7 @@ public class QueryableFilterVisitorDistanceTests new Coordinate(0, 2), new Coordinate(2, 2), new Coordinate(2, 0), - new Coordinate(0, 0) + new Coordinate(0, 0), })); private static readonly Polygon _falsePolygon = new( @@ -27,13 +27,13 @@ public class QueryableFilterVisitorDistanceTests new Coordinate(0, -2), new Coordinate(-2, -2), new Coordinate(-2, 0), - new Coordinate(0, 0) + new Coordinate(0, 0), })); private static readonly Foo[] _fooEntities = { new() { Id = 1, Bar = _truePolygon }, - new() { Id = 2, Bar = _falsePolygon } + new() { Id = 2, Bar = _falsePolygon }, }; public QueryableFilterVisitorDistanceTests(PostgreSqlResource resource) diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorIntersectTests.cs b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorIntersectTests.cs index d008481bdfb..483a8dac015 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorIntersectTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorIntersectTests.cs @@ -33,7 +33,7 @@ public class QueryableFilterVisitorIntersectsTests private static readonly Foo[] _fooEntities = { new() { Id = 1, Bar = _truePolygon }, - new() { Id = 2, Bar = _falsePolygon } + new() { Id = 2, Bar = _falsePolygon }, }; public QueryableFilterVisitorIntersectsTests(PostgreSqlResource resource) diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorOverlapsTests.cs b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorOverlapsTests.cs index 7fd3b8df412..323f739e906 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorOverlapsTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorOverlapsTests.cs @@ -18,7 +18,7 @@ public class QueryableFilterVisitorOverlapsTests : SchemaCache new Coordinate(140, 20), new Coordinate(20, 20), new Coordinate(70, 70), - new Coordinate(150, 150) + new Coordinate(150, 150), })); private static readonly Polygon _falsePolygon = @@ -34,7 +34,7 @@ public class QueryableFilterVisitorOverlapsTests : SchemaCache private static readonly Foo[] _fooEntities = { new() { Id = 1, Bar = _truePolygon }, - new() { Id = 2, Bar = _falsePolygon } + new() { Id = 2, Bar = _falsePolygon }, }; public QueryableFilterVisitorOverlapsTests(PostgreSqlResource resource) diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorTouchesTests.cs b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorTouchesTests.cs index 3751ad6e8dd..2935d696f8d 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorTouchesTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorTouchesTests.cs @@ -16,7 +16,7 @@ public class QueryableFilterVisitorTouchesTests : SchemaCache new Coordinate(160, 20), new Coordinate(20, 20), new Coordinate(20, 120), - new Coordinate(140, 120) + new Coordinate(140, 120), })); private static readonly Polygon _falsePolygon = @@ -32,7 +32,7 @@ public class QueryableFilterVisitorTouchesTests : SchemaCache private static readonly Foo[] _fooEntities = { new() { Id = 1, Bar = _truePolygon }, - new() { Id = 2, Bar = _falsePolygon } + new() { Id = 2, Bar = _falsePolygon }, }; public QueryableFilterVisitorTouchesTests(PostgreSqlResource resource) diff --git a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorWithinTests.cs b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorWithinTests.cs index 23d1bea0264..59031ccdea9 100644 --- a/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorWithinTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Filters.SqlServer.Tests/QueryableFilterVisitorWithinTests.cs @@ -32,7 +32,7 @@ public class QueryableFilterVisitorWithinTests : SchemaCache private static readonly Foo[] _fooEntities = { new() { Id = 1, Bar = _truePolygon }, - new() { Id = 2, Bar = _falsePolygon } + new() { Id = 2, Bar = _falsePolygon }, }; public QueryableFilterVisitorWithinTests(PostgreSqlResource resource) diff --git a/src/HotChocolate/Spatial/test/Data.Projections.SqlServer.Tests/QueryableFilterVisitorTests.cs b/src/HotChocolate/Spatial/test/Data.Projections.SqlServer.Tests/QueryableFilterVisitorTests.cs index 62bb05974be..d08e1fd114e 100644 --- a/src/HotChocolate/Spatial/test/Data.Projections.SqlServer.Tests/QueryableFilterVisitorTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Projections.SqlServer.Tests/QueryableFilterVisitorTests.cs @@ -18,7 +18,7 @@ public class QueryableProjectionVisitorTests new Coordinate(0, 2), new Coordinate(2, 2), new Coordinate(2, 0), - new Coordinate(0, 0) + new Coordinate(0, 0), })); private static readonly Polygon _falsePolygon = @@ -29,13 +29,13 @@ public class QueryableProjectionVisitorTests new Coordinate(0, -2), new Coordinate(-2, -2), new Coordinate(-2, 0), - new Coordinate(0, 0) + new Coordinate(0, 0), })); private static readonly Foo[] _fooEntities = { new() { Id = 1, Bar = _truePolygon }, - new() { Id = 2, Bar = _falsePolygon } + new() { Id = 2, Bar = _falsePolygon }, }; public QueryableProjectionVisitorTests(PostgreSqlResource resource) diff --git a/src/HotChocolate/Spatial/test/Data.Tests/Expressions/QueryableFilterVisitorGeometryTests.cs b/src/HotChocolate/Spatial/test/Data.Tests/Expressions/QueryableFilterVisitorGeometryTests.cs index 2ae4aa055c6..65c1bfe0096 100644 --- a/src/HotChocolate/Spatial/test/Data.Tests/Expressions/QueryableFilterVisitorGeometryTests.cs +++ b/src/HotChocolate/Spatial/test/Data.Tests/Expressions/QueryableFilterVisitorGeometryTests.cs @@ -38,8 +38,8 @@ public void Line_Contains_Point() { new Coordinate(10, 20), new Coordinate(20, 20), - new Coordinate(30, 20) - }) + new Coordinate(30, 20), + }), }; Assert.True(func(a)); @@ -49,8 +49,8 @@ public void Line_Contains_Point() { new Coordinate(10, 10), new Coordinate(20, 10), - new Coordinate(30, 10) - }) + new Coordinate(30, 10), + }), }; Assert.False(func(b)); } @@ -86,8 +86,8 @@ public void Polygon_Contains_Buffered_Point() new Coordinate(0, 6), new Coordinate(6, 6), new Coordinate(6, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.True(func(a), "polygon a does not contain the buffered point"); @@ -100,8 +100,8 @@ public void Polygon_Contains_Buffered_Point() new Coordinate(6, 6), new Coordinate(4, 4), new Coordinate(6, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.False(func(b), "polygon c contains the buffered point"); } @@ -140,8 +140,8 @@ public void Point_to_Line() { new Coordinate(2, 0), new Coordinate(0, 0), - new Coordinate(1, 0) - }) + new Coordinate(1, 0), + }), }; Assert.True(func(a)); @@ -151,8 +151,8 @@ public void Point_to_Line() { new Coordinate(0.5, 0.5), new Coordinate(0, 0), - new Coordinate(1, 0) - }) + new Coordinate(1, 0), + }), }; Assert.False(func(b)); } @@ -184,8 +184,8 @@ public void Line_to_Line() Bar = new LineString(new[] { new Coordinate(0, 0), - new Coordinate(1, 0) - }) + new Coordinate(1, 0), + }), }; Assert.True(func(a)); } @@ -220,8 +220,8 @@ public void Point_in_Poly() new Coordinate(0, 0), new Coordinate(1, 2), new Coordinate(2, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.True(func(a)); @@ -232,8 +232,8 @@ public void Point_in_Poly() new Coordinate(0, 0), new Coordinate(1, -2), new Coordinate(2, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.False(func(b)); } @@ -265,8 +265,8 @@ public void Line_in_Poly() new Coordinate(0, 0), new Coordinate(1, 2), new Coordinate(2, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.True(func(a)); @@ -277,8 +277,8 @@ public void Line_in_Poly() new Coordinate(0, 0), new Coordinate(1, -2), new Coordinate(2, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.False(func(b)); } @@ -310,8 +310,8 @@ public void Poly_in_Poly() new Coordinate(0, 0), new Coordinate(1, 2), new Coordinate(2, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.True(func(a)); @@ -322,8 +322,8 @@ public void Poly_in_Poly() new Coordinate(0, 0), new Coordinate(1, -2), new Coordinate(2, -1), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.False(func(b)); } @@ -357,8 +357,8 @@ public void Line_and_Line() { new Coordinate(0, 0), new Coordinate(1, 2), - new Coordinate(2, 0) - }) + new Coordinate(2, 0), + }), }; Assert.True(func(a)); @@ -368,8 +368,8 @@ public void Line_and_Line() { new Coordinate(0, 0), new Coordinate(1, -2), - new Coordinate(2, 0) - }) + new Coordinate(2, 0), + }), }; Assert.False(func(b)); } @@ -401,8 +401,8 @@ public void Poly_and_Poly() new Coordinate(0, 0), new Coordinate(1, 2), new Coordinate(2, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.True(func(a)); @@ -413,8 +413,8 @@ public void Poly_and_Poly() new Coordinate(0, 0), new Coordinate(1, -2), new Coordinate(2, -1), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.False(func(b)); } @@ -445,13 +445,13 @@ public void Point_Within_Line() // assert var a = new Foo { - Bar = new Point(20, 20) + Bar = new Point(20, 20), }; Assert.True(func(a)); var b = new Foo { - Bar = new Point(20, 30) + Bar = new Point(20, 30), }; Assert.False(func(b)); } @@ -487,8 +487,8 @@ public void Polygon_Within_Buffered_Point() new Coordinate(0, 2), new Coordinate(2, 2), new Coordinate(2, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.True(func(a)); @@ -501,8 +501,8 @@ public void Polygon_Within_Buffered_Point() new Coordinate(9, 9), new Coordinate(3, 3), new Coordinate(9, 0), - new Coordinate(0, 0) - })) + new Coordinate(0, 0), + })), }; Assert.False(func(b)); } diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringSerializerTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringSerializerTests.cs index 678b539b114..9482d60511a 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringSerializerTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringSerializerTests.cs @@ -23,8 +23,8 @@ public class GeoJsonLineStringSerializerTests { new Coordinate(30, 10), new Coordinate(10, 30), - new Coordinate(40, 40) - }); + new Coordinate(40, 40), + }); private readonly string _geometryType = "LineString"; @@ -32,8 +32,8 @@ public class GeoJsonLineStringSerializerTests { new[] { 30.0, 10.0 }, new[] { 10.0, 30.0 }, - new[] { 40.0, 40.0 } - }; + new[] { 40.0, 40.0 }, + }; [Theory] [InlineData(GeometryTypeName)] @@ -424,7 +424,7 @@ public void Deserialize_Should_Pass_When_AllFieldsInDictionary(string typeName) { { WellKnownFields.TypeFieldName, _geometryType }, { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, 26912 } + { WellKnownFields.CrsFieldName, 26912 }, }; // act @@ -445,7 +445,7 @@ public void Deserialize_Should_Pass_When_CrsIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CoordinatesFieldName, _geometryParsed } + { WellKnownFields.CoordinatesFieldName, _geometryParsed }, }; // act @@ -466,7 +466,7 @@ public void Deserialize_Should_Fail_When_TypeNameIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act @@ -486,7 +486,7 @@ public void Deserialize_Should_When_CoordinatesAreMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringTypeTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringTypeTests.cs index 1de04d18cc6..39f00e91d38 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringTypeTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonLineStringTypeTests.cs @@ -11,7 +11,7 @@ public class GeoJsonLineStringTypeTests { new Coordinate(30, 10), new Coordinate(10, 30), - new Coordinate(40, 40) + new Coordinate(40, 40), }); [Fact] diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringSerializerTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringSerializerTests.cs index 4e2ee13d983..154a27fe6bc 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringSerializerTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringSerializerTests.cs @@ -40,15 +40,15 @@ public class GeoJsonMultiLineStringSerializerTests { new Coordinate(10, 10), new Coordinate(20, 20), - new Coordinate(10, 40) + new Coordinate(10, 40), }), new LineString(new[] { new Coordinate(40, 40), new Coordinate(30, 30), new Coordinate(40, 20), - new Coordinate(30, 10) - }) + new Coordinate(30, 10), + }), }); private readonly string _geometryType = "MultiLineString"; @@ -59,16 +59,16 @@ public class GeoJsonMultiLineStringSerializerTests { new[] { 10.0, 10.0 }, new[] { 20.0, 20.0 }, - new[] { 10.0, 40.0 } + new[] { 10.0, 40.0 }, }, new[] { new[] { 40.0, 40.0 }, new[] { 30.0, 30.0 }, new[] { 40.0, 20.0 }, - new[] { 30.0, 10.0 } - } - }; + new[] { 30.0, 10.0 }, + }, + }; [Theory] [InlineData(GeometryTypeName)] @@ -494,7 +494,7 @@ public void Deserialize_Should_Pass_When_AllFieldsInDictionary(string typeName) { { WellKnownFields.TypeFieldName, _geometryType }, { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, 26912 } + { WellKnownFields.CrsFieldName, 26912 }, }; // act @@ -516,7 +516,7 @@ public void Deserialize_Should_Pass_When_CrsIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CoordinatesFieldName, _geometryParsed } + { WellKnownFields.CoordinatesFieldName, _geometryParsed }, }; // act @@ -538,7 +538,7 @@ public void Deserialize_Should_Fail_WhenTypeNameIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act @@ -558,7 +558,7 @@ public void Deserialize_Should_When_CoordinatesAreMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringTypeTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringTypeTests.cs index 0b3ba19e88c..014ede70802 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringTypeTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiLineStringTypeTests.cs @@ -14,15 +14,15 @@ public class GeoJsonMultiLineStringTypeTests { new Coordinate(10, 10), new Coordinate(20, 20), - new Coordinate(10, 40) + new Coordinate(10, 40), }), new LineString(new[] { new Coordinate(40, 40), new Coordinate(30, 30), new Coordinate(40, 20), - new Coordinate(30, 10) - }) + new Coordinate(30, 10), + }), }); [Fact] diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPointSerializerTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPointSerializerTests.cs index d4aa8465e75..83b119468a2 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPointSerializerTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPointSerializerTests.cs @@ -37,7 +37,7 @@ public class GeoJsonMultiPointSerializerTests new[] { 10.0, 40.0 }, new[] { 40.0, 30.0 }, new[] { 20.0, 20.0 }, - new[] { 30.0, 10.0 } + new[] { 30.0, 10.0 }, }; [Theory] @@ -437,7 +437,7 @@ public void Deserialize_Should_Pass_When_AllFieldsInDictionary(string typeName) { { WellKnownFields.TypeFieldName, _geometryType }, { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, 26912 } + { WellKnownFields.CrsFieldName, 26912 }, }; // act @@ -458,7 +458,7 @@ public void Deserialize_Should_Pass_When_CrsIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CoordinatesFieldName, _geometryParsed } + { WellKnownFields.CoordinatesFieldName, _geometryParsed }, }; // act @@ -479,7 +479,7 @@ public void Deserialize_Should_Fail_WhentypeNameIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act @@ -498,7 +498,7 @@ public void Deserialize_Should_When_CoordinatesAreMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonSerializerTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonSerializerTests.cs index a7b75023ae5..70cd4d2a9e7 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonSerializerTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonSerializerTests.cs @@ -51,7 +51,7 @@ public class GeoJsonMultiPolygonSerializerTests new Coordinate(30, 20), new Coordinate(45, 40), new Coordinate(10, 40), - new Coordinate(30, 20) + new Coordinate(30, 20), })), new Polygon( new LinearRing( @@ -61,8 +61,8 @@ public class GeoJsonMultiPolygonSerializerTests new Coordinate(40, 10), new Coordinate(10, 20), new Coordinate(5, 15), - new Coordinate(15, 5) - })) + new Coordinate(15, 5), + })), }); private readonly string _geometryType = "MultiPolygon"; @@ -76,8 +76,8 @@ public class GeoJsonMultiPolygonSerializerTests new[] { 30.0, 20.0 }, new[] { 45.0, 40.0 }, new[] { 10.0, 40.0 }, - new[] { 30.0, 20.0 } - } + new[] { 30.0, 20.0 }, + }, }, new[] { @@ -87,10 +87,10 @@ public class GeoJsonMultiPolygonSerializerTests new[] { 40.0, 10.0 }, new[] { 10.0, 20.0 }, new[] { 5.0, 15.0 }, - new[] { 15.0, 5.0 } - } - } - }; + new[] { 15.0, 5.0 }, + }, + }, + }; [Theory] [InlineData(GeometryTypeName)] @@ -515,7 +515,7 @@ public void Deserialize_Should_Pass_When_AllFieldsInDictionary(string typeName) { { WellKnownFields.TypeFieldName, _geometryType }, { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, 26912 } + { WellKnownFields.CrsFieldName, 26912 }, }; // act @@ -536,7 +536,7 @@ public void Deserialize_Should_Pass_When_CrsIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CoordinatesFieldName, _geometryParsed } + { WellKnownFields.CoordinatesFieldName, _geometryParsed }, }; // act @@ -557,7 +557,7 @@ public void Deserialize_Should_Fail_WhenTypeNameIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act @@ -576,7 +576,7 @@ public void Deserialize_Should_When_CoordinatesAreMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonTypeTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonTypeTests.cs index a7e9e921043..7912bf48c06 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonTypeTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonMultiPolygonTypeTests.cs @@ -14,7 +14,7 @@ public class GeoJsonMultiPolygonTypeTests new Coordinate(30, 20), new Coordinate(45, 40), new Coordinate(10, 40), - new Coordinate(30, 20) + new Coordinate(30, 20), })), new Polygon(new LinearRing(new[] { @@ -22,8 +22,8 @@ public class GeoJsonMultiPolygonTypeTests new Coordinate(40, 10), new Coordinate(10, 20), new Coordinate(5, 15), - new Coordinate(15, 5) - })) + new Coordinate(15, 5), + })), }); [Fact] diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPointSerializerTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPointSerializerTests.cs index bfcbd8d2e28..4948a57536d 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPointSerializerTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPointSerializerTests.cs @@ -443,7 +443,7 @@ public void Deserialize_Should_Pass_When_AllFieldsInDictionary(string typeName) { { WellKnownFields.TypeFieldName, _geometryType }, { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, 26912 } + { WellKnownFields.CrsFieldName, 26912 }, }; // act @@ -464,7 +464,7 @@ public void Deserialize_Should_Pass_When_CrsIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CoordinatesFieldName, _geometryParsed } + { WellKnownFields.CoordinatesFieldName, _geometryParsed }, }; // act @@ -485,7 +485,7 @@ public void Deserialize_Should_Fail_WhenTypeNameIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act @@ -504,7 +504,7 @@ public void Deserialize_Should_When_CoordinatesAreMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonSerializerTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonSerializerTests.cs index 452f39ba10c..bf0a44ef01b 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonSerializerTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonSerializerTests.cs @@ -33,7 +33,7 @@ public class GeoJsonPolygonSerializerTests new Coordinate(40, 40), new Coordinate(20, 40), new Coordinate(10, 20), - new Coordinate(30, 10) + new Coordinate(30, 10), })); private readonly string _geometryType = "Polygon"; @@ -45,30 +45,30 @@ public class GeoJsonPolygonSerializerTests new[] { 30.0, - 10.0 + 10.0, }, new[] { 40.0, - 40.0 + 40.0, }, new[] { 20.0, - 40.0 + 40.0, }, new[] { 10.0, - 20.0 + 20.0, }, new[] { 30.0, - 10.0 - } - } - }; + 10.0, + }, + }, + }; [Theory] [InlineData(GeometryTypeName)] @@ -175,7 +175,7 @@ public void IsInstanceOfType_Should_Fail_When_DifferentGeoJsonObject(string type GeometryFactory.Default.CreateGeometryCollection( new Geometry[] { - new Point(1, 2) + new Point(1, 2), }))); } @@ -501,7 +501,7 @@ public void Deserialize_Should_Pass_When_AllFieldsInDictionary(string typeName) { { WellKnownFields.TypeFieldName, _geometryType }, { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, 26912 } + { WellKnownFields.CrsFieldName, 26912 }, }; // act @@ -522,7 +522,7 @@ public void Deserialize_Should_Pass_When_CrsIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CoordinatesFieldName, _geometryParsed } + { WellKnownFields.CoordinatesFieldName, _geometryParsed }, }; // act @@ -543,7 +543,7 @@ public void Deserialize_Should_Fail_WhentypeNameIsMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.CoordinatesFieldName, _geometryParsed }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act @@ -562,7 +562,7 @@ public void Deserialize_Should_When_CoordinatesAreMissing(string typeName) var serialized = new Dictionary { { WellKnownFields.TypeFieldName, _geometryType }, - { WellKnownFields.CrsFieldName, new IntValueNode(0) } + { WellKnownFields.CrsFieldName, new IntValueNode(0) }, }; // act diff --git a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonTypeTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonTypeTests.cs index 649a9cbf181..caadb5aea71 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonTypeTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/GeoJsonPolygonTypeTests.cs @@ -14,7 +14,7 @@ public class GeoJsonPolygonTypeTests new Coordinate(40, 40), new Coordinate(20, 40), new Coordinate(10, 20), - new Coordinate(30, 10) + new Coordinate(30, 10), })); [Fact] diff --git a/src/HotChocolate/Spatial/test/Types.Tests/TransformationIntegrationTests.cs b/src/HotChocolate/Spatial/test/Types.Tests/TransformationIntegrationTests.cs index a4daa5f463a..b21db48f19d 100644 --- a/src/HotChocolate/Spatial/test/Types.Tests/TransformationIntegrationTests.cs +++ b/src/HotChocolate/Spatial/test/Types.Tests/TransformationIntegrationTests.cs @@ -88,7 +88,7 @@ public async Task Execute_OutputUnknownCRS_RaiseException() { new Coordinate(30, 10), new Coordinate(10, 30), - new Coordinate(40, 40) + new Coordinate(40, 40), }); var schema = SchemaBuilder.New() @@ -133,7 +133,7 @@ public async Task Execute_CoordinateZM_RaiseException() new Coordinate(30, 10), new Coordinate(10, 30), new CoordinateZM(10, 30, 12, 15), - new Coordinate(40, 40) + new Coordinate(40, 40), }); var schema = SchemaBuilder.New() @@ -179,7 +179,7 @@ public async Task Execute_CoordinateM_RaiseException() new Coordinate(30, 10), new Coordinate(10, 30), new CoordinateM(10, 30, 12), - new Coordinate(40, 40) + new Coordinate(40, 40), }); var schema = SchemaBuilder.New() @@ -225,7 +225,7 @@ public async Task Execute_CoordinateZ_NotRaiseException() new Coordinate(30, 10), new Coordinate(10, 30), new CoordinateZ(10, 30, 12), - new Coordinate(40, 40) + new Coordinate(40, 40), }); var schema = SchemaBuilder.New() @@ -404,8 +404,8 @@ public async Task Execute_CrsEmpty_TakeDefaultSrid() new Coordinate(30, 10), new Coordinate(10, 30), new CoordinateZ(10, 30, 12), - new Coordinate(40, 40) - }); + new Coordinate(40, 40), + }); var schema = SchemaBuilder.New() .AddDocumentFromString( @@ -519,7 +519,7 @@ public async Task Execute_SourceDifferentThanCrsRequest_Transform() { new Coordinate(30, 10), new Coordinate(10, 30), - new Coordinate(40, 40) + new Coordinate(40, 40), }); var schema = SchemaBuilder.New() @@ -564,7 +564,7 @@ public async Task Execute_SourceEqualToCrsRequest_NotTransform() { new Coordinate(30, 10), new Coordinate(10, 30), - new Coordinate(40, 40) + new Coordinate(40, 40), }); var schema = SchemaBuilder.New() diff --git a/src/StrawberryShake/Client/src/Core/ExecutionStrategy.cs b/src/StrawberryShake/Client/src/Core/ExecutionStrategy.cs index 54bd187ebf7..2b04753f8e5 100644 --- a/src/StrawberryShake/Client/src/Core/ExecutionStrategy.cs +++ b/src/StrawberryShake/Client/src/Core/ExecutionStrategy.cs @@ -4,5 +4,5 @@ public enum ExecutionStrategy { CacheFirst, CacheAndNetwork, - NetworkOnly + NetworkOnly, } diff --git a/src/StrawberryShake/Client/src/Core/Json/JsonErrorParser.cs b/src/StrawberryShake/Client/src/Core/Json/JsonErrorParser.cs index c6e039cf5da..02ae7fc1f4f 100644 --- a/src/StrawberryShake/Client/src/Core/Json/JsonErrorParser.cs +++ b/src/StrawberryShake/Client/src/Core/Json/JsonErrorParser.cs @@ -65,7 +65,7 @@ private static IClientError ParseError(JsonElement error) { JsonValueKind.String => element.GetString()!, JsonValueKind.Number => element.GetInt32(), - _ => "NOT_SUPPORTED_VALUE" + _ => "NOT_SUPPORTED_VALUE", }; } diff --git a/src/StrawberryShake/Client/src/Core/Json/JsonResultPatcher.cs b/src/StrawberryShake/Client/src/Core/Json/JsonResultPatcher.cs index ef0db68cb26..c12e9953321 100644 --- a/src/StrawberryShake/Client/src/Core/Json/JsonResultPatcher.cs +++ b/src/StrawberryShake/Client/src/Core/Json/JsonResultPatcher.cs @@ -74,7 +74,7 @@ public Response PatchResponse(Response response) JsonValueKind.String => current[path[i].GetString()!]!, JsonValueKind.Number => current[path[i].GetInt32()]!, _ => throw new NotSupportedException( - JsonResultPatcher_PathSegmentMustBeStringOrInt) + JsonResultPatcher_PathSegmentMustBeStringOrInt), }; } } diff --git a/src/StrawberryShake/Client/src/Core/OperationKind.cs b/src/StrawberryShake/Client/src/Core/OperationKind.cs index 69070b31e4d..55d2745236c 100644 --- a/src/StrawberryShake/Client/src/Core/OperationKind.cs +++ b/src/StrawberryShake/Client/src/Core/OperationKind.cs @@ -4,5 +4,5 @@ public enum OperationKind : byte { Query = 0, Mutation = 1, - Subscription = 2 + Subscription = 2, } diff --git a/src/StrawberryShake/Client/src/Core/OperationResultBuilder.cs b/src/StrawberryShake/Client/src/Core/OperationResultBuilder.cs index bfef29c8944..609efaa1fb8 100644 --- a/src/StrawberryShake/Client/src/Core/OperationResultBuilder.cs +++ b/src/StrawberryShake/Client/src/Core/OperationResultBuilder.cs @@ -63,8 +63,8 @@ public IOperationResult Build( exception: ex, extensions: new Dictionary { - { nameof(ex.StackTrace), ex.StackTrace } - }) + { nameof(ex.StackTrace), ex.StackTrace }, + }), }; if (errors is not null) @@ -87,8 +87,8 @@ public IOperationResult Build( exception: response.Exception, extensions: new Dictionary { - { nameof(response.Exception.StackTrace), response.Exception.StackTrace } - }) + { nameof(response.Exception.StackTrace), response.Exception.StackTrace }, + }), }; } diff --git a/src/StrawberryShake/Client/src/Core/OperationStore.cs b/src/StrawberryShake/Client/src/Core/OperationStore.cs index 40c9d2215e8..760180cebfe 100644 --- a/src/StrawberryShake/Client/src/Core/OperationStore.cs +++ b/src/StrawberryShake/Client/src/Core/OperationStore.cs @@ -265,7 +265,7 @@ private void OnUpdate( operation.Request, operation.LastResult, operation.Subscribers, - operation.LastModified) + operation.LastModified), }, kind); diff --git a/src/StrawberryShake/Client/src/Core/OperationUpdateKind.cs b/src/StrawberryShake/Client/src/Core/OperationUpdateKind.cs index 2448c60e72f..7a2ff7742bf 100644 --- a/src/StrawberryShake/Client/src/Core/OperationUpdateKind.cs +++ b/src/StrawberryShake/Client/src/Core/OperationUpdateKind.cs @@ -3,5 +3,5 @@ namespace StrawberryShake; public enum OperationUpdateKind { Updated, - Removed + Removed, } diff --git a/src/StrawberryShake/Client/src/Core/RequestStrategy.cs b/src/StrawberryShake/Client/src/Core/RequestStrategy.cs index 913d99b0aba..9902fee7098 100644 --- a/src/StrawberryShake/Client/src/Core/RequestStrategy.cs +++ b/src/StrawberryShake/Client/src/Core/RequestStrategy.cs @@ -19,5 +19,5 @@ public enum RequestStrategy /// The full GraphQL query is only send if the server has not yet stored the /// persisted query. /// - AutomaticPersistedQuery + AutomaticPersistedQuery, } diff --git a/src/StrawberryShake/Client/src/Core/Serialization/TimeSpanFormat.cs b/src/StrawberryShake/Client/src/Core/Serialization/TimeSpanFormat.cs index be149ab3596..050f362e47e 100644 --- a/src/StrawberryShake/Client/src/Core/Serialization/TimeSpanFormat.cs +++ b/src/StrawberryShake/Client/src/Core/Serialization/TimeSpanFormat.cs @@ -11,5 +11,5 @@ public enum TimeSpanFormat /// TimeSpan .NET Constant ("c") Format /// https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier /// - DotNet + DotNet, } diff --git a/src/StrawberryShake/Client/src/Core/ThrowHelper.cs b/src/StrawberryShake/Client/src/Core/ThrowHelper.cs index 27a2174bde7..e25cf6901f5 100644 --- a/src/StrawberryShake/Client/src/Core/ThrowHelper.cs +++ b/src/StrawberryShake/Client/src/Core/ThrowHelper.cs @@ -24,7 +24,7 @@ internal static GraphQLClientException DateTimeSerializer_InvalidFormat( "For more information read: `https://www.graphql-scalars.com/date-time`.", extensions: new Dictionary { - { "serializedValue", serializedValue } + { "serializedValue", serializedValue }, })); internal static GraphQLClientException DateSerializer_InvalidFormat( @@ -33,7 +33,7 @@ internal static GraphQLClientException DateSerializer_InvalidFormat( "The serialized format for Date must be `yyyy-MM-dd`.", extensions: new Dictionary { - { "serializedValue", serializedValue } + { "serializedValue", serializedValue }, })); internal static GraphQLClientException UrlFormatter_CouldNotParseUri(string value) => diff --git a/src/StrawberryShake/Client/src/Core/ValueKind.cs b/src/StrawberryShake/Client/src/Core/ValueKind.cs index 7a51e80b173..e3ac2c327ea 100644 --- a/src/StrawberryShake/Client/src/Core/ValueKind.cs +++ b/src/StrawberryShake/Client/src/Core/ValueKind.cs @@ -6,5 +6,5 @@ public enum ValueKind Integer, Float, Boolean, - Enum + Enum, } diff --git a/src/StrawberryShake/Client/src/Persistence.SQLite/DatabaseHelper.cs b/src/StrawberryShake/Client/src/Persistence.SQLite/DatabaseHelper.cs index 03a57c9f03e..ca655fc6bbb 100644 --- a/src/StrawberryShake/Client/src/Persistence.SQLite/DatabaseHelper.cs +++ b/src/StrawberryShake/Client/src/Persistence.SQLite/DatabaseHelper.cs @@ -90,7 +90,7 @@ public async IAsyncEnumerable GetAllEntitiesAsync( { Id = reader.GetString(0), Value = reader.GetString(1), - Type = reader.GetString(2) + Type = reader.GetString(2), }; } } @@ -138,7 +138,7 @@ public async IAsyncEnumerable GetAllOperationsAsync( Id = reader.GetString(0), Variables = reader.GetString(1), ResultType = reader.GetString(2), - DataInfo = reader.GetString(3) + DataInfo = reader.GetString(3), }; } } diff --git a/src/StrawberryShake/Client/src/Persistence.SQLite/SQLitePersistence.cs b/src/StrawberryShake/Client/src/Persistence.SQLite/SQLitePersistence.cs index 1d98ed6083e..b47491f3a3b 100644 --- a/src/StrawberryShake/Client/src/Persistence.SQLite/SQLitePersistence.cs +++ b/src/StrawberryShake/Client/src/Persistence.SQLite/SQLitePersistence.cs @@ -18,7 +18,7 @@ public class SQLitePersistence : IDisposable { Formatting = Formatting.None, TypeNameHandling = TypeNameHandling.All, - TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple + TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple, }; private readonly JsonOperationRequestSerializer _requestSerializer = new(); @@ -205,7 +205,7 @@ private async Task WriteEntityAsync( { Id = serializedId, Value = JsonConvert.SerializeObject(entity, _serializerSettings), - Type = entity.GetType().FullName! + Type = entity.GetType().FullName!, }; await database.SaveEntityAsync( @@ -245,7 +245,7 @@ private async Task WriteOperationAsync( DataInfo = JsonConvert.SerializeObject( operationVersion.Result.DataInfo, _serializerSettings), - ResultType = $"{dataType.FullName}, {dataType.Assembly.GetName().Name}" + ResultType = $"{dataType.FullName}, {dataType.Assembly.GetName().Name}", }; await database.SaveOperationAsync( diff --git a/src/StrawberryShake/Client/src/Transport.InMemory/DependencyInjection/InMemoryClient.cs b/src/StrawberryShake/Client/src/Transport.InMemory/DependencyInjection/InMemoryClient.cs index 223e4b9f456..4437757c0b5 100644 --- a/src/StrawberryShake/Client/src/Transport.InMemory/DependencyInjection/InMemoryClient.cs +++ b/src/StrawberryShake/Client/src/Transport.InMemory/DependencyInjection/InMemoryClient.cs @@ -154,7 +154,7 @@ private static void GetFileValueOrDefault( { (Dictionary s, string prop) when s.ContainsKey(prop) => s[prop], (List l, int i) when i < l.Count => l[i], - _ => null + _ => null, }; } diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/DependencyInjection/WebSocketClientFactoryServiceCollectionExtensions.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/DependencyInjection/WebSocketClientFactoryServiceCollectionExtensions.cs index f4b32b84777..b311b7f0d9c 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/DependencyInjection/WebSocketClientFactoryServiceCollectionExtensions.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/DependencyInjection/WebSocketClientFactoryServiceCollectionExtensions.cs @@ -204,7 +204,7 @@ private static IServiceCollection AddWebSocketClient(this IServiceCollection ser services.TryAddSingleton>( new ISocketProtocolFactory[] { - new GraphQLWebSocketProtocolFactory() + new GraphQLWebSocketProtocolFactory(), }); services.TryAddSingleton(); services.TryAddSingleton(sp => diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/Messaging/Messages/OperationMessageType.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/Messaging/Messages/OperationMessageType.cs index 72a0fac0832..b85e303a216 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/Messaging/Messages/OperationMessageType.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/Messaging/Messages/OperationMessageType.cs @@ -8,5 +8,5 @@ public enum OperationMessageType Error, Data, Cancelled, - Complete + Complete, } \ No newline at end of file diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageParser.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageParser.cs index 633288ee8f0..99341d6d44b 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageParser.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageParser.cs @@ -28,13 +28,13 @@ internal ref struct GraphQLWebSocketMessageParser (byte)'t', (byte)'y', (byte)'p', - (byte)'e' + (byte)'e', }; private static ReadOnlySpan Id => new[] { (byte)'i', - (byte)'d' + (byte)'d', }; private static ReadOnlySpan Payload => new[] @@ -45,7 +45,7 @@ internal ref struct GraphQLWebSocketMessageParser (byte)'l', (byte)'o', (byte)'a', - (byte)'d' + (byte)'d', }; private Utf8JsonReader _reader; diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageType.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageType.cs index f7f4b34fd7b..291444c2889 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageType.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageType.cs @@ -168,5 +168,5 @@ internal enum GraphQLWebSocketMessageType /// /// /// - Stop + Stop, } \ No newline at end of file diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageTypeSpans.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageTypeSpans.cs index b8fa376ded5..4fd746d178b 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageTypeSpans.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageTypeSpans.cs @@ -20,7 +20,7 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'i', (byte)'n', (byte)'i', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan ConnectionAccept => new[] @@ -38,7 +38,7 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'_', (byte)'a', (byte)'c', - (byte)'k' + (byte)'k', }; public static ReadOnlySpan ConnectionError => new[] @@ -58,13 +58,13 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'r', (byte)'r', (byte)'o', - (byte)'r' + (byte)'r', }; public static ReadOnlySpan KeepAlive => new[] { (byte)'k', - (byte)'a' + (byte)'a', }; public static ReadOnlySpan ConnectionTerminate => new[] @@ -88,7 +88,7 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'n', (byte)'a', (byte)'t', - (byte)'e' + (byte)'e', }; public static ReadOnlySpan Start => new[] @@ -97,7 +97,7 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'t', (byte)'a', (byte)'r', - (byte)'t' + (byte)'t', }; public static ReadOnlySpan Data => new[] @@ -105,7 +105,7 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'d', (byte)'a', (byte)'t', - (byte)'a' + (byte)'a', }; public static ReadOnlySpan Error => new[] @@ -114,7 +114,7 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'r', (byte)'r', (byte)'o', - (byte)'r' + (byte)'r', }; public static ReadOnlySpan Complete => new[] @@ -126,7 +126,7 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'l', (byte)'e', (byte)'t', - (byte)'e' + (byte)'e', }; public static ReadOnlySpan Stop => new[] @@ -134,6 +134,6 @@ public static class GraphQLWebSocketMessageTypeSpans (byte)'s', (byte)'t', (byte)'o', - (byte)'p' + (byte)'p', }; } \ No newline at end of file diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocol.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocol.cs index 46a39438ffd..a04f9ceb56b 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocol.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocol.cs @@ -140,7 +140,7 @@ private ValueTask ProcessAsync( _ => CloseSocketOnProtocolError( "Invalid message type received: " + message.Type, - cancellationToken) + cancellationToken), }; } } diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketWriterExtension.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketWriterExtension.cs index bc6c7f319d8..19d0c38072a 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketWriterExtension.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketWriterExtension.cs @@ -118,7 +118,7 @@ private static void WriteType( GraphQLWebSocketMessageType.Error => Error, GraphQLWebSocketMessageType.Complete => Complete, GraphQLWebSocketMessageType.Stop => Stop, - _ => throw new ArgumentOutOfRangeException(nameof(type), type, null) + _ => throw new ArgumentOutOfRangeException(nameof(type), type, null), }; writer.Writer.WriteStringValue(typeToWriter); diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/SocketCloseStatus.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/SocketCloseStatus.cs index ab830960959..842e31d3671 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/SocketCloseStatus.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/SocketCloseStatus.cs @@ -14,5 +14,5 @@ public enum SocketCloseStatus PolicyViolation, MessageTooBig, MandatoryExtension, - InternalServerError + InternalServerError, } \ No newline at end of file diff --git a/src/StrawberryShake/Client/src/Transport.WebSockets/WebSocketClient.cs b/src/StrawberryShake/Client/src/Transport.WebSockets/WebSocketClient.cs index 977580d0072..0c0779cc40a 100644 --- a/src/StrawberryShake/Client/src/Transport.WebSockets/WebSocketClient.cs +++ b/src/StrawberryShake/Client/src/Transport.WebSockets/WebSocketClient.cs @@ -242,7 +242,7 @@ private static WebSocketCloseStatus MapCloseStatus(SocketCloseStatus closeStatus SocketCloseStatus.NormalClosure => WebSocketCloseStatus.NormalClosure, SocketCloseStatus.PolicyViolation => WebSocketCloseStatus.PolicyViolation, SocketCloseStatus.ProtocolError => WebSocketCloseStatus.ProtocolError, - _ => WebSocketCloseStatus.Empty + _ => WebSocketCloseStatus.Empty, }; /// diff --git a/src/StrawberryShake/Client/test/Core.Tests/Json/JsonOperationRequestSerializerTests.cs b/src/StrawberryShake/Client/test/Core.Tests/Json/JsonOperationRequestSerializerTests.cs index eb35e713546..ec0755f0c78 100644 --- a/src/StrawberryShake/Client/test/Core.Tests/Json/JsonOperationRequestSerializerTests.cs +++ b/src/StrawberryShake/Client/test/Core.Tests/Json/JsonOperationRequestSerializerTests.cs @@ -24,10 +24,10 @@ public void Serialize_Request_With_InputObject() new KeyValuePair[] { new("s", "def"), - } + }, }), new("sl", new List { "a", "b", "c" }), - new("il", new[] { 1, 2, 3 }) + new("il", new[] { 1, 2, 3 }), }; // act @@ -98,7 +98,7 @@ public void Serialize_Request_With_Extensions() new KeyValuePair[] { new("s", "def"), - } + }, }); operationRequest.Extensions.Add("sl", new List { "a", "b", "c" }); operationRequest.Extensions.Add("il", new[] { 1, 2, 3 }); diff --git a/src/StrawberryShake/Client/test/Core.Tests/OperationRequestTests.cs b/src/StrawberryShake/Client/test/Core.Tests/OperationRequestTests.cs index a86917ba6a1..53be64c446d 100644 --- a/src/StrawberryShake/Client/test/Core.Tests/OperationRequestTests.cs +++ b/src/StrawberryShake/Client/test/Core.Tests/OperationRequestTests.cs @@ -69,7 +69,7 @@ public void Equals_With_Variables_3() "a", new ConcurrentDictionary( new Dictionary { { "a", "b" } }) - } + }, }); var b = new OperationRequest( @@ -82,7 +82,7 @@ public void Equals_With_Variables_3() "a", new ConcurrentDictionary( new Dictionary { { "a", "b" } }) - } + }, }); // act @@ -272,7 +272,7 @@ public void NotEquals_With_Variables_7() "a", new ConcurrentDictionary( new Dictionary { { "a", "b" } }) - } + }, }); var b = new OperationRequest( @@ -285,7 +285,7 @@ public void NotEquals_With_Variables_7() "a", new ConcurrentDictionary( new Dictionary { { "c", "b" } }) - } + }, }); // act @@ -309,7 +309,7 @@ public void NotEquals_With_Variables_8() "a", new ConcurrentDictionary( new Dictionary { { "a", "b" } }) - } + }, }); var b = new OperationRequest( @@ -322,7 +322,7 @@ public void NotEquals_With_Variables_8() "a", new ConcurrentDictionary( new Dictionary { { "a", "c" } }) - } + }, }); // act @@ -369,7 +369,7 @@ public void NotEquals_With_Variables_10() "a", new ConcurrentDictionary( new Dictionary { { "a", null } }) - } + }, }); var b = new OperationRequest( @@ -382,7 +382,7 @@ public void NotEquals_With_Variables_10() "a", new ConcurrentDictionary( new Dictionary { { "c", "b" } }) - } + }, }); // act @@ -517,11 +517,11 @@ public void Equals_With_Variables_JSON() { "e", new List { 1, 2, 3, 4 } }, { "f", true } } }, - { "g", 123 } + { "g", 123 }, } - } + }, } - } + }, }); var b = new OperationRequest( @@ -539,11 +539,11 @@ public void Equals_With_Variables_JSON() { "e", new List { 1, 2, 3, 4 } }, { "f", true } } }, - { "g", 123 } + { "g", 123 }, } - } + }, } - } + }, }); // act @@ -566,10 +566,10 @@ public void Equals_With_Variables_KeyValuePair() { new KeyValuePair("b", new List> { - new KeyValuePair("id", "123456") - }) + new KeyValuePair("id", "123456"), + }), } - } + }, }); var b = new OperationRequest( @@ -582,10 +582,10 @@ public void Equals_With_Variables_KeyValuePair() { new KeyValuePair("b", new List> { - new KeyValuePair("id", "123456") - }) + new KeyValuePair("id", "123456"), + }), } - } + }, }); // act diff --git a/src/StrawberryShake/Client/test/Core.Tests/Serialization/Iso8601DurationTests.cs b/src/StrawberryShake/Client/test/Core.Tests/Serialization/Iso8601DurationTests.cs index 3ca6a8952d5..877c2137365 100644 --- a/src/StrawberryShake/Client/test/Core.Tests/Serialization/Iso8601DurationTests.cs +++ b/src/StrawberryShake/Client/test/Core.Tests/Serialization/Iso8601DurationTests.cs @@ -9,7 +9,7 @@ public class Iso8601DurationTests { new object[] { "-P1D", TimeSpan.FromDays(-1) }, new object[] { "PT0.0000001S", TimeSpan.FromMilliseconds(1) / 1000 / 10 }, - new object[] { "-PT0.0000001S", TimeSpan.FromMilliseconds(-1) / 1000 / 10 } + new object[] { "-PT0.0000001S", TimeSpan.FromMilliseconds(-1) / 1000 / 10 }, }; [Theory] diff --git a/src/StrawberryShake/Client/test/Core.Tests/Serialization/SerializerResolverTests.cs b/src/StrawberryShake/Client/test/Core.Tests/Serialization/SerializerResolverTests.cs index 204f8b7ed67..f4120a31bb3 100644 --- a/src/StrawberryShake/Client/test/Core.Tests/Serialization/SerializerResolverTests.cs +++ b/src/StrawberryShake/Client/test/Core.Tests/Serialization/SerializerResolverTests.cs @@ -97,8 +97,8 @@ public void Constructor_CustomIntSerializerRegistered_PreferOverBuiltInt() ISerializer[] serializers = { new CustomIntSerializer(), - new IntSerializer() - }; + new IntSerializer(), + }; var resolver = new SerializerResolver(serializers); // act @@ -114,8 +114,8 @@ public void GetLeaveValueParser_SerializerRegistered_ReturnSerializer() // arrange ISerializer[] serializers = { - new IntSerializer() - }; + new IntSerializer(), + }; var resolver = new SerializerResolver(serializers); // act @@ -132,8 +132,8 @@ public void GetLeaveValueParser_SerializerRegisteredDifferentName_ThrowException // arrange ISerializer[] serializers = { - new IntSerializer() - }; + new IntSerializer(), + }; var resolver = new SerializerResolver(serializers); // act @@ -149,8 +149,8 @@ public void GetLeaveValueParser_SerializerRegisteredDifferentType_ThrowException // arrange ISerializer[] serializers = { - new IntSerializer() - }; + new IntSerializer(), + }; var resolver = new SerializerResolver(serializers); // act @@ -166,8 +166,8 @@ public void GetLeaveValueParser_TypeNull_ThrowException() // arrange ISerializer[] serializers = { - new IntSerializer() - }; + new IntSerializer(), + }; var resolver = new SerializerResolver(serializers); // act @@ -184,8 +184,8 @@ public void GetInputValueFormatter_FormatterRegistered_ReturnFormatter() // arrange ISerializer[] serializers = { - new CustomInputValueFormatter() - }; + new CustomInputValueFormatter(), + }; var resolver = new SerializerResolver(serializers); @@ -202,8 +202,8 @@ public void GetInputValueFormatter_FormatterRegisteredDifferentName_ThrowExcepti // arrange ISerializer[] serializers = { - new CustomInputValueFormatter() - }; + new CustomInputValueFormatter(), + }; var resolver = new SerializerResolver(serializers); // act @@ -221,8 +221,8 @@ public void GetInputValueFormatter_FormatterRegisteredDifferentType_ThrowExcepti serializerMock.Setup(x => x.TypeName).Returns("Int"); ISerializer[] serializers = { - serializerMock.Object - }; + serializerMock.Object, + }; var resolver = new SerializerResolver(serializers); @@ -239,8 +239,8 @@ public void GetInputValueFormatter_TypeNull_ThrowException() // arrange ISerializer[] serializers = { - new IntSerializer() - }; + new IntSerializer(), + }; var resolver = new SerializerResolver(serializers); // act diff --git a/src/StrawberryShake/Client/test/Transport.WebSocket.Tests/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocolTests.cs b/src/StrawberryShake/Client/test/Transport.WebSocket.Tests/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocolTests.cs index 9b0afce5044..7f3fb43bb5d 100644 --- a/src/StrawberryShake/Client/test/Transport.WebSocket.Tests/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocolTests.cs +++ b/src/StrawberryShake/Client/test/Transport.WebSocket.Tests/Protocols/GraphQLWebSocket/GraphQLWebSocketProtocolTests.cs @@ -86,7 +86,7 @@ public async Task InitializeAsync_SocketIsOpen_SendConnectionInitPayload() var socketClient = new SocketClientStub { IsClosed = false, - ConnectionInterceptor = connectionInterceptorMock.Object + ConnectionInterceptor = connectionInterceptorMock.Object, }; var protocol = new GraphQLWebSocketProtocol(socketClient); diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/Inheritance.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/Inheritance.cs index e030b469713..ead2f07f750 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/Inheritance.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/Inheritance.cs @@ -5,5 +5,5 @@ public enum Inheritance None, Sealed, Override, - Virtual + Virtual, } \ No newline at end of file diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/MethodCallBuilder.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/MethodCallBuilder.cs index 405255226b8..5474c600040 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/MethodCallBuilder.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/MethodCallBuilder.cs @@ -31,7 +31,7 @@ public MethodCallBuilder SetMethodName(string methodName) { _methodName = new[] { - methodName + methodName, }; return this; } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/TypeReferenceBuilder.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/TypeReferenceBuilder.cs index 84df8ca0aed..012bde493b7 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/TypeReferenceBuilder.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Builders/TypeReferenceBuilder.cs @@ -59,7 +59,7 @@ public TypeReferenceBuilder SetIsNullable(bool isNullable) private enum TypeKindToken { List, - Nullable + Nullable, } public override string ToString() diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGenerator.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGenerator.cs index a43ddbf0c87..71a960bf393 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGenerator.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGenerator.cs @@ -39,7 +39,7 @@ public static class CSharpGenerator new ResultTypeGenerator(), new StoreAccessorGenerator(), new NoStoreAccessorGenerator(), new InputTypeGenerator(), new InputTypeStateInterfaceGenerator(), new ResultInterfaceGenerator(), new DataTypeGenerator(), new RazorQueryGenerator(), - new RazorSubscriptionGenerator() + new RazorSubscriptionGenerator(), }; public static async Task GenerateAsync( diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGeneratorSettings.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGeneratorSettings.cs index 7bfd1b51ad8..f6e4e8077ed 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGeneratorSettings.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/CSharpGeneratorSettings.cs @@ -75,6 +75,6 @@ public class CSharpGeneratorSettings new TransportProfile( TransportProfile.DefaultProfileName, TransportType.Http, - subscription: TransportType.WebSocket) + subscription: TransportType.WebSocket), }; } \ No newline at end of file diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/ClassBuilderExtensions.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/ClassBuilderExtensions.cs index 1921cd53e54..3aa45ed5121 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/ClassBuilderExtensions.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/ClassBuilderExtensions.cs @@ -312,7 +312,7 @@ ICode BuildPropertyInternal( .SetMethodName(TypeNames.SequenceEqual) .AddArgument(propertyName) .AddArgument($"{other}.{propertyName}"), - _ => throw new ArgumentOutOfRangeException() + _ => throw new ArgumentOutOfRangeException(), }; } } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/DescriptorExtensions.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/DescriptorExtensions.cs index c7c628d103f..3b27d6d4020 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/DescriptorExtensions.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/DescriptorExtensions.cs @@ -57,7 +57,7 @@ public static TypeReferenceBuilder ToTypeReference( INamedTypeDescriptor named => actualBuilder.SetName(named.RuntimeType.ToString()), - _ => throw new ArgumentOutOfRangeException(nameof(typeReferenceDescriptor)) + _ => throw new ArgumentOutOfRangeException(nameof(typeReferenceDescriptor)), }; } @@ -106,7 +106,7 @@ public static TypeReferenceBuilder ToStateTypeReference( INamedTypeDescriptor d => actualBuilder.SetName(d.RuntimeType.ToString()), - _ => throw new ArgumentOutOfRangeException(nameof(typeDescriptor)) + _ => throw new ArgumentOutOfRangeException(nameof(typeDescriptor)), }; } } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/HashCodeBuilderExtensions.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/HashCodeBuilderExtensions.cs index ee44134d6bf..8076ded6ba9 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/HashCodeBuilderExtensions.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Extensions/HashCodeBuilderExtensions.cs @@ -53,7 +53,7 @@ ICode BuildPropertyInternal( .New() .SetLoopHeader($"var {variableName}_elm in {variableName}") .AddCode(BuildPropertyInternal(d.InnerType, variableName + "_elm", true)), - _ => throw new ArgumentOutOfRangeException() + _ => throw new ArgumentOutOfRangeException(), }; if (isNullable && currentType is not NonNullTypeDescriptor) diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/DependencyInjectionGenerator.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/DependencyInjectionGenerator.cs index 9d42fa5a0df..b3e03e59723 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/DependencyInjectionGenerator.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/DependencyInjectionGenerator.cs @@ -42,7 +42,7 @@ public class DependencyInjectionGenerator : CodeGenerator _alternativeTypeNames = new() @@ -53,7 +53,7 @@ public class DependencyInjectionGenerator : CodeGenerator profile.Subscription, QueryOperationDescriptor => profile.Query, MutationOperationDescriptor => profile.Mutation, - _ => throw ThrowHelper.DependencyInjection_InvalidOperationKind(operation) + _ => throw ThrowHelper.DependencyInjection_InvalidOperationKind(operation), }; var connectionKind = operationKind switch @@ -542,7 +542,7 @@ private static ICode GenerateInternalMethodBody( TransportType.Http => IHttpConnection, TransportType.WebSocket => IWebSocketConnection, TransportType.InMemory => IInMemoryConnection, - var v => throw ThrowHelper.DependencyInjection_InvalidTransportType(v) + var v => throw ThrowHelper.DependencyInjection_InvalidTransportType(v), }; var operationName = operation.Name; @@ -788,7 +788,7 @@ private static ICode RegisterConnection(TransportType transportProfile, string c TransportType.WebSocket => RegisterWebSocketConnection(clientName), TransportType.Http => RegisterHttpConnection(clientName), TransportType.InMemory => RegisterInMemoryConnection(clientName), - var v => throw ThrowHelper.DependencyInjection_InvalidTransportType(v) + var v => throw ThrowHelper.DependencyInjection_InvalidTransportType(v), }; } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/InputValueFormatterGenerator.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/InputValueFormatterGenerator.cs index 74f2b3c54dd..6e590273d9a 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/InputValueFormatterGenerator.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/InputValueFormatterGenerator.cs @@ -247,7 +247,7 @@ ICode GenerateSerializerLocal( assignment == @return ? $"return {variable}_list;" : $"{assignment}.Add({variable}_list);")), - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; if (isNullable && currentType is not NonNullTypeDescriptor) diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs index 286295db9fe..78a0edf9080 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator.cs @@ -362,7 +362,7 @@ private static string BuildDeserializeMethodName( InterfaceTypeDescriptor { ImplementedBy.Count: > 1, - ParentRuntimeType: { } parentRuntimeType + ParentRuntimeType: { } parentRuntimeType, } => parentRuntimeType.Name, INamedTypeDescriptor { Kind: TypeKind.Entity } d => @@ -381,7 +381,7 @@ private static string BuildDeserializeMethodName( ? BuildDeserializeMethodName(nonNullTypeDescriptor.InnerType) + "NonNullable" : "NonNullable" + BuildDeserializeMethodName(nonNullTypeDescriptor.InnerType), - _ => throw new ArgumentOutOfRangeException(nameof(typeDescriptor)) + _ => throw new ArgumentOutOfRangeException(nameof(typeDescriptor)), }; } } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/OperationDocumentGenerator.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/OperationDocumentGenerator.cs index 452529bc285..940385cef01 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/OperationDocumentGenerator.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/OperationDocumentGenerator.cs @@ -28,7 +28,7 @@ protected override void Generate(OperationDescriptor descriptor, MutationOperationDescriptor => "Mutation", QueryOperationDescriptor => "Query", SubscriptionOperationDescriptor => "Subscription", - _ => throw new ArgumentOutOfRangeException(nameof(descriptor)) + _ => throw new ArgumentOutOfRangeException(nameof(descriptor)), }; var classBuilder = ClassBuilder diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_EntityHandler.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_EntityHandler.cs index 77eaa3a417d..cc959e2b573 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_EntityHandler.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_EntityHandler.cs @@ -114,14 +114,14 @@ private static ICode GenerateEntityHandlerIfClause( { _entityId, "Name", - nameof(string.Equals) + nameof(string.Equals), } : new[] { _entityId, "Value", "Name", - nameof(string.Equals) + nameof(string.Equals), }) .AddArgument(objectTypeDescriptor.Name.AsStringToken()) .AddArgument(TypeNames.OrdinalStringComparison)); diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_MapMethodMeta.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_MapMethodMeta.cs index 1008fed9ed1..7165cb9525c 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_MapMethodMeta.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_MapMethodMeta.cs @@ -77,7 +77,7 @@ private static string BuildMapMethodName( { ImplementedBy.Count: > 1, Kind: TypeKind.Entity, - ParentRuntimeType: { } parentRuntimeType + ParentRuntimeType: { } parentRuntimeType, } => parentRuntimeType.Name, INamedTypeDescriptor namedTypeDescriptor => @@ -87,7 +87,7 @@ private static string BuildMapMethodName( ? BuildMapMethodName(nonNullTypeDescriptor.InnerType) + "NonNullable" : "NonNullable" + BuildMapMethodName(nonNullTypeDescriptor.InnerType), - _ => throw new ArgumentOutOfRangeException(nameof(typeDescriptor)) + _ => throw new ArgumentOutOfRangeException(nameof(typeDescriptor)), }; } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/JsonUtils.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/JsonUtils.cs index f27d11dd3e3..8dd045d897e 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/JsonUtils.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/JsonUtils.cs @@ -27,7 +27,7 @@ public static string GetParseMethod(RuntimeTypeInfo serializationType) TypeNames.TimeSpan => nameof(JsonElement.GetString), TypeNames.Boolean => nameof(JsonElement.GetBoolean), TypeNames.Guid => nameof(JsonElement.GetGuid), - _ => throw new NotSupportedException("Serialization format not supported.") + _ => throw new NotSupportedException("Serialization format not supported."), }; } @@ -53,7 +53,7 @@ public static string GetWriteMethod(RuntimeTypeInfo serializationType) TypeNames.TimeSpan => nameof(Utf8JsonWriter.WriteString), TypeNames.Boolean => nameof(Utf8JsonWriter.WriteBoolean), TypeNames.Guid => nameof(Utf8JsonWriter.WriteString), - _ => throw new NotSupportedException("Serialization format not supported.") + _ => throw new NotSupportedException("Serialization format not supported."), }; } } \ No newline at end of file diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/SourceDocumentKind.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/SourceDocumentKind.cs index 744b4a983a8..093e178c9f5 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/SourceDocumentKind.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/SourceDocumentKind.cs @@ -4,5 +4,5 @@ public enum SourceDocumentKind { CSharp, Razor, - GraphQL + GraphQL, } \ No newline at end of file diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/AccessModifier.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/AccessModifier.cs index 42a318f8bf9..641b6373332 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/AccessModifier.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/AccessModifier.cs @@ -5,5 +5,5 @@ public enum AccessModifier Public = 0, Internal = 1, Protected = 2, - Private = 3 + Private = 3, } \ No newline at end of file diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentHelper.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentHelper.cs index 1094a60d393..489cbb11e03 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentHelper.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentHelper.cs @@ -25,7 +25,7 @@ public static class FragmentHelper directive.Arguments[0] is { Name: { Value: "fragment" }, - Value: StringValueNode { Value: { Length: > 0 } } sv + Value: StringValueNode { Value: { Length: > 0 } } sv, }) { return sv.Value; diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentKind.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentKind.cs index 3e0c1ccedb3..ce7c6f1feb4 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentKind.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentKind.cs @@ -4,5 +4,5 @@ public enum FragmentKind { Structure, Named, - Inline + Inline, } \ No newline at end of file diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/OutputModelKind.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/OutputModelKind.cs index c4c1d0589cd..ccad7c5ee5a 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/OutputModelKind.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/OutputModelKind.cs @@ -9,5 +9,5 @@ public enum OutputModelKind Interface = 1, Fragment = 2, FragmentInterface = Fragment | Interface, - FragmentObject = Fragment | Object + FragmentObject = Fragment | Object, } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/BuiltInScalarNames.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/BuiltInScalarNames.cs index d809b422920..7f582c8edb0 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/BuiltInScalarNames.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/BuiltInScalarNames.cs @@ -30,7 +30,7 @@ public static class BuiltInScalarNames ScalarNames.ByteArray, ScalarNames.Any, ScalarNames.JSON, - ScalarNames.TimeSpan + ScalarNames.TimeSpan, }; public static bool IsBuiltInScalar(string typeName) => _typeNames.Contains(typeName); diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Descriptors/TypeDescriptors/TypeKind.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Descriptors/TypeDescriptors/TypeKind.cs index 3cda40a2de7..d8a80608fd1 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Descriptors/TypeDescriptors/TypeKind.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Descriptors/TypeDescriptors/TypeKind.cs @@ -43,5 +43,5 @@ public enum TypeKind /// /// A preserved fragment. /// - Fragment + Fragment, } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Extensions/TypeDescriptorExtensions.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Extensions/TypeDescriptorExtensions.cs index 36dbc8b3bee..5ff45fe781e 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Extensions/TypeDescriptorExtensions.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Extensions/TypeDescriptorExtensions.cs @@ -28,7 +28,7 @@ public static bool ContainsEntity(this ITypeDescriptor typeDescriptor) .Any(prop => prop.Type.IsEntity() || prop.Type.ContainsEntity()), NonNullTypeDescriptor nonNullTypeDescriptor => nonNullTypeDescriptor.InnerType.ContainsEntity(), - _ => false + _ => false, }; } @@ -51,7 +51,7 @@ public static bool IsOrContainsEntity(this ITypeDescriptor typeDescriptor) NonNullTypeDescriptor d => d.InnerType.IsOrContainsEntity(), - _ => false + _ => false, }; } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Keywords.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Keywords.cs index a2c720340fa..f511ab20516 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Keywords.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Keywords.cs @@ -118,7 +118,7 @@ public static class Keywords "when", "where", "with", - "yield" + "yield", }; public static string ToSafeName(string name) diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Mappers/OperationDescriptorMapper.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Mappers/OperationDescriptorMapper.cs index 2ce4dc2ffbd..4e48875235e 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Mappers/OperationDescriptorMapper.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Mappers/OperationDescriptorMapper.cs @@ -108,6 +108,6 @@ private static ITypeDescriptor Rewrite( ListType lt => new ListTypeDescriptor( Rewrite(lt.InnerType(), namedTypeDescriptor)), INamedType => namedTypeDescriptor, - _ => throw new InvalidOperationException() + _ => throw new InvalidOperationException(), }; } diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/TypeInfos.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/TypeInfos.cs index fdca7487bed..ff0035ea5d4 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/TypeInfos.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/TypeInfos.cs @@ -102,7 +102,7 @@ public sealed class TypeInfos { DateTimeSerializer, new RuntimeTypeInfo(DateTimeSerializer) }, { DateSerializer, new RuntimeTypeInfo(DateSerializer) }, { ByteArraySerializer, new RuntimeTypeInfo(ByteArraySerializer) }, - { TimeSpanSerializer, new RuntimeTypeInfo(TimeSpanSerializer) } + { TimeSpanSerializer, new RuntimeTypeInfo(TimeSpanSerializer) }, }; public RuntimeTypeInfo GetOrAdd(string fullTypeName, bool valueType = false) => diff --git a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Utilities/DocumentHelper.cs b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Utilities/DocumentHelper.cs index 45f92d1bb20..517ecbabdbc 100644 --- a/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Utilities/DocumentHelper.cs +++ b/src/StrawberryShake/CodeGeneration/src/CodeGeneration/Utilities/DocumentHelper.cs @@ -66,7 +66,7 @@ public static void IndexSyntaxNodes( VisitArguments = true, VisitDescriptions = true, VisitDirectives = true, - VisitNames = true + VisitNames = true, }) .Visit(file.Document); } diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/CSharpCompiler.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/CSharpCompiler.cs index f84a0c682d0..aa1b7d0ad5b 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/CSharpCompiler.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/CSharpCompiler.cs @@ -34,7 +34,7 @@ internal static class CSharpCompiler { // warning CS1702: Assuming assembly reference is of different version "CS1702", - "CS1701" + "CS1701", }; public static IReadOnlyList GetDiagnosticErrors(params string[] sourceText) diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/DependencyInjectionGeneratorTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/DependencyInjectionGeneratorTests.cs index 29f6e3ce2e8..3ede05cbef4 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/DependencyInjectionGeneratorTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/DependencyInjectionGeneratorTests.cs @@ -57,8 +57,8 @@ public void Default_InMemory() => { new TransportProfile( TransportProfile.DefaultProfileName, - TransportType.InMemory) - } + TransportType.InMemory), + }, }, "query GetPerson { person { name } }", "subscription onPerson { onPerson { name } }", @@ -77,8 +77,8 @@ public void Default_MultiProfile() => Profiles = { TransportProfile.Default, - new TransportProfile("InMemory", TransportType.InMemory) - } + new TransportProfile("InMemory", TransportType.InMemory), + }, }, "query GetPerson { person { name } }", "subscription onPerson { onPerson { name } }", @@ -101,8 +101,8 @@ public void Default_DifferentTransportMethods() => TransportType.InMemory, query: TransportType.Http, mutation: TransportType.WebSocket, - subscription: TransportType.InMemory) - } + subscription: TransportType.InMemory), + }, }, "query GetPerson { person { name } }", "subscription onPerson { onPerson { name } }", diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/GeneratorTestHelper.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/GeneratorTestHelper.cs index 3093acca314..c4ef7705e9f 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/GeneratorTestHelper.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/GeneratorTestHelper.cs @@ -25,7 +25,7 @@ public static IReadOnlyList AssertError(params string[] fileNames) { Namespace = "Foo.Bar", ClientName = "FooClient", - AccessModifier = AccessModifier.Public + AccessModifier = AccessModifier.Public, }) .Result; @@ -94,7 +94,7 @@ public static void AssertResult( NoStore = settings.NoStore, InputRecords = settings.InputRecords, EntityRecords = settings.EntityRecords, - RazorComponents = settings.RazorComponents + RazorComponents = settings.RazorComponents, }); Assert.False( @@ -231,8 +231,8 @@ public static AssertSettings CreateIntegrationTest( NoStore = noStore, Profiles = (profiles ?? new[] { - TransportProfile.Default - }).ToList() + TransportProfile.Default, + }).ToList(), }; } diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/EntityIdOrDataTest.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/EntityIdOrDataTest.cs index c1978a7eab7..427469856ee 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/EntityIdOrDataTest.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/EntityIdOrDataTest.cs @@ -47,7 +47,7 @@ public class Query new Baz { Id = "BarId" }, new Baz2 { Id = "Bar2Id" }, new Quox { Foo = "QuoxFoo" }, - new Quox2 { Foo = "Quox2Foo" } + new Quox2 { Foo = "Quox2Foo" }, }; } diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/MultiProfileTest.Client.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/MultiProfileTest.Client.cs index ba19011ce7a..aacb0c45cb2 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/MultiProfileTest.Client.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/MultiProfileTest.Client.cs @@ -1120,7 +1120,7 @@ public enum Episode { NewHope, Empire, - Jedi + Jedi, } [global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "0.0.0.0")] @@ -1562,7 +1562,7 @@ public partial interface IMultiProfileClient public enum MultiProfileClientProfileKind { InMemory, - Default + Default, } } diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsIntrospectionTest.Client.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsIntrospectionTest.Client.cs index 50309450a48..49854a0b830 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsIntrospectionTest.Client.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsIntrospectionTest.Client.cs @@ -2758,7 +2758,7 @@ public enum __TypeKind /// /// Indicates this type is a non-null. `ofType` is a valid field. /// - NonNull + NonNull, } [global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "0.0.0.0")] diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsOnReviewSubCompletionTest.Client.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsOnReviewSubCompletionTest.Client.cs index c31904fad49..1a6f8632375 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsOnReviewSubCompletionTest.Client.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/StarWarsOnReviewSubCompletionTest.Client.cs @@ -433,7 +433,7 @@ public partial interface IStarWarsOnReviewSubCompletionClient public enum StarWarsOnReviewSubCompletionClientProfileKind { InMemory, - Default + Default, } } diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/TestGeneration.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/TestGeneration.cs index 2a3c927bb7b..f5824fe813d 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/TestGeneration.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/TestGeneration.cs @@ -53,7 +53,7 @@ public void MultiProfile() => CreateIntegrationTest(profiles: new[] { new TransportProfile("InMemory", TransportType.InMemory), - TransportProfile.Default + TransportProfile.Default, }), @"query GetHero { hero(episode: NEW_HOPE) { @@ -148,7 +148,7 @@ public void EntityIdOrData() => AssertResult( CreateIntegrationTest(profiles: new[] { - new TransportProfile("Default", TransportType.InMemory) + new TransportProfile("Default", TransportType.InMemory), }), skipWarnings: true, @" @@ -243,7 +243,7 @@ public void StarWarsOnReviewSubCompletion() => CreateIntegrationTest(profiles: new[] { new TransportProfile("InMemory", TransportType.InMemory), - TransportProfile.Default + TransportProfile.Default, }), @"subscription OnReviewSub { onReview(episode: NEW_HOPE) { @@ -270,7 +270,7 @@ public void StarWarsOnReviewSubGraphQLSSE() => AssertStarWarsResult( CreateIntegrationTest(profiles: new[] { - new TransportProfile("default", TransportType.Http) + new TransportProfile("default", TransportType.Http), }), @"subscription OnReviewSub { onReview(episode: NEW_HOPE) { @@ -350,7 +350,7 @@ public void UploadScalar() => AssertResult( CreateIntegrationTest(profiles: new[] { - new TransportProfile("Default", TransportType.Http) + new TransportProfile("Default", TransportType.Http), }), skipWarnings: true, UploadQueries, @@ -362,7 +362,7 @@ public void UploadScalar_InMemory() => AssertResult( CreateIntegrationTest(profiles: new[] { - new TransportProfile("Default", TransportType.InMemory) + new TransportProfile("Default", TransportType.InMemory), }), skipWarnings: true, UploadQueries, diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalarTest.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalarTest.cs index 016567e2652..28287637088 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalarTest.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalarTest.cs @@ -105,8 +105,8 @@ public async Task Execute_Input_Argument() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(data, "test-file") } - } + Baz = new BazInput() { File = new Upload(data, "test-file") }, + }, }, null, null, @@ -138,16 +138,16 @@ public async Task Execute_InputList_Argument() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataA, "A") } - } + Baz = new BazInput() { File = new Upload(dataA, "A") }, + }, }, new TestInput() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataB, "B") } - } - } + Baz = new BazInput() { File = new Upload(dataB, "B") }, + }, + }, }, null, cancellationToken: ct); @@ -182,16 +182,16 @@ public async Task Execute_InputNested_Argument() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataA, "A") } - } + Baz = new BazInput() { File = new Upload(dataA, "A") }, + }, }, new TestInput() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataB, "B") } - } - } + Baz = new BazInput() { File = new Upload(dataB, "B") }, + }, + }, }, }, cancellationToken: ct); diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalar_InMemoryTest.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalar_InMemoryTest.cs index d0c1f81b363..11cb3dd0dfc 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalar_InMemoryTest.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/Integration/UploadScalar_InMemoryTest.cs @@ -92,8 +92,8 @@ public async Task Execute_Input_Argument() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(data, "test-file") } - } + Baz = new BazInput() { File = new Upload(data, "test-file") }, + }, }, null, null); @@ -122,16 +122,16 @@ public async Task Execute_InputList_Argument() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataA, "A") } - } + Baz = new BazInput() { File = new Upload(dataA, "A") }, + }, }, new TestInput() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataB, "B") } - } - } + Baz = new BazInput() { File = new Upload(dataB, "B") }, + }, + }, }, null); @@ -163,17 +163,17 @@ public async Task Execute_InputNested_Argument() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataA, "A") } - } + Baz = new BazInput() { File = new Upload(dataA, "A") }, + }, }, new TestInput() { Bar = new BarInput() { - Baz = new BazInput() { File = new Upload(dataB, "B") } - } - } - } + Baz = new BazInput() { File = new Upload(dataB, "B") }, + }, + }, + }, }); // assert diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/PersistedQueryGeneratorTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/PersistedQueryGeneratorTests.cs index bf5e240da22..6a6a41cd469 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/PersistedQueryGeneratorTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/PersistedQueryGeneratorTests.cs @@ -11,7 +11,7 @@ public void Simple_Custom_Scalar() => AssertResult( new AssertSettings { - RequestStrategy = RequestStrategyGen.PersistedQuery + RequestStrategy = RequestStrategyGen.PersistedQuery, }, "query GetPerson { person { name email } }", "type Query { person: Person }", diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/StarWarsGeneratorTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/StarWarsGeneratorTests.cs index 195f0b4cc0c..570823e78cc 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/StarWarsGeneratorTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/StarWarsGeneratorTests.cs @@ -97,7 +97,7 @@ public void Generate_Client_With_Internal_Access_Modifier() AssertStarWarsResult( new AssertSettings { StrictValidation = true, - AccessModifier = AccessModifier.Internal + AccessModifier = AccessModifier.Internal, }, @"query GetHero { hero(episode: NEW_HOPE) { diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/CSharpCompiler.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/CSharpCompiler.cs index f84a0c682d0..aa1b7d0ad5b 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/CSharpCompiler.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/CSharpCompiler.cs @@ -34,7 +34,7 @@ internal static class CSharpCompiler { // warning CS1702: Assuming assembly reference is of different version "CS1702", - "CS1701" + "CS1701", }; public static IReadOnlyList GetDiagnosticErrors(params string[] sourceText) diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/GeneratorTestHelper.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/GeneratorTestHelper.cs index 5eefb154dca..0282f46b141 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/GeneratorTestHelper.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/GeneratorTestHelper.cs @@ -29,7 +29,7 @@ public static IReadOnlyList AssertError(params string[] fileNames) new CSharpGeneratorSettings { Namespace = "Foo.Bar", - ClientName = "FooClient" + ClientName = "FooClient", }) .Result; @@ -97,7 +97,7 @@ public static void AssertResult( NoStore = settings.NoStore, InputRecords = settings.InputRecords, EntityRecords = settings.EntityRecords, - RazorComponents = settings.RazorComponents + RazorComponents = settings.RazorComponents, }); Assert.False( @@ -233,8 +233,8 @@ public static AssertSettings CreateIntegrationTest( NoStore = noStore, Profiles = (profiles ?? new[] { - TransportProfile.Default - }).ToList() + TransportProfile.Default, + }).ToList(), }; } diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Analyzers/DocumentAnalyzerTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Analyzers/DocumentAnalyzerTests.cs index fa650d6ec07..2bbeb66a704 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Analyzers/DocumentAnalyzerTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Analyzers/DocumentAnalyzerTests.cs @@ -31,7 +31,7 @@ public async Task One_Document_One_Op_One_Field_No_Fragments() { new(schema.ToDocument()), new(Utf8GraphQLParser.Parse( - @"extend scalar String @runtimeType(name: ""Abc"")")) + @"extend scalar String @runtimeType(name: ""Abc"")")), }); var document = @@ -98,7 +98,7 @@ public async Task One_Fragment_One_Deferred_Fragment() new(Utf8GraphQLParser.Parse( @"extend scalar String @runtimeType(name: ""Abc"")")), new(Utf8GraphQLParser.Parse( - "extend schema @key(fields: \"id\")")) + "extend schema @key(fields: \"id\")")), }); var document = diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ClientDescriptorMapperTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ClientDescriptorMapperTests.cs index ceecf3f6891..1d6f1c082b5 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ClientDescriptorMapperTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ClientDescriptorMapperTests.cs @@ -44,7 +44,7 @@ subscription OnReview { RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map(clientModel, context); OperationDescriptorMapper.Map(clientModel, context); diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/DataTypeMapperTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/DataTypeMapperTests.cs index 5d9c2dae423..79bc2d21933 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/DataTypeMapperTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/DataTypeMapperTests.cs @@ -44,7 +44,7 @@ query GetHeroEdges { RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map( @@ -125,7 +125,7 @@ public void MapDataTypeDescriptors_DataUnionType() RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map( clientModel, @@ -219,7 +219,7 @@ public void MapDataTypeDescriptors_DataInterfaceType() RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map( clientModel, diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/EnumDescriptorMapperTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/EnumDescriptorMapperTests.cs index 9b779c1f256..9c20e4373cd 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/EnumDescriptorMapperTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/EnumDescriptorMapperTests.cs @@ -31,7 +31,7 @@ public async Task MapEnumTypeDescriptors() RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map(clientModel, context); diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/OperationDescriptorMapperTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/OperationDescriptorMapperTests.cs index 9c96e995adc..56d07a6f097 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/OperationDescriptorMapperTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/OperationDescriptorMapperTests.cs @@ -46,7 +46,7 @@ subscription OnReview { RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map(clientModel, context); OperationDescriptorMapper.Map(clientModel, context); diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ResultBuilderDescriptorMapperTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ResultBuilderDescriptorMapperTests.cs index 41ca6c1dd17..e5f23b57392 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ResultBuilderDescriptorMapperTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/ResultBuilderDescriptorMapperTests.cs @@ -46,7 +46,7 @@ subscription OnReview { RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map(clientModel, context); ResultBuilderDescriptorMapper.Map(clientModel, context); diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TestDataHelper.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TestDataHelper.cs index 4e8dd8008c8..13f41b27606 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TestDataHelper.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TestDataHelper.cs @@ -19,7 +19,7 @@ public static ClientModel CreateClientModelAsync( new GraphQLFile[] { new(Utf8GraphQLParser.Parse(Open(schemaResource))), - new(Utf8GraphQLParser.Parse("extend schema @key(fields: \"id\")")) + new(Utf8GraphQLParser.Parse("extend schema @key(fields: \"id\")")), }); var document = Utf8GraphQLParser.Parse(Open(queryResource)); @@ -45,7 +45,7 @@ public static async Task CreateClientModelAsync(string query) new GraphQLFile[] { new(schema.ToDocument()), - new(Utf8GraphQLParser.Parse("extend schema @key(fields: \"id\")")) + new(Utf8GraphQLParser.Parse("extend schema @key(fields: \"id\")")), }); var document = Utf8GraphQLParser.Parse(query); diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TypeDescriptorMapperTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TypeDescriptorMapperTests.cs index 3095a8fd366..2f49082ed98 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TypeDescriptorMapperTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Mappers/TypeDescriptorMapperTests.cs @@ -31,7 +31,7 @@ public async Task MapClientTypeDescriptors() RequestStrategyGen.Default, new[] { - TransportProfile.Default + TransportProfile.Default, }); TypeDescriptorMapper.Map(clientModel, context); diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/QueryDocumentRewriterTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/QueryDocumentRewriterTests.cs index da32becc0c2..cf711159b7d 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/QueryDocumentRewriterTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/QueryDocumentRewriterTests.cs @@ -27,7 +27,7 @@ public async Task GetReturnTypeName() new GraphQLFile[] { new(schema.ToDocument()), - new(Utf8GraphQLParser.Parse("extend schema @key(fields: \"id\")")) + new(Utf8GraphQLParser.Parse("extend schema @key(fields: \"id\")")), }); var document = diff --git a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/SchemaHelperTests.cs b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/SchemaHelperTests.cs index 9d96c526121..e847ea0bb2a 100644 --- a/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/SchemaHelperTests.cs +++ b/src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Utilities/SchemaHelperTests.cs @@ -21,7 +21,7 @@ public void LoadGitHubSchema() new GraphQLFile[] { new("GitHub.graphql", Utf8GraphQLParser.Parse(schemaSdl)), - new("GitHub.extensions.graphql", Utf8GraphQLParser.Parse(extensionsSdl)) + new("GitHub.extensions.graphql", Utf8GraphQLParser.Parse(extensionsSdl)), }); // assert diff --git a/src/StrawberryShake/Tooling/src/Configuration/GraphQLConfig.cs b/src/StrawberryShake/Tooling/src/Configuration/GraphQLConfig.cs index dc8885a8800..2ebb74fd934 100644 --- a/src/StrawberryShake/Tooling/src/Configuration/GraphQLConfig.cs +++ b/src/StrawberryShake/Tooling/src/Configuration/GraphQLConfig.cs @@ -25,7 +25,7 @@ public override string ToString() new StrawberryShakeSettingsTransportProfile { Default = TransportType.Http, - Subscription = TransportType.WebSocket + Subscription = TransportType.WebSocket, }); } @@ -56,7 +56,7 @@ public static GraphQLConfig FromJson(string json) new StrawberryShakeSettingsTransportProfile { Default = TransportType.Http, - Subscription = TransportType.WebSocket + Subscription = TransportType.WebSocket, }); } diff --git a/src/StrawberryShake/Tooling/src/Configuration/RequestStrategy.cs b/src/StrawberryShake/Tooling/src/Configuration/RequestStrategy.cs index 50d1d90f55e..2f447e0aa8e 100644 --- a/src/StrawberryShake/Tooling/src/Configuration/RequestStrategy.cs +++ b/src/StrawberryShake/Tooling/src/Configuration/RequestStrategy.cs @@ -4,5 +4,5 @@ public enum RequestStrategy { Default = 0, PersistedQuery = 1, - AutomaticPersistedQuery = 2 + AutomaticPersistedQuery = 2, } diff --git a/src/StrawberryShake/Tooling/src/Configuration/StrawberryShakeSettings.cs b/src/StrawberryShake/Tooling/src/Configuration/StrawberryShakeSettings.cs index cfca6673ade..8a3b550f464 100644 --- a/src/StrawberryShake/Tooling/src/Configuration/StrawberryShakeSettings.cs +++ b/src/StrawberryShake/Tooling/src/Configuration/StrawberryShakeSettings.cs @@ -74,7 +74,7 @@ public class StrawberryShakeSettings new() { Inputs = false, - Entities = false + Entities = false, }; /// diff --git a/src/StrawberryShake/Tooling/src/Configuration/TransportType.cs b/src/StrawberryShake/Tooling/src/Configuration/TransportType.cs index ec7064a82e7..a16bd7e42a2 100644 --- a/src/StrawberryShake/Tooling/src/Configuration/TransportType.cs +++ b/src/StrawberryShake/Tooling/src/Configuration/TransportType.cs @@ -6,5 +6,5 @@ public enum TransportType WebSocket = 1, InMemory = 2, SignalR = 3, - Grpc = 4 + Grpc = 4, } \ No newline at end of file diff --git a/src/StrawberryShake/Tooling/src/dotnet-graphql/GeneratorHelpers.cs b/src/StrawberryShake/Tooling/src/dotnet-graphql/GeneratorHelpers.cs index d066d0f8e2e..64bd438d932 100644 --- a/src/StrawberryShake/Tooling/src/dotnet-graphql/GeneratorHelpers.cs +++ b/src/StrawberryShake/Tooling/src/dotnet-graphql/GeneratorHelpers.cs @@ -87,7 +87,7 @@ private static AccessModifier GetAccessModifier(string? accessModifier) { "public" => AccessModifier.Public, "internal" => AccessModifier.Internal, - _ => throw new NotSupportedException($"The access modifier `{accessModifier}` is not supported.") + _ => throw new NotSupportedException($"The access modifier `{accessModifier}` is not supported."), }; } @@ -98,7 +98,7 @@ private static IDocumentHashProvider GetHashProvider(string hashAlgorithm) "sha1" => new Sha1DocumentHashProvider(HashFormat.Hex), "sha256" => new Sha256DocumentHashProvider(HashFormat.Hex), _ => throw new NotSupportedException( - $"The hash algorithm `{hashAlgorithm}` is not supported.") + $"The hash algorithm `{hashAlgorithm}` is not supported."), }; private static List MapTransportProfiles( diff --git a/src/StrawberryShake/Tooling/src/dotnet-graphql/InitCommandHandler.cs b/src/StrawberryShake/Tooling/src/dotnet-graphql/InitCommandHandler.cs index 58f300916da..d26b75798da 100644 --- a/src/StrawberryShake/Tooling/src/dotnet-graphql/InitCommandHandler.cs +++ b/src/StrawberryShake/Tooling/src/dotnet-graphql/InitCommandHandler.cs @@ -135,9 +135,9 @@ private async Task WriteConfigurationAsync( { Name = context.ClientName, Namespace = context.CustomNamespace, - Url = context.Uri - } - } + Url = context.Uri, + }, + }, }; await FileSystem.WriteTextAsync(configFilePath, configuration.ToString()).ConfigureAwait(false); diff --git a/src/StrawberryShake/Tooling/src/dotnet-graphql/JsonConsoleOutputCommand.cs b/src/StrawberryShake/Tooling/src/dotnet-graphql/JsonConsoleOutputCommand.cs index edc0464885c..063c3a1a20a 100644 --- a/src/StrawberryShake/Tooling/src/dotnet-graphql/JsonConsoleOutputCommand.cs +++ b/src/StrawberryShake/Tooling/src/dotnet-graphql/JsonConsoleOutputCommand.cs @@ -22,7 +22,7 @@ public void Dispose() #else IgnoreNullValues = true, #endif - IgnoreReadOnlyProperties = false + IgnoreReadOnlyProperties = false, }); Console.WriteLine(json); } diff --git a/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/TokenClient.cs b/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/TokenClient.cs index f67463c0f79..e3e79c5ded8 100644 --- a/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/TokenClient.cs +++ b/src/StrawberryShake/Tooling/src/dotnet-graphql/OAuth/TokenClient.cs @@ -22,7 +22,7 @@ public static async Task GetTokenAsync( Address = tokenEndpoint, ClientId = clientId, ClientSecret = clientSecret, - Scope = string.Join(" ", scopes) + Scope = string.Join(" ", scopes), }, cancellationToken).ConfigureAwait(false); return tokenRes.AccessToken; From 62a13cf23eedf6dae967798fd1a7076ee048986e Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Tue, 19 Dec 2023 12:09:31 +0200 Subject: [PATCH 56/89] Refactor scope guards to use throw helpers --- .../Configuration/Attributes/MapAttribute.cs | 3 +- .../SchemaPrinter/FederationSchemaPrinter.cs | 5 +- .../Descriptors/EntityResolverDescriptor.cs | 20 ++---- .../ReferenceResolverDefinition.cs | 3 +- ...escriptorExtensions.ApolloAuthenticated.cs | 25 ++----- ...rationDescriptorExtensions.Inaccessible.cs | 5 +- ...tionDescriptorExtensions.RequiresScopes.cs | 25 ++----- .../ApolloFederationDescriptorExtensions.cs | 66 ++++++------------- ...erationRequestExecutorBuilderExtensions.cs | 5 +- ...ApolloFederationSchemaBuilderExtensions.cs | 20 ++---- .../src/ApolloFederation/Representation.cs | 3 +- 11 files changed, 48 insertions(+), 132 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs index 513555db5da..4948954c1b8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs @@ -14,7 +14,8 @@ public class MapAttribute : Attribute /// public MapAttribute(string path) { - Path = path ?? throw new ArgumentNullException(nameof(path)); + ArgumentNullException.ThrowIfNull(path); + Path = path; } /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs index eebd62bcda0..49af5a02c4a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs @@ -42,10 +42,7 @@ public static partial class FederationSchemaPrinter /// public static string Print(ISchema schema) { - if (schema is null) - { - throw new ArgumentNullException(nameof(schema)); - } + ArgumentNullException.ThrowIfNull(schema); return SerializeSchema(schema).ToString(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs index 4d92f047fd0..3e78345905f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs @@ -77,10 +77,7 @@ public IObjectTypeDescriptor ResolveReferenceWith( public IObjectTypeDescriptor ResolveReferenceWith( Expression> method) { - if (method is null) - { - throw new ArgumentNullException(nameof(method)); - } + ArgumentNullException.ThrowIfNull(method); var member = method.TryExtractMember(true); @@ -97,10 +94,7 @@ public IObjectTypeDescriptor ResolveReferenceWith( /// public IObjectTypeDescriptor ResolveReferenceWith(MethodInfo method) { - if (method is null) - { - throw new ArgumentNullException(nameof(method)); - } + ArgumentNullException.ThrowIfNull(method); var argumentBuilder = new ReferenceResolverArgumentExpressionBuilder(); @@ -129,15 +123,9 @@ private IObjectTypeDescriptor ResolveReference( FieldResolverDelegate fieldResolver, IReadOnlyList required) { - if (fieldResolver is null) - { - throw new ArgumentNullException(nameof(fieldResolver)); - } + ArgumentNullException.ThrowIfNull(fieldResolver); - if (required is null) - { - throw new ArgumentNullException(nameof(required)); - } + ArgumentNullException.ThrowIfNull(required); Definition.ResolverDefinition = new(fieldResolver, required); return _typeDescriptor; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/ReferenceResolverDefinition.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/ReferenceResolverDefinition.cs index 00950a880df..3eec6faf2c5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/ReferenceResolverDefinition.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/ReferenceResolverDefinition.cs @@ -24,7 +24,8 @@ public ReferenceResolverDefinition( FieldResolverDelegate resolver, IReadOnlyList? required = default) { - Resolver = resolver ?? throw new ArgumentNullException(nameof(resolver)); + ArgumentNullException.ThrowIfNull(resolver); + Resolver = resolver; Required = required ?? Array.Empty(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs index b15d172712f..9199d06dd90 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs @@ -27,50 +27,35 @@ public static partial class ApolloFederationDescriptorExtensions /// public static IEnumTypeDescriptor ApolloAuthenticated(this IEnumTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); } /// public static IInterfaceFieldDescriptor ApolloAuthenticated(this IInterfaceFieldDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); } /// public static IInterfaceTypeDescriptor ApolloAuthenticated(this IInterfaceTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); } /// public static IObjectFieldDescriptor ApolloAuthenticated(this IObjectFieldDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); } /// public static IObjectTypeDescriptor ApolloAuthenticated(this IObjectTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs index 2eb12af4a54..6874dad8485 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs @@ -103,9 +103,6 @@ public static IUnionTypeDescriptor Inaccessible( private static void ValidateDescriptor(IDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs index a371286d07d..ce589a2f249 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs @@ -31,10 +31,7 @@ public static IEnumTypeDescriptor RequiresScopes( this IEnumTypeDescriptor descriptor, List> scopes) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(new RequiresScopes(scopes)); } @@ -43,10 +40,7 @@ public static IInterfaceFieldDescriptor RequiresScopes( this IInterfaceFieldDescriptor descriptor, List> scopes) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(new RequiresScopes(scopes)); } @@ -55,10 +49,7 @@ public static IInterfaceTypeDescriptor RequiresScopes( this IInterfaceTypeDescriptor descriptor, List> scopes) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(new RequiresScopes(scopes)); } @@ -67,10 +58,7 @@ public static IObjectFieldDescriptor RequiresScopes( this IObjectFieldDescriptor descriptor, List> scopes) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(new RequiresScopes(scopes)); } @@ -79,10 +67,7 @@ public static IObjectTypeDescriptor RequiresScopes( this IObjectTypeDescriptor descriptor, List> scopes) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(new RequiresScopes(scopes)); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 8be271df1ad..2f3d369d685 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -58,8 +58,8 @@ public static ISchemaTypeDescriptor Contact( string name, string? url = null, string? description = null) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); - ArgumentException.ThrowIfNullOrEmpty(nameof(name)); + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(name); return descriptor.Directive(new ContactDirective(name, url, description)); } @@ -95,8 +95,8 @@ public static ISchemaTypeDescriptor Contact( /// public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor descriptor, string name) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); - ArgumentException.ThrowIfNullOrEmpty(nameof(name)); + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(name); return descriptor.Directive( WellKnownTypeNames.ComposeDirective, @@ -131,7 +131,7 @@ public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor public static IObjectTypeDescriptor ExtendServiceType( this IObjectTypeDescriptor descriptor) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentNullException.ThrowIfNull(descriptor); descriptor .Extend() @@ -170,7 +170,7 @@ public static IObjectTypeDescriptor ExtendServiceType( public static IObjectFieldDescriptor External( this IObjectFieldDescriptor descriptor) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.External); } @@ -197,7 +197,7 @@ public static IObjectFieldDescriptor External( /// public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.InterfaceObject); } @@ -245,7 +245,7 @@ public static IEntityResolverDescriptor Key( string fieldSet, bool? resolvable = null) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentNullException.ThrowIfNull(descriptor); if (string.IsNullOrEmpty(fieldSet)) { @@ -267,7 +267,7 @@ public static IInterfaceTypeDescriptor Key( string fieldSet, bool? resolvable = null) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); + ArgumentNullException.ThrowIfNull(descriptor); if (string.IsNullOrEmpty(fieldSet)) { @@ -355,8 +355,8 @@ public static ISchemaTypeDescriptor Link( string url, IEnumerable? import) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); - ArgumentException.ThrowIfNullOrEmpty(nameof(url)); + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(url); return descriptor.Directive(new LinkDirective(url, import?.ToList())); } @@ -392,8 +392,8 @@ public static IObjectFieldDescriptor Override( this IObjectFieldDescriptor descriptor, string from) { - ArgumentNullException.ThrowIfNull(nameof(descriptor)); - ArgumentException.ThrowIfNullOrEmpty(nameof(from)); + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(from); return descriptor.Directive( WellKnownTypeNames.Override, @@ -445,10 +445,7 @@ public static IObjectFieldDescriptor Provides( this IObjectFieldDescriptor descriptor, string fieldSet) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); if (string.IsNullOrEmpty(fieldSet)) { @@ -502,10 +499,7 @@ public static IObjectFieldDescriptor Requires( this IObjectFieldDescriptor descriptor, string fieldSet) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); if (string.IsNullOrEmpty(fieldSet)) { @@ -550,10 +544,7 @@ public static IObjectFieldDescriptor Requires( /// public static IObjectFieldDescriptor Shareable(this IObjectFieldDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.Shareable); } @@ -587,10 +578,7 @@ public static IObjectFieldDescriptor Shareable(this IObjectFieldDescriptor descr /// public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.Shareable); } @@ -625,10 +613,7 @@ public static IEntityResolverDescriptor Key( this IObjectTypeDescriptor descriptor, string fieldSet) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); if (string.IsNullOrEmpty(fieldSet)) { @@ -672,10 +657,7 @@ public static IEntityResolverDescriptor Key( public static IObjectTypeDescriptor ExtendServiceType( this IObjectTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); descriptor .Extend() @@ -706,10 +688,7 @@ public static IObjectTypeDescriptor ExtendServiceType( /// public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.InterfaceObject); } @@ -743,10 +722,7 @@ public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescri /// public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) { - if (descriptor is null) - { - throw new ArgumentNullException(nameof(descriptor)); - } + ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(WellKnownTypeNames.Shareable); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs index 989907a3587..4578c81bee6 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs @@ -22,10 +22,7 @@ public static class ApolloFederationRequestExecutorBuilderExtensions public static IRequestExecutorBuilder AddApolloFederation( this IRequestExecutorBuilder builder) { - if (builder is null) - { - throw new ArgumentNullException(nameof(builder)); - } + ArgumentNullException.ThrowIfNull(builder); return builder.ConfigureSchema(s => s.AddApolloFederation()); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index e5d80c18e7f..2e41e62b280 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -30,10 +30,7 @@ public static ISchemaBuilder AddApolloFederation( FederationVersion version = FederationVersion.Latest, Action? schemaConfiguration = null) { - if (builder is null) - { - throw new ArgumentNullException(nameof(builder)); - } + ArgumentNullException.ThrowIfNull(builder); // TODO : we will move this to the type interceptor. builder.SetSchema(s => @@ -65,15 +62,9 @@ public static ISchemaBuilder AddApolloFederation( /// public static ISchemaBuilder AddApolloFederation(this ISchemaBuilder builder, FederatedSchema schema) { - if (builder is null) - { - throw new ArgumentNullException(nameof(builder)); - } + ArgumentNullException.ThrowIfNull(builder); - if (schema is null) - { - throw new ArgumentNullException(nameof(schema)); - } + ArgumentNullException.ThrowIfNull(schema); builder.SetSchema(schema); return AddApolloFederationDefinitions(builder, schema.FederationVersion); @@ -96,10 +87,7 @@ private static ISchemaBuilder AddApolloFederationDefinitions( this ISchemaBuilder builder, FederationVersion version = FederationVersion.Latest) { - if (builder is null) - { - throw new ArgumentNullException(nameof(builder)); - } + ArgumentNullException.ThrowIfNull(builder); // Disable hot chocolate tag directive // specify default Query type name if not specified diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Representation.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Representation.cs index ab9c5728146..fe8ae7cef56 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Representation.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Representation.cs @@ -20,8 +20,9 @@ public sealed class Representation /// public Representation(string typeName, ObjectValueNode data) { + ArgumentNullException.ThrowIfNull(data); TypeName = typeName.EnsureGraphQLName(); - Data = data ?? throw new ArgumentNullException(nameof(data)); + Data = data; } /// From fffee44422573c0f3f8899411f5a51d529e9f5c2 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Tue, 19 Dec 2023 12:18:13 +0200 Subject: [PATCH 57/89] Replace not null or empty scope guards with custom message to regular ones --- .../ApolloFederationDescriptorExtensions.cs | 40 +++---------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 2f3d369d685..d3a5fb0db1d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -246,13 +246,7 @@ public static IEntityResolverDescriptor Key( bool? resolvable = null) { ArgumentNullException.ThrowIfNull(descriptor); - - if (string.IsNullOrEmpty(fieldSet)) - { - throw new ArgumentException( - FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty, - nameof(fieldSet)); - } + ArgumentException.ThrowIfNullOrEmpty(fieldSet); var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); @@ -268,13 +262,7 @@ public static IInterfaceTypeDescriptor Key( bool? resolvable = null) { ArgumentNullException.ThrowIfNull(descriptor); - - if (string.IsNullOrEmpty(fieldSet)) - { - throw new ArgumentException( - FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty, - nameof(fieldSet)); - } + ArgumentException.ThrowIfNullOrEmpty(fieldSet); var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); @@ -446,13 +434,7 @@ public static IObjectFieldDescriptor Provides( string fieldSet) { ArgumentNullException.ThrowIfNull(descriptor); - - if (string.IsNullOrEmpty(fieldSet)) - { - throw new ArgumentException( - FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty, - nameof(fieldSet)); - } + ArgumentException.ThrowIfNullOrEmpty(fieldSet); return descriptor.Directive( WellKnownTypeNames.Provides, @@ -500,13 +482,7 @@ public static IObjectFieldDescriptor Requires( string fieldSet) { ArgumentNullException.ThrowIfNull(descriptor); - - if (string.IsNullOrEmpty(fieldSet)) - { - throw new ArgumentException( - FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty, - nameof(fieldSet)); - } + ArgumentException.ThrowIfNullOrEmpty(fieldSet); return descriptor.Directive( WellKnownTypeNames.Requires, @@ -614,13 +590,7 @@ public static IEntityResolverDescriptor Key( string fieldSet) { ArgumentNullException.ThrowIfNull(descriptor); - - if (string.IsNullOrEmpty(fieldSet)) - { - throw new ArgumentException( - FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty, - nameof(fieldSet)); - } + ArgumentException.ThrowIfNullOrEmpty(fieldSet); descriptor.Directive( WellKnownTypeNames.Key, From 60d917623dec7a01f4c03511fb8a7eee03b966b2 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Tue, 19 Dec 2023 12:19:24 +0200 Subject: [PATCH 58/89] Apply braces code style in solution (move to another branch?) --- .../Helpers/MockFunctionContext.cs | 2 ++ .../Helpers/MockHttpRequestData.cs | 2 ++ .../HotChocolate.OpenApi/OpenApiWrapperPipelineBuilder.cs | 6 +++++- .../Pipeline/CreateInputTypesMiddleware.cs | 6 +++++- .../Pipeline/CreateMutationTypeMiddleware.cs | 5 ++++- .../Pipeline/DiscoverOperationsMiddleware.cs | 6 +++++- .../Controller/PetStoreController.cs | 6 +++++- .../Client/src/Core/Serialization/Iso8601Duration.cs | 4 ++++ 8 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockFunctionContext.cs b/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockFunctionContext.cs index 1be21962d01..882b9ada25c 100644 --- a/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockFunctionContext.cs +++ b/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockFunctionContext.cs @@ -87,7 +87,9 @@ public class MockInvocationFeatures : Dictionary, IInvocationFeatu public void Set(T instance) { if (instance == null) + { return; + } TryAdd(typeof(T), instance); } diff --git a/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockHttpRequestData.cs b/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockHttpRequestData.cs index 06d072db584..47d104c27fc 100644 --- a/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockHttpRequestData.cs +++ b/src/HotChocolate/AzureFunctions/test/HotChocolate.AzureFunctions.IsolatedProcess.Tests/Helpers/MockHttpRequestData.cs @@ -30,7 +30,9 @@ public MockHttpRequestData( Url = requestUri ?? throw new ArgumentNullException(nameof(requestUri)); if(claimsIdentities != null) + { Identities = claimsIdentities; + } if (!string.IsNullOrEmpty(requestBody)) { diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/OpenApiWrapperPipelineBuilder.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/OpenApiWrapperPipelineBuilder.cs index 59a8e10773b..367839c6a2b 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/OpenApiWrapperPipelineBuilder.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/OpenApiWrapperPipelineBuilder.cs @@ -11,7 +11,11 @@ private OpenApiWrapperPipelineBuilder() public OpenApiWrapperDelegate Build() { OpenApiWrapperDelegate next = _ => { }; - for (var i = _pipeline.Count - 1; i >= 0; i--) next = _pipeline[i].Invoke(next); + for (var i = _pipeline.Count - 1; i >= 0; i--) + { + next = _pipeline[i].Invoke(next); + } + return next; } diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateInputTypesMiddleware.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateInputTypesMiddleware.cs index 11d1ae71d95..3c64bc0e5d1 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateInputTypesMiddleware.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateInputTypesMiddleware.cs @@ -79,7 +79,11 @@ private static void AddInputType(OpenApiWrapperContext context, Operation operat private static void AddIfNecessary(OpenApiWrapperContext context, InputObjectType inputObjectType) { - if (context.MutableSchema.Types.ContainsName(inputObjectType.Name)) return; + if (context.MutableSchema.Types.ContainsName(inputObjectType.Name)) + { + return; + } + context.MutableSchema.Types.Add(inputObjectType); } diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs index e34e3d3f33f..a9eab8b1b93 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/CreateMutationTypeMiddleware.cs @@ -23,7 +23,10 @@ private static void CreateMutationType(OpenApiWrapperContext context) { var operations = context.GetMutationOperations(); - if (operations.Count == 0) return; + if (operations.Count == 0) + { + return; + } var mutationType = new ObjectType(OpenApiResources.RootTypeMutation); diff --git a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs index 2b9d6fbee09..283a278db7f 100644 --- a/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs +++ b/src/HotChocolate/OpenApi/src/HotChocolate.OpenApi/Pipeline/DiscoverOperationsMiddleware.cs @@ -41,7 +41,11 @@ public void Invoke(OpenApiWrapperContext context, OpenApiWrapperDelegate next) resultOperation.AddParameter(openApiParameter); } - if (context.Operations.ContainsKey(resultOperation.OperationId)) continue; + if (context.Operations.ContainsKey(resultOperation.OperationId)) + { + continue; + } + context.Operations.Add(resultOperation.OperationId, resultOperation); } } diff --git a/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/PetStoreController.cs b/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/PetStoreController.cs index 662a7472bc8..299aeb423f7 100644 --- a/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/PetStoreController.cs +++ b/src/HotChocolate/OpenApi/tests/HotChocolate.OpenApi.Tests/Controller/PetStoreController.cs @@ -32,7 +32,11 @@ public IActionResult DeletePet([FromRoute] [Required] long? id) { var toDelete = _pets.FirstOrDefault(p => p.Id == id); - if (toDelete is null) return BadRequest("Pet not found"); + if (toDelete is null) + { + return BadRequest("Pet not found"); + } + _pets.Remove(toDelete); return Ok(); diff --git a/src/StrawberryShake/Client/src/Core/Serialization/Iso8601Duration.cs b/src/StrawberryShake/Client/src/Core/Serialization/Iso8601Duration.cs index 2e0b4c98346..899fc02bd80 100644 --- a/src/StrawberryShake/Client/src/Core/Serialization/Iso8601Duration.cs +++ b/src/StrawberryShake/Client/src/Core/Serialization/Iso8601Duration.cs @@ -305,10 +305,14 @@ internal static bool TryParse(string s, out TimeSpan? result) // Normalize to nanosecond intervals for (; numDigits > 9; numDigits--) + { value /= 10; + } for (; numDigits < 9; numDigits++) + { value *= 10; + } nanoseconds |= (uint)value; From b565181dd2e0354b31746b939e78f6165d075808 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Tue, 19 Dec 2023 17:42:03 +0200 Subject: [PATCH 59/89] Prototyping policy? --- .../Attributes/PolicyAttribute.cs | 103 +++++++++ .../Directives/PolicyDirectiveType.cs | 8 +- ...{PolicyType.cs => PolicyCollectionType.cs} | 109 ++++++--- .../Constants/WellKnownTypeNames.cs | 2 +- ...loFederationDescriptorExtensions.Policy.cs | 72 ++++++ ...ApolloFederationSchemaBuilderExtensions.cs | 17 +- .../FederationVersioning/FederationUtils.cs | 4 + .../FederationVersioning/FederationVersion.cs | 1 + .../FederationTypeInterceptor.cs | 3 +- .../Directives/PolicyDirectiveTests.cs | 213 ++++++++++++++++++ 10 files changed, 487 insertions(+), 45 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/{PolicyType.cs => PolicyCollectionType.cs} (61%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs create mode 100644 src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs new file mode 100644 index 00000000000..830733483a2 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs @@ -0,0 +1,103 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +[AttributeUsage( + AttributeTargets.Class + | AttributeTargets.Interface + | AttributeTargets.Property + | AttributeTargets.Method + | AttributeTargets.Enum + | AttributeTargets.Field + | AttributeTargets.Struct, + Inherited = true, + // TODO: Should we just allow multiple attributes instead maybe? + AllowMultiple = false)] +public sealed class PolicyAttribute : DescriptorAttribute +{ + public PolicyAttribute(PolicyCollection policyCollection) + { + PolicyCollection = policyCollection; + } + + public PolicyAttribute(params string[] policySets) + { + PolicyCollection = ConvertCommaSeparatedPolicyNamesListsToCollection(policySets); + } + + /// + /// + public PolicyCollection PolicyCollection { get; set; } + + /// + /// Comma-separated lists of policy names for each set. + /// + public string[] PolicySets + { + set => PolicyCollection = ConvertCommaSeparatedPolicyNamesListsToCollection(value); + } + + private static PolicyCollection ConvertCommaSeparatedPolicyNamesListsToCollection(string[] names) + { + var policySets = new PolicySet[names.Length]; + var policySetCount = policySets.Length; + for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + { + var commaSeparatedPolicyNames = names[policySetIndex]; + var policyNames = commaSeparatedPolicyNames.Split(','); + var policyCount = policyNames.Length; + var policies = new Policy[policyCount]; + for (var policyIndex = 0; policyIndex < policyCount; policyIndex++) + { + var name = policyNames[policyIndex].Trim(); + policies[policyIndex] = new Policy + { + Name = name, + }; + } + } + + return new() + { + PolicySets = policySets, + }; + } + + protected internal override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + var policyCollection = PolicyCollection; + + switch (descriptor) + { + case IObjectFieldDescriptor fieldDescriptor: + { + fieldDescriptor.Policy(policyCollection); + break; + } + case IEnumTypeDescriptor enumTypeDescriptor: + { + enumTypeDescriptor.Policy(policyCollection); + break; + } + case IInterfaceTypeDescriptor interfaceTypeDescriptor: + { + interfaceTypeDescriptor.Policy(policyCollection); + break; + } + case IObjectTypeDescriptor objectTypeDescriptor: + { + objectTypeDescriptor.Policy(policyCollection); + break; + } + case IInterfaceFieldDescriptor interfaceFieldDescriptor: + { + interfaceFieldDescriptor.Policy(policyCollection); + break; + } + } + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs index fd641e11c79..f46639ca451 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs @@ -19,7 +19,8 @@ namespace HotChocolate.ApolloFederation; public sealed class PolicyDirectiveType : DirectiveType { protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor + { + descriptor .Name(WellKnownTypeNames.PolicyDirective) .Description(FederationResources.PolicyDirective_Description) .Location( @@ -28,4 +29,9 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) DirectiveLocation.Interface | DirectiveLocation.Scalar | DirectiveLocation.Enum); + + descriptor + .Argument("policies") + .Type>>>(); + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs similarity index 61% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs index 61f3da85601..19eff1c025b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; using HotChocolate.Language; namespace HotChocolate.ApolloFederation; @@ -9,9 +7,10 @@ namespace HotChocolate.ApolloFederation; /// A union called _Entity which is a union of all types that use the @key directive, /// including both types native to the schema and extended types. /// -public sealed class PolicyType : ScalarType +public sealed class PolicyCollectionType : ScalarType { - public PolicyType(string name, BindingBehavior bind = BindingBehavior.Explicit) : base(name, bind) + public PolicyCollectionType(BindingBehavior bind = BindingBehavior.Explicit) + : base(WellKnownTypeNames.PolicyDirective, bind) { } @@ -30,11 +29,45 @@ public override IValueNode ParseResult(object? resultValue) protected override PolicyCollection ParseLiteral(ListValueNode valueSyntax) { - var policySetNodes = valueSyntax.Items; - int policySetCount = policySetNodes.Count; + var result = PolicyParsingHelper.ParseNode(valueSyntax); + return result; + } + + protected override ListValueNode ParseValue(PolicyCollection runtimeValue) + { + var policySets = runtimeValue.PolicySets; + var policySetCount = policySets.Length; + + var policySetNodes = new IValueNode[policySetCount]; + for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + { + var policySet = policySets[policySetIndex]; + var policies = policySet.Policies; + var policyCount = policies.Length; + + var policyNameNodes = new IValueNode[policyCount]; + for (var policyIndex = 0; policyIndex < policyCount; policyIndex++) + { + var policyName = policies[policyIndex].Name; + policyNameNodes[policyIndex] = new StringValueNode(policyName); + } + policySetNodes[policySetIndex] = new ListValueNode(policyNameNodes); + } + var result = new ListValueNode(policySetNodes); + + return result; + } +} + +public static class PolicyParsingHelper +{ + public static PolicyCollection ParseNode(ListValueNode node) + { + var policySetNodes = node.Items; + var policySetCount = policySetNodes.Count; var policySets = new PolicySet[policySetCount]; - for (int policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) { var item = policySetNodes[policySetIndex]; if (item is not ListValueNode policySetNode) @@ -43,9 +76,9 @@ protected override PolicyCollection ParseLiteral(ListValueNode valueSyntax) } var policyNameNodes = policySetNode.Items; - int policyNameCount = policyNameNodes.Count; + var policyNameCount = policyNameNodes.Count; var policies = new Policy[policyNameCount]; - for (int policyNameIndex = 0; policyNameIndex < policyNameCount; policyNameIndex++) + for (var policyNameIndex = 0; policyNameIndex < policyNameCount; policyNameIndex++) { var policyNameNode = policyNameNodes[policyNameIndex]; if (policyNameNode is not StringValueNode stringPolicyNameNode) @@ -60,7 +93,7 @@ protected override PolicyCollection ParseLiteral(ListValueNode valueSyntax) policySets[policySetIndex] = new PolicySet { - PolicyNames = policies, + Policies = policies, }; } var result = new PolicyCollection @@ -71,30 +104,6 @@ protected override PolicyCollection ParseLiteral(ListValueNode valueSyntax) return result; } - protected override ListValueNode ParseValue(PolicyCollection runtimeValue) - { - var policySets = runtimeValue.PolicySets; - var policySetCount = policySets.Length; - - var policySetNodes = new IValueNode[policySetCount]; - for (int policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) - { - var policySet = policySets[policySetIndex]; - var policies = policySet.PolicyNames; - var policyCount = policies.Length; - - var policyNameNodes = new IValueNode[policyCount]; - for (int policyIndex = 0; policyIndex < policyCount; policyIndex++) - { - var policyName = policies[policyIndex].Name; - policyNameNodes[policyIndex] = new StringValueNode(policyName); - } - policySetNodes[policySetIndex] = new ListValueNode(policyNameNodes); - } - var result = new ListValueNode(policySetNodes); - - return result; - } } public struct Policy @@ -108,9 +117,9 @@ public struct Policy public struct PolicySet { /// - /// Includes names of policies included in this set. + /// Includes policies included in this set. /// - public required Policy[] PolicyNames { get; init; } + public required Policy[] Policies { get; init; } } public sealed class PolicyCollection @@ -119,4 +128,32 @@ public sealed class PolicyCollection /// Either of the policy sets listed here must be satisfied. /// public required PolicySet[] PolicySets { get; init; } + + public static PolicyCollection FromNameSets(string[][] names) + { + var policySets = new PolicySet[names.Length]; + int policySetCount = names.Length; + for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + { + var policyNames = names[policySetIndex]; + var policyCount = policyNames.Length; + var policies = new Policy[policyCount]; + for (var policyIndex = 0; policyIndex < policyCount; policyIndex++) + { + policies[policyIndex] = new Policy + { + Name = policyNames[policyIndex], + }; + } + policySets[policySetIndex] = new PolicySet + { + Policies = policies, + }; + } + + return new() + { + PolicySets = policySets, + }; + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs index c9b7f6571f2..1857acae149 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs @@ -22,5 +22,5 @@ internal static class WellKnownTypeNames public const string Any = "_Any"; public const string Entity = "_Entity"; public const string Service = "_Service"; - public const string PolicyDirective = "Policy"; + public const string PolicyDirective = "policy"; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs new file mode 100644 index 00000000000..46b0ce51c06 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs @@ -0,0 +1,72 @@ +using HotChocolate.ApolloFederation; + +namespace HotChocolate.Types; + +/// +/// Provides extensions for applying @policy directive on type system descriptors. +/// +public static partial class ApolloFederationDescriptorExtensions +{ + /// + /// Indicates to composition that the target element is restricted based on authorization policies + /// that are evaluated in a Rhai script or coprocessor. + /// + /// type Foo { + /// description: String @policy(policies: [["policy1Or", "policy2"], ["andPolicy3"]]) + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// The policy collection + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor Policy( + this IEnumTypeDescriptor descriptor, + PolicyCollection policies) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(policies); + } + + /// + public static IInterfaceFieldDescriptor Policy( + this IInterfaceFieldDescriptor descriptor, + PolicyCollection policies) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(policies); + } + + /// + public static IInterfaceTypeDescriptor Policy( + this IInterfaceTypeDescriptor descriptor, + PolicyCollection policies) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(policies); + } + + /// + public static IObjectFieldDescriptor Policy( + this IObjectFieldDescriptor descriptor, + PolicyCollection policies) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(policies); + } + + /// + public static IObjectTypeDescriptor Policy( + this IObjectTypeDescriptor descriptor, + PolicyCollection policies) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(policies); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index 2e41e62b280..34c1f23403f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -39,7 +39,8 @@ public static ISchemaBuilder AddApolloFederation( s.Link(link.Url, link.Import); schemaConfiguration?.Invoke(s); }); - return AddApolloFederationDefinitions(builder, version); + AddApolloFederationDefinitions(builder, version); + return builder; } /// @@ -63,11 +64,11 @@ public static ISchemaBuilder AddApolloFederation( public static ISchemaBuilder AddApolloFederation(this ISchemaBuilder builder, FederatedSchema schema) { ArgumentNullException.ThrowIfNull(builder); - ArgumentNullException.ThrowIfNull(schema); builder.SetSchema(schema); - return AddApolloFederationDefinitions(builder, schema.FederationVersion); + AddApolloFederationDefinitions(builder, schema.FederationVersion); + return builder; } /// @@ -83,11 +84,12 @@ public static ISchemaBuilder AddApolloFederation(this ISchemaBuilder builder, Fe /// /// The is null. /// - private static ISchemaBuilder AddApolloFederationDefinitions( + private static void AddApolloFederationDefinitions( this ISchemaBuilder builder, FederationVersion version = FederationVersion.Latest) { ArgumentNullException.ThrowIfNull(builder); + builder.TryAddTypeInterceptor(); // Disable hot chocolate tag directive // specify default Query type name if not specified @@ -146,6 +148,12 @@ private static ISchemaBuilder AddApolloFederationDefinitions( goto case FederationVersion.Federation24; } + case FederationVersion.Federation26: + { + builder.AddType(); + goto case FederationVersion.Federation25; + } + default: { break; @@ -153,6 +161,5 @@ private static ISchemaBuilder AddApolloFederationDefinitions( } builder.TryAddTypeInterceptor(); - return builder; } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs index 6f0943711e7..f811e714c3c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs @@ -23,6 +23,7 @@ public ref T this[FederationVersion v] public ref T V23 => ref this[FederationVersion.Federation23]; public ref T V24 => ref this[FederationVersion.Federation24]; public ref T V25 => ref this[FederationVersion.Federation25]; + public ref T V26 => ref this[FederationVersion.Federation26]; public bool AllSet { @@ -88,6 +89,9 @@ static FederationUtils() _imports.V25.Add("@authenticated"); _imports.V25.Add("@requiresPolicy"); + _imports.V26 = new(_imports.V25); + _imports.V26.Add("@policy"); + Debug.Assert(_imports.AllSet); _urls = CreateFederationValues(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs index 496c9278bd7..1e78c52f4f5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs @@ -11,6 +11,7 @@ public enum FederationVersion Federation23 = 3, Federation24 = 4, Federation25 = 5, + Federation26 = 6, Latest = Federation25, Count, } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index 6fb5363900f..34d739b48c9 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -12,7 +12,6 @@ using HotChocolate.Resolvers; using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; -using HotChocolate.Types.Helpers; using static HotChocolate.ApolloFederation.ThrowHelper; using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; using static HotChocolate.Types.TagHelper; @@ -87,7 +86,7 @@ internal override void OnAfterResolveRootType( { if (operationType is OperationType.Query) { - _queryType = (ObjectType) completionContext.Type; + _queryType = (ObjectType)completionContext.Type; } } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs new file mode 100644 index 00000000000..69c2487f332 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs @@ -0,0 +1,213 @@ +using System.Linq; +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.Language; +using HotChocolate.Types; +using Snapshooter.Xunit; + +namespace HotChocolate.ApolloFederation.Directives; + +public class PolicyDirectiveTests : FederationTypesTestBase +{ + [Fact] + public void PolicyDirectives_GetParsedCorrectly_SchemaFirst() + { + // arrange + Snapshot.FullName(); + + var schema = SchemaBuilder.New() + .AddDocumentFromString( + """ + type Review @policy(policies: [["p3"]]) { + id: Int! + } + + type Query { + someField(a: Int): Review @policy(policies: [["p1", "p1_1"], ["p2"]]) + } + """) + .AddDirectiveType() + .Use(_ => _ => default) + .Create(); + + CheckReviewType(schema); + CheckQueryType(schema); + + schema.ToString().MatchSnapshot(); + } + + [Fact] + public void PolicyDirectives_GetAddedCorrectly_Annotations() + { + // arrange + Snapshot.FullName(); + + var schema = SchemaBuilder.New() + .AddApolloFederation() + .AddQueryType() + .Create(); + + CheckReviewType(schema); + CheckQueryType(schema); + + schema.ToString().MatchSnapshot(); + } + + [Fact] + public void PolicyDirectives_GetAddedCorrectly_CodeFirst() + { + // arrange + Snapshot.FullName(); + + var schema = SchemaBuilder.New() + .AddApolloFederation() + .AddType(new ObjectType(d => + { + d.Name(nameof(Review)); + d.Field("id").Type>(); + })) + .AddQueryType(new ObjectType(d => + { + d.Name(nameof(Query)); + d.Field("someField") + .Type>>() + .Policy(new PolicyCollection + { + PolicySets = new PolicySet[] + { + new() + { + Policies = new Policy[] + { + new() + { + Name = "p1", + }, + new() + { + Name = "p1_1", + }, + }, + }, + new() + { + Policies = new Policy[] + { + new() + { + Name = "p2", + }, + }, + }, + }, + }); + })) + .Create(); + + CheckReviewType(schema); + CheckQueryType(schema); + + schema.ToString().MatchSnapshot(); + } + + private static PolicyCollection GetSinglePoliciesArgument(IDirectiveCollection directives) + { + PolicyCollection? result = null; + Assert.Collection( + directives, + t => + { + Assert.Equal( + WellKnownTypeNames.PolicyDirective, + t.Type.Name); + Assert.Collection( + t.AsSyntaxNode().Arguments, + argument => + { + Assert.Equal("policies", argument.Name.Value); + var listNode = Assert.IsType(argument.Value); + result = PolicyParsingHelper.ParseNode(listNode); + }); + }); + return result!; + } + + private static void CheckQueryType(ISchema schema) + { + var testType = schema.GetType(nameof(Query)); + var directives = testType + .Fields + .Single(f => f.Name == "someField") + .Directives; + var policyCollection = GetSinglePoliciesArgument(directives); + Assert.Collection(policyCollection.PolicySets, + t1 => + { + var policies = t1.Policies; + Assert.Equal("p1", policies[0].Name); + Assert.Equal("p1_1", policies[1].Name); + }, + t2 => + { + var policies = t2.Policies; + Assert.Equal("p2", policies[0].Name); + }); + } + + private static void CheckReviewType(ISchema schema) + { + var testType = schema.GetType(nameof(Review)); + var directives = testType.Directives; + var policyCollection = GetSinglePoliciesArgument(directives); + Assert.Collection(policyCollection.PolicySets, + t1 => + { + var policies = t1.Policies; + Assert.Equal("p3", policies[0].Name); + }); + } + + [Fact] + public void AnnotateProvidesToClassAttributePureCodeFirst() + { + // arrange + Snapshot.FullName(); + + var schema = SchemaBuilder.New() + .AddApolloFederation() + .AddQueryType() + .Create(); + + // act + var testType = schema.GetType("Review"); + + // assert + Assert.Collection( + testType.Fields.Single(field => field.Name == "product").Directives, + providesDirective => + { + Assert.Equal( + WellKnownTypeNames.Provides, + providesDirective.Type.Name); + Assert.Equal( + "fields", + providesDirective.AsSyntaxNode().Arguments[0].Name.ToString()); + Assert.Equal( + "\"name\"", + providesDirective.AsSyntaxNode().Arguments[0].Value.ToString()); + }); + + schema.ToString().MatchSnapshot(); + } + + public class Query + { + [Policy("p1,p1_1", "p2")] + public Review SomeField(int id) => default!; + } + + [Policy("p3")] + public class Review + { + public int Id { get; set; } + } +} From a3e29ea2d8a3e6f1e01c8bbab1c47be7eb297a01 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Tue, 19 Dec 2023 17:42:39 +0200 Subject: [PATCH 60/89] Remove wrong doc comment --- .../Configuration/ObjectTypes/PolicyCollectionType.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs index 19eff1c025b..fae945cd2d4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs @@ -4,8 +4,6 @@ namespace HotChocolate.ApolloFederation; /// -/// A union called _Entity which is a union of all types that use the @key directive, -/// including both types native to the schema and extended types. /// public sealed class PolicyCollectionType : ScalarType { From 602fa956f1d794d25baee834860f26e43dc17ee3 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 15 Jan 2024 14:04:13 +0200 Subject: [PATCH 61/89] Fix PolicyCollection --- .../Attributes/PolicyAttribute.cs | 25 +- .../ObjectTypes/PolicyCollectionType.cs | 187 +++++------ ...loFederationDescriptorExtensions.Policy.cs | 18 +- .../FederationResources.Designer.cs | 309 ++++++------------ .../Properties/FederationResources.resx | 3 + .../Directives/PolicyDirectiveTests.cs | 50 +-- 6 files changed, 195 insertions(+), 397 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs index 830733483a2..704f278f78f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs @@ -16,7 +16,7 @@ namespace HotChocolate.ApolloFederation; AllowMultiple = false)] public sealed class PolicyAttribute : DescriptorAttribute { - public PolicyAttribute(PolicyCollection policyCollection) + public PolicyAttribute(string[][] policyCollection) { PolicyCollection = policyCollection; } @@ -28,7 +28,7 @@ public PolicyAttribute(params string[] policySets) /// /// - public PolicyCollection PolicyCollection { get; set; } + public string[][] PolicyCollection { get; set; } /// /// Comma-separated lists of policy names for each set. @@ -38,30 +38,17 @@ public string[] PolicySets set => PolicyCollection = ConvertCommaSeparatedPolicyNamesListsToCollection(value); } - private static PolicyCollection ConvertCommaSeparatedPolicyNamesListsToCollection(string[] names) + private static string[][] ConvertCommaSeparatedPolicyNamesListsToCollection(string[] names) { - var policySets = new PolicySet[names.Length]; + var policySets = new string[][names.Length]; var policySetCount = policySets.Length; for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) { var commaSeparatedPolicyNames = names[policySetIndex]; var policyNames = commaSeparatedPolicyNames.Split(','); - var policyCount = policyNames.Length; - var policies = new Policy[policyCount]; - for (var policyIndex = 0; policyIndex < policyCount; policyIndex++) - { - var name = policyNames[policyIndex].Trim(); - policies[policyIndex] = new Policy - { - Name = name, - }; - } + policySets[policySetIndex] = policyNames; } - - return new() - { - PolicySets = policySets, - }; + return policySets; } protected internal override void TryConfigure( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs index fae945cd2d4..da0b93d1dc2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs @@ -1,157 +1,122 @@ using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Properties; using HotChocolate.Language; namespace HotChocolate.ApolloFederation; /// /// -public sealed class PolicyCollectionType : ScalarType +public sealed class PolicyCollectionType : ScalarType { public PolicyCollectionType(BindingBehavior bind = BindingBehavior.Explicit) : base(WellKnownTypeNames.PolicyDirective, bind) { } - public override IValueNode ParseResult(object? resultValue) - { - if (resultValue is null) - { - return NullValueNode.Default; - } - if (resultValue is PolicyCollection policyCollection) - { - return ParseValue(policyCollection); - } - throw new Exception("object of unexpected type"); - } + public override bool IsInstanceOfType(IValueNode valueSyntax) + => PolicyParsingHelper.CanParseNode(valueSyntax); - protected override PolicyCollection ParseLiteral(ListValueNode valueSyntax) - { - var result = PolicyParsingHelper.ParseNode(valueSyntax); - return result; - } + public override object ParseLiteral(IValueNode valueSyntax) + => PolicyParsingHelper.ParseNode(valueSyntax); - protected override ListValueNode ParseValue(PolicyCollection runtimeValue) + public override IValueNode ParseValue(object? runtimeValue) { - var policySets = runtimeValue.PolicySets; - var policySetCount = policySets.Length; - - var policySetNodes = new IValueNode[policySetCount]; - for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + if (runtimeValue is not string[][] policies1) { - var policySet = policySets[policySetIndex]; - var policies = policySet.Policies; - var policyCount = policies.Length; + throw new ArgumentException( + FederationResources.PolicyCollectionType_ParseValue_ExpectedStringArray, + nameof(runtimeValue)); + } - var policyNameNodes = new IValueNode[policyCount]; - for (var policyIndex = 0; policyIndex < policyCount; policyIndex++) + var list1 = new IValueNode[policies1.Length]; + for (int i1 = 0; i1 < list1.Length; i1++) + { + var policies2 = policies1[i1]; + var list2 = new IValueNode[policies2.Length]; + for (int i2 = 0; i2 < list2.Length; i2++) { - var policyName = policies[policyIndex].Name; - policyNameNodes[policyIndex] = new StringValueNode(policyName); + list2[i2] = new StringValueNode(policies2[i2]); } - policySetNodes[policySetIndex] = new ListValueNode(policyNameNodes); + + list1[i1] = new ListValueNode(list2); } - var result = new ListValueNode(policySetNodes); + var result = new ListValueNode(list1); return result; } + + public override IValueNode ParseResult(object? resultValue) + => ParseValue(resultValue); } + public static class PolicyParsingHelper { - public static PolicyCollection ParseNode(ListValueNode node) + private static bool IsNestedList( + IValueNode syntaxNode, + int numDimensions) { - var policySetNodes = node.Items; - var policySetCount = policySetNodes.Count; + if (syntaxNode.Kind == SyntaxKind.StringValue) + { + return true; + } - var policySets = new PolicySet[policySetCount]; - for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + if (numDimensions == 0) { - var item = policySetNodes[policySetIndex]; - if (item is not ListValueNode policySetNode) - { - throw new Exception("Expected list of strings"); - } + return false; + } - var policyNameNodes = policySetNode.Items; - var policyNameCount = policyNameNodes.Count; - var policies = new Policy[policyNameCount]; - for (var policyNameIndex = 0; policyNameIndex < policyNameCount; policyNameIndex++) - { - var policyNameNode = policyNameNodes[policyNameIndex]; - if (policyNameNode is not StringValueNode stringPolicyNameNode) - { - throw new Exception("Expected string"); - } - policies[policyNameIndex] = new Policy - { - Name = stringPolicyNameNode.Value, - }; - } + if (syntaxNode is not ListValueNode list) + { + return false; + } - policySets[policySetIndex] = new PolicySet + foreach (var item in list.Items) + { + if (!IsNestedList(item, numDimensions - 1)) { - Policies = policies, - }; + return false; + } } - var result = new PolicyCollection - { - PolicySets = policySets, - }; - - return result; + return true; } -} - -public struct Policy -{ - public required string Name { get; init; } -} - -/// -/// Represents a set of multiple policies. -/// -public struct PolicySet -{ - /// - /// Includes policies included in this set. - /// - public required Policy[] Policies { get; init; } -} + private static string[] ParseNestedList1(IValueNode syntaxNode) + { + if (syntaxNode.Kind == SyntaxKind.StringValue) + { + return [(string)syntaxNode.Value!]; + } -public sealed class PolicyCollection -{ - /// - /// Either of the policy sets listed here must be satisfied. - /// - public required PolicySet[] PolicySets { get; init; } + var listNode = (ListValueNode)syntaxNode; + var items = listNode.Items; + var array = new string[items.Count]; + for (var i = 0; i < array.Length; i++) + { + array[i] = (string)items[i].Value!; + } + return array; + } - public static PolicyCollection FromNameSets(string[][] names) + private static string[][] ParseNestedList2(IValueNode syntaxNode) { - var policySets = new PolicySet[names.Length]; - int policySetCount = names.Length; - for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) + if (syntaxNode.Kind == SyntaxKind.StringValue) { - var policyNames = names[policySetIndex]; - var policyCount = policyNames.Length; - var policies = new Policy[policyCount]; - for (var policyIndex = 0; policyIndex < policyCount; policyIndex++) - { - policies[policyIndex] = new Policy - { - Name = policyNames[policyIndex], - }; - } - policySets[policySetIndex] = new PolicySet - { - Policies = policies, - }; + return [[(string)syntaxNode.Value!]]; } - return new() + var listNode = (ListValueNode)syntaxNode; + var items = listNode.Items; + var array = new string[][items.Count]; + for (var i = 0; i < array.Length; i++) { - PolicySets = policySets, - }; + array[i] = ParseNestedList1(items[i]); + } + return array; } + + public static string[][] ParseNode(IValueNode syntaxNode) + => ParseNestedList2(syntaxNode); + public static bool CanParseNode(IValueNode syntaxNode) + => IsNestedList(syntaxNode, numDimensions: 2); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs index 46b0ce51c06..0e34a892d44 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs @@ -28,43 +28,43 @@ public static partial class ApolloFederationDescriptorExtensions /// public static IEnumTypeDescriptor Policy( this IEnumTypeDescriptor descriptor, - PolicyCollection policies) + string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(policies); } - /// + /// public static IInterfaceFieldDescriptor Policy( this IInterfaceFieldDescriptor descriptor, - PolicyCollection policies) + string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(policies); } - /// + /// public static IInterfaceTypeDescriptor Policy( this IInterfaceTypeDescriptor descriptor, - PolicyCollection policies) + string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(policies); } - /// + /// public static IObjectFieldDescriptor Policy( this IObjectFieldDescriptor descriptor, - PolicyCollection policies) + string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(policies); } - /// + /// public static IObjectTypeDescriptor Policy( this IObjectTypeDescriptor descriptor, - PolicyCollection policies) + string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); return descriptor.Directive(policies); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index be0d13368ce..06bbc694ad2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -11,46 +11,32 @@ namespace HotChocolate.ApolloFederation.Properties { using System; - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class FederationResources { - private static global::System.Resources.ResourceManager resourceMan; + private static System.Resources.ResourceManager resourceMan; - private static global::System.Globalization.CultureInfo resourceCulture; + private static System.Globalization.CultureInfo resourceCulture; - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal FederationResources() { } - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Resources.ResourceManager ResourceManager { get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HotChocolate.ApolloFederation.Properties.FederationResources", typeof(FederationResources).Assembly); + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("HotChocolate.ApolloFederation.Properties.FederationResources", typeof(FederationResources).Assembly); resourceMan = temp; } return resourceMan; } } - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -59,354 +45,243 @@ internal FederationResources() { } } - /// - /// Looks up a localized string similar to The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema.. - /// - internal static string Any_Description { + internal static string AuthenticatedDirective_Description { get { - return ResourceManager.GetString("Any_Description", resourceCulture); + return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users.. - /// - internal static string AuthenticatedDirective_Description { + internal static string ContactDirective_Description { get { - return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); + return ResourceManager.GetString("ContactDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Marks underlying custom directive to be included in the Supergraph schema.. - /// internal static string ComposeDirective_Description { get { return ResourceManager.GetString("ComposeDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Provides contact information of the owner responsible for this subgraph schema.. - /// - internal static string ContactDirective_Description { + internal static string ExtendsDirective_Description { get { - return ResourceManager.GetString("ContactDirective_Description", resourceCulture); + return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to The EntityResolver must be a method. Please check if the EntityResolverAttribute is correctly set to a method.. - /// - internal static string EntityResolver_MustBeMethod { + internal static string ExternalDirective_Description { get { - return ResourceManager.GetString("EntityResolver_MustBeMethod", resourceCulture); + return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Union of all types that key directive applied. This information is needed by the Apollo federation gateway.. - /// - internal static string EntityType_Description { + internal static string FieldsetType_Description { get { - return ResourceManager.GetString("EntityType_Description", resourceCulture); + return ResourceManager.GetString("FieldsetType_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to The specified key `{0}` does not exist on `context.ScopedContextData`.. - /// - internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue { + internal static string InaccessibleDirective_Description { get { - return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture); + return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Directive to indicate that marks target object as extending part of the federated schema.. - /// - internal static string ExtendsDirective_Description { + internal static string InterfaceObjectDirective_Description { get { - return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); + return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Directive to indicate that a field is owned by another service, for example via Apollo federation.. - /// - internal static string ExternalDirective_Description { + internal static string KeyDirective_Description { get { - return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); + return ResourceManager.GetString("KeyDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Value cannot be null or empty.. - /// - internal static string FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty { + internal static string OverrideDirective_Description { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Value cannot be null or empty.. - /// - internal static string FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty { + internal static string ProvidesDirective_Description { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Value cannot be null or empty.. - /// - internal static string FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty { + internal static string RequiresDirective_Description { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Value cannot be null or empty.. - /// - internal static string FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty { + internal static string RequiresScopesDirective_Description { get { - return ResourceManager.GetString("FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty", resourceCulture); + return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Scalar representing a set of fields.. - /// - internal static string FieldsetType_Description { + internal static string ScopeType_Description { get { - return ResourceManager.GetString("FieldsetType_Description", resourceCulture); + return ResourceManager.GetString("ScopeType_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Marks location within schema as inaccessible from the GraphQL Gateway. - /// - internal static string InaccessibleDirective_Description { + internal static string ShareableDirective_Description { get { - return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); + return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Provides meta information to the router that this entity type is an interface in the supergraph.. - /// - internal static string InterfaceObjectDirective_Description { + internal static string TagDirective_Description { get { - return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); + return ResourceManager.GetString("TagDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface.. - /// - internal static string KeyDirective_Description { + internal static string EntityType_Description { get { - return ResourceManager.GetString("KeyDirective_Description", resourceCulture); + return ResourceManager.GetString("EntityType_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another.. - /// - internal static string OverrideDirective_Description { + internal static string PolicyDirective_Description { get { - return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); + return ResourceManager.GetString("PolicyDirective_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor.. - /// - internal static string PolicyDirective_Description { + internal static string ThrowHelper_FieldSet_HasInvalidFormat { get { - return ResourceManager.GetString("PolicyDirective_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_FieldSet_HasInvalidFormat", resourceCulture); } } - /// - /// Looks up a localized string similar to Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway.. - /// - internal static string ProvidesDirective_Description { + internal static string ThrowHelper_Scalar_CannotParseValue { get { - return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Scalar_CannotParseValue", resourceCulture); } } - /// - /// Looks up a localized string similar to Used to annotate the required input fieldset from a base type for a resolver.. - /// - internal static string RequiresDirective_Description { + internal static string ThrowHelper_Key_FieldSet_CannotBeEmpty { get { - return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Key_FieldSet_CannotBeEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes.. - /// - internal static string RequiresScopesDirective_Description { + internal static string ThrowHelper_Provides_FieldSet_CannotBeEmpty { get { - return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Provides_FieldSet_CannotBeEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to The expression must refer to a method representing the reference resolver.. - /// - internal static string ResolveReference_MustBeMethod { + internal static string ThrowHelper_Requires_FieldSet_CannotBeEmpty { get { - return ResourceManager.GetString("ResolveReference_MustBeMethod", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Requires_FieldSet_CannotBeEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to Scalar representing a JWT scope. - /// - internal static string ScopeType_Description { + internal static string ThrowHelper_ComposeDirective_Name_CannotBeEmpty { get { - return ResourceManager.GetString("ScopeType_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_ComposeDirective_Name_CannotBeEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec.. - /// - internal static string ServiceType_Description { + internal static string ThrowHelper_Link_Url_CannotBeEmpty { get { - return ResourceManager.GetString("ServiceType_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Link_Url_CannotBeEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to Indicates that given object and/or field can be resolved by multiple subgraphs.. - /// - internal static string ShareableDirective_Description { + internal static string ThrowHelper_Contact_Name_CannotBeEmpty { get { - return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Contact_Name_CannotBeEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to Allows users to annotate fields and types with additional metadata information.. - /// - internal static string TagDirective_Description { + internal static string ThrowHelper_FederationVersion_Unknown { get { - return ResourceManager.GetString("TagDirective_Description", resourceCulture); + return ResourceManager.GetString("ThrowHelper_FederationVersion_Unknown", resourceCulture); } } - /// - /// Looks up a localized string similar to The given any representation has an invalid format.. - /// - internal static string ThrowHelper_Any_HasInvalidFormat { + internal static string FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("ThrowHelper_Any_HasInvalidFormat", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Key_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to The compose directive attribute is used on `{0}` without specifying the name.. - /// - internal static string ThrowHelper_ComposeDirective_Name_CannotBeEmpty { + internal static string FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("ThrowHelper_ComposeDirective_Name_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Requires_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to The contact attribute is used on `{0}` without specifying the name.. - /// - internal static string ThrowHelper_Contact_Name_CannotBeEmpty { + internal static string FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("ThrowHelper_Contact_Name_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Provides_FieldSet_CannotBeNullOrEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to The apollo gateway tries to resolve an entity for which no EntityResolver method was found.. - /// - internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { + internal static string FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty { get { - return ResourceManager.GetString("ThrowHelper_EntityResolver_NoEntityResolverFound", resourceCulture); + return ResourceManager.GetString("FieldDescriptorExtensions_Override_From_CannotBeNullOrEmpty", resourceCulture); } } - /// - /// Looks up a localized string similar to The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least one entity.. - /// internal static string ThrowHelper_EntityType_NoEntities { get { return ResourceManager.GetString("ThrowHelper_EntityType_NoEntities", resourceCulture); } } - /// - /// Looks up a localized string similar to Specified federation version `{0}` is not supported.. - /// - internal static string ThrowHelper_FederationVersion_Unknown { + internal static string ServiceType_Description { get { - return ResourceManager.GetString("ThrowHelper_FederationVersion_Unknown", resourceCulture); + return ResourceManager.GetString("ServiceType_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to The fieldset has an invalid format.. - /// - internal static string ThrowHelper_FieldSet_HasInvalidFormat { + internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { get { - return ResourceManager.GetString("ThrowHelper_FieldSet_HasInvalidFormat", resourceCulture); + return ResourceManager.GetString("ThrowHelper_EntityResolver_NoEntityResolverFound", resourceCulture); } } - /// - /// Looks up a localized string similar to The key attribute is used on `{0}` without specifying the field set.. - /// - internal static string ThrowHelper_Key_FieldSet_CannotBeEmpty { + internal static string EntityResolver_MustBeMethod { get { - return ResourceManager.GetString("ThrowHelper_Key_FieldSet_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("EntityResolver_MustBeMethod", resourceCulture); } } - /// - /// Looks up a localized string similar to The link attribute is used on `{0}` without specifying the url.. - /// - internal static string ThrowHelper_Link_Url_CannotBeEmpty { + internal static string ThrowHelper_Any_HasInvalidFormat { get { - return ResourceManager.GetString("ThrowHelper_Link_Url_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("ThrowHelper_Any_HasInvalidFormat", resourceCulture); } } - /// - /// Looks up a localized string similar to FieldSet is null or empty on type. - /// - internal static string ThrowHelper_Provides_FieldSet_CannotBeEmpty { + internal static string ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue { get { - return ResourceManager.GetString("ThrowHelper_Provides_FieldSet_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("ExpressionHelper_GetScopedStateWithDefault_NoDefaultValue", resourceCulture); } } - /// - /// Looks up a localized string similar to FieldSet is null or empty on type. - /// - internal static string ThrowHelper_Requires_FieldSet_CannotBeEmpty { + internal static string Any_Description { get { - return ResourceManager.GetString("ThrowHelper_Requires_FieldSet_CannotBeEmpty", resourceCulture); + return ResourceManager.GetString("Any_Description", resourceCulture); } } - /// - /// Looks up a localized string similar to {0} cannot parse the given value of type `{1}`. - /// - internal static string ThrowHelper_Scalar_CannotParseValue { + internal static string ResolveReference_MustBeMethod { get { - return ResourceManager.GetString("ThrowHelper_Scalar_CannotParseValue", resourceCulture); + return ResourceManager.GetString("ResolveReference_MustBeMethod", resourceCulture); + } + } + + internal static string PolicyCollectionType_ParseValue_ExpectedStringArray { + get { + return ResourceManager.GetString("PolicyCollectionType_ParseValue_ExpectedStringArray", resourceCulture); } } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index f22af71bfd7..215ccdb05c0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -234,4 +234,7 @@ The expression must refer to a method representing the reference resolver. + + Expected a string[][] + diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs index 69c2487f332..cb0fc84a492 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs @@ -70,36 +70,7 @@ public void PolicyDirectives_GetAddedCorrectly_CodeFirst() d.Name(nameof(Query)); d.Field("someField") .Type>>() - .Policy(new PolicyCollection - { - PolicySets = new PolicySet[] - { - new() - { - Policies = new Policy[] - { - new() - { - Name = "p1", - }, - new() - { - Name = "p1_1", - }, - }, - }, - new() - { - Policies = new Policy[] - { - new() - { - Name = "p2", - }, - }, - }, - }, - }); + .Policy([["p1", "p1_1"], ["p2"]]); })) .Create(); @@ -109,9 +80,9 @@ public void PolicyDirectives_GetAddedCorrectly_CodeFirst() schema.ToString().MatchSnapshot(); } - private static PolicyCollection GetSinglePoliciesArgument(IDirectiveCollection directives) + private static string[][] GetSinglePoliciesArgument(IDirectiveCollection directives) { - PolicyCollection? result = null; + string[][]? result = null; Assert.Collection( directives, t => @@ -139,17 +110,15 @@ private static void CheckQueryType(ISchema schema) .Single(f => f.Name == "someField") .Directives; var policyCollection = GetSinglePoliciesArgument(directives); - Assert.Collection(policyCollection.PolicySets, + Assert.Collection(policyCollection, t1 => { - var policies = t1.Policies; - Assert.Equal("p1", policies[0].Name); - Assert.Equal("p1_1", policies[1].Name); + Assert.Equal("p1", t1[0]); + Assert.Equal("p1_1", t1[1]); }, t2 => { - var policies = t2.Policies; - Assert.Equal("p2", policies[0].Name); + Assert.Equal("p2", t2[0]); }); } @@ -158,11 +127,10 @@ private static void CheckReviewType(ISchema schema) var testType = schema.GetType(nameof(Review)); var directives = testType.Directives; var policyCollection = GetSinglePoliciesArgument(directives); - Assert.Collection(policyCollection.PolicySets, + Assert.Collection(policyCollection, t1 => { - var policies = t1.Policies; - Assert.Equal("p3", policies[0].Name); + Assert.Equal("p3", t1[0]); }); } From 6b203bcea0f4a5f1d843035dbecefca5e6129286 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 15 Jan 2024 14:30:50 +0200 Subject: [PATCH 62/89] Different names for directive and scalar --- .../Configuration/Attributes/PolicyAttribute.cs | 2 +- .../Configuration/Directives/PolicyDirectiveType.cs | 2 +- .../Configuration/ObjectTypes/PolicyCollectionType.cs | 4 ++-- .../src/ApolloFederation/Constants/WellKnownTypeNames.cs | 1 + .../FederationVersioning/FederationVersion.cs | 2 +- .../Directives/PolicyDirectiveTests.cs | 6 ++---- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs index 704f278f78f..0f845a78f8f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs @@ -40,7 +40,7 @@ public string[] PolicySets private static string[][] ConvertCommaSeparatedPolicyNamesListsToCollection(string[] names) { - var policySets = new string[][names.Length]; + var policySets = new string[names.Length][]; var policySetCount = policySets.Length; for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs index f46639ca451..5d94867d96c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs @@ -32,6 +32,6 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) descriptor .Argument("policies") - .Type>>>(); + .Type>(); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs index da0b93d1dc2..bba61026457 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs @@ -9,7 +9,7 @@ namespace HotChocolate.ApolloFederation; public sealed class PolicyCollectionType : ScalarType { public PolicyCollectionType(BindingBehavior bind = BindingBehavior.Explicit) - : base(WellKnownTypeNames.PolicyDirective, bind) + : base(WellKnownTypeNames.PolicyCollection, bind) { } @@ -107,7 +107,7 @@ private static string[][] ParseNestedList2(IValueNode syntaxNode) var listNode = (ListValueNode)syntaxNode; var items = listNode.Items; - var array = new string[][items.Count]; + var array = new string[items.Count][]; for (var i = 0; i < array.Length; i++) { array[i] = ParseNestedList1(items[i]); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs index 1857acae149..000dc3e53bf 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs @@ -23,4 +23,5 @@ internal static class WellKnownTypeNames public const string Entity = "_Entity"; public const string Service = "_Service"; public const string PolicyDirective = "policy"; + public const string PolicyCollection = "policyCollection"; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs index 1e78c52f4f5..b83735e1fed 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs @@ -12,6 +12,6 @@ public enum FederationVersion Federation24 = 4, Federation25 = 5, Federation26 = 6, - Latest = Federation25, + Latest = Federation26, Count, } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs index cb0fc84a492..aa1617b40eb 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs @@ -1,6 +1,5 @@ using System.Linq; using HotChocolate.ApolloFederation.Constants; -using HotChocolate.Language; using HotChocolate.Types; using Snapshooter.Xunit; @@ -17,7 +16,7 @@ public void PolicyDirectives_GetParsedCorrectly_SchemaFirst() var schema = SchemaBuilder.New() .AddDocumentFromString( """ - type Review @policy(policies: [["p3"]]) { + type Review @policy(policies: "p3") { id: Int! } @@ -95,8 +94,7 @@ private static string[][] GetSinglePoliciesArgument(IDirectiveCollection directi argument => { Assert.Equal("policies", argument.Name.Value); - var listNode = Assert.IsType(argument.Value); - result = PolicyParsingHelper.ParseNode(listNode); + result = PolicyParsingHelper.ParseNode(argument.Value); }); }); return result!; From 87ad350ddaf65a8c0a0cfd2234ea9cf7ad408544 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 15 Jan 2024 14:58:37 +0200 Subject: [PATCH 63/89] Fix tests --- .../Directives/PolicyDirectiveType.cs | 2 +- .../ObjectTypes/PolicyCollectionType.cs | 36 ++++---- .../Constants/WellKnownArgumentNames.cs | 1 + ...loFederationDescriptorExtensions.Policy.cs | 29 +++++-- .../Directives/PolicyDirectiveTests.cs | 82 ++++++++----------- ...ective_GetsAddedCorrectly_Annotations.snap | 76 +++++++++++++++++ ...ectives_GetAddedCorrectly_Annotations.snap | 76 +++++++++++++++++ ...irectives_GetAddedCorrectly_CodeFirst.snap | 76 +++++++++++++++++ ...ctives_GetParsedCorrectly_SchemaFirst.snap | 18 ++++ 9 files changed, 329 insertions(+), 67 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirective_GetsAddedCorrectly_Annotations.snap create mode 100644 src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_Annotations.snap create mode 100644 src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_CodeFirst.snap create mode 100644 src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetParsedCorrectly_SchemaFirst.snap diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs index 5d94867d96c..98099d411c0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs @@ -31,7 +31,7 @@ protected override void Configure(IDirectiveTypeDescriptor descriptor) DirectiveLocation.Enum); descriptor - .Argument("policies") + .Argument(WellKnownArgumentNames.Policies) .Type>(); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs index bba61026457..de4764a3cfa 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs @@ -28,21 +28,7 @@ public override IValueNode ParseValue(object? runtimeValue) nameof(runtimeValue)); } - var list1 = new IValueNode[policies1.Length]; - for (int i1 = 0; i1 < list1.Length; i1++) - { - var policies2 = policies1[i1]; - var list2 = new IValueNode[policies2.Length]; - for (int i2 = 0; i2 < list2.Length; i2++) - { - list2[i2] = new StringValueNode(policies2[i2]); - } - - list1[i1] = new ListValueNode(list2); - } - - var result = new ListValueNode(list1); - return result; + return PolicyParsingHelper.ParseValue(policies1); } public override IValueNode ParseResult(object? resultValue) @@ -115,6 +101,26 @@ private static string[][] ParseNestedList2(IValueNode syntaxNode) return array; } + + public static ListValueNode ParseValue(string[][] policies1) + { + var list1 = new IValueNode[policies1.Length]; + for (int i1 = 0; i1 < list1.Length; i1++) + { + var policies2 = policies1[i1]; + var list2 = new IValueNode[policies2.Length]; + for (int i2 = 0; i2 < list2.Length; i2++) + { + list2[i2] = new StringValueNode(policies2[i2]); + } + + list1[i1] = new ListValueNode(list2); + } + + var result = new ListValueNode(list1); + return result; + } + public static string[][] ParseNode(IValueNode syntaxNode) => ParseNestedList2(syntaxNode); public static bool CanParseNode(IValueNode syntaxNode) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs index ce937b10b72..ab6a081cfc3 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs @@ -9,4 +9,5 @@ internal static class WellKnownArgumentNames public const string Representations = "representations"; public const string Scopes = "scopes"; public const string Url = "url"; + public const string Policies = "policies"; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs index 0e34a892d44..44e3a7eb905 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs @@ -1,4 +1,6 @@ using HotChocolate.ApolloFederation; +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.Language; namespace HotChocolate.Types; @@ -31,7 +33,9 @@ public static IEnumTypeDescriptor Policy( string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(policies); + return descriptor.Directive( + WellKnownTypeNames.PolicyDirective, + ParsePoliciesArgument(policies)); } /// @@ -40,7 +44,9 @@ public static IInterfaceFieldDescriptor Policy( string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(policies); + return descriptor.Directive( + WellKnownTypeNames.PolicyDirective, + ParsePoliciesArgument(policies)); } /// @@ -49,7 +55,9 @@ public static IInterfaceTypeDescriptor Policy( string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(policies); + return descriptor.Directive( + WellKnownTypeNames.PolicyDirective, + ParsePoliciesArgument(policies)); } /// @@ -58,7 +66,9 @@ public static IObjectFieldDescriptor Policy( string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(policies); + return descriptor.Directive( + WellKnownTypeNames.PolicyDirective, + ParsePoliciesArgument(policies)); } /// @@ -67,6 +77,15 @@ public static IObjectTypeDescriptor Policy( string[][] policies) { ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(policies); + return descriptor.Directive( + WellKnownTypeNames.PolicyDirective, + ParsePoliciesArgument(policies)); + } + + private static ArgumentNode ParsePoliciesArgument(string[][] policies) + { + var list = PolicyParsingHelper.ParseValue(policies); + var result = new ArgumentNode(WellKnownArgumentNames.Policies, list); + return result; } } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs index aa1617b40eb..9c2dbe827f9 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs @@ -57,20 +57,29 @@ public void PolicyDirectives_GetAddedCorrectly_CodeFirst() // arrange Snapshot.FullName(); + var reviewType = new ObjectType(d => + { + d.Name(nameof(Review)); + d.Key("id"); + { + var id = d.Field("id"); + id.Type>(); + id.Resolve(_ => default); + } + }); + var queryType = new ObjectType(d => + { + d.Name(nameof(Query)); + d.Field("someField") + .Type(new NonNullType(reviewType)) + .Policy([["p1", "p1_1"], ["p2"]]) + .Resolve(_ => default); + }); + var schema = SchemaBuilder.New() .AddApolloFederation() - .AddType(new ObjectType(d => - { - d.Name(nameof(Review)); - d.Field("id").Type>(); - })) - .AddQueryType(new ObjectType(d => - { - d.Name(nameof(Query)); - d.Field("someField") - .Type>>() - .Policy([["p1", "p1_1"], ["p2"]]); - })) + .AddType(reviewType) + .AddQueryType(queryType) .Create(); CheckReviewType(schema); @@ -81,23 +90,19 @@ public void PolicyDirectives_GetAddedCorrectly_CodeFirst() private static string[][] GetSinglePoliciesArgument(IDirectiveCollection directives) { - string[][]? result = null; - Assert.Collection( - directives, - t => + foreach (var directive in directives) + { + if (directive.Type.Name != WellKnownTypeNames.PolicyDirective) { - Assert.Equal( - WellKnownTypeNames.PolicyDirective, - t.Type.Name); - Assert.Collection( - t.AsSyntaxNode().Arguments, - argument => - { - Assert.Equal("policies", argument.Name.Value); - result = PolicyParsingHelper.ParseNode(argument.Value); - }); - }); - return result!; + continue; + } + + var argument = directive.AsSyntaxNode().Arguments.Single(); + return PolicyParsingHelper.ParseNode(argument.Value); + } + + Assert.True(false, "No policy directive found."); + return null!; } private static void CheckQueryType(ISchema schema) @@ -133,7 +138,7 @@ private static void CheckReviewType(ISchema schema) } [Fact] - public void AnnotateProvidesToClassAttributePureCodeFirst() + public void PolicyDirective_GetsAddedCorrectly_Annotations() { // arrange Snapshot.FullName(); @@ -144,23 +149,7 @@ public void AnnotateProvidesToClassAttributePureCodeFirst() .Create(); // act - var testType = schema.GetType("Review"); - - // assert - Assert.Collection( - testType.Fields.Single(field => field.Name == "product").Directives, - providesDirective => - { - Assert.Equal( - WellKnownTypeNames.Provides, - providesDirective.Type.Name); - Assert.Equal( - "fields", - providesDirective.AsSyntaxNode().Arguments[0].Name.ToString()); - Assert.Equal( - "\"name\"", - providesDirective.AsSyntaxNode().Arguments[0].Value.ToString()); - }); + CheckQueryType(schema); schema.ToString().MatchSnapshot(); } @@ -171,6 +160,7 @@ public class Query public Review SomeField(int id) => default!; } + [Key("id")] [Policy("p3")] public class Review { diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirective_GetsAddedCorrectly_Annotations.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirective_GetsAddedCorrectly_Annotations.snap new file mode 100644 index 00000000000..a6badde20c5 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirective_GetsAddedCorrectly_Annotations.snap @@ -0,0 +1,76 @@ +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.6", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy", "@policy" ]) { + query: Query +} + +type Query { + someField(id: Int!): Review! @policy(policies: [ [ "p1", "p1_1" ], [ "p2" ] ]) + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! +} + +type Review @key(fields: "id") @policy(policies: [ [ "p3" ] ]) { + id: Int! +} + +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! +} + +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Review + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor." +directive @policy(policies: policyCollection!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a set of fields." +scalar FieldSet + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +scalar policyCollection diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_Annotations.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_Annotations.snap new file mode 100644 index 00000000000..a6badde20c5 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_Annotations.snap @@ -0,0 +1,76 @@ +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.6", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy", "@policy" ]) { + query: Query +} + +type Query { + someField(id: Int!): Review! @policy(policies: [ [ "p1", "p1_1" ], [ "p2" ] ]) + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! +} + +type Review @key(fields: "id") @policy(policies: [ [ "p3" ] ]) { + id: Int! +} + +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! +} + +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Review + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor." +directive @policy(policies: policyCollection!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a set of fields." +scalar FieldSet + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +scalar policyCollection diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_CodeFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_CodeFirst.snap new file mode 100644 index 00000000000..fcf6b479077 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetAddedCorrectly_CodeFirst.snap @@ -0,0 +1,76 @@ +schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.6", import: [ "@extends", "@external", "@key", "@inaccessible", "@override", "@provides", "@requires", "@shareable", "@tag", "FieldSet", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresPolicy", "@policy" ]) { + query: Query +} + +type Query { + someField: Review! @policy(policies: [ [ "p1", "p1_1" ], [ "p2" ] ]) + _service: _Service! + _entities(representations: [_Any!]!): [_Entity]! +} + +type Review @key(fields: "id") @key(fields: "id") @policy(policies: [ [ "p3" ] ]) { + id: Int! +} + +"This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." +type _Service { + sdl: String! +} + +"Union of all types that key directive applied. This information is needed by the Apollo federation gateway." +union _Entity = Review + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users." +directive @authenticated on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Marks underlying custom directive to be included in the Supergraph schema." +directive @composeDirective(name: String!) on SCHEMA + +"Directive to indicate that marks target object as extending part of the federated schema." +directive @extends on OBJECT | INTERFACE + +"Directive to indicate that a field is owned by another service, for example via Apollo federation." +directive @external on FIELD_DEFINITION + +"Marks location within schema as inaccessible from the GraphQL Gateway" +directive @inaccessible on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Provides meta information to the router that this entity type is an interface in the supergraph." +directive @interfaceObject on OBJECT + +"Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." +directive @key(fields: FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + +directive @link(url: String! import: [String!]) repeatable on SCHEMA + +"Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another." +directive @override(from: String!) on FIELD_DEFINITION + +"Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor." +directive @policy(policies: policyCollection!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway." +directive @provides(fields: FieldSet!) on FIELD_DEFINITION + +"Used to annotate the required input fieldset from a base type for a resolver." +directive @requires(fields: FieldSet!) on FIELD_DEFINITION + +"Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes." +directive @requiresScopes(scopes: [[Scope!]!]!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +"Indicates that given object and\/or field can be resolved by multiple subgraphs." +directive @shareable repeatable on OBJECT | FIELD_DEFINITION + +"Allows users to annotate fields and types with additional metadata information." +directive @tag(name: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +"Scalar representing a set of fields." +scalar FieldSet + +"Scalar representing a JWT scope" +scalar Scope + +"The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." +scalar _Any + +scalar policyCollection diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetParsedCorrectly_SchemaFirst.snap b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetParsedCorrectly_SchemaFirst.snap new file mode 100644 index 00000000000..6e06413779f --- /dev/null +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/__snapshots__/PolicyDirectiveTests.PolicyDirectives_GetParsedCorrectly_SchemaFirst.snap @@ -0,0 +1,18 @@ +schema { + query: Query +} + +type Query { + someField(a: Int): Review @policy(policies: [ [ "p1", "p1_1" ], [ "p2" ] ]) +} + +type Review @policy(policies: "p3") { + id: Int! +} + +"Indicates to composition that the target element is restricted based on authorization policies that are evaluated in a Rhai script or coprocessor." +directive @policy(policies: policyCollection!) on SCALAR | OBJECT | FIELD_DEFINITION | INTERFACE | ENUM + +directive @tag(name: String!) repeatable on SCHEMA | SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +scalar policyCollection From 3447948fb923e9983aa60fe55b16b14371dc93b3 Mon Sep 17 00:00:00 2001 From: AntonC9018 Date: Mon, 15 Jan 2024 15:29:45 +0200 Subject: [PATCH 64/89] cref -> href --- .../Configuration/Directives/PolicyDirectiveType.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs index 98099d411c0..bd8b235209d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs @@ -14,7 +14,7 @@ namespace HotChocolate.ApolloFederation; /// /// Indicates to composition that the target element is restricted based on authorization policies /// that are evaluated in a Rhai script or coprocessor. -/// +/// /// public sealed class PolicyDirectiveType : DirectiveType { From 70d6b2b5aa77ef2aa35945f0380354968fff31c0 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 20:28:10 +0100 Subject: [PATCH 65/89] edits --- .../Attributes/KeyInterfaceAttribute.cs | 85 --------------- .../Attributes/NonResolvableKeyAttribute.cs | 61 ----------- .../AuthenticatedAttribute.cs} | 12 ++- .../Attributes/{ => _remove}/LinkAttribute.cs | 0 .../ApolloFederationDescriptorExtensions.cs | 92 +--------------- .../src/ApolloFederation/FederationVersion.cs | 18 ++++ .../FederationVersioning/FederationVersion.cs | 17 --- .../HotChocolate.ApolloFederation.csproj | 4 + .../src/ApolloFederation/ThrowHelper.cs | 50 ++++++--- .../CommonArgumentsDescriptorExtensions.cs} | 2 +- .../Descriptors/EntityResolverDefinition.cs | 0 .../Descriptors/EntityResolverDescriptor.cs | 0 .../Descriptors/IEntityResolverDescriptor.cs | 0 .../ReferenceResolverDefinition.cs | 0 .../Attributes => Types}/KeyAttribute.cs | 77 ++++++++++--- .../Types/KeyDescriptorExtensions.cs | 101 ++++++++++++++++++ .../Directives => Types}/KeyDirectiveType.cs | 20 +++- .../Types/OptionsDescriptorExtensions.cs | 21 ++++ .../{Constants => }/WellKnownArgumentNames.cs | 2 +- .../{Constants => }/WellKnownContextData.cs | 1 + .../{Constants => }/WellKnownFieldNames.cs | 0 .../{Constants => }/WellKnownTypeNames.cs | 0 22 files changed, 270 insertions(+), 293 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/{ApolloAuthenticatedAttribute.cs => _remove/AuthenticatedAttribute.cs} (82%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/{ => _remove}/LinkAttribute.cs (100%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Extensions/DirectiveTypeDescriptorExtensions.cs => Types/CommonArgumentsDescriptorExtensions.cs} (86%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Types}/Descriptors/EntityResolverDefinition.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Types}/Descriptors/EntityResolverDescriptor.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Types}/Descriptors/IEntityResolverDescriptor.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Types}/Descriptors/ReferenceResolverDefinition.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Types}/KeyAttribute.cs (51%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives => Types}/KeyDirectiveType.cs (73%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Constants => }/WellKnownArgumentNames.cs (99%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Constants => }/WellKnownContextData.cs (85%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Constants => }/WellKnownFieldNames.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Constants => }/WellKnownTypeNames.cs (100%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs deleted file mode 100644 index 84898146a0e..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyInterfaceAttribute.cs +++ /dev/null @@ -1,85 +0,0 @@ -using HotChocolate.Types.Descriptors; -using static HotChocolate.ApolloFederation.ThrowHelper; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// # federation v1 definition -/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE -/// -/// # federation v2 definition -/// directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE -/// -/// -/// The @key directive is used to indicate a combination of fields that can be used to uniquely -/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), -/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can -/// be specified on a target type. -/// -/// Keys can also be marked as non-resolvable which indicates to router that given entity should never be -/// resolved within given subgraph. This allows your subgraph to still reference target entity without -/// contributing any fields to it. -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// field: String -/// bars: [Bar!]! -/// } -/// -/// type Bar @key(fields: "id", resolvable: false) { -/// id: ID! -/// } -/// -/// -public sealed class KeyInterfaceAttribute : InterfaceTypeDescriptorAttribute -{ - /// - /// Initializes a new instance of . - /// - /// - /// The field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - public KeyInterfaceAttribute(string fieldSet) - { - FieldSet = fieldSet; - Resolvable = null; - } - - /// - /// Initializes a new instance of . - /// - /// - /// The field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - /// - /// Boolean flag to indicate whether this entity is resolvable locally. - /// - public KeyInterfaceAttribute(string fieldSet, bool? resolvable = null) - { - FieldSet = fieldSet; - Resolvable = resolvable; - } - - /// - /// Gets the field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - public string FieldSet { get; } - - /// - /// Gets the resolvable flag. - /// - public bool? Resolvable { get; } - - protected override void OnConfigure(IDescriptorContext context, IInterfaceTypeDescriptor descriptor, Type type) - { - if (string.IsNullOrEmpty(FieldSet)) - { - throw Key_FieldSet_CannotBeEmpty(type); - } - descriptor.Key(FieldSet, Resolvable); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs deleted file mode 100644 index 2fdfcd32d3c..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/NonResolvableKeyAttribute.cs +++ /dev/null @@ -1,61 +0,0 @@ -using HotChocolate.Types.Descriptors; -using static HotChocolate.ApolloFederation.ThrowHelper; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// # federation v2 definition -/// directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE -/// -/// -/// The @key directive is used to indicate a combination of fields that can be used to uniquely -/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), -/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can -/// be specified on a target type. -/// -/// Keys can also be marked as non-resolvable which indicates to router that given entity should never be -/// resolved within given subgraph. This allows your subgraph to still reference target entity without -/// contributing any fields to it. -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// field: String -/// bars: [Bar!]! -/// } -/// -/// type Bar @key(fields: "id", resolvable: false) { -/// id: ID! -/// } -/// -/// -/// -public sealed class NonResolvableKeyAttribute : ObjectTypeDescriptorAttribute -{ - /// - /// Initializes a new instance of . - /// - /// - /// The field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - public NonResolvableKeyAttribute(string fieldSet) - { - FieldSet = fieldSet; - } - - /// - /// Gets the field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - public string FieldSet { get; } - - protected override void OnConfigure(IDescriptorContext context, IObjectTypeDescriptor descriptor, Type type) - { - if (string.IsNullOrEmpty(FieldSet)) - { - throw Key_FieldSet_CannotBeEmpty(type); - } - descriptor.Key(FieldSet, false); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/AuthenticatedAttribute.cs similarity index 82% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/AuthenticatedAttribute.cs index 714f74cb9d2..0f00622f67c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ApolloAuthenticatedAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/AuthenticatedAttribute.cs @@ -13,10 +13,12 @@ namespace HotChocolate.ApolloFederation; /// | SCALAR /// /// -/// The @authenticated directive is used to indicate that the target element is accessible only to the authenticated supergraph users. -/// For more granular access control, see the RequiresScopeDirectiveType directive usage. -/// Refer to the Apollo Router article -/// for additional details. +/// The @authenticated directive is used to indicate that the target element is accessible only to the +/// authenticated supergraph users. For more granular access control, see the +/// RequiresScopeDirectiveType directive usage. +/// Refer to the +/// Apollo Router article for additional details. +/// /// /// type Foo @key(fields: "id") { /// id: ID @@ -31,7 +33,7 @@ namespace HotChocolate.ApolloFederation; AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct)] -public sealed class ApolloAuthenticatedAttribute : DescriptorAttribute +public sealed class AuthenticatedAttribute : DescriptorAttribute { protected internal override void TryConfigure( IDescriptorContext context, diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/LinkAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/LinkAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/LinkAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index d3a5fb0db1d..a944395ac4b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -202,97 +202,7 @@ public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor d return descriptor.Directive(WellKnownTypeNames.InterfaceObject); } - /// - /// Applies the @key directive which is used to indicate a combination of fields that can be used to uniquely - /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), - /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can - /// be specified on a target type. - /// - /// Keys can be marked as non-resolvable which indicates to router that given entity should never be - /// resolved within given subgraph. This allows your subgraph to still reference target entity without - /// contributing any fields to it. - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// field: String - /// bars: [Bar!]! - /// } - /// - /// type Bar @key(fields: "id", resolvable: false) { - /// id: ID! - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// The field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - /// - /// Boolean flag to indicate whether this entity is resolvable locally. - /// - /// - /// - /// is null. - /// - /// - /// is null or . - /// - public static IEntityResolverDescriptor Key( - this IObjectTypeDescriptor descriptor, - string fieldSet, - bool? resolvable = null) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(fieldSet); - - var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); - - descriptor.Directive(WellKnownTypeNames.Key, arguments); - - return new EntityResolverDescriptor(descriptor); - } - - /// - public static IInterfaceTypeDescriptor Key( - this IInterfaceTypeDescriptor descriptor, - string fieldSet, - bool? resolvable = null) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(fieldSet); - - var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); - - return descriptor.Directive(WellKnownTypeNames.Key, arguments); - } - - private static ArgumentNode[] CreateKeyArgumentNodes(string fieldSet, bool? resolvable) - { - var notResolvable = resolvable is false; - - var argumentCount = 1; - if (notResolvable) - { - argumentCount++; - } - - var arguments = new ArgumentNode[argumentCount]; - arguments[0] = new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet)); - if (notResolvable) - { - arguments[1] = - new ArgumentNode( - WellKnownArgumentNames.Resolvable, - new BooleanValueNode(false)); - } - - return arguments; - } + /// /// Applies @link directive definitions to link the document to external schemas. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs new file mode 100644 index 00000000000..3377aeb411b --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs @@ -0,0 +1,18 @@ +namespace HotChocolate.ApolloFederation; + +/// +/// Enum defining all supported Apollo Federation v2 versions. +/// +public enum FederationVersion +{ + Unknown = 0, + Federation10 = 1_0, + Federation20 = 2_0, + Federation21 = 2_1, + Federation22 = 2_2, + Federation23 = 2_3, + Federation24 = 2_4, + Federation25 = 2_5, + Federation26 = 2_6, + Latest = Federation26, +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs deleted file mode 100644 index b83735e1fed..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationVersion.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace HotChocolate.ApolloFederation; - -/// -/// Enum defining all supported Apollo Federation v2 versions. -/// -public enum FederationVersion -{ - Federation20 = 0, - Federation21 = 1, - Federation22 = 2, - Federation23 = 3, - Federation24 = 4, - Federation25 = 5, - Federation26 = 6, - Latest = Federation26, - Count, -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index 4c46ea457bb..8061b7a3872 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -39,4 +39,8 @@ + + + + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs index 5ebcff5898e..5c25588ff5b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs @@ -41,14 +41,16 @@ public static SerializationException Any_InvalidFormat( /// of the given type. /// public static SchemaException ExternalAttribute_InvalidTarget( - Type type, MemberInfo? member) => - new SchemaException(SchemaErrorBuilder.New() - .SetMessage( - "The specified external attribute was applied to " + - "the member `{0}` of `{1}`, which is not a property.", - member?.Name, - type.FullName ?? type.Name) - .Build()); + Type type, + MemberInfo? member) => + new SchemaException( + SchemaErrorBuilder.New() + .SetMessage( + "The specified external attribute was applied to " + + "the member `{0}` of `{1}`, which is not a property.", + member?.Name, + type.FullName ?? type.Name) + .Build()); /// /// No ReferenceResolver was found for a type that is decorated with a ReferenceResolverAttribute. @@ -56,12 +58,13 @@ public static SchemaException ExternalAttribute_InvalidTarget( public static SchemaException ReferenceResolverAttribute_EntityResolverNotFound( Type type, string referenceResolver) => - new SchemaException(SchemaErrorBuilder.New() - .SetMessage( - "The specified ReferenceResolver `{0}` does not exist on `{1}`.", - type.FullName ?? type.Name, - referenceResolver) - .Build()); + new SchemaException( + SchemaErrorBuilder.New() + .SetMessage( + "The specified ReferenceResolver `{0}` does not exist on `{1}`.", + type.FullName ?? type.Name, + referenceResolver) + .Build()); /// /// The runtime type is not supported by the scalars ParseValue method. @@ -115,6 +118,23 @@ public static SchemaException Key_FieldSet_CannotBeEmpty( // .SetCode(ErrorCodes.ApolloFederation.KeyFieldSetNullOrEmpty) .Build()); + /// + /// The key attribute is used on the type level without specifying the fieldset. + /// + public static SchemaException Key_FieldSet_MustBeEmpty( + MemberInfo member) + { + var type = member.ReflectedType ?? member.DeclaringType!; + + return new SchemaException( + SchemaErrorBuilder.New() + .SetMessage("The specified key attribute must not specify a fieldset when annotated to a field.") + .SetExtension("type", type.FullName ?? type.Name) + .SetExtension("member", member.Name) + // .SetCode(ErrorCodes.ApolloFederation.KeyFieldSetNullOrEmpty) + .Build()); + } + /// /// The provides attribute is used and the fieldset is set to null or /// . @@ -188,4 +208,4 @@ public static SchemaException FederationVersion_Unknown( ThrowHelper_FederationVersion_Unknown, version) .Build()); -} +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs similarity index 86% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs index 46faecf697f..ab6befed988 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/DirectiveTypeDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs @@ -2,7 +2,7 @@ namespace HotChocolate.ApolloFederation; -internal static class DirectiveTypeDescriptorExtensions +internal static class CommonArgumentsDescriptorExtensions { public static IDirectiveTypeDescriptor FieldsArgument( this IDirectiveTypeDescriptor descriptor) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDefinition.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDefinition.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDefinition.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDefinition.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/EntityResolverDescriptor.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/IEntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/IEntityResolverDescriptor.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/IEntityResolverDescriptor.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/IEntityResolverDescriptor.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/ReferenceResolverDefinition.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/ReferenceResolverDefinition.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Descriptors/ReferenceResolverDefinition.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/ReferenceResolverDefinition.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyAttribute.cs similarity index 51% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyAttribute.cs index c188fdc241c..63b09312f12 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyAttribute.cs @@ -1,5 +1,8 @@ +using System.Collections.Generic; using System.Reflection; using HotChocolate.Types.Descriptors; +using static System.Reflection.MemberTypes; +using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; using static HotChocolate.ApolloFederation.ThrowHelper; namespace HotChocolate.ApolloFederation; @@ -32,7 +35,6 @@ namespace HotChocolate.ApolloFederation; /// id: ID! /// } /// -/// /// [AttributeUsage( AttributeTargets.Class | @@ -40,6 +42,14 @@ namespace HotChocolate.ApolloFederation; AllowMultiple = true)] public sealed class KeyAttribute : DescriptorAttribute { + /// + /// Initializes a new instance of . + /// + public KeyAttribute() + { + Resolvable = true; + } + /// /// Initializes a new instance of . /// @@ -47,9 +57,13 @@ public sealed class KeyAttribute : DescriptorAttribute /// The field set that describes the key. /// Grammatically, a field set is a selection set minus the braces. /// - public KeyAttribute(string? fieldSet = default) + /// + /// Indicates whether the key is resolvable. + /// + public KeyAttribute(string fieldSet, bool resolvable = true) { FieldSet = fieldSet; + Resolvable = resolvable; } /// @@ -57,29 +71,64 @@ public KeyAttribute(string? fieldSet = default) /// Grammatically, a field set is a selection set minus the braces. /// public string? FieldSet { get; } + + /// + /// Gets a value that indicates whether the key is resolvable. + /// + public bool Resolvable { get; } protected internal override void TryConfigure( IDescriptorContext context, IDescriptor descriptor, ICustomAttributeProvider element) { - if (descriptor is IObjectTypeDescriptor objectTypeDescriptor && - element is Type objectType) + switch (element) { - if (string.IsNullOrEmpty(FieldSet)) - { - throw Key_FieldSet_CannotBeEmpty(objectType); - } + case Type type: + ConfigureType(type, descriptor); + break; - objectTypeDescriptor.Key(FieldSet); + case MemberInfo { MemberType: Property | Method } member: + ConfigureField(member, descriptor); + break; } + } - if (descriptor is IObjectFieldDescriptor objectFieldDescriptor && - element is MemberInfo) + private void ConfigureType(Type type, IDescriptor descriptor) + { + if (string.IsNullOrEmpty(FieldSet)) + { + throw Key_FieldSet_CannotBeEmpty(type); + } + + switch (descriptor) + { + case IObjectTypeDescriptor typeDesc: + typeDesc.Key(FieldSet, Resolvable); + break; + + case IInterfaceTypeDescriptor interfaceDesc: + interfaceDesc.Key(FieldSet, Resolvable); + break; + } + } + + private void ConfigureField(MemberInfo member, IDescriptor descriptor) + { + if (string.IsNullOrEmpty(FieldSet)) + { + throw Key_FieldSet_MustBeEmpty(member); + } + + switch (descriptor) { - objectFieldDescriptor - .Extend() - .OnBeforeCreate(d => d.ContextData[Constants.WellKnownContextData.KeyMarker] = true); + case IObjectFieldDescriptor fieldDesc: + fieldDesc.Extend().Definition.ContextData.TryAdd(KeyMarker, true); + break; + + case IInterfaceFieldDescriptor fieldDesc: + fieldDesc.Extend().Definition.ContextData.TryAdd(KeyMarker, true); + break; } } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs new file mode 100644 index 00000000000..ed39d1a21c5 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs @@ -0,0 +1,101 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Descriptors; +using HotChocolate.Language; + +namespace HotChocolate.ApolloFederation; + +public static class KeyDescriptorExtensions +{ + /// + /// Applies the @key directive which is used to indicate a combination of fields that can be used to uniquely + /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), + /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can + /// be specified on a target type. + /// + /// Keys can be marked as non-resolvable which indicates to router that given entity should never be + /// resolved within given subgraph. This allows your subgraph to still reference target entity without + /// contributing any fields to it. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// field: String + /// bars: [Bar!]! + /// } + /// + /// type Bar @key(fields: "id", resolvable: false) { + /// id: ID! + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// The field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// Boolean flag to indicate whether this entity is resolvable locally. + /// + /// + /// + /// is null. + /// + /// + /// is null or . + /// + public static IEntityResolverDescriptor Key( + this IObjectTypeDescriptor descriptor, + string fieldSet, + bool? resolvable = null) + { + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(fieldSet); + + var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); + + descriptor.Directive(WellKnownTypeNames.Key, arguments); + + return new EntityResolverDescriptor(descriptor); + } + + /// + public static IInterfaceTypeDescriptor Key( + this IInterfaceTypeDescriptor descriptor, + string fieldSet, + bool? resolvable = null) + { + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(fieldSet); + + var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); + + return descriptor.Directive(WellKnownTypeNames.Key, arguments); + } + + private static ArgumentNode[] CreateKeyArgumentNodes(string fieldSet, bool? resolvable) + { + var notResolvable = resolvable is false; + + var argumentCount = 1; + if (notResolvable) + { + argumentCount++; + } + + var arguments = new ArgumentNode[argumentCount]; + arguments[0] = new ArgumentNode( + WellKnownArgumentNames.Fields, + new StringValueNode(fieldSet)); + + if (notResolvable) + { + arguments[1] = + new ArgumentNode( + WellKnownArgumentNames.Resolvable, + new BooleanValueNode(false)); + } + + return arguments; + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/KeyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDirectiveType.cs similarity index 73% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/KeyDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDirectiveType.cs index 502b2d98bd4..5e7b5825ca4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/KeyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDirectiveType.cs @@ -22,13 +22,27 @@ namespace HotChocolate.ApolloFederation; public sealed class KeyDirectiveType : DirectiveType { protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor + { + descriptor .Name(WellKnownTypeNames.Key) .Description(FederationResources.KeyDirective_Description) .Location(DirectiveLocation.Object | DirectiveLocation.Interface) - .Repeatable() - .FieldsArgument() + .Repeatable(); + + descriptor + .FieldsArgument(); + + if(descriptor.GetFederationVersion() > FederationVersion.Federation10) + { + descriptor + .Argument(WellKnownArgumentNames.Resolvable) + .Type() + .DefaultValue(true); + } + descriptor .Argument(WellKnownArgumentNames.Resolvable) .Type() .DefaultValue(true); + + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs new file mode 100644 index 00000000000..741db082ea6 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs @@ -0,0 +1,21 @@ +using HotChocolate.Types.Descriptors.Definitions; + +namespace HotChocolate.ApolloFederation; + +internal static class OptionsDescriptorExtensions +{ + public static FederationVersion GetFederationVersion( + this IDescriptor descriptor) + where T : DefinitionBase + { + var contextData = descriptor.Extend().Context.ContextData; + if (contextData.TryGetValue(Constants.WellKnownContextData.FederationVersion, out var value) && + value is FederationVersion version && version > FederationVersion.Unknown) + { + return version; + } + + // TODO : resources + throw new InvalidOperationException("The configuration state is invalid."); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownArgumentNames.cs similarity index 99% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownArgumentNames.cs index ab6a081cfc3..9a44123a2de 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownArgumentNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownArgumentNames.cs @@ -10,4 +10,4 @@ internal static class WellKnownArgumentNames public const string Scopes = "scopes"; public const string Url = "url"; public const string Policies = "policies"; -} +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownContextData.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownContextData.cs similarity index 85% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownContextData.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownContextData.cs index 5180cf6e0be..1bb3adad87c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownContextData.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownContextData.cs @@ -6,6 +6,7 @@ internal static class WellKnownContextData public const string ExtendMarker = "HotChocolate.ApolloFederation.Extend"; public const string ExternalSetter = "HotChocolate.ApolloFederation.ExternalSetter"; public const string EntityResolver = "HotChocolate.ApolloFederation.EntityResolver"; + public const string FederationVersion = "HotChocolate.ApolloFederation.Version"; public const string DataField = "data"; public const string TypeField = "__type"; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownFieldNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownFieldNames.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownFieldNames.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownFieldNames.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Constants/WellKnownTypeNames.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs From e8b6653966a422c3cc10e0940f7b8dd12d99aabc Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 20:36:27 +0100 Subject: [PATCH 66/89] edits --- .../ComposeDirectiveAttribute.cs | 0 ...ApolloFederationSchemaBuilderExtensions.cs | 2 +- .../HotChocolate.ApolloFederation.csproj | 4 -- .../ExtendServiceDirectiveType.cs} | 6 +- .../ExtendServiceTypeAttribute.cs | 0 .../Attributes => Types}/ProvidesAttribute.cs | 0 .../Types/ProvidesDescriptorExtensions.cs | 60 +++++++++++++++++++ .../ProvidesDirectiveType.cs | 9 ++- .../AnnotationBased/Types/Data.cs | 8 +-- .../AnnotationBased/Types/Product.cs | 20 ++----- .../AnnotationBased/Types/ProductDimension.cs | 12 +--- 11 files changed, 84 insertions(+), 37 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/{ => _remove}/ComposeDirectiveAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives/ExtendsDirectiveType.cs => Types/ExtendServiceDirectiveType.cs} (90%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Types}/ExtendServiceTypeAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Types}/ProvidesAttribute.cs (100%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives => Types}/ProvidesDirectiveType.cs (91%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ComposeDirectiveAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ComposeDirectiveAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ComposeDirectiveAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ComposeDirectiveAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index 34c1f23403f..44de920868e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -112,7 +112,7 @@ private static void AddApolloFederationDefinitions( { case FederationVersion.Federation20: { - builder.AddType(); + builder.AddType(); builder.AddType(); builder.AddType(); builder.AddType(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index 8061b7a3872..4c46ea457bb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -39,8 +39,4 @@ - - - - diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExtendsDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceDirectiveType.cs similarity index 90% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExtendsDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceDirectiveType.cs index 50ae3df2ff9..fcd9a400c2a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExtendsDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceDirectiveType.cs @@ -18,11 +18,13 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class ExtendsDirectiveType : DirectiveType +public sealed class ExtendServiceDirectiveType : DirectiveType { protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor + { + descriptor .Name(WellKnownTypeNames.Extends) .Description(FederationResources.ExtendsDirective_Description) .Location(DirectiveLocation.Object | DirectiveLocation.Interface); + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExtendServiceTypeAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ProvidesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ProvidesAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDescriptorExtensions.cs new file mode 100644 index 00000000000..17d3ebd5e19 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDescriptorExtensions.cs @@ -0,0 +1,60 @@ +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.Language; + +namespace HotChocolate.ApolloFederation; + +public static class ProvidesDescriptorExtensions +{ + /// + /// Applies the @provides directive which is a router optimization hint specifying field set that + /// can be resolved locally at the given subgraph through this particular query path. This + /// allows you to expose only a subset of fields from the underlying entity type to be selectable + /// from the federated schema without the need to call other subgraphs. Provided fields specified + /// in the directive field set should correspond to a valid field on the underlying GraphQL + /// interface/object type. @provides directive can only be used on fields returning entities. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// # implies name field can be resolved locally + /// bar: Bar @provides(fields: "name") + /// # name fields are external + /// # so will be fetched from other subgraphs + /// bars: [Bar] + /// } + /// + /// type Bar @key(fields: "id") { + /// id: ID! + /// name: String @external + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// The fields that are guaranteed to be selectable by the gateway. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// is null. + /// + /// + /// is null or . + /// + public static IObjectFieldDescriptor Provides( + this IObjectFieldDescriptor descriptor, + string fieldSet) + { + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(fieldSet); + + return descriptor.Directive( + WellKnownTypeNames.Provides, + new ArgumentNode( + WellKnownArgumentNames.Fields, + new StringValueNode(fieldSet))); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDirectiveType.cs similarity index 91% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDirectiveType.cs index 01c52685c87..f8984e6b91e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ProvidesDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDirectiveType.cs @@ -33,9 +33,12 @@ namespace HotChocolate.ApolloFederation; public sealed class ProvidesDirectiveType : DirectiveType { protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor + { + descriptor .Name(WellKnownTypeNames.Provides) .Description(FederationResources.ProvidesDirective_Description) - .Location(DirectiveLocation.FieldDefinition) - .FieldsArgument(); + .Location(DirectiveLocation.FieldDefinition); + + descriptor.FieldsArgument(); + } } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Data.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Data.cs index 4bba84cad81..e1b33e9acc5 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Data.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Data.cs @@ -4,9 +4,9 @@ namespace HotChocolate.ApolloFederation.CertificationSchema.AnnotationBased.Type public class Data { - public List Products { get; } = new() - { + public List Products { get; } = + [ new("apollo-federation", "federation", "@apollo/federation", "OSS"), - new("apollo-studio", "studio", string.Empty, "platform"), - }; + new("apollo-studio", "studio", string.Empty, "platform") + ]; } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs index 8c7dbfbcbc8..3547982f83f 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs @@ -6,29 +6,21 @@ namespace HotChocolate.ApolloFederation.CertificationSchema.AnnotationBased.Type [Key("id")] [Key("sku package")] [Key("sku variation { id }")] -public class Product +public class Product(string id, string sku, string package, string variation) { - public Product(string id, string sku, string package, string variation) - { - Id = id; - Sku = sku; - Package = package; - Variation = new(variation); - } - [ID] - public string Id { get; } + public string Id { get; } = id; - public string? Sku { get; } + public string? Sku { get; } = sku; - public string? Package { get; } + public string? Package { get; } = package; - public ProductVariation? Variation { get; } + public ProductVariation? Variation { get; } = new(variation); public ProductDimension? Dimensions { get; } = new("1", 1); [Provides("totalProductsCreated")] - public User? CreatedBy { get; } = new("support@apollographql.com", 1337); + public User? CreatedBy { get; } = new("contact@chillicream.com", 1337); [ReferenceResolver] public static Product? GetProductById( diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/ProductDimension.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/ProductDimension.cs index a1018fb718a..8b37a3fed80 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/ProductDimension.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/ProductDimension.cs @@ -1,14 +1,8 @@ namespace HotChocolate.ApolloFederation.CertificationSchema.AnnotationBased.Types; -public class ProductDimension +public class ProductDimension(string size, double weight) { - public ProductDimension(string size, double weight) - { - Size = size; - Weight = weight; - } + public string? Size { get; } = size; - public string? Size { get; } - - public double? Weight { get; } + public double? Weight { get; } = weight; } From 2f6ff5ed7759a76f710494300cc6403663a04ae8 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 20:39:02 +0100 Subject: [PATCH 67/89] edits --- .../{ => _remove}/ContactAttribute.cs | 0 .../Directives => Types}/Contact.cs | 0 .../ContactDirectiveType.cs | 5 ++- .../Types/ExternalAttribute.cs | 39 +++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/{ => _remove}/ContactAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives => Types}/Contact.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives => Types}/ContactDirectiveType.cs (97%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ContactAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ContactAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ContactAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ContactAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/Contact.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/Contact.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ContactDirectiveType.cs similarity index 97% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ContactDirectiveType.cs index 5ca58534a60..479c98dd40c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ContactDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ContactDirectiveType.cs @@ -18,7 +18,6 @@ namespace HotChocolate.ApolloFederation; /// Contact schema directive can be used to provide team contact information to your subgraph schema. This information is automatically parsed and displayed by Apollo Studio. /// See Subgraph Contact Information for additional details. /// -/// /// /// /// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ @@ -30,8 +29,10 @@ namespace HotChocolate.ApolloFederation; public sealed class ContactDirectiveType : DirectiveType { protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor + { + descriptor .Name(WellKnownTypeNames.ContactDirective) .Description(FederationResources.ContactDirective_Description) .Location(DirectiveLocation.Schema); + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalAttribute.cs new file mode 100644 index 00000000000..0732d886b04 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalAttribute.cs @@ -0,0 +1,39 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// # federation v1 definition +/// directive @external on FIELD_DEFINITION +/// +/// # federation v2 definition +/// directive @external on OBJECT | FIELD_DEFINITION +/// +/// +/// The @external directive is used to mark a field as owned by another service. +/// This allows service A to use fields from service B while also knowing at runtime +/// the types of that field. All the external fields should either be referenced from the @key, +/// @requires or @provides directives field sets. +/// +/// Due to the smart merging of entity types, Federation v2 no longer requires @external directive +/// on @key fields and can be safely omitted from the schema. @external directive is only required +/// on fields referenced by the @requires and @provides directive. +/// +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// remoteField: String @external +/// localField: String @requires(fields: "remoteField") +/// } +/// +/// +public sealed class ExternalAttribute : ObjectFieldDescriptorAttribute +{ + protected override void OnConfigure( + IDescriptorContext context, + IObjectFieldDescriptor descriptor, + MemberInfo member) + => descriptor.External(); +} From c9184553136ec4017f13ec41c06d3f3a83cf09eb Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 20:40:04 +0100 Subject: [PATCH 68/89] edits --- .../Attributes/ExternalAttribute.cs | 39 ------------------- .../ExternalDirectiveType.cs | 4 +- 2 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives => Types}/ExternalDirectiveType.cs (97%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs deleted file mode 100644 index 0732d886b04..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ExternalAttribute.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Reflection; -using HotChocolate.Types.Descriptors; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// # federation v1 definition -/// directive @external on FIELD_DEFINITION -/// -/// # federation v2 definition -/// directive @external on OBJECT | FIELD_DEFINITION -/// -/// -/// The @external directive is used to mark a field as owned by another service. -/// This allows service A to use fields from service B while also knowing at runtime -/// the types of that field. All the external fields should either be referenced from the @key, -/// @requires or @provides directives field sets. -/// -/// Due to the smart merging of entity types, Federation v2 no longer requires @external directive -/// on @key fields and can be safely omitted from the schema. @external directive is only required -/// on fields referenced by the @requires and @provides directive. -/// -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// remoteField: String @external -/// localField: String @requires(fields: "remoteField") -/// } -/// -/// -public sealed class ExternalAttribute : ObjectFieldDescriptorAttribute -{ - protected override void OnConfigure( - IDescriptorContext context, - IObjectFieldDescriptor descriptor, - MemberInfo member) - => descriptor.External(); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExternalDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalDirectiveType.cs similarity index 97% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExternalDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalDirectiveType.cs index 50d95949b14..b4d65f9d2cf 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ExternalDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalDirectiveType.cs @@ -28,8 +28,10 @@ namespace HotChocolate.ApolloFederation; public sealed class ExternalDirectiveType : DirectiveType { protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor + { + descriptor .Name(WellKnownTypeNames.External) .Description(FederationResources.ExternalDirective_Description) .Location(DirectiveLocation.FieldDefinition); + } } From b16e7aa5d4c622847b59f1d40e79b729f533836c Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 20:45:37 +0100 Subject: [PATCH 69/89] edits --- .../ApolloFederationDescriptorExtensions.cs | 35 ----------------- ...ApolloFederationSchemaBuilderExtensions.cs | 2 +- .../CommonArgumentsDescriptorExtensions.cs | 3 ++ .../src/ApolloFederation/Types/Contact.cs | 2 + .../ExtendServiceTypeDescriptorExtensions.cs | 39 +++++++++++++++++++ ...e.cs => ExtendServiceTypeDirectiveType.cs} | 2 +- .../Types/KeyDescriptorExtensions.cs | 39 ++++++++++++++++++- 7 files changed, 84 insertions(+), 38 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ExtendServiceDirectiveType.cs => ExtendServiceTypeDirectiveType.cs} (93%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index a944395ac4b..ea183a61538 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -105,41 +105,6 @@ public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor new StringValueNode(name))); } - /// - /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have - /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. - /// - /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends - /// directive should be removed from your Federation v2 schemas. - /// - /// # extended from the Users service - /// type Foo @extends @key(fields: "id") { - /// id: ID - /// description: String - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - public static IObjectTypeDescriptor ExtendServiceType( - this IObjectTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - descriptor - .Extend() - .OnBeforeCreate(d => d.ContextData[ExtendMarker] = true); - - return descriptor; - } - /// /// Applies the @external directive which is used to mark a field as owned by another service. /// This allows service A to use fields from service B while also knowing at runtime diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index 44de920868e..5574a2bd3be 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -112,7 +112,7 @@ private static void AddApolloFederationDefinitions( { case FederationVersion.Federation20: { - builder.AddType(); + builder.AddType(); builder.AddType(); builder.AddType(); builder.AddType(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs index ab6befed988..3dd42c6ed43 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs @@ -7,9 +7,12 @@ internal static class CommonArgumentsDescriptorExtensions public static IDirectiveTypeDescriptor FieldsArgument( this IDirectiveTypeDescriptor descriptor) { + ArgumentNullException.ThrowIfNull(descriptor); + descriptor .Argument(WellKnownArgumentNames.Fields) .Type>(); + return descriptor; } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs index 815dac3400c..d0809d525be 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs @@ -45,6 +45,8 @@ public sealed class Contact /// public Contact(string name, string? url, string? description) { + ArgumentException.ThrowIfNullOrEmpty(name); + Name = name; Url = url; Description = description; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDescriptorExtensions.cs new file mode 100644 index 00000000000..4ecb41d70df --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDescriptorExtensions.cs @@ -0,0 +1,39 @@ +namespace HotChocolate.ApolloFederation; + +public static class ExtendServiceTypeDescriptorExtensions +{ + /// + /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have + /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. + /// + /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends + /// directive should be removed from your Federation v2 schemas. + /// + /// # extended from the Users service + /// type Foo @extends @key(fields: "id") { + /// id: ID + /// description: String + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor ExtendServiceType( + this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor + .Extend() + .OnBeforeCreate(d => d.ContextData[Constants.WellKnownContextData.ExtendMarker] = true); + + return descriptor; + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDirectiveType.cs similarity index 93% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDirectiveType.cs index fcd9a400c2a..188a7a2886b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDirectiveType.cs @@ -18,7 +18,7 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class ExtendServiceDirectiveType : DirectiveType +public sealed class ExtendServiceTypeDirectiveType : DirectiveType { protected override void Configure(IDirectiveTypeDescriptor descriptor) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs index ed39d1a21c5..0b410a348a3 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs @@ -59,7 +59,44 @@ public static IEntityResolverDescriptor Key( return new EntityResolverDescriptor(descriptor); } - /// + /// + /// Applies the @key directive which is used to indicate a combination of fields that can be used to uniquely + /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), + /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can + /// be specified on a target type. + /// + /// Keys can be marked as non-resolvable which indicates to router that given entity should never be + /// resolved within given subgraph. This allows your subgraph to still reference target entity without + /// contributing any fields to it. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// field: String + /// bars: [Bar!]! + /// } + /// + /// type Bar @key(fields: "id", resolvable: false) { + /// id: ID! + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// The field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// Boolean flag to indicate whether this entity is resolvable locally. + /// + /// + /// + /// is null. + /// + /// + /// is null or . + /// public static IInterfaceTypeDescriptor Key( this IInterfaceTypeDescriptor descriptor, string fieldSet, From dd28bd52f5cc904e1dcca4b4c14e4c38e6fcbefd Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 22:46:48 +0100 Subject: [PATCH 70/89] edits --- .../ApolloFederationDescriptorExtensions.cs | 85 +------------------ .../FederationResources.Designer.cs | 24 ------ .../Properties/FederationResources.resx | 12 --- .../CommonArgumentsDescriptorExtensions.cs | 18 ---- .../Types/ContactDirectiveType.cs | 38 --------- .../ApolloFederation/Types/Descriptions.cs | 22 +++++ .../ContactDirective.cs} | 10 ++- .../Directives/ContactDirectiveExtensions.cs | 52 ++++++++++++ .../ExtendServiceTypeAttribute.cs | 0 .../ExtendServiceTypeDescriptorExtensions.cs | 5 +- .../ExtendServiceTypeDirective.cs} | 17 ++-- .../{ => Directives}/ExternalAttribute.cs | 0 .../ExternalDirective.cs} | 15 ++-- .../Directives/ExternalDirectiveExtensions.cs | 39 +++++++++ .../Types/{ => Directives}/KeyAttribute.cs | 0 .../KeyDescriptorExtensions.cs | 45 ++-------- .../Types/Directives/KeyDirective.cs | 49 +++++++++++ .../{ => Directives}/ProvidesAttribute.cs | 0 .../ProvidesDescriptorExtensions.cs | 10 +-- .../ProvidesDirective.cs} | 20 ++--- .../Types/FieldSetAttribute.cs | 13 +++ .../Types/KeyDirectiveType.cs | 48 ----------- .../Types/OptionsDescriptorExtensions.cs | 2 +- .../ApolloFederation/WellKnownTypeNames.cs | 16 ++-- .../DirectiveArgumentDescriptorAttribute.cs | 27 ++++++ .../DirectiveTypeDescriptorAttribute.cs | 2 +- 26 files changed, 249 insertions(+), 320 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ContactDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{Contact.cs => Directives/ContactDirective.cs} (85%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ => Directives}/ExtendServiceTypeAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ => Directives}/ExtendServiceTypeDescriptorExtensions.cs (90%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ExtendServiceTypeDirectiveType.cs => Directives/ExtendServiceTypeDirective.cs} (52%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ => Directives}/ExternalAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ExternalDirectiveType.cs => Directives/ExternalDirective.cs} (67%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirectiveExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ => Directives}/KeyAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ => Directives}/KeyDescriptorExtensions.cs (77%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ => Directives}/ProvidesAttribute.cs (100%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ => Directives}/ProvidesDescriptorExtensions.cs (88%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{ProvidesDirectiveType.cs => Directives/ProvidesDirective.cs} (69%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDirectiveType.cs create mode 100644 src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveArgumentDescriptorAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index ea183a61538..7e0f66673a4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -3,7 +3,7 @@ using HotChocolate.Language; using System.Collections.Generic; using System.Linq; -using ContactDirective = HotChocolate.ApolloFederation.Contact; +using HotChocolate.ApolloFederation; using LinkDirective = HotChocolate.ApolloFederation.Link; using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; using static HotChocolate.ApolloFederation.Properties.FederationResources; @@ -15,54 +15,6 @@ namespace HotChocolate.Types; /// public static partial class ApolloFederationDescriptorExtensions { - /// - /// Applies @contact directive which can be used to prpvode team contact information to your subgraph schema. - /// This information is automatically parsed and displayed by Apollo Studio. See - /// - /// Subgraph Contact Information - /// for additional details. - /// - /// - /// schema - /// @contact( - /// description: "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall)." - /// name: "My Team Name" - /// url: "https://myteam.slack.com/archives/teams-chat-room-url") { - /// query: Query - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Contact title of the subgraph owner - /// - /// - /// URL where the subgraph's owner can be reached - /// - /// - /// Other relevant contact notes; supports markdown links - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - /// - /// is null. - /// - public static ISchemaTypeDescriptor Contact( - this ISchemaTypeDescriptor descriptor, - string name, string? url = null, - string? description = null) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(name); - return descriptor.Directive(new ContactDirective(name, url, description)); - } - /// /// Applies @composeDirective which is used to specify custom directives that should be exposed in the /// Supergraph schema. If not specified, by default, Supergraph schema excludes all custom directives. @@ -105,41 +57,6 @@ public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor new StringValueNode(name))); } - /// - /// Applies the @external directive which is used to mark a field as owned by another service. - /// This allows service A to use fields from service B while also knowing at runtime - /// the types of that field. All the external fields should either be referenced from the @key, - /// @requires or @provides directives field sets. - /// - /// Due to the smart merging of entity types, Federation v2 no longer requires @external directive - /// on @key fields and can be safely omitted from the schema. @external directive is only required - /// on fields referenced by the @requires and @provides directive. - /// - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// remoteField: String @external - /// localField: String @requires(fields: "remoteField") - /// } - /// - /// - /// - /// The object field descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object field descriptor. - /// - /// - /// The is null. - /// - public static IObjectFieldDescriptor External( - this IObjectFieldDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - return descriptor.Directive(WellKnownTypeNames.External); - } - /// /// Applies the @interfaceObject directive which provides meta information to the router that this entity /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 06bbc694ad2..0aaab2023a7 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -51,30 +51,12 @@ internal static string AuthenticatedDirective_Description { } } - internal static string ContactDirective_Description { - get { - return ResourceManager.GetString("ContactDirective_Description", resourceCulture); - } - } - internal static string ComposeDirective_Description { get { return ResourceManager.GetString("ComposeDirective_Description", resourceCulture); } } - internal static string ExtendsDirective_Description { - get { - return ResourceManager.GetString("ExtendsDirective_Description", resourceCulture); - } - } - - internal static string ExternalDirective_Description { - get { - return ResourceManager.GetString("ExternalDirective_Description", resourceCulture); - } - } - internal static string FieldsetType_Description { get { return ResourceManager.GetString("FieldsetType_Description", resourceCulture); @@ -105,12 +87,6 @@ internal static string OverrideDirective_Description { } } - internal static string ProvidesDirective_Description { - get { - return ResourceManager.GetString("ProvidesDirective_Description", resourceCulture); - } - } - internal static string RequiresDirective_Description { get { return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index 215ccdb05c0..357a86c3e8a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -120,18 +120,9 @@ Indicates to composition that the target element is accessible only to the authenticated supergraph users. - - Provides contact information of the owner responsible for this subgraph schema. - Marks underlying custom directive to be included in the Supergraph schema. - - Directive to indicate that marks target object as extending part of the federated schema. - - - Directive to indicate that a field is owned by another service, for example via Apollo federation. - Scalar representing a set of fields. @@ -147,9 +138,6 @@ Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another. - - Used to annotate the expected returned fieldset from a field on a base type that is guaranteed to be selectable by the federation gateway. - Used to annotate the required input fieldset from a base type for a resolver. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs deleted file mode 100644 index 3dd42c6ed43..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/CommonArgumentsDescriptorExtensions.cs +++ /dev/null @@ -1,18 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; - -namespace HotChocolate.ApolloFederation; - -internal static class CommonArgumentsDescriptorExtensions -{ - public static IDirectiveTypeDescriptor FieldsArgument( - this IDirectiveTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - descriptor - .Argument(WellKnownArgumentNames.Fields) - .Type>(); - - return descriptor; - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ContactDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ContactDirectiveType.cs deleted file mode 100644 index 479c98dd40c..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ContactDirectiveType.cs +++ /dev/null @@ -1,38 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @contact( -/// "Contact title of the subgraph owner" -/// name: String! -/// "URL where the subgraph's owner can be reached" -/// url: String -/// "Other relevant notes can be included here; supports markdown links" -/// description: String -/// ) on SCHEMA -/// -/// -/// Contact schema directive can be used to provide team contact information to your subgraph schema. This information is automatically parsed and displayed by Apollo Studio. -/// See Subgraph Contact Information for additional details. -/// -/// -/// -/// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ -/// query: Query -/// } -/// -/// -/// -public sealed class ContactDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - { - descriptor - .Name(WellKnownTypeNames.ContactDirective) - .Description(FederationResources.ContactDirective_Description) - .Location(DirectiveLocation.Schema); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs new file mode 100644 index 00000000000..c79d78e54ef --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs @@ -0,0 +1,22 @@ +namespace HotChocolate.ApolloFederation.Types; + +internal static class Descriptions +{ + public const string ProvidesDirective_Description = + "Used to annotate the expected returned fieldset from a field on a base type " + + "that is guaranteed to be selectable by the federation gateway."; + + public const string KeyDirective_Description = + "Used to indicate a combination of fields that can be used to uniquely identify " + + "and fetch an object or interface."; + + public const string ExternalDirective_Description = + "Directive to indicate that a field is owned by another service, " + + "for example via Apollo federation."; + + public const string ExtendsDirective_Description = + "Directive to indicate that marks target object as extending part of the federated schema."; + + public const string ContactDirective_Description = + "Provides contact information of the owner responsible for this subgraph schema."; +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs similarity index 85% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs index d0809d525be..0510e0e1445 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Contact.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs @@ -1,3 +1,5 @@ +using HotChocolate.ApolloFederation.Types; + namespace HotChocolate.ApolloFederation; /// @@ -29,10 +31,12 @@ namespace HotChocolate.ApolloFederation; /// /// /// -public sealed class Contact +[DirectiveType(DirectiveLocation.Schema)] +[GraphQLDescription(Descriptions.ContactDirective_Description)] +public sealed class ContactDirective { /// - /// Initializes new instance of + /// Initializes new instance of /// /// /// Contact title of the subgraph owner @@ -43,7 +47,7 @@ public sealed class Contact /// /// Other relevant notes can be included here; supports markdown links /// - public Contact(string name, string? url, string? description) + public ContactDirective(string name, string? url, string? description) { ArgumentException.ThrowIfNullOrEmpty(name); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs new file mode 100644 index 00000000000..6658b683b2e --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs @@ -0,0 +1,52 @@ +namespace HotChocolate.ApolloFederation; + +public static class ContactDirectiveExtensions +{ + /// + /// Applies @contact directive which can be used to prpvode team contact information to your subgraph schema. + /// This information is automatically parsed and displayed by Apollo Studio. See + /// + /// Subgraph Contact Information + /// for additional details. + /// + /// + /// schema + /// @contact( + /// description: "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall)." + /// name: "My Team Name" + /// url: "https://myteam.slack.com/archives/teams-chat-room-url") { + /// query: Query + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Contact title of the subgraph owner + /// + /// + /// URL where the subgraph's owner can be reached + /// + /// + /// Other relevant contact notes; supports markdown links + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static ISchemaTypeDescriptor Contact( + this ISchemaTypeDescriptor descriptor, + string name, string? url = null, + string? description = null) + { + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(name); + return descriptor.Directive(new ContactDirective(name, url, description)); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs similarity index 90% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDescriptorExtensions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs index 4ecb41d70df..997c3660d05 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs @@ -30,10 +30,7 @@ public static IObjectTypeDescriptor ExtendServiceType( { ArgumentNullException.ThrowIfNull(descriptor); - descriptor - .Extend() - .OnBeforeCreate(d => d.ContextData[Constants.WellKnownContextData.ExtendMarker] = true); - + descriptor.Directive(ExtendServiceTypeDirective.Default); return descriptor; } } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs similarity index 52% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs index 188a7a2886b..ae9bc060a03 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExtendServiceTypeDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs @@ -1,5 +1,4 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; namespace HotChocolate.ApolloFederation; @@ -18,13 +17,9 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class ExtendServiceTypeDirectiveType : DirectiveType +[DirectiveType(DirectiveLocation.Object | DirectiveLocation.Interface)] +[GraphQLDescription(Descriptions.ExtendsDirective_Description)] +public sealed class ExtendServiceTypeDirective { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - { - descriptor - .Name(WellKnownTypeNames.Extends) - .Description(FederationResources.ExtendsDirective_Description) - .Location(DirectiveLocation.Object | DirectiveLocation.Interface); - } -} + public static ExtendServiceTypeDirective Default { get; } = new(); +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs similarity index 67% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs index b4d65f9d2cf..bb00dbf02b4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ExternalDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs @@ -1,5 +1,4 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; namespace HotChocolate.ApolloFederation; @@ -25,13 +24,9 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class ExternalDirectiveType : DirectiveType +[DirectiveType(DirectiveLocation.FieldDefinition)] +[GraphQLDescription(Descriptions.ExternalDirective_Description)] +public sealed class ExternalDirective { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - { - descriptor - .Name(WellKnownTypeNames.External) - .Description(FederationResources.ExternalDirective_Description) - .Location(DirectiveLocation.FieldDefinition); - } + public static ExternalDirective Default { get; } = new(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirectiveExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirectiveExtensions.cs new file mode 100644 index 00000000000..9263b8454e2 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirectiveExtensions.cs @@ -0,0 +1,39 @@ +namespace HotChocolate.ApolloFederation; + +public static class ExternalDirectiveExtensions +{ + /// + /// Applies the @external directive which is used to mark a field as owned by another service. + /// This allows service A to use fields from service B while also knowing at runtime + /// the types of that field. All the external fields should either be referenced from the @key, + /// @requires or @provides directives field sets. + /// + /// Due to the smart merging of entity types, Federation v2 no longer requires @external directive + /// on @key fields and can be safely omitted from the schema. @external directive is only required + /// on fields referenced by the @requires and @provides directive. + /// + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// remoteField: String @external + /// localField: String @requires(fields: "remoteField") + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// The is null. + /// + public static IObjectFieldDescriptor External( + this IObjectFieldDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + return descriptor.Directive(ExternalDirective.Default); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDescriptorExtensions.cs similarity index 77% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDescriptorExtensions.cs index 0b410a348a3..3d6a4e5158a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDescriptorExtensions.cs @@ -1,6 +1,4 @@ -using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Descriptors; -using HotChocolate.Language; namespace HotChocolate.ApolloFederation; @@ -47,15 +45,12 @@ public static class KeyDescriptorExtensions public static IEntityResolverDescriptor Key( this IObjectTypeDescriptor descriptor, string fieldSet, - bool? resolvable = null) + bool resolvable = true) { ArgumentNullException.ThrowIfNull(descriptor); ArgumentException.ThrowIfNullOrEmpty(fieldSet); - - var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); - - descriptor.Directive(WellKnownTypeNames.Key, arguments); - + + descriptor.Directive(new KeyDirective(fieldSet, resolvable)); return new EntityResolverDescriptor(descriptor); } @@ -75,7 +70,7 @@ public static IEntityResolverDescriptor Key( /// bars: [Bar!]! /// } /// - /// type Bar @key(fields: "id", resolvable: false) { + /// type Bar @key(fields: "id", resolvable: true) { /// id: ID! /// } /// @@ -100,39 +95,11 @@ public static IEntityResolverDescriptor Key( public static IInterfaceTypeDescriptor Key( this IInterfaceTypeDescriptor descriptor, string fieldSet, - bool? resolvable = null) + bool resolvable = true) { ArgumentNullException.ThrowIfNull(descriptor); ArgumentException.ThrowIfNullOrEmpty(fieldSet); - - var arguments = CreateKeyArgumentNodes(fieldSet, resolvable); - - return descriptor.Directive(WellKnownTypeNames.Key, arguments); - } - - private static ArgumentNode[] CreateKeyArgumentNodes(string fieldSet, bool? resolvable) - { - var notResolvable = resolvable is false; - - var argumentCount = 1; - if (notResolvable) - { - argumentCount++; - } - - var arguments = new ArgumentNode[argumentCount]; - arguments[0] = new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet)); - if (notResolvable) - { - arguments[1] = - new ArgumentNode( - WellKnownArgumentNames.Resolvable, - new BooleanValueNode(false)); - } - - return arguments; + return descriptor.Directive(new KeyDirective(fieldSet, resolvable)); } } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs new file mode 100644 index 00000000000..f4ffd8f229d --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs @@ -0,0 +1,49 @@ +using HotChocolate.ApolloFederation.Types; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE +/// +/// +/// The @key directive is used to indicate a combination of fields that can be used to uniquely +/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), +/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can +/// be specified on a target type. +/// +/// type Foo @key(fields: "id") { +/// id: ID! +/// field: String +/// } +/// +/// +[DirectiveType(DirectiveLocation.Object | DirectiveLocation.Interface, IsRepeatable = true)] +[GraphQLDescription(Descriptions.KeyDirective_Description)] +[KeyLegacySupport] +public sealed class KeyDirective(string fieldSet, bool resolvable = true) +{ + [FieldSet] + public string FieldSet { get; } = fieldSet; + + [GraphQLType] + [DefaultValue(true)] + public bool Resolvable { get; } = resolvable; +} + +internal sealed class KeyLegacySupportAttribute : DirectiveTypeDescriptorAttribute +{ + protected override void OnConfigure( + IDescriptorContext context, + IDirectiveTypeDescriptor descriptor, + Type type) + { + if (descriptor.GetFederationVersion() == FederationVersion.Federation10) + { + var desc = (IDirectiveTypeDescriptor)descriptor; + desc.BindArgumentsExplicitly(); + desc.Argument(t => t.FieldSet); + } + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDescriptorExtensions.cs similarity index 88% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDescriptorExtensions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDescriptorExtensions.cs index 17d3ebd5e19..debf9fb3152 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDescriptorExtensions.cs @@ -1,6 +1,3 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.Language; - namespace HotChocolate.ApolloFederation; public static class ProvidesDescriptorExtensions @@ -50,11 +47,6 @@ public static IObjectFieldDescriptor Provides( { ArgumentNullException.ThrowIfNull(descriptor); ArgumentException.ThrowIfNullOrEmpty(fieldSet); - - return descriptor.Directive( - WellKnownTypeNames.Provides, - new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet))); + return descriptor.Directive(new ProvidesDirective(fieldSet)); } } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs similarity index 69% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs index f8984e6b91e..b2e203d89f3 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ProvidesDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs @@ -1,5 +1,6 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; +using static HotChocolate.ApolloFederation.Types.Descriptions; +using static HotChocolate.Types.DirectiveLocation; namespace HotChocolate.ApolloFederation; @@ -30,15 +31,10 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class ProvidesDirectiveType : DirectiveType +[DirectiveType(FieldDefinition)] +[GraphQLDescription(ProvidesDirective_Description)] +public sealed class ProvidesDirective(string fieldSet) { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - { - descriptor - .Name(WellKnownTypeNames.Provides) - .Description(FederationResources.ProvidesDirective_Description) - .Location(DirectiveLocation.FieldDefinition); - - descriptor.FieldsArgument(); - } + [FieldSet] + public string FieldSet { get; } = fieldSet; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetAttribute.cs new file mode 100644 index 00000000000..9dc61909067 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetAttribute.cs @@ -0,0 +1,13 @@ +using System.Reflection; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation.Types; + +internal sealed class FieldSetAttribute : DirectiveArgumentDescriptorAttribute +{ + protected override void OnConfigure( + IDescriptorContext context, + IDirectiveArgumentDescriptor descriptor, + PropertyInfo property) + => descriptor.Type>(); +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDirectiveType.cs deleted file mode 100644 index 5e7b5825ca4..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/KeyDirectiveType.cs +++ /dev/null @@ -1,48 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE -/// -/// -/// The @key directive is used to indicate a combination of fields that can be used to uniquely -/// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), -/// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can -/// be specified on a target type. -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// field: String -/// } -/// -/// -public sealed class KeyDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - { - descriptor - .Name(WellKnownTypeNames.Key) - .Description(FederationResources.KeyDirective_Description) - .Location(DirectiveLocation.Object | DirectiveLocation.Interface) - .Repeatable(); - - descriptor - .FieldsArgument(); - - if(descriptor.GetFederationVersion() > FederationVersion.Federation10) - { - descriptor - .Argument(WellKnownArgumentNames.Resolvable) - .Type() - .DefaultValue(true); - } - descriptor - .Argument(WellKnownArgumentNames.Resolvable) - .Type() - .DefaultValue(true); - - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs index 741db082ea6..84fc7009231 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs @@ -10,7 +10,7 @@ public static FederationVersion GetFederationVersion( { var contextData = descriptor.Extend().Context.ContextData; if (contextData.TryGetValue(Constants.WellKnownContextData.FederationVersion, out var value) && - value is FederationVersion version && version > FederationVersion.Unknown) + value is FederationVersion version and > FederationVersion.Unknown) { return version; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs index 000dc3e53bf..cee1da63e44 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs @@ -3,16 +3,20 @@ namespace HotChocolate.ApolloFederation.Constants; internal static class WellKnownTypeNames { public const string AuthenticatedDirective = "authenticated"; - public const string ContactDirective = "contact"; + // public const string ContactDirective = "contact"; public const string ComposeDirective = "composeDirective"; - public const string Extends = "extends"; - public const string External = "external"; + // public const string Extends = "extends"; + //public const string External = "external"; public const string Inaccessible = "inaccessible"; + public const string InterfaceObject = "interfaceObject"; - public const string Key = "key"; + + //public const string Key = "key"; public const string Link = "link"; + public const string Override = "override"; - public const string Provides = "provides"; + + //public const string Provides = "provides"; public const string Requires = "requires"; public const string RequiresScopes = "requiresScopes"; public const string Shareable = "shareable"; @@ -24,4 +28,4 @@ internal static class WellKnownTypeNames public const string Service = "_Service"; public const string PolicyDirective = "policy"; public const string PolicyCollection = "policyCollection"; -} +} \ No newline at end of file diff --git a/src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveArgumentDescriptorAttribute.cs b/src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveArgumentDescriptorAttribute.cs new file mode 100644 index 00000000000..8660a3b2568 --- /dev/null +++ b/src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveArgumentDescriptorAttribute.cs @@ -0,0 +1,27 @@ +#nullable enable +using System; +using System.Reflection; +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.Types; + +[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] +public abstract class DirectiveArgumentDescriptorAttribute : DescriptorAttribute +{ + protected internal sealed override void TryConfigure( + IDescriptorContext context, + IDescriptor descriptor, + ICustomAttributeProvider element) + { + if (descriptor is IDirectiveArgumentDescriptor d + && element is PropertyInfo property) + { + OnConfigure(context, d, property); + } + } + + protected abstract void OnConfigure( + IDescriptorContext context, + IDirectiveArgumentDescriptor descriptor, + PropertyInfo property); +} \ No newline at end of file diff --git a/src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveTypeDescriptorAttribute.cs b/src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveTypeDescriptorAttribute.cs index d0dc6117ae2..2bc0cb3a687 100644 --- a/src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveTypeDescriptorAttribute.cs +++ b/src/HotChocolate/Core/src/Types/Types/Attributes/DirectiveTypeDescriptorAttribute.cs @@ -24,4 +24,4 @@ protected abstract void OnConfigure( IDescriptorContext context, IDirectiveTypeDescriptor descriptor, Type type); -} +} \ No newline at end of file From 1e1751097dcdefd07036fee609d8a264b7f60a06 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 23:18:52 +0100 Subject: [PATCH 71/89] edits --- .../FederationSchemaPrinter.OutputTypes.cs | 2 +- .../ApolloFederationDescriptorExtensions.cs | 2 +- ...ontextData.cs => FederationContextData.cs} | 3 +- .../Helpers/EntitiesResolver.cs | 2 +- .../Helpers/ExternalSetterExpressionHelper.cs | 2 +- ...erenceResolverArgumentExpressionBuilder.cs | 6 +- .../Helpers/ReferenceResolverHelper.cs | 2 +- .../FederationTypeInterceptor.cs | 2 +- .../src/ApolloFederation/ThrowHelper.cs | 6 + .../Descriptors/EntityResolverDescriptor.cs | 2 +- .../Directives/ContactDirectiveExtensions.cs | 147 +++++++++++++++++- .../Types/Directives/KeyAttribute.cs | 2 +- .../Types/OptionsDescriptorExtensions.cs | 2 +- .../ReferenceResolverAttributeTests.cs | 2 +- .../src/Abstractions/WellKnownContextData.cs | 5 + .../Core/src/Types/Schema.Initialization.cs | 84 ++++++++++ 16 files changed, 249 insertions(+), 22 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{WellKnownContextData.cs => FederationContextData.cs} (81%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs index 018a121aa73..a568ede70d5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs @@ -25,7 +25,7 @@ public static partial class FederationSchemaPrinter .Select(t => SerializeNamedType(t, context)) .ToList(); - if (objectType.ContextData.ContainsKey(Constants.WellKnownContextData.ExtendMarker)) + if (objectType.ContextData.ContainsKey(Constants.FederationContextData.ExtendMarker)) { return new ObjectTypeExtensionNode( location: null, diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 7e0f66673a4..4afda437c73 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -5,7 +5,7 @@ using System.Linq; using HotChocolate.ApolloFederation; using LinkDirective = HotChocolate.ApolloFederation.Link; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.Types; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownContextData.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs similarity index 81% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownContextData.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs index 1bb3adad87c..f8c6c4910e5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownContextData.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs @@ -1,9 +1,10 @@ namespace HotChocolate.ApolloFederation.Constants; -internal static class WellKnownContextData +internal static class FederationContextData { public const string KeyMarker = "HotChocolate.ApolloFederation.Key"; public const string ExtendMarker = "HotChocolate.ApolloFederation.Extend"; + public const string ContactMarker = "HotChocolate.ApolloFederation.Contact"; public const string ExternalSetter = "HotChocolate.ApolloFederation.ExternalSetter"; public const string EntityResolver = "HotChocolate.ApolloFederation.EntityResolver"; public const string FederationVersion = "HotChocolate.ApolloFederation.Version"; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/EntitiesResolver.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/EntitiesResolver.cs index 26f241b8a3a..cca2211e591 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/EntitiesResolver.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/EntitiesResolver.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using HotChocolate.Resolvers; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; namespace HotChocolate.ApolloFederation.Helpers; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs index c5bca71b144..784339d7585 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs @@ -6,7 +6,7 @@ using HotChocolate.Types.Descriptors.Definitions; using static System.Linq.Expressions.Expression; using static System.Reflection.BindingFlags; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; namespace HotChocolate.ApolloFederation.Helpers; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs index 9a8ddfc5c94..1190b12b2c9 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; +using HotChocolate.ApolloFederation.Constants; using HotChocolate.Internal; using HotChocolate.Language; using HotChocolate.Resolvers.Expressions.Parameters; -using ApolloContextData = HotChocolate.ApolloFederation.Constants.WellKnownContextData; namespace HotChocolate.ApolloFederation.Helpers; @@ -23,10 +23,10 @@ public override Expression Build(ParameterExpressionBuilderContext context) RequirePathAndGetSeparatedPath(param), typeof(string[])); var dataKey = Expression.Constant( - ApolloContextData.DataField, + FederationContextData.DataField, typeof(string)); var typeKey = Expression.Constant( - ApolloContextData.TypeField, + FederationContextData.TypeField, typeof(string)); var value = BuildGetter( param, diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverHelper.cs index 6e257fb14d7..9a5dfc84e5b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverHelper.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using HotChocolate.Language; using HotChocolate.Resolvers; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; namespace HotChocolate.ApolloFederation.Helpers; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index 34d739b48c9..e8662fedb95 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -13,7 +13,7 @@ using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; using static HotChocolate.ApolloFederation.ThrowHelper; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; using static HotChocolate.Types.TagHelper; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs index 5c25588ff5b..1649a8114a4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs @@ -208,4 +208,10 @@ public static SchemaException FederationVersion_Unknown( ThrowHelper_FederationVersion_Unknown, version) .Build()); + + public static SchemaException Contact_Not_Repeatable() => + new SchemaException( + SchemaErrorBuilder.New() + .SetMessage("The @contact directive is not repeatable and can.") + .Build()); } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs index 3e78345905f..59a9d8d03eb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs @@ -8,7 +8,7 @@ using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; using HotChocolate.Utilities; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; namespace HotChocolate.ApolloFederation.Descriptors; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs index 6658b683b2e..30446ec12e1 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs @@ -1,3 +1,8 @@ +using System.Collections.Generic; +using HotChocolate.Execution.Configuration; +using Microsoft.Extensions.DependencyInjection; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; + namespace HotChocolate.ApolloFederation; public static class ContactDirectiveExtensions @@ -19,8 +24,8 @@ public static class ContactDirectiveExtensions /// } /// /// - /// - /// The object type descriptor on which this directive shall be annotated. + /// + /// The GraphQL request executor builder. /// /// /// Contact title of the subgraph owner @@ -35,18 +40,144 @@ public static class ContactDirectiveExtensions /// Returns the object type descriptor. /// /// - /// is null. + /// is null. /// /// /// is null. /// - public static ISchemaTypeDescriptor Contact( - this ISchemaTypeDescriptor descriptor, - string name, string? url = null, + public static IRequestExecutorBuilder AddContact( + this IRequestExecutorBuilder builder, + string name, + string? url = null, string? description = null) { - ArgumentNullException.ThrowIfNull(descriptor); + ArgumentNullException.ThrowIfNull(builder); ArgumentException.ThrowIfNullOrEmpty(name); - return descriptor.Directive(new ContactDirective(name, url, description)); + + builder.ConfigureSchema( + sb => + { + if (!sb.ContextData.TryAdd(ContactMarker, 1)) + { + throw ThrowHelper.Contact_Not_Repeatable(); + } + + sb.AddSchemaConfiguration(d => d.Directive(new ContactDirective(name, url, description))); + }); + + return builder; + } + + /// + /// Applies @contact directive which can be used to prpvode team contact information to your subgraph schema. + /// This information is automatically parsed and displayed by Apollo Studio. See + /// + /// Subgraph Contact Information + /// for additional details. + /// + /// + /// schema + /// @contact( + /// description: "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall)." + /// name: "My Team Name" + /// url: "https://myteam.slack.com/archives/teams-chat-room-url") { + /// query: Query + /// } + /// + /// + /// + /// The GraphQL request executor builder. + /// + /// + /// The contact. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static IRequestExecutorBuilder AddContact( + this IRequestExecutorBuilder builder, + ContactDirective contact) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentNullException.ThrowIfNull(contact); + + builder.ConfigureSchema( + sb => + { + if (!sb.ContextData.TryAdd(ContactMarker, 1)) + { + throw ThrowHelper.Contact_Not_Repeatable(); + } + + sb.AddSchemaConfiguration(d => d.Directive(contact)); + }); + + return builder; + } + + /// + /// Applies @contact directive which can be used to prpvode team contact information to your subgraph schema. + /// This information is automatically parsed and displayed by Apollo Studio. See + /// + /// Subgraph Contact Information + /// for additional details. + /// + /// + /// schema + /// @contact( + /// description: "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall)." + /// name: "My Team Name" + /// url: "https://myteam.slack.com/archives/teams-chat-room-url") { + /// query: Query + /// } + /// + /// + /// + /// The GraphQL request executor builder. + /// + /// + /// A delegate to resolve the contact details from the DI or from the configuration. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static IRequestExecutorBuilder AddContact( + this IRequestExecutorBuilder builder, + Func contactResolver) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentNullException.ThrowIfNull(contactResolver); + + builder.ConfigureSchema( + (sp, sb) => + { + var contact = contactResolver(sp.GetApplicationServices()); + + if (contact is null) + { + return; + } + + if (!sb.ContextData.TryAdd(ContactMarker, 1)) + { + throw ThrowHelper.Contact_Not_Repeatable(); + } + + sb.AddSchemaConfiguration(d => d.Directive(contact)); + }); + + return builder; } } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs index 63b09312f12..08031fae2fd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs @@ -2,7 +2,7 @@ using System.Reflection; using HotChocolate.Types.Descriptors; using static System.Reflection.MemberTypes; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; using static HotChocolate.ApolloFederation.ThrowHelper; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs index 84fc7009231..4d74b958dc8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs @@ -9,7 +9,7 @@ public static FederationVersion GetFederationVersion( where T : DefinitionBase { var contextData = descriptor.Extend().Context.ContextData; - if (contextData.TryGetValue(Constants.WellKnownContextData.FederationVersion, out var value) && + if (contextData.TryGetValue(Constants.FederationContextData.FederationVersion, out var value) && value is FederationVersion version and > FederationVersion.Unknown) { return version; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs index 5117f826f1f..a00ab2b5353 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs @@ -3,7 +3,7 @@ using HotChocolate.Language; using HotChocolate.Resolvers; using HotChocolate.Types; -using static HotChocolate.ApolloFederation.Constants.WellKnownContextData; +using static HotChocolate.ApolloFederation.Constants.FederationContextData; using static HotChocolate.ApolloFederation.TestHelper; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/Core/src/Abstractions/WellKnownContextData.cs b/src/HotChocolate/Core/src/Abstractions/WellKnownContextData.cs index 6b241e70dca..3a35ea80ce5 100644 --- a/src/HotChocolate/Core/src/Abstractions/WellKnownContextData.cs +++ b/src/HotChocolate/Core/src/Abstractions/WellKnownContextData.cs @@ -284,4 +284,9 @@ public static class WellKnownContextData /// The key to access the tag options object. /// public const string TagOptions = "HotChocolate.Types.TagOptions"; + + /// + /// Type key to access the internal schema options. + /// + public const string InternalSchemaOptions = "HotChocolate.Types.InternalSchemaOptions"; } diff --git a/src/HotChocolate/Core/src/Types/Schema.Initialization.cs b/src/HotChocolate/Core/src/Types/Schema.Initialization.cs index 194e887e08b..0233cd307db 100644 --- a/src/HotChocolate/Core/src/Types/Schema.Initialization.cs +++ b/src/HotChocolate/Core/src/Types/Schema.Initialization.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using HotChocolate.Configuration; using HotChocolate.Types; @@ -29,6 +30,8 @@ protected sealed override SchemaTypeDefinition CreateDefinition(ITypeDiscoveryCo var descriptor = SchemaTypeDescriptor.New(context.DescriptorContext, GetType()); _configure(descriptor); + + context.DescriptorContext.ApplySchemaConfigurations(descriptor); return descriptor.CreateDefinition(); } @@ -106,3 +109,84 @@ internal void CompleteSchema(SchemaTypesDefinition schemaTypesDefinition) _sealed = true; } } + +internal static class SchemaTools +{ + public static void AddSchemaConfiguration( + this ISchemaBuilder builder, + Action configure) + { + if (builder is null) + { + throw new ArgumentNullException(nameof(builder)); + } + + if (configure is null) + { + throw new ArgumentNullException(nameof(configure)); + } + + List> options; + + if (!builder.ContextData.TryGetValue(WellKnownContextData.InternalSchemaOptions, out var value)) + { + options = new List>(); + builder.ContextData.Add(WellKnownContextData.InternalSchemaOptions, options); + value = options; + } + + options = (List>)value!; + options.Add(configure); + } + + public static void AddSchemaConfiguration( + this IDescriptorContext context, + Action configure) + { + if (context is null) + { + throw new ArgumentNullException(nameof(context)); + } + + if (configure is null) + { + throw new ArgumentNullException(nameof(configure)); + } + + List> options; + + if (!context.ContextData.TryGetValue(WellKnownContextData.InternalSchemaOptions, out var value)) + { + options = new List>(); + context.ContextData.Add(WellKnownContextData.InternalSchemaOptions, options); + value = options; + } + + options = (List>)value!; + options.Add(configure); + } + + public static void ApplySchemaConfigurations( + this IDescriptorContext context, + ISchemaTypeDescriptor descriptor) + { + if (context is null) + { + throw new ArgumentNullException(nameof(context)); + } + + if (descriptor is null) + { + throw new ArgumentNullException(nameof(descriptor)); + } + + if (context.ContextData.TryGetValue(WellKnownContextData.InternalSchemaOptions, out var value) && + value is List> options) + { + foreach (var option in options) + { + option(descriptor); + } + } + } +} \ No newline at end of file From 495835cb3e2b037291c703c03c6c809d96bb9b03 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 23:33:18 +0100 Subject: [PATCH 72/89] edits --- .../SchemaTypeDescriptorAttribute.cs | 13 ---- .../Directives/TagDirectiveType.cs | 70 ------------------- .../ApolloFederationDescriptorExtensions.cs | 46 ------------ .../HotChocolate.ApolloFederation.csproj | 33 +++++++++ .../ApolloFederation/Types/Descriptions.cs | 3 + ...ions.cs => ContactDescriptorExtensions.cs} | 2 +- ...ons.cs => ExternalDescriptorExtensions.cs} | 2 +- .../Directives}/RequiresAttribute.cs | 0 .../RequiresDescriptorExtensions.cs | 48 +++++++++++++ .../Directives/RequiresDirective.cs} | 17 ++--- 10 files changed, 93 insertions(+), 141 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/TagDirectiveType.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/{ContactDirectiveExtensions.cs => ContactDescriptorExtensions.cs} (99%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/{ExternalDirectiveExtensions.cs => ExternalDescriptorExtensions.cs} (96%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Types/Directives}/RequiresAttribute.cs (100%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives/RequiresDirectiveType.cs => Types/Directives/RequiresDirective.cs} (65%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs deleted file mode 100644 index 2186f8ae259..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/SchemaTypeDescriptorAttribute.cs +++ /dev/null @@ -1,13 +0,0 @@ -using HotChocolate.Types.Descriptors; - -namespace HotChocolate.ApolloFederation; - -/// -/// Schema descriptor attribute that provides common mechanism of applying directives on schema type. -/// -/// NOTE: HotChocolate currently does not provide mechanism to apply those directives. -/// -public abstract class SchemaTypeDescriptorAttribute : Attribute -{ - public abstract void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/TagDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/TagDirectiveType.cs deleted file mode 100644 index ec209020dff..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/TagDirectiveType.cs +++ /dev/null @@ -1,70 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @tag(name: String!) repeatable on FIELD_DEFINITION -/// | OBJECT -/// | INTERFACE -/// | UNION -/// | ENUM -/// | ENUM_VALUE -/// | SCALAR -/// | INPUT_OBJECT -/// | INPUT_FIELD_DEFINITION -/// | ARGUMENT_DEFINITION -/// -/// -/// The @tag directive allows users to annotate fields and types with additional metadata information. -/// Tagging is commonly used for creating variants of the supergraph using contracts. -/// -/// type Foo @tag(name: "internal") { -/// id: ID! -/// name: String -/// } -/// -/// -public sealed class TagDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .BindArgumentsImplicitly() - .Name(WellKnownTypeNames.Tag) - .Description(FederationResources.TagDirective_Description) - .Location( - DirectiveLocation.FieldDefinition - | DirectiveLocation.Object - | DirectiveLocation.Interface - | DirectiveLocation.Union - | DirectiveLocation.Enum - | DirectiveLocation.EnumValue - | DirectiveLocation.Scalar - | DirectiveLocation.Scalar - | DirectiveLocation.InputObject - | DirectiveLocation.InputFieldDefinition - | DirectiveLocation.ArgumentDefinition); -} - -/// -/// Object representation of a @tag directive. -/// -public sealed class TagValue -{ - /// - /// Initializes a new instance of . - /// - /// - /// Custom tag value - /// - public TagValue(string name) - { - Name = name; - } - - /// - /// Get tag value. - /// - public string Name { get; } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 4afda437c73..5b8f621f826 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -235,53 +235,7 @@ public static IObjectFieldDescriptor Provides( new StringValueNode(fieldSet))); } - /// - /// Applies the @requires directive which is used to specify external (provided by other subgraphs) - /// entity fields that are needed to resolve target field. It is used to develop a query plan where - /// the required fields may not be needed by the client, but the service may need additional - /// information from other subgraphs. Required fields specified in the directive field set should - /// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented - /// with @external directive. - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// # this field will be resolved from other subgraph - /// remote: String @external - /// local: String @requires(fields: "remote") - /// } - /// - /// - /// - /// The object field descriptor on which this directive shall be annotated. - /// - /// - /// The describes which fields may - /// not be needed by the client, but are required by - /// this service as additional information from other services. - /// Grammatically, a field set is a selection set minus the braces. - /// - /// - /// Returns the object field descriptor. - /// - /// - /// is null. - /// - /// - /// is null or . - /// - public static IObjectFieldDescriptor Requires( - this IObjectFieldDescriptor descriptor, - string fieldSet) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(fieldSet); - return descriptor.Directive( - WellKnownTypeNames.Requires, - new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet))); - } /// /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index 4c46ea457bb..c0ddef32a29 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -32,6 +32,39 @@ ResXFileCodeGenerator FederationResources.Designer.cs + + ProvidesDirective.cs + + + ProvidesDirective.cs + + + RequiresDirective.cs + + + RequiresDirective.cs + + + KeyDirective.cs + + + KeyDirective.cs + + + ExternalDirective.cs + + + ExternalDirective.cs + + + ExtendServiceTypeDirective.cs + + + ExtendServiceTypeDirective.cs + + + ContactDirective.cs + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs index c79d78e54ef..4ea70eb7d5e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs @@ -19,4 +19,7 @@ internal static class Descriptions public const string ContactDirective_Description = "Provides contact information of the owner responsible for this subgraph schema."; + + public const string RequiresDirective_Description = + "Used to annotate the required input fieldset from a base type for a resolver."; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs similarity index 99% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs index 30446ec12e1..8b0a7816c04 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirectiveExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs @@ -5,7 +5,7 @@ namespace HotChocolate.ApolloFederation; -public static class ContactDirectiveExtensions +public static class ContactDescriptorExtensions { /// /// Applies @contact directive which can be used to prpvode team contact information to your subgraph schema. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirectiveExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDescriptorExtensions.cs similarity index 96% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirectiveExtensions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDescriptorExtensions.cs index 9263b8454e2..7302d8b2b04 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirectiveExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDescriptorExtensions.cs @@ -1,6 +1,6 @@ namespace HotChocolate.ApolloFederation; -public static class ExternalDirectiveExtensions +public static class ExternalDescriptorExtensions { /// /// Applies the @external directive which is used to mark a field as owned by another service. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs new file mode 100644 index 00000000000..c92192ff0f7 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs @@ -0,0 +1,48 @@ +namespace HotChocolate.ApolloFederation; + +public static class RequiresDescriptorExtensions +{ + /// + /// Applies the @requires directive which is used to specify external (provided by other subgraphs) + /// entity fields that are needed to resolve target field. It is used to develop a query plan where + /// the required fields may not be needed by the client, but the service may need additional + /// information from other subgraphs. Required fields specified in the directive field set should + /// correspond to a valid field on the underlying GraphQL interface/object and should be instrumented + /// with @external directive. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// # this field will be resolved from other subgraph + /// remote: String @external + /// local: String @requires(fields: "remote") + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// The describes which fields may + /// not be needed by the client, but are required by + /// this service as additional information from other services. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// is null. + /// + /// + /// is null or . + /// + public static IObjectFieldDescriptor Requires( + this IObjectFieldDescriptor descriptor, + string fieldSet) + { + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(fieldSet); + + return descriptor.Directive(new RequiresDirective(fieldSet)); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs similarity index 65% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs index a69ec16f437..00cb6b3b31a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs @@ -1,5 +1,4 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; namespace HotChocolate.ApolloFederation; @@ -23,12 +22,10 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class RequiresDirectiveType : DirectiveType +[DirectiveType(DirectiveLocation.FieldDefinition)] +[GraphQLDescription(Descriptions.RequiresDirective_Description)] +public sealed class RequiresDirective(string fieldSet) { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Requires) - .Description(FederationResources.RequiresDirective_Description) - .Location(DirectiveLocation.FieldDefinition) - .FieldsArgument(); -} + [FieldSet] + public string FieldSet { get; } = fieldSet; +} \ No newline at end of file From 5909a115bbf83e56c91dc02652ffa8ddb1b8105a Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Tue, 16 Jan 2024 23:41:02 +0100 Subject: [PATCH 73/89] edits --- .../ApolloFederationDescriptorExtensions.cs | 41 +------------------ .../HotChocolate.ApolloFederation.csproj | 6 +++ .../FederationResources.Designer.cs | 12 ------ .../Properties/FederationResources.resx | 6 --- .../ApolloFederation/Types/Descriptions.cs | 4 ++ .../Directives}/OverrideAttribute.cs | 0 .../OverrideDescriptorExtensions.cs | 41 +++++++++++++++++++ .../Directives/OverrideDirective.cs} | 17 +++----- .../ApolloFederation/WellKnownTypeNames.cs | 4 +- 9 files changed, 60 insertions(+), 71 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Types/Directives}/OverrideAttribute.cs (100%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives/OverrideDirectiveType.cs => Types/Directives/OverrideDirective.cs} (53%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 5b8f621f826..59e96c44e31 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -141,46 +141,7 @@ public static ISchemaTypeDescriptor Link( return descriptor.Directive(new LinkDirective(url, import?.ToList())); } - /// - /// Applies the @override directive which is used to indicate that the current subgraph is taking - /// responsibility for resolving the marked field away from the subgraph specified in the from - /// argument. Name of the subgraph to be overridden has to match the name of the subgraph that - /// was used to publish their schema. - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// description: String @override(from: "BarSubgraph") - /// } - /// - /// - /// - /// The object field descriptor on which this directive shall be annotated. - /// - /// - /// Name of the subgraph to be overridden. - /// - /// - /// Returns the object field descriptor. - /// - /// - /// is null. - /// - /// - /// is null or . - /// - public static IObjectFieldDescriptor Override( - this IObjectFieldDescriptor descriptor, - string from) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(from); - - return descriptor.Directive( - WellKnownTypeNames.Override, - new ArgumentNode( - WellKnownArgumentNames.From, - new StringValueNode(from))); - } + /// /// Applies the @provides directive which is a router optimization hint specifying field set that diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index c0ddef32a29..a84fc7c7aeb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -65,6 +65,12 @@ ContactDirective.cs + + OverrideDirective.cs + + + OverrideDirective.cs + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 0aaab2023a7..8c4db53212c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -81,18 +81,6 @@ internal static string KeyDirective_Description { } } - internal static string OverrideDirective_Description { - get { - return ResourceManager.GetString("OverrideDirective_Description", resourceCulture); - } - } - - internal static string RequiresDirective_Description { - get { - return ResourceManager.GetString("RequiresDirective_Description", resourceCulture); - } - } - internal static string RequiresScopesDirective_Description { get { return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index 357a86c3e8a..2e84ddb10ad 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -135,12 +135,6 @@ Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface. - - Overrides fields resolution logic from other subgraph. Used for migrating fields from one subgraph to another. - - - Used to annotate the required input fieldset from a base type for a resolver. - Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs index 4ea70eb7d5e..40509a8f032 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs @@ -22,4 +22,8 @@ internal static class Descriptions public const string RequiresDirective_Description = "Used to annotate the required input fieldset from a base type for a resolver."; + + public const string OverrideDirective_Description = + "Overrides fields resolution logic from other subgraph. " + + "Used for migrating fields from one subgraph to another."; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/OverrideAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideAttribute.cs similarity index 100% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/OverrideAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideAttribute.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs new file mode 100644 index 00000000000..49bb43d98fb --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs @@ -0,0 +1,41 @@ +namespace HotChocolate.ApolloFederation; + +public static class OverrideDescriptorExtensions +{ + /// + /// Applies the @override directive which is used to indicate that the current subgraph is taking + /// responsibility for resolving the marked field away from the subgraph specified in the from + /// argument. Name of the subgraph to be overridden has to match the name of the subgraph that + /// was used to publish their schema. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// description: String @override(from: "BarSubgraph") + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Name of the subgraph to be overridden. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// is null. + /// + /// + /// is null or . + /// + public static IObjectFieldDescriptor Override( + this IObjectFieldDescriptor descriptor, + string from) + { + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(from); + + return descriptor.Directive(new OverrideDirective(from)); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/OverrideDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs similarity index 53% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/OverrideDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs index ab4351293cc..0cbc69f92ee 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/OverrideDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs @@ -1,5 +1,4 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; namespace HotChocolate.ApolloFederation; @@ -19,13 +18,9 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class OverrideDirectiveType : DirectiveType +[DirectiveType(DirectiveLocation.FieldDefinition)] +[GraphQLDescription(Descriptions.OverrideDirective_Description)] +public sealed class OverrideDirective(string from) { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Override) - .Description(FederationResources.OverrideDirective_Description) - .Location(DirectiveLocation.FieldDefinition) - .Argument(WellKnownArgumentNames.From) - .Type>(); -} + public string From { get; } = from; +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs index cee1da63e44..98f4af83f7f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs @@ -14,10 +14,10 @@ internal static class WellKnownTypeNames //public const string Key = "key"; public const string Link = "link"; - public const string Override = "override"; + // public const string Override = "override"; //public const string Provides = "provides"; - public const string Requires = "requires"; + //public const string Requires = "requires"; public const string RequiresScopes = "requiresScopes"; public const string Shareable = "shareable"; public const string Tag = "tag"; From 4bb38e6debbbd9878f2c7e71034300ee1d47a07b Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 09:19:50 +0100 Subject: [PATCH 74/89] edits --- .../Attributes/ReferenceResolverAttribute.cs | 3 +- .../ApolloFederationDescriptorExtensions.cs | 145 +----------------- .../HotChocolate.ApolloFederation.csproj | 6 + .../FederationTypeInterceptor.cs | 1 - .../FederationResources.Designer.cs | 6 - .../Properties/FederationResources.resx | 3 - .../ApolloFederation/Types/Descriptions.cs | 3 + .../Descriptors/EntityResolverDefinition.cs | 2 +- .../Descriptors/EntityResolverDescriptor.cs | 2 +- .../Descriptors/IEntityResolverDescriptor.cs | 2 +- .../ReferenceResolverDefinition.cs | 2 +- .../Directives/ContactDescriptorExtensions.cs | 2 +- .../Types/Directives/ContactDirective.cs | 4 +- .../Directives/ExtendServiceTypeAttribute.cs | 2 +- .../ExtendServiceTypeDescriptorExtensions.cs | 2 +- .../Directives/ExtendServiceTypeDirective.cs | 4 +- .../Types/Directives/ExternalAttribute.cs | 2 +- .../ExternalDescriptorExtensions.cs | 2 +- .../Types/Directives/ExternalDirective.cs | 4 +- .../Types/Directives/KeyAttribute.cs | 2 +- .../Directives/KeyDescriptorExtensions.cs | 46 +++++- .../Types/Directives/KeyDirective.cs | 3 +- .../Types/Directives/OverrideAttribute.cs | 2 +- .../OverrideDescriptorExtensions.cs | 2 +- .../Types/Directives/OverrideDirective.cs | 4 +- .../Types/Directives/ProvidesAttribute.cs | 2 +- .../ProvidesDescriptorExtensions.cs | 2 +- .../Types/Directives/ProvidesDirective.cs | 3 +- .../Types/Directives/RequiresAttribute.cs | 2 +- .../RequiresDescriptorExtensions.cs | 2 +- .../Types/Directives/RequiresDirective.cs | 4 +- .../Directives}/ShareableAttribute.cs | 5 +- .../ShareableDescriptorExtensions.cs | 107 +++++++++++++ .../Directives/ShareableDirective.cs} | 16 +- .../Types/OptionsDescriptorExtensions.cs | 2 +- .../ApolloFederation/WellKnownTypeNames.cs | 2 +- .../AnnotationBased/Types/Product.cs | 1 + .../AnnotationBased/Types/Query.cs | 1 + .../AnnotationBased/Types/User.cs | 1 + .../CodeFirst/Types/ProductType.cs | 7 +- .../CodeFirst/Types/QueryType.cs | 1 + .../CodeFirst/Types/UserType.cs | 1 + .../Directives/ExternalDirectiveTests.cs | 1 + .../Directives/KeyDirectiveTests.cs | 1 + .../Directives/PolicyDirectiveTests.cs | 1 + .../Directives/ProvidesDirectiveTests.cs | 3 +- .../Directives/RequiresDirectiveTests.cs | 1 + .../EntitiesResolverTests.cs | 1 + .../ApolloFederation.Tests/EntityTypeTests.cs | 1 + .../FederationSchemaPrinterTests.cs | 1 + .../ReferenceResolverAttributeTests.cs | 1 + .../ServiceTypeTests.cs | 1 + 52 files changed, 215 insertions(+), 212 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Types/Directives}/ShareableAttribute.cs (95%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives/ShareableDirectiveType.cs => Types/Directives/ShareableDirective.cs} (64%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs index 6f9ab52062a..f35ac20c7cd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs @@ -1,5 +1,4 @@ using System.Reflection; -using HotChocolate.ApolloFederation.Descriptors; using HotChocolate.Types.Descriptors; using static HotChocolate.ApolloFederation.ThrowHelper; @@ -83,7 +82,7 @@ private void OnConfigure(IObjectTypeDescriptor descriptor, Type type) } } - private void OnConfigure(IObjectTypeDescriptor descriptor, MethodInfo method) + private static void OnConfigure(IObjectTypeDescriptor descriptor, MethodInfo method) { var entityResolverDescriptor = new EntityResolverDescriptor(descriptor); entityResolverDescriptor.ResolveReferenceWith(method); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index 59e96c44e31..cf565a17eb2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -1,5 +1,4 @@ using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Descriptors; using HotChocolate.Language; using System.Collections.Generic; using System.Linq; @@ -198,115 +197,9 @@ public static IObjectFieldDescriptor Provides( - /// - /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. - /// If an object is marked as @shareable then all its fields are automatically shareable without the need - /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are - /// automatically shareable as well. - /// - /// type Foo @key(fields: "id") { - /// id: ID! # shareable because id is a key field - /// name: String # non-shareable - /// description: String @shareable # shareable - /// } - /// - /// type Bar @shareable { - /// description: String # shareable because User is marked shareable - /// name: String # shareable because User is marked shareable - /// } - /// - /// - /// - /// The object field descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object field descriptor. - /// - /// - /// is null. - /// - public static IObjectFieldDescriptor Shareable(this IObjectFieldDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - return descriptor.Directive(WellKnownTypeNames.Shareable); - } - - /// - /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. - /// If an object is marked as @shareable then all its fields are automatically shareable without the need - /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are - /// automatically shareable as well. - /// - /// type Foo @key(fields: "id") { - /// id: ID! # shareable because id is a key field - /// name: String # non-shareable - /// description: String @shareable # shareable - /// } - /// - /// type Bar @shareable { - /// description: String # shareable because User is marked shareable - /// name: String # shareable because User is marked shareable - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - return descriptor.Directive(WellKnownTypeNames.Shareable); - } - - /// - /// Adds the @key directive which is used to indicate a combination of fields that can be used to uniquely - /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), - /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can - /// be specified on a target type. - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// field: String - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// The field set that describes the key. - /// Grammatically, a field set is a selection set minus the braces. - /// - /// - /// - /// is null. - /// - /// - /// is null or . - /// - public static IEntityResolverDescriptor Key( - this IObjectTypeDescriptor descriptor, - string fieldSet) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(fieldSet); - - descriptor.Directive( - WellKnownTypeNames.Key, - new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet))); + - return new EntityResolverDescriptor(descriptor); - } + /// /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have @@ -370,37 +263,5 @@ public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescri return descriptor.Directive(WellKnownTypeNames.InterfaceObject); } - /// - /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. - /// If an object is marked as @shareable then all its fields are automatically shareable without the need - /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are - /// automatically shareable as well. - /// - /// type Foo @key(fields: "id") { - /// id: ID! # shareable because id is a key field - /// name: String # non-shareable - /// description: String @shareable # shareable - /// } - /// - /// type Bar @shareable { - /// description: String # shareable because User is marked shareable - /// name: String # shareable because User is marked shareable - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - return descriptor.Directive(WellKnownTypeNames.Shareable); - } + } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index a84fc7c7aeb..fbdd99a29bd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -71,6 +71,12 @@ OverrideDirective.cs + + ShareableDirective.cs + + + ShareableDirective.cs + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index e8662fedb95..d474a913d98 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -5,7 +5,6 @@ using System.Text; using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Descriptors; using HotChocolate.ApolloFederation.Helpers; using HotChocolate.Configuration; using HotChocolate.Language; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 8c4db53212c..272fb839056 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -93,12 +93,6 @@ internal static string ScopeType_Description { } } - internal static string ShareableDirective_Description { - get { - return ResourceManager.GetString("ShareableDirective_Description", resourceCulture); - } - } - internal static string TagDirective_Description { get { return ResourceManager.GetString("TagDirective_Description", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index 2e84ddb10ad..fefdc5bf9f8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -141,9 +141,6 @@ Scalar representing a JWT scope - - Indicates that given object and/or field can be resolved by multiple subgraphs. - Allows users to annotate fields and types with additional metadata information. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs index 40509a8f032..f730e7c9738 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs @@ -26,4 +26,7 @@ internal static class Descriptions public const string OverrideDirective_Description = "Overrides fields resolution logic from other subgraph. " + "Used for migrating fields from one subgraph to another."; + + public const string ShareableDirective_Description = + "Indicates that given object and/or field can be resolved by multiple subgraphs."; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDefinition.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDefinition.cs index 77982e63982..5d0f5a33238 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDefinition.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDefinition.cs @@ -1,6 +1,6 @@ using HotChocolate.Types.Descriptors.Definitions; -namespace HotChocolate.ApolloFederation.Descriptors; +namespace HotChocolate.ApolloFederation.Types; /// /// The entity definition allows to specify a reference resolver. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs index 59a9d8d03eb..488654b9db4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs @@ -10,7 +10,7 @@ using HotChocolate.Utilities; using static HotChocolate.ApolloFederation.Constants.FederationContextData; -namespace HotChocolate.ApolloFederation.Descriptors; +namespace HotChocolate.ApolloFederation.Types; /// /// The entity descriptor allows to specify a reference resolver. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/IEntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/IEntityResolverDescriptor.cs index 7c58b12bf84..fe91fb190f6 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/IEntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/IEntityResolverDescriptor.cs @@ -1,7 +1,7 @@ using System.Linq.Expressions; using System.Reflection; -namespace HotChocolate.ApolloFederation.Descriptors; +namespace HotChocolate.ApolloFederation.Types; /// /// The entity descriptor allows to specify a reference resolver. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/ReferenceResolverDefinition.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/ReferenceResolverDefinition.cs index 3eec6faf2c5..fbd21a77c51 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/ReferenceResolverDefinition.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/ReferenceResolverDefinition.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using HotChocolate.Resolvers; -namespace HotChocolate.ApolloFederation.Descriptors; +namespace HotChocolate.ApolloFederation.Types; /// /// A reference resolver definition. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs index 8b0a7816c04..47ed4cc7bc7 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using static HotChocolate.ApolloFederation.Constants.FederationContextData; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; public static class ContactDescriptorExtensions { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs index 0510e0e1445..286a75393df 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs @@ -1,6 +1,4 @@ -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeAttribute.cs index aa927f9bb21..adf370e27c5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeAttribute.cs @@ -1,6 +1,6 @@ using HotChocolate.Types.Descriptors; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs index 997c3660d05..1d2476b10a5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs @@ -1,4 +1,4 @@ -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; public static class ExtendServiceTypeDescriptorExtensions { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs index ae9bc060a03..57861b55bbd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs @@ -1,6 +1,4 @@ -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalAttribute.cs index 0732d886b04..f4fa6037d27 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalAttribute.cs @@ -1,7 +1,7 @@ using System.Reflection; using HotChocolate.Types.Descriptors; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDescriptorExtensions.cs index 7302d8b2b04..26cbf1749f5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDescriptorExtensions.cs @@ -1,4 +1,4 @@ -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; public static class ExternalDescriptorExtensions { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs index bb00dbf02b4..5d9a91da183 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs @@ -1,6 +1,4 @@ -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs index 08031fae2fd..581b89cd84c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs @@ -5,7 +5,7 @@ using static HotChocolate.ApolloFederation.Constants.FederationContextData; using static HotChocolate.ApolloFederation.ThrowHelper; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDescriptorExtensions.cs index 3d6a4e5158a..a6d1c6e68b4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDescriptorExtensions.cs @@ -1,6 +1,4 @@ -using HotChocolate.ApolloFederation.Descriptors; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; public static class KeyDescriptorExtensions { @@ -54,6 +52,48 @@ public static IEntityResolverDescriptor Key( return new EntityResolverDescriptor(descriptor); } + /// + /// Adds the @key directive which is used to indicate a combination of fields that can be used to uniquely + /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), + /// multiple fields (e.g. "id name") or nested selection sets (e.g. "id user { name }"). Multiple keys can + /// be specified on a target type. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// field: String + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// The field set that describes the key. + /// Grammatically, a field set is a selection set minus the braces. + /// + /// + /// Boolean flag to indicate whether this entity is resolvable locally. + /// + /// + /// + /// is null. + /// + /// + /// is null or . + /// + public static IEntityResolverDescriptor Key( + this IObjectTypeDescriptor descriptor, + string fieldSet, + bool resolvable = true) + { + ArgumentNullException.ThrowIfNull(descriptor); + ArgumentException.ThrowIfNullOrEmpty(fieldSet); + + descriptor.Directive(new KeyDirective(fieldSet, resolvable)); + + return new EntityResolverDescriptor(descriptor); + } + /// /// Applies the @key directive which is used to indicate a combination of fields that can be used to uniquely /// identify and fetch an object or interface. The specified field set can represent single field (e.g. "id"), diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs index f4ffd8f229d..99a71c7972b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs @@ -1,7 +1,6 @@ -using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Descriptors; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideAttribute.cs index 6909078f428..020f4243acc 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideAttribute.cs @@ -1,7 +1,7 @@ using System.Reflection; using HotChocolate.Types.Descriptors; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs index 49bb43d98fb..f50c150e48a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDescriptorExtensions.cs @@ -1,4 +1,4 @@ -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; public static class OverrideDescriptorExtensions { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs index 0cbc69f92ee..9fdff5420f5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs @@ -1,6 +1,4 @@ -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesAttribute.cs index f02c535e7f7..606457193e1 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesAttribute.cs @@ -2,7 +2,7 @@ using HotChocolate.Types.Descriptors; using static HotChocolate.ApolloFederation.ThrowHelper; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDescriptorExtensions.cs index debf9fb3152..a832d12e48b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDescriptorExtensions.cs @@ -1,4 +1,4 @@ -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; public static class ProvidesDescriptorExtensions { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs index b2e203d89f3..e47442f2946 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs @@ -1,8 +1,7 @@ -using HotChocolate.ApolloFederation.Types; using static HotChocolate.ApolloFederation.Types.Descriptions; using static HotChocolate.Types.DirectiveLocation; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresAttribute.cs index f75a75af3b6..d8022448c82 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresAttribute.cs @@ -2,7 +2,7 @@ using HotChocolate.Types.Descriptors; using static HotChocolate.ApolloFederation.ThrowHelper; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs index c92192ff0f7..acc54ef695d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDescriptorExtensions.cs @@ -1,4 +1,4 @@ -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; public static class RequiresDescriptorExtensions { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs index 00cb6b3b31a..efb8d0e1de5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs @@ -1,6 +1,4 @@ -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableAttribute.cs similarity index 95% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableAttribute.cs index 52a40bafcec..939a9d60f2a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ShareableAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableAttribute.cs @@ -1,7 +1,7 @@ using System.Reflection; using HotChocolate.Types.Descriptors; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// @@ -30,8 +30,7 @@ namespace HotChocolate.ApolloFederation; AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method - | AttributeTargets.Property -)] + | AttributeTargets.Property)] public sealed class ShareableAttribute : DescriptorAttribute { protected internal override void TryConfigure( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDescriptorExtensions.cs new file mode 100644 index 00000000000..13cfb93a305 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDescriptorExtensions.cs @@ -0,0 +1,107 @@ +namespace HotChocolate.ApolloFederation.Types; + +public static class ShareableDescriptorExtensions +{ + /// + /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple + /// subgraphs. + /// If an object is marked as @shareable then all its fields are automatically shareable without the need + /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are + /// automatically shareable as well. + /// + /// type Foo @key(fields: "id") { + /// id: ID! # shareable because id is a key field + /// name: String # non-shareable + /// description: String @shareable # shareable + /// } + /// + /// type Bar @shareable { + /// description: String # shareable because User is marked shareable + /// name: String # shareable because User is marked shareable + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + return descriptor.Directive(ShareableDirective.Default); + } + + /// + /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. + /// If an object is marked as @shareable then all its fields are automatically shareable without the need + /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are + /// automatically shareable as well. + /// + /// type Foo @key(fields: "id") { + /// id: ID! # shareable because id is a key field + /// name: String # non-shareable + /// description: String @shareable # shareable + /// } + /// + /// type Bar @shareable { + /// description: String # shareable because User is marked shareable + /// name: String # shareable because User is marked shareable + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor Shareable(this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + return descriptor.Directive(ShareableDirective.Default); + } + + /// + /// Applies @shareable directive which indicates that given object and/or field can be resolved by multiple subgraphs. + /// If an object is marked as @shareable then all its fields are automatically shareable without the need + /// for explicitly marking them with @shareable directive. All fields referenced from @key directive are + /// automatically shareable as well. + /// + /// type Foo @key(fields: "id") { + /// id: ID! # shareable because id is a key field + /// name: String # non-shareable + /// description: String @shareable # shareable + /// } + /// + /// type Bar @shareable { + /// description: String # shareable because User is marked shareable + /// name: String # shareable because User is marked shareable + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// is null. + /// + public static IObjectFieldDescriptor Shareable(this IObjectFieldDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + return descriptor.Directive(ShareableDirective.Default); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ShareableDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDirective.cs similarity index 64% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ShareableDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDirective.cs index 638539784cd..96ed62c0807 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ShareableDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDirective.cs @@ -1,7 +1,4 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// @@ -25,12 +22,9 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class ShareableDirectiveType : DirectiveType +[DirectiveType(DirectiveLocation.FieldDefinition | DirectiveLocation.Object, IsRepeatable = true)] +[GraphQLDescription(Descriptions.ShareableDirective_Description)] +public sealed class ShareableDirective { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Shareable) - .Description(FederationResources.ShareableDirective_Description) - .Location(DirectiveLocation.FieldDefinition | DirectiveLocation.Object) - .Repeatable(); + public static ShareableDirective Default { get; } = new(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs index 4d74b958dc8..4c24d845a0e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs @@ -1,6 +1,6 @@ using HotChocolate.Types.Descriptors.Definitions; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; internal static class OptionsDescriptorExtensions { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs index 98f4af83f7f..20b0f6dc1c3 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs @@ -19,7 +19,7 @@ internal static class WellKnownTypeNames //public const string Provides = "provides"; //public const string Requires = "requires"; public const string RequiresScopes = "requiresScopes"; - public const string Shareable = "shareable"; + // public const string Shareable = "shareable"; public const string Tag = "tag"; public const string FieldSet = "FieldSet"; public const string Scope = "Scope"; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs index 3547982f83f..989ab6dac3c 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs @@ -1,4 +1,5 @@ using System.Linq; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Relay; namespace HotChocolate.ApolloFederation.CertificationSchema.AnnotationBased.Types; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Query.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Query.cs index f18c954753b..c8a84a73b8f 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Query.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Query.cs @@ -1,4 +1,5 @@ using System.Linq; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Relay; namespace HotChocolate.ApolloFederation.CertificationSchema.AnnotationBased.Types; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/User.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/User.cs index c1f282684f4..f2e2ebbfabe 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/User.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/User.cs @@ -1,3 +1,4 @@ +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Relay; namespace HotChocolate.ApolloFederation.CertificationSchema.AnnotationBased.Types; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs index ae4a992d896..ea6a91a85ad 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs @@ -1,4 +1,5 @@ using System.Linq; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; namespace HotChocolate.ApolloFederation.CertificationSchema.CodeFirst.Types; @@ -23,9 +24,9 @@ protected override void Configure(IObjectTypeDescriptor descriptor) .Key("sku variation { id }") .ResolveReferenceWith(t => GetProductByVariation(default!, default!, default!)); - descriptor - .Field(t => t.CreatedBy) - .Provides("totalProductsCreated") + ProvidesDescriptorExtensions.Provides( + descriptor + .Field(t => t.CreatedBy), "totalProductsCreated") .Type>(); } diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/QueryType.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/QueryType.cs index 54a6b05f908..f601da8a6b5 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/QueryType.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/QueryType.cs @@ -1,4 +1,5 @@ using System.Linq; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; namespace HotChocolate.ApolloFederation.CertificationSchema.CodeFirst.Types; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/UserType.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/UserType.cs index 7b78308f699..844ea58c245 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/UserType.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/UserType.cs @@ -1,3 +1,4 @@ +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; namespace HotChocolate.ApolloFederation.CertificationSchema.CodeFirst.Types; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs index 31060f70be0..32811c90923 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs @@ -1,5 +1,6 @@ using System.Linq; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; using HotChocolate.Utilities; using Snapshooter.Xunit; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs index 310cbf5ed20..910022afd8a 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs @@ -1,5 +1,6 @@ using System.Linq; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; using HotChocolate.Utilities; using Snapshooter.Xunit; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs index 9c2dbe827f9..c476ec7df01 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs @@ -1,5 +1,6 @@ using System.Linq; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; using Snapshooter.Xunit; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs index 7c6fc133621..68706ad24b5 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs @@ -1,5 +1,6 @@ using System.Linq; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; using HotChocolate.Utilities; using Snapshooter.Xunit; @@ -89,7 +90,7 @@ public void AnnotateProvidesToFieldCodeFirst() { o.Name("Review").Key("id"); o.Field("id").Type(); - o.Field("product").Provides("name").Type("Product"); + ProvidesDescriptorExtensions.Provides(o.Field("product"), "name").Type("Product"); })) .AddQueryType( new ObjectType(o => diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs index b47a5cd3fc0..41753873fc8 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs @@ -1,5 +1,6 @@ using System.Linq; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; using HotChocolate.Utilities; using Snapshooter.Xunit; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs index f978b3fdefe..632bd7a08cf 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using GreenDonut; using HotChocolate.ApolloFederation.Helpers; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using static HotChocolate.ApolloFederation.TestHelper; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs index fab9f2c86a7..d41643f4a9d 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs @@ -1,3 +1,4 @@ +using HotChocolate.ApolloFederation.Types; using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs index 8d4b6a9595d..e2cba5e385a 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs @@ -1,5 +1,6 @@ using System; using System.Reflection; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; using HotChocolate.Types.Descriptors; using Snapshooter.Xunit; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs index a00ab2b5353..245ad0d90a8 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using HotChocolate.Resolvers; using HotChocolate.Types; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs index 9e1fdffdb95..b188943624d 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using Snapshooter.Xunit; using static HotChocolate.ApolloFederation.TestHelper; From a3186cac78bf588cc1cda1004b8b8d6edb75dd69 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 09:27:06 +0100 Subject: [PATCH 75/89] edits --- .../Attributes/RequiresScopesAttribute.cs | 1 + .../InaccessibleAttribute.cs | 21 +-- .../Directives/PolicyDirectiveType.cs | 1 + .../Directives/RequiresScopesDirectiveType.cs | 1 + .../ObjectTypes/PolicyCollectionType.cs | 128 ------------------ .../SchemaPrinter/FederationSchemaPrinter.cs | 1 + ...loFederationDescriptorExtensions.Policy.cs | 1 + ...tionDescriptorExtensions.RequiresScopes.cs | 1 + ...ApolloFederationSchemaBuilderExtensions.cs | 3 +- .../HotChocolate.ApolloFederation.csproj | 4 + .../FederationTypeInterceptor.cs | 2 + .../src/ApolloFederation/ThrowHelper.cs | 2 + .../ObjectTypes => Types}/AnyType.cs | 2 +- .../Types/Directives/KeyDirective.cs | 20 +-- .../Directives/KeyLegacySupportAttribute.cs | 19 +++ .../ObjectTypes => Types}/EntityType.cs | 2 +- .../ObjectTypes => Types}/FieldSetType.cs | 4 +- .../src/ApolloFederation/Types/Scope.cs | 23 ++++ .../ObjectTypes => Types}/ScopeType.cs | 30 +--- .../ObjectTypes => Types}/ServiceType.cs | 2 +- .../ApolloFederation.Tests/AnyTypeTests.cs | 1 + .../FederationTypesTestBase.cs | 1 + .../FieldSetTypeTests.cs | 1 + 23 files changed, 72 insertions(+), 199 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/{Attributes => Directives}/InaccessibleAttribute.cs (91%) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/ObjectTypes => Types}/AnyType.cs (98%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyLegacySupportAttribute.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/ObjectTypes => Types}/EntityType.cs (91%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/ObjectTypes => Types}/FieldSetType.cs (97%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/ObjectTypes => Types}/ScopeType.cs (67%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/ObjectTypes => Types}/ServiceType.cs (96%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs index 60ccfedad2a..30b5e7bc9c0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; using HotChocolate.Types.Helpers; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleAttribute.cs similarity index 91% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleAttribute.cs index c2d4300bcf5..e56185d9ad1 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InaccessibleAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleAttribute.cs @@ -42,8 +42,7 @@ namespace HotChocolate.ApolloFederation; | AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property - | AttributeTargets.Struct -)] + | AttributeTargets.Struct)] public sealed class InaccessibleAttribute : DescriptorAttribute { protected internal override void TryConfigure( @@ -54,50 +53,32 @@ protected internal override void TryConfigure( switch (descriptor) { case IEnumTypeDescriptor enumTypeDescriptor: - { enumTypeDescriptor.Inaccessible(); break; - } case IObjectTypeDescriptor objectFieldDescriptor: - { objectFieldDescriptor.Inaccessible(); break; - } case IObjectFieldDescriptor objectFieldDescriptor: - { objectFieldDescriptor.Inaccessible(); break; - } case IInterfaceTypeDescriptor interfaceTypeDescriptor: - { interfaceTypeDescriptor.Inaccessible(); break; - } case IInterfaceFieldDescriptor interfaceFieldDescriptor: - { interfaceFieldDescriptor.Inaccessible(); break; - } case IInputObjectTypeDescriptor inputObjectTypeDescriptor: - { inputObjectTypeDescriptor.Inaccessible(); break; - } case IInputFieldDescriptor inputFieldDescriptor: - { inputFieldDescriptor.Inaccessible(); break; - } case IUnionTypeDescriptor unionTypeDescriptor: - { unionTypeDescriptor.Inaccessible(); break; - } case IEnumValueDescriptor enumValueDescriptor: - { enumValueDescriptor.Inaccessible(); break; - } } } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs index bd8b235209d..490acbee58b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs @@ -1,5 +1,6 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs index 1c3f8696226..afb913272b1 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs deleted file mode 100644 index de4764a3cfa..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/PolicyCollectionType.cs +++ /dev/null @@ -1,128 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; -using HotChocolate.Language; - -namespace HotChocolate.ApolloFederation; - -/// -/// -public sealed class PolicyCollectionType : ScalarType -{ - public PolicyCollectionType(BindingBehavior bind = BindingBehavior.Explicit) - : base(WellKnownTypeNames.PolicyCollection, bind) - { - } - - public override bool IsInstanceOfType(IValueNode valueSyntax) - => PolicyParsingHelper.CanParseNode(valueSyntax); - - public override object ParseLiteral(IValueNode valueSyntax) - => PolicyParsingHelper.ParseNode(valueSyntax); - - public override IValueNode ParseValue(object? runtimeValue) - { - if (runtimeValue is not string[][] policies1) - { - throw new ArgumentException( - FederationResources.PolicyCollectionType_ParseValue_ExpectedStringArray, - nameof(runtimeValue)); - } - - return PolicyParsingHelper.ParseValue(policies1); - } - - public override IValueNode ParseResult(object? resultValue) - => ParseValue(resultValue); -} - - -public static class PolicyParsingHelper -{ - private static bool IsNestedList( - IValueNode syntaxNode, - int numDimensions) - { - if (syntaxNode.Kind == SyntaxKind.StringValue) - { - return true; - } - - if (numDimensions == 0) - { - return false; - } - - if (syntaxNode is not ListValueNode list) - { - return false; - } - - foreach (var item in list.Items) - { - if (!IsNestedList(item, numDimensions - 1)) - { - return false; - } - } - return true; - } - - private static string[] ParseNestedList1(IValueNode syntaxNode) - { - if (syntaxNode.Kind == SyntaxKind.StringValue) - { - return [(string)syntaxNode.Value!]; - } - - var listNode = (ListValueNode)syntaxNode; - var items = listNode.Items; - var array = new string[items.Count]; - for (var i = 0; i < array.Length; i++) - { - array[i] = (string)items[i].Value!; - } - return array; - } - - private static string[][] ParseNestedList2(IValueNode syntaxNode) - { - if (syntaxNode.Kind == SyntaxKind.StringValue) - { - return [[(string)syntaxNode.Value!]]; - } - - var listNode = (ListValueNode)syntaxNode; - var items = listNode.Items; - var array = new string[items.Count][]; - for (var i = 0; i < array.Length; i++) - { - array[i] = ParseNestedList1(items[i]); - } - return array; - } - - - public static ListValueNode ParseValue(string[][] policies1) - { - var list1 = new IValueNode[policies1.Length]; - for (int i1 = 0; i1 < list1.Length; i1++) - { - var policies2 = policies1[i1]; - var list2 = new IValueNode[policies2.Length]; - for (int i2 = 0; i2 < list2.Length; i2++) - { - list2[i2] = new StringValueNode(policies2[i2]); - } - - list1[i1] = new ListValueNode(list2); - } - - var result = new ListValueNode(list1); - return result; - } - - public static string[][] ParseNode(IValueNode syntaxNode) - => ParseNestedList2(syntaxNode); - public static bool CanParseNode(IValueNode syntaxNode) - => IsNestedList(syntaxNode, numDimensions: 2); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs index 49af5a02c4a..e6707a44779 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs @@ -3,6 +3,7 @@ using System.Linq; using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Helpers; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using HotChocolate.Types.Introspection; using HotChocolate.Utilities; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs index 44e3a7eb905..55ebdc620eb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs @@ -1,5 +1,6 @@ using HotChocolate.ApolloFederation; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; namespace HotChocolate.Types; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs index ce589a2f249..2c5e65c3f32 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using HotChocolate.ApolloFederation; +using HotChocolate.ApolloFederation.Types; namespace HotChocolate.Types; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index 5574a2bd3be..f1a259b3eb7 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -1,5 +1,6 @@ using HotChocolate.ApolloFederation; -using ApolloAnyType = HotChocolate.ApolloFederation.AnyType; +using HotChocolate.ApolloFederation.Types; +using ApolloAnyType = HotChocolate.ApolloFederation.Types.AnyType; namespace HotChocolate; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index fbdd99a29bd..b4d8d912afe 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -84,4 +84,8 @@ + + + + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index d474a913d98..da3bf20f4da 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Helpers; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Configuration; using HotChocolate.Language; using HotChocolate.Resolvers; @@ -14,6 +15,7 @@ using static HotChocolate.ApolloFederation.ThrowHelper; using static HotChocolate.ApolloFederation.Constants.FederationContextData; using static HotChocolate.Types.TagHelper; +using AnyType = HotChocolate.ApolloFederation.Types.AnyType; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs index 1649a8114a4..bf0382824cc 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs @@ -1,5 +1,7 @@ using System.Reflection; +using HotChocolate.ApolloFederation.Types; using static HotChocolate.ApolloFederation.Properties.FederationResources; +using AnyType = HotChocolate.ApolloFederation.Types.AnyType; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/AnyType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs similarity index 98% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/AnyType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs index 127236a62bf..101dfc2be76 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/AnyType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs @@ -5,7 +5,7 @@ using HotChocolate.Utilities; using static HotChocolate.ApolloFederation.ThrowHelper; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// The _Any scalar is used to pass representations of entities diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs index 99a71c7972b..4de81c282d5 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs @@ -1,5 +1,3 @@ -using HotChocolate.Types.Descriptors; - namespace HotChocolate.ApolloFederation.Types; /// @@ -29,20 +27,4 @@ public sealed class KeyDirective(string fieldSet, bool resolvable = true) [GraphQLType] [DefaultValue(true)] public bool Resolvable { get; } = resolvable; -} - -internal sealed class KeyLegacySupportAttribute : DirectiveTypeDescriptorAttribute -{ - protected override void OnConfigure( - IDescriptorContext context, - IDirectiveTypeDescriptor descriptor, - Type type) - { - if (descriptor.GetFederationVersion() == FederationVersion.Federation10) - { - var desc = (IDirectiveTypeDescriptor)descriptor; - desc.BindArgumentsExplicitly(); - desc.Argument(t => t.FieldSet); - } - } -} +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyLegacySupportAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyLegacySupportAttribute.cs new file mode 100644 index 00000000000..35ce3eaf50c --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyLegacySupportAttribute.cs @@ -0,0 +1,19 @@ +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation.Types; + +internal sealed class KeyLegacySupportAttribute : DirectiveTypeDescriptorAttribute +{ + protected override void OnConfigure( + IDescriptorContext context, + IDirectiveTypeDescriptor descriptor, + Type type) + { + if (descriptor.GetFederationVersion() == FederationVersion.Federation10) + { + var desc = (IDirectiveTypeDescriptor)descriptor; + desc.BindArgumentsExplicitly(); + desc.Argument(t => t.FieldSet); + } + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/EntityType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs similarity index 91% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/EntityType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs index 0f31a7a7673..310b567bb00 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/EntityType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs @@ -1,7 +1,7 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// A union called _Entity which is a union of all types that use the @key directive, diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs similarity index 97% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs index 79b39004270..3e9015ab4cb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/FieldSetType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs @@ -3,7 +3,7 @@ using HotChocolate.Language; using static HotChocolate.ApolloFederation.ThrowHelper; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// A scalar called _FieldSet is a custom scalar type that is used to @@ -53,7 +53,7 @@ protected override SelectionSetNode ParseLiteral(StringValueNode valueSyntax) /// protected override StringValueNode ParseValue(SelectionSetNode runtimeValue) - => new StringValueNode(SerializeSelectionSet(runtimeValue)); + => new(SerializeSelectionSet(runtimeValue)); /// public override IValueNode ParseResult(object? resultValue) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs new file mode 100644 index 00000000000..7d742fdebc1 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs @@ -0,0 +1,23 @@ +namespace HotChocolate.ApolloFederation.Types; + +/// +/// Scalar Scope representation. +/// +public sealed class Scope +{ + /// + /// Initializes a new instance of . + /// + /// + /// Scope value + /// + public Scope(string value) + { + Value = value; + } + + /// + /// Retrieve scope value + /// + public string Value { get; } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ScopeType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs similarity index 67% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ScopeType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs index 83f3e4bc202..c4f942662c7 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ScopeType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs @@ -2,7 +2,7 @@ using HotChocolate.ApolloFederation.Properties; using HotChocolate.Language; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// The Scope scalar representing a JWT scope. Serializes as a string. @@ -32,33 +32,11 @@ public ScopeType(string name, BindingBehavior bind = BindingBehavior.Explicit) } protected override Scope ParseLiteral(StringValueNode valueSyntax) - => new Scope(valueSyntax.Value); + => new(valueSyntax.Value); public override IValueNode ParseResult(object? resultValue) => ParseValue(resultValue); protected override StringValueNode ParseValue(Scope runtimeValue) - => new StringValueNode(runtimeValue.Value); -} - -/// -/// Scalar Scope representation. -/// -public sealed class Scope -{ - /// - /// Initializes a new instance of . - /// - /// - /// Scope value - /// - public Scope(string value) - { - Value = value; - } - - /// - /// Retrieve scope value - /// - public string Value { get; } -} + => new(runtimeValue.Value); +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServiceType.cs similarity index 96% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServiceType.cs index 49494234578..121fe876538 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/ObjectTypes/ServiceType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServiceType.cs @@ -2,7 +2,7 @@ using HotChocolate.ApolloFederation.Properties; using HotChocolate.Resolvers; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// A new object type called _Service must be created. diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs index ab5f2f44d28..5d2b0601ec2 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs @@ -1,6 +1,7 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.Language; using HotChocolate.Types; +using AnyType = HotChocolate.ApolloFederation.Types.AnyType; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs index 353b4baaede..0cbda05edf7 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationTypesTestBase.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; namespace HotChocolate.ApolloFederation; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs index 7ea691a392a..07da23f66ee 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs @@ -1,4 +1,5 @@ using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using HotChocolate.Types; using static HotChocolate.Language.Utf8GraphQLParser; From 5f52d05e1db4d271c05e63eecdfc2ae6ffe2d0ba Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 09:37:53 +0100 Subject: [PATCH 76/89] edits --- .../InterfaceObjectDirectiveType.cs | 28 --------- .../ApolloFederationDescriptorExtensions.cs | 54 +---------------- ...erenceResolverArgumentExpressionBuilder.cs | 1 + .../HotChocolate.ApolloFederation.csproj | 10 ++-- .../FederationTypeInterceptor.cs | 1 + .../FederationResources.Designer.cs | 6 -- .../Properties/FederationResources.resx | 3 - .../Attributes => Resolvers}/MapAttribute.cs | 2 +- .../ReferenceResolverAttribute.cs | 3 +- .../ApolloFederation/Types/Descriptions.cs | 3 + .../Directives/InaccessibleAttribute.cs | 2 +- .../Directives/InaccessibleDirectiveType.cs | 2 +- .../Directives/InterfaceObjectAttribute.cs | 29 ++++++++++ .../InterfaceObjectDescriptorExtensions.cs | 58 +++++++++++++++++++ .../Directives/InterfaceObjectDirective.cs} | 16 ++--- .../ApolloFederation/WellKnownTypeNames.cs | 2 +- .../AnnotationBased/Types/Product.cs | 1 + .../CodeFirst/Types/ProductType.cs | 1 + .../EntitiesResolverTests.cs | 1 + .../ReferenceResolverAttributeTests.cs | 1 + 20 files changed, 115 insertions(+), 109 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InterfaceObjectDirectiveType.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Resolvers}/MapAttribute.cs (92%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Resolvers}/ReferenceResolverAttribute.cs (96%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration => Types}/Directives/InaccessibleAttribute.cs (98%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration => Types}/Directives/InaccessibleDirectiveType.cs (97%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectAttribute.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes/InterfaceObjectAttribute.cs => Types/Directives/InterfaceObjectDirective.cs} (62%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InterfaceObjectDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InterfaceObjectDirectiveType.cs deleted file mode 100644 index 0dbc122af47..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InterfaceObjectDirectiveType.cs +++ /dev/null @@ -1,28 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @interfaceObject on OBJECT -/// -/// -/// The @interfaceObject directive provides meta information to the router that this entity -/// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality -/// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. -/// -/// type Foo @interfaceObject @key(fields: "ids") { -/// id: ID! -/// newCommonField: String -/// } -/// -/// -public sealed class InterfaceObjectDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.InterfaceObject) - .Description(FederationResources.InterfaceObjectDirective_Description) - .Location(DirectiveLocation.Object); -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index cf565a17eb2..b964b0496bc 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -56,33 +56,6 @@ public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor new StringValueNode(name))); } - /// - /// Applies the @interfaceObject directive which provides meta information to the router that this entity - /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality - /// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. - /// - /// type Foo @interfaceObject @key(fields: "ids") { - /// id: ID! - /// newCommonField: String - /// } - /// - /// - /// - /// The object field descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object field descriptor. - /// - /// - /// The is null. - /// - public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - return descriptor.Directive(WellKnownTypeNames.InterfaceObject); - } - /// @@ -236,32 +209,7 @@ public static IObjectTypeDescriptor ExtendServiceType( return descriptor; } - /// - /// Applies the @interfaceObject directive which provides meta information to the router that this entity - /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality - /// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. - /// - /// type Foo @interfaceObject @key(fields: "ids") { - /// id: ID! - /// newCommonField: String - /// } - /// - /// - /// - /// The object field descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object field descriptor. - /// - /// - /// The is null. - /// - public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - return descriptor.Directive(WellKnownTypeNames.InterfaceObject); - } + } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs index 1190b12b2c9..0c098af2c0e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs @@ -2,6 +2,7 @@ using System.Linq.Expressions; using System.Reflection; using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.Internal; using HotChocolate.Language; using HotChocolate.Resolvers.Expressions.Parameters; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index b4d8d912afe..4e0cba10093 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -77,6 +77,12 @@ ShareableDirective.cs + + InterfaceObjectDirective.cs + + + InterfaceObjectDirective.cs + @@ -84,8 +90,4 @@ - - - - diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs index da3bf20f4da..97d724a88ce 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Helpers; +using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Configuration; using HotChocolate.Language; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 272fb839056..23bfd9b02d2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -69,12 +69,6 @@ internal static string InaccessibleDirective_Description { } } - internal static string InterfaceObjectDirective_Description { - get { - return ResourceManager.GetString("InterfaceObjectDirective_Description", resourceCulture); - } - } - internal static string KeyDirective_Description { get { return ResourceManager.GetString("KeyDirective_Description", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index fefdc5bf9f8..b3bb1c7e9bb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -129,9 +129,6 @@ Marks location within schema as inaccessible from the GraphQL Gateway - - Provides meta information to the router that this entity type is an interface in the supergraph. - Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/MapAttribute.cs similarity index 92% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/MapAttribute.cs index 4948954c1b8..aebfdec154b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/MapAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/MapAttribute.cs @@ -1,4 +1,4 @@ -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Resolvers; /// /// Maps an argument to a representation value. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverAttribute.cs similarity index 96% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverAttribute.cs index f35ac20c7cd..4d3e56d1f82 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/ReferenceResolverAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverAttribute.cs @@ -1,8 +1,9 @@ using System.Reflection; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Descriptors; using static HotChocolate.ApolloFederation.ThrowHelper; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Resolvers; /// /// The reference resolver enables your gateway's query planner to resolve a particular diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs index f730e7c9738..ffa10179a9d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs @@ -29,4 +29,7 @@ internal static class Descriptions public const string ShareableDirective_Description = "Indicates that given object and/or field can be resolved by multiple subgraphs."; + + public const string InterfaceObjectDirective_Description = + "Provides meta information to the router that this entity type is an interface in the supergraph."; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleAttribute.cs similarity index 98% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleAttribute.cs index e56185d9ad1..9d05e1d7b70 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleAttribute.cs @@ -1,7 +1,7 @@ using System.Reflection; using HotChocolate.Types.Descriptors; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirectiveType.cs similarity index 97% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirectiveType.cs index 21ab226c766..0b338dcf2ae 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/InaccessibleDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirectiveType.cs @@ -1,7 +1,7 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectAttribute.cs new file mode 100644 index 00000000000..832f76c49d5 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectAttribute.cs @@ -0,0 +1,29 @@ +using HotChocolate.Types.Descriptors; + +namespace HotChocolate.ApolloFederation.Types; + +/// +/// +/// directive @interfaceObject on OBJECT +/// +/// +/// The @interfaceObject directive provides meta information to the router that this entity +/// type defined within this subgraph is an interface in the supergraph. +/// This allows you to extend functionality of an interface across the supergraph +/// without having to implement (or even be aware of) all its implementing types. +/// +/// +/// type Foo @interfaceObject @key(fields: "ids") { +/// id: ID! +/// newCommonField: String +/// } +/// +/// +public sealed class InterfaceObjectAttribute : ObjectTypeDescriptorAttribute +{ + protected override void OnConfigure( + IDescriptorContext context, + IObjectTypeDescriptor descriptor, + Type type) + => descriptor.InterfaceObject(); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDescriptorExtensions.cs new file mode 100644 index 00000000000..188598ec6cb --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDescriptorExtensions.cs @@ -0,0 +1,58 @@ +namespace HotChocolate.ApolloFederation.Types; + +public static class InterfaceObjectDescriptorExtensions +{ + /// + /// Applies the @interfaceObject directive which provides meta information to the router that this entity + /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality + /// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. + /// + /// type Foo @interfaceObject @key(fields: "ids") { + /// id: ID! + /// newCommonField: String + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// The is null. + /// + public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + return descriptor.Directive(InterfaceObjectDirective.Default); + } + + /// + /// Applies the @interfaceObject directive which provides meta information to the router that this entity + /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality + /// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. + /// + /// type Foo @interfaceObject @key(fields: "ids") { + /// id: ID! + /// newCommonField: String + /// } + /// + /// + /// + /// The object field descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object field descriptor. + /// + /// + /// The is null. + /// + public static IObjectTypeDescriptor InterfaceObject(this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + return descriptor.Directive(InterfaceObjectDirective.Default); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InterfaceObjectAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDirective.cs similarity index 62% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InterfaceObjectAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDirective.cs index 67bb3f7cc1f..4d84b54c2c8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/InterfaceObjectAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDirective.cs @@ -1,6 +1,4 @@ -using HotChocolate.Types.Descriptors; - -namespace HotChocolate.ApolloFederation; +namespace HotChocolate.ApolloFederation.Types; /// /// @@ -10,7 +8,6 @@ namespace HotChocolate.ApolloFederation; /// The @interfaceObject directive provides meta information to the router that this entity /// type defined within this subgraph is an interface in the supergraph. This allows you to extend functionality /// of an interface across the supergraph without having to implement (or even be aware of) all its implementing types. -/// /// /// type Foo @interfaceObject @key(fields: "ids") { /// id: ID! @@ -18,10 +15,9 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class InterfaceObjectAttribute : ObjectTypeDescriptorAttribute +[DirectiveType(DirectiveLocation.Object)] +[GraphQLDescription(Descriptions.InterfaceObjectDirective_Description)] +public sealed class InterfaceObjectDirective { - protected override void OnConfigure(IDescriptorContext context, IObjectTypeDescriptor descriptor, Type type) - { - descriptor.InterfaceObject(); - } -} + public static InterfaceObjectDirective Default { get; } = new(); +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs index 20b0f6dc1c3..6ff7888b7af 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs @@ -9,7 +9,7 @@ internal static class WellKnownTypeNames //public const string External = "external"; public const string Inaccessible = "inaccessible"; - public const string InterfaceObject = "interfaceObject"; + // public const string InterfaceObject = "interfaceObject"; //public const string Key = "key"; public const string Link = "link"; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs index 989ab6dac3c..66e1f754a8e 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/AnnotationBased/Types/Product.cs @@ -1,4 +1,5 @@ using System.Linq; +using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Relay; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs index ea6a91a85ad..a24d080ac51 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/CertificationSchema/CodeFirst/Types/ProductType.cs @@ -1,4 +1,5 @@ using System.Linq; +using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Types; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs index 632bd7a08cf..f5a9c723872 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using GreenDonut; using HotChocolate.ApolloFederation.Helpers; +using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using static HotChocolate.ApolloFederation.TestHelper; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs index 245ad0d90a8..a2b2e68ba1f 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using HotChocolate.Resolvers; From ffde8626a6cf3580d2ec03718f5b1212c7bd8cf4 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 13:45:23 +0100 Subject: [PATCH 77/89] edits --- .../Attributes/PolicyAttribute.cs | 90 ------------- .../Attributes/_remove/ContactAttribute.cs | 78 ----------- .../Attributes/_remove/LinkAttribute.cs | 86 ------------ .../Directives/LinkDirectiveType.cs | 74 ----------- .../Directives/PolicyDirectiveType.cs | 38 ------ .../ApolloFederationDescriptorExtensions.cs | 95 +------------- .../ApolloFederation/FederationContextData.cs | 2 +- .../ApolloFederation/FederationTypeNames.cs | 27 ++++ .../src/ApolloFederation/FederationVersion.cs | 10 ++ .../FederationVersioning/FederationUtils.cs | 5 +- .../HotChocolate.ApolloFederation.csproj | 15 +++ .../FederationResources.Designer.cs | 20 +-- .../FederationResources.cs} | 11 +- .../Properties/FederationResources.resx | 9 -- .../Descriptors/EntityResolverDescriptor.cs | 2 +- .../Directives/ComposeDirective.cs} | 22 ++-- .../Types/Directives/ContactDirective.cs | 7 +- .../ExtendServiceTypeDescriptorExtensions.cs | 32 +++++ .../Directives/ExtendServiceTypeDirective.cs | 12 +- .../Types/Directives/ExternalDirective.cs | 9 +- .../InaccessibleDescriptorExtensions.cs | 98 ++++++++++++++ ...ectiveType.cs => InaccessibleDirective.cs} | 40 +++--- .../Directives/InterfaceObjectDirective.cs | 9 +- .../Types/Directives/KeyDirective.cs | 13 +- .../Directives/LinkDescriptorExtensions.cs | 123 ++++++++++++++++++ .../Types/Directives/LinkDirective.cs | 36 +++++ .../Types/Directives/OverrideDirective.cs | 9 +- .../Types/Directives/PackageAttribute.cs | 7 + .../Types/Directives/ProvidesDirective.cs | 8 +- .../Types/Directives/RequiresDirective.cs | 9 +- .../Types/Directives/ShareableDirective.cs | 13 +- .../ApolloFederation/Types/FieldSetType.cs | 1 + .../ApolloFederation/WellKnownTypeNames.cs | 31 ----- 33 files changed, 465 insertions(+), 576 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ContactAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/LinkAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/LinkDirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Types/Descriptions.cs => Properties/FederationResources.cs} (80%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives/ComposeDirectiveType.cs => Types/Directives/ComposeDirective.cs} (57%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDescriptorExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/{InaccessibleDirectiveType.cs => InaccessibleDirective.cs} (53%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/PackageAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs deleted file mode 100644 index 0f845a78f8f..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/PolicyAttribute.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System.Reflection; -using HotChocolate.Types.Descriptors; - -namespace HotChocolate.ApolloFederation; - -[AttributeUsage( - AttributeTargets.Class - | AttributeTargets.Interface - | AttributeTargets.Property - | AttributeTargets.Method - | AttributeTargets.Enum - | AttributeTargets.Field - | AttributeTargets.Struct, - Inherited = true, - // TODO: Should we just allow multiple attributes instead maybe? - AllowMultiple = false)] -public sealed class PolicyAttribute : DescriptorAttribute -{ - public PolicyAttribute(string[][] policyCollection) - { - PolicyCollection = policyCollection; - } - - public PolicyAttribute(params string[] policySets) - { - PolicyCollection = ConvertCommaSeparatedPolicyNamesListsToCollection(policySets); - } - - /// - /// - public string[][] PolicyCollection { get; set; } - - /// - /// Comma-separated lists of policy names for each set. - /// - public string[] PolicySets - { - set => PolicyCollection = ConvertCommaSeparatedPolicyNamesListsToCollection(value); - } - - private static string[][] ConvertCommaSeparatedPolicyNamesListsToCollection(string[] names) - { - var policySets = new string[names.Length][]; - var policySetCount = policySets.Length; - for (var policySetIndex = 0; policySetIndex < policySetCount; policySetIndex++) - { - var commaSeparatedPolicyNames = names[policySetIndex]; - var policyNames = commaSeparatedPolicyNames.Split(','); - policySets[policySetIndex] = policyNames; - } - return policySets; - } - - protected internal override void TryConfigure( - IDescriptorContext context, - IDescriptor descriptor, - ICustomAttributeProvider element) - { - var policyCollection = PolicyCollection; - - switch (descriptor) - { - case IObjectFieldDescriptor fieldDescriptor: - { - fieldDescriptor.Policy(policyCollection); - break; - } - case IEnumTypeDescriptor enumTypeDescriptor: - { - enumTypeDescriptor.Policy(policyCollection); - break; - } - case IInterfaceTypeDescriptor interfaceTypeDescriptor: - { - interfaceTypeDescriptor.Policy(policyCollection); - break; - } - case IObjectTypeDescriptor objectTypeDescriptor: - { - objectTypeDescriptor.Policy(policyCollection); - break; - } - case IInterfaceFieldDescriptor interfaceFieldDescriptor: - { - interfaceFieldDescriptor.Policy(policyCollection); - break; - } - } - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ContactAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ContactAttribute.cs deleted file mode 100644 index 209c444082f..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ContactAttribute.cs +++ /dev/null @@ -1,78 +0,0 @@ -using HotChocolate.Types.Descriptors; -using static HotChocolate.ApolloFederation.ThrowHelper; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @contact( -/// "Contact title of the subgraph owner" -/// name: String! -/// "URL where the subgraph's owner can be reached" -/// url: String -/// "Other relevant notes can be included here; supports markdown links" -/// description: String -/// ) on SCHEMA -/// -/// -/// Contact schema directive can be used to provide team contact information to your subgraph schema. This information is automatically parsed and displayed by Apollo Studio. -/// See Subgraph Contact Information for additional details. -/// -/// -/// -/// -/// schema @contact(description : "send urgent issues to [#oncall](https://yourteam.slack.com/archives/oncall).", name : "My Team Name", url : "https://myteam.slack.com/archives/teams-chat-room-url"){ -/// query: Query -/// } -/// -/// -/// -[AttributeUsage( - AttributeTargets.Class | - AttributeTargets.Struct, - Inherited = true)] -public sealed class ContactAttribute : SchemaTypeDescriptorAttribute -{ - /// - /// Initializes new instance of - /// - /// - /// Contact title of the subgraph owner - /// - /// - /// URL where the subgraph's owner can be reached - /// - /// - /// Other relevant contact notes; supports markdown links - /// - public ContactAttribute(string name, string? url = null, string? description = null) - { - Name = name; - Url = url; - Description = description; - } - - /// - /// Gets the contact title of the subgraph owner. - /// - public string Name { get; } - - /// - /// Gets the url where the subgraph's owner can be reached. - /// - public string? Url { get; } - - /// - /// Gets other relevant notes about subgraph contact information. Can include markdown links. - /// - public string? Description { get; } - - public override void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type) - { - if (string.IsNullOrEmpty(Url)) - { - throw Contact_Name_CannotBeEmpty(type); - } - descriptor.Contact(Name, Url, Description); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/LinkAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/LinkAttribute.cs deleted file mode 100644 index 7db21bf1d64..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/LinkAttribute.cs +++ /dev/null @@ -1,86 +0,0 @@ -using HotChocolate.Types.Descriptors; -using static HotChocolate.ApolloFederation.ThrowHelper; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @link(url: String!, import: [String]) repeatable on SCHEMA -/// -/// -/// The @link directive links definitions within the document to external schemas. -/// External schemas are identified by their url, which optionally ends with a name and version with -/// the following format: `{NAME}/v{MAJOR}.{MINOR}` -/// -/// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive -/// should be namespaced as federation__key) unless they are explicitly imported. We automatically -/// import ALL federation directives to avoid the need for namespacing. -/// -/// NOTE: We currently DO NOT support full @link directive capability as it requires support for -/// namespacing and renaming imports. This functionality may be added in the future releases. -/// See @link specification for details. -/// -/// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) -/// -/// type Query { -/// foo: Foo! -/// } -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// name: String -/// } -/// -/// -[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = true)] -public sealed class LinkAttribute : SchemaTypeDescriptorAttribute -{ - /// - /// Initializes new instance of - /// - /// - /// Url of specification to be imported - /// - public LinkAttribute(string url) - { - Url = url; - Import = null; - } - - /// - /// Initializes new instance of - /// - /// - /// Url of specification to be imported - /// - /// - /// Optional list of imported elements. - /// - public LinkAttribute(string url, string[]? import) - { - Url = url; - Import = import; - } - - /// - /// Gets imported specification url. - /// - public string Url { get; } - - /// - /// Gets optional list of imported element names. - /// - public string[]? Import { get; } - - public override void OnConfigure( - IDescriptorContext context, - ISchemaTypeDescriptor descriptor, - Type type) - { - if (string.IsNullOrEmpty(Url)) - { - throw Link_Url_CannotBeEmpty(type); - } - descriptor.Link(Url, Import); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/LinkDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/LinkDirectiveType.cs deleted file mode 100644 index 0887a9834e4..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/LinkDirectiveType.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections.Generic; -using HotChocolate.ApolloFederation.Constants; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @link(url: String!, import: [String]) repeatable on SCHEMA -/// -/// -/// The @link directive links definitions within the document to external schemas. -/// External schemas are identified by their url, which optionally ends with a name and version with -/// the following format: `{NAME}/v{MAJOR}.{MINOR}` -/// -/// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive -/// should be namespaced as federation__key) unless they are explicitly imported. We automatically -/// import ALL federation directives to avoid the need for namespacing. -/// -/// NOTE: We currently DO NOT support full @link directive capability as it requires support for -/// namespacing and renaming imports. This functionality may be added in the future releases. -/// See @link specification for details. -/// -/// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) -/// -/// type Query { -/// foo: Foo! -/// } -/// -/// type Foo @key(fields: "id") { -/// id: ID! -/// name: String -/// } -/// -/// -public sealed class LinkDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .BindArgumentsImplicitly() - .Name(WellKnownTypeNames.Link) - .Location(DirectiveLocation.Schema) - .Repeatable(); -} - -/// -/// Object representation of @link directive. -/// -public sealed class Link -{ - /// - /// Initializes new instance of - /// - /// - /// Url of specification to be imported - /// - /// - /// Optional list of imported elements. - /// - public Link(string url, List? import) - { - Url = url; - Import = import; - } - - /// - /// Gets imported specification url. - /// - public string Url { get; } - - /// - /// Gets optional list of imported element names. - /// - public List? Import { get; } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs deleted file mode 100644 index 490acbee58b..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/PolicyDirectiveType.cs +++ /dev/null @@ -1,38 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @policy(policies: [[Policy!]!]!) on -/// | FIELD_DEFINITION -/// | OBJECT -/// | INTERFACE -/// | SCALAR -/// | ENUM -/// -/// Indicates to composition that the target element is restricted based on authorization policies -/// that are evaluated in a Rhai script or coprocessor. -/// -/// -public sealed class PolicyDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - { - descriptor - .Name(WellKnownTypeNames.PolicyDirective) - .Description(FederationResources.PolicyDirective_Description) - .Location( - DirectiveLocation.FieldDefinition | - DirectiveLocation.Object | - DirectiveLocation.Interface | - DirectiveLocation.Scalar | - DirectiveLocation.Enum); - - descriptor - .Argument(WellKnownArgumentNames.Policies) - .Type>(); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs index b964b0496bc..4d7db8ac50f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using HotChocolate.ApolloFederation; -using LinkDirective = HotChocolate.ApolloFederation.Link; using static HotChocolate.ApolloFederation.Constants.FederationContextData; using static HotChocolate.ApolloFederation.Properties.FederationResources; @@ -55,66 +54,7 @@ public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor WellKnownArgumentNames.Name, new StringValueNode(name))); } - - - - /// - /// Applies @link directive definitions to link the document to external schemas. - /// External schemas are identified by their url, which optionally ends with a name and version with - /// the following format: `{NAME}/v{MAJOR}.{MINOR}` - /// - /// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive - /// should be namespaced as federation__key) unless they are explicitly imported. We automatically - /// import ALL federation directives to avoid the need for namespacing. - /// - /// NOTE: We currently DO NOT support full @link directive capability as it requires support for - /// namespacing and renaming imports. This functionality may be added in the future releases. - /// See @link specification for details. - - /// - /// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) - /// - /// type Query { - /// foo: Foo! - /// } - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// name: String - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Url of specification to be imported - /// - /// - /// Optional list of imported elements. - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - /// - /// is null. - /// - public static ISchemaTypeDescriptor Link( - this ISchemaTypeDescriptor descriptor, - string url, - IEnumerable? import) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(url); - - return descriptor.Directive(new LinkDirective(url, import?.ToList())); - } - - /// /// Applies the @provides directive which is a router optimization hint specifying field set that /// can be resolved locally at the given subgraph through this particular query path. This @@ -174,40 +114,7 @@ public static IObjectFieldDescriptor Provides( - /// - /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have - /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. - /// - /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends - /// directive should be removed from your Federation v2 schemas. - /// - /// # extended from the Users service - /// type Foo @extends @key(fields: "id") { - /// id: ID - /// description: String - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - public static IObjectTypeDescriptor ExtendServiceType( - this IObjectTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - - descriptor - .Extend() - .OnBeforeCreate(d => d.ContextData[ExtendMarker] = true); - - return descriptor; - } + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs index f8c6c4910e5..11c9ecdbd17 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs @@ -1,4 +1,4 @@ -namespace HotChocolate.ApolloFederation.Constants; +namespace HotChocolate.ApolloFederation; internal static class FederationContextData { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs new file mode 100644 index 00000000000..11b59d66b78 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs @@ -0,0 +1,27 @@ +namespace HotChocolate.ApolloFederation; + +internal static class FederationTypeNames +{ + public const string AuthenticatedDirective_Name = "authenticated"; + public const string ContactDirective_Name = "contact"; + public const string ComposeDirective_Name = "composeDirective"; + public const string ExtendsDirective_Name = "extends"; + public const string ExternalDirective_Name = "external"; + public const string InaccessibleDirective_Name = "inaccessible"; + public const string InterfaceObject_Name = "interfaceObject"; + public const string KeyDirective_Name = "key"; + public const string LinkDirective_Name = "link"; + public const string OverrideDirective_Name = "override"; + public const string ProvidesDirective_Name = "provides"; + public const string RequiresDirective_Name = "requires"; + public const string RequiresScopes_Name = "requiresScopes"; + public const string ShareableDirective_Name = "shareable"; + public const string Tag_Name = "tag"; + public const string FieldSet_Name = "FieldSet"; + public const string Scope_Name = "Scope"; + public const string Any_Name = "_Any"; + public const string Entity_Name = "_Entity"; + public const string Service_Name = "_Service"; + public const string PolicyDirective_Name = "policy"; + public const string PolicyCollection_Name = "policyCollection"; +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs index 3377aeb411b..07a402d9e7d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs @@ -16,3 +16,13 @@ public enum FederationVersion Federation26 = 2_6, Latest = Federation26, } + +internal static class FederationVersionUrls +{ + public const string Federation20 = "https://specs.apollo.dev/federation/v2.0"; + public const string Federation21 = "https://specs.apollo.dev/federation/v2.1"; + public const string Federation22 = "https://specs.apollo.dev/federation/v2.2"; + public const string Federation23 = "https://specs.apollo.dev/federation/v2.3"; + public const string Federation24 = "https://specs.apollo.dev/federation/v2.4"; + public const string Federation25 = "https://specs.apollo.dev/federation/v2.5"; +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs index f811e714c3c..dae113ca3f8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs @@ -112,15 +112,16 @@ static FederationUtils() /// /// Federation @link information corresponding to the specified version. /// - internal static Link GetFederationLink(FederationVersion federationVersion) + internal static LinkDirective GetFederationLink(FederationVersion federationVersion) { if (!_imports.IsValidVersion(federationVersion)) { throw ThrowHelper.FederationVersion_Unknown(federationVersion); } - return new Link( + return new LinkDirective( _urls[federationVersion], _imports[federationVersion]); } } + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index 4e0cba10093..be0b8b55214 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -83,6 +83,21 @@ InterfaceObjectDirective.cs + + KeyDirective.cs + + + LinkDirective.cs + + + LinkDirective.cs + + + InaccessibleDirective.cs + + + InaccessibleDirective.cs + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 23bfd9b02d2..465fe5afa47 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -14,7 +14,7 @@ namespace HotChocolate.ApolloFederation.Properties { [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class FederationResources { + internal partial class FederationResources { private static System.Resources.ResourceManager resourceMan; @@ -51,30 +51,12 @@ internal static string AuthenticatedDirective_Description { } } - internal static string ComposeDirective_Description { - get { - return ResourceManager.GetString("ComposeDirective_Description", resourceCulture); - } - } - internal static string FieldsetType_Description { get { return ResourceManager.GetString("FieldsetType_Description", resourceCulture); } } - internal static string InaccessibleDirective_Description { - get { - return ResourceManager.GetString("InaccessibleDirective_Description", resourceCulture); - } - } - - internal static string KeyDirective_Description { - get { - return ResourceManager.GetString("KeyDirective_Description", resourceCulture); - } - } - internal static string RequiresScopesDirective_Description { get { return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs similarity index 80% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs index ffa10179a9d..40134ab2cf8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs @@ -1,6 +1,6 @@ -namespace HotChocolate.ApolloFederation.Types; +namespace HotChocolate.ApolloFederation.Properties; -internal static class Descriptions +internal partial class FederationResources { public const string ProvidesDirective_Description = "Used to annotate the expected returned fieldset from a field on a base type " + @@ -32,4 +32,11 @@ internal static class Descriptions public const string InterfaceObjectDirective_Description = "Provides meta information to the router that this entity type is an interface in the supergraph."; + + public const string InaccessibleDirective_Description = + "Marks location within schema as inaccessible from the GraphQL Gateway."; + + public const string ComposeDirective_Description = + "Marks underlying custom directive to be included in the Supergraph schema."; + } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index b3bb1c7e9bb..cde777d2e99 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -120,18 +120,9 @@ Indicates to composition that the target element is accessible only to the authenticated supergraph users. - - Marks underlying custom directive to be included in the Supergraph schema. - Scalar representing a set of fields. - - Marks location within schema as inaccessible from the GraphQL Gateway - - - Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface. - Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs index 488654b9db4..cf083165270 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs @@ -8,7 +8,7 @@ using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; using HotChocolate.Utilities; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; +using static HotChocolate.ApolloFederation.FederationContextData; namespace HotChocolate.ApolloFederation.Types; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ComposeDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ComposeDirective.cs similarity index 57% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ComposeDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ComposeDirective.cs index 9c49dc1233c..a433dd84898 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/ComposeDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ComposeDirective.cs @@ -1,5 +1,6 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.ApolloFederation; @@ -23,13 +24,10 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class ComposeDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.ComposeDirective) - .Description(FederationResources.ComposeDirective_Description) - .Location(DirectiveLocation.Schema) - .Argument(WellKnownArgumentNames.Name) - .Type>(); -} +[Package(Federation25)] +[DirectiveType(ComposeDirective_Name, DirectiveLocation.Schema, IsRepeatable = true)] +[GraphQLDescription(ComposeDirective_Description)] +public sealed class ComposeDirective(string name) +{ + public string Name { get; } = name; +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs index 286a75393df..d7e63791fd8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDirective.cs @@ -1,3 +1,6 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -29,8 +32,8 @@ namespace HotChocolate.ApolloFederation.Types; /// /// /// -[DirectiveType(DirectiveLocation.Schema)] -[GraphQLDescription(Descriptions.ContactDirective_Description)] +[DirectiveType(ContactDirective_Name, DirectiveLocation.Schema)] +[GraphQLDescription(ContactDirective_Description)] public sealed class ContactDirective { /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs index 1d2476b10a5..9903a763265 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDescriptorExtensions.cs @@ -2,6 +2,38 @@ namespace HotChocolate.ApolloFederation.Types; public static class ExtendServiceTypeDescriptorExtensions { + /// + /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have + /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. + /// + /// NOTE: Federation v2 no longer requires `@extends` directive due to the smart entity type merging. All usage of @extends + /// directive should be removed from your Federation v2 schemas. + /// + /// # extended from the Users service + /// type Foo @extends @key(fields: "id") { + /// id: ID + /// description: String + /// } + /// + /// + /// + /// The object type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + public static IObjectTypeDescriptor ExtendServiceType( + this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Directive(ExtendServiceTypeDirective.Default); + return descriptor; + } + /// /// Applies @extends directive which is used to represent type extensions in the schema. Federated extended types should have /// corresponding @key directive defined that specifies primary key required to fetch the underlying object. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs index 57861b55bbd..cfdf38cdee8 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExtendServiceTypeDirective.cs @@ -1,3 +1,7 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -15,8 +19,12 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(DirectiveLocation.Object | DirectiveLocation.Interface)] -[GraphQLDescription(Descriptions.ExtendsDirective_Description)] +[Package(Federation20)] +[DirectiveType( + ExtendsDirective_Name, + DirectiveLocation.Object | + DirectiveLocation.Interface)] +[GraphQLDescription(ExtendsDirective_Description)] public sealed class ExtendServiceTypeDirective { public static ExtendServiceTypeDirective Default { get; } = new(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs index 5d9a91da183..3118084014e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ExternalDirective.cs @@ -1,3 +1,7 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -22,8 +26,9 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(DirectiveLocation.FieldDefinition)] -[GraphQLDescription(Descriptions.ExternalDirective_Description)] +[Package(Federation20)] +[DirectiveType(ExternalDirective_Name, DirectiveLocation.FieldDefinition)] +[GraphQLDescription(ExternalDirective_Description)] public sealed class ExternalDirective { public static ExternalDirective Default { get; } = new(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDescriptorExtensions.cs new file mode 100644 index 00000000000..d4ff26078f4 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDescriptorExtensions.cs @@ -0,0 +1,98 @@ +namespace HotChocolate.ApolloFederation.Types; + +public static class InaccessibleDescriptorExtensions +{ + /// + /// Applies the @inaccessible directive which is used to mark location within schema as inaccessible + /// from the GraphQL Router. While @inaccessible fields are not exposed by the router to the clients, + /// they are still available for query plans and can be referenced from @key and @requires directives. + /// This allows you to not expose sensitive fields to your clients but still make them available for + /// computations. Inaccessible can also be used to incrementally add schema elements (e.g. fields) to + /// multiple subgraphs without breaking composition. + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// hidden: String @inaccessible + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor Inaccessible( + this IEnumTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IEnumValueDescriptor Inaccessible( + this IEnumValueDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IInterfaceFieldDescriptor Inaccessible( + this IInterfaceFieldDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IInterfaceTypeDescriptor Inaccessible( + this IInterfaceTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IInputObjectTypeDescriptor Inaccessible( + this IInputObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IInputFieldDescriptor Inaccessible( + this IInputFieldDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IObjectFieldDescriptor Inaccessible( + this IObjectFieldDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IObjectTypeDescriptor Inaccessible( + this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } + + /// + public static IUnionTypeDescriptor Inaccessible( + this IUnionTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(InaccessibleDirective.Default); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirective.cs similarity index 53% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirective.cs index 0b338dcf2ae..02070ade87c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InaccessibleDirective.cs @@ -1,5 +1,6 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.ApolloFederation.Types; @@ -33,22 +34,21 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -public sealed class InaccessibleDirectiveType : DirectiveType +[Package(Federation20)] +[DirectiveType( + InaccessibleDirective_Name, + DirectiveLocation.FieldDefinition | + DirectiveLocation.Object | + DirectiveLocation.Interface | + DirectiveLocation.Union | + DirectiveLocation.Enum | + DirectiveLocation.EnumValue | + DirectiveLocation.Scalar | + DirectiveLocation.InputObject | + DirectiveLocation.InputFieldDefinition | + DirectiveLocation.ArgumentDefinition)] +[GraphQLDescription(InaccessibleDirective_Description)] +public sealed class InaccessibleDirective { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Inaccessible) - .Description(FederationResources.InaccessibleDirective_Description) - .Location( - DirectiveLocation.FieldDefinition - | DirectiveLocation.Object - | DirectiveLocation.Interface - | DirectiveLocation.Union - | DirectiveLocation.Enum - | DirectiveLocation.EnumValue - | DirectiveLocation.Scalar - | DirectiveLocation.Scalar - | DirectiveLocation.InputObject - | DirectiveLocation.InputFieldDefinition - | DirectiveLocation.ArgumentDefinition); -} + public static InaccessibleDirective Default { get; } = new(); +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDirective.cs index 4d84b54c2c8..0d76dfc1daa 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/InterfaceObjectDirective.cs @@ -1,3 +1,7 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -15,8 +19,9 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(DirectiveLocation.Object)] -[GraphQLDescription(Descriptions.InterfaceObjectDirective_Description)] +[Package(Federation22)] +[DirectiveType(InterfaceObject_Name, DirectiveLocation.Object)] +[GraphQLDescription(InterfaceObjectDirective_Description)] public sealed class InterfaceObjectDirective { public static InterfaceObjectDirective Default { get; } = new(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs index 4de81c282d5..89298be74f0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs @@ -1,3 +1,7 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -16,8 +20,13 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(DirectiveLocation.Object | DirectiveLocation.Interface, IsRepeatable = true)] -[GraphQLDescription(Descriptions.KeyDirective_Description)] +[Package(Federation20)] +[DirectiveType( + KeyDirective_Name, + DirectiveLocation.Object | + DirectiveLocation.Interface, + IsRepeatable = true)] +[GraphQLDescription(KeyDirective_Description)] [KeyLegacySupport] public sealed class KeyDirective(string fieldSet, bool resolvable = true) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs new file mode 100644 index 00000000000..98d2acb3c3e --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs @@ -0,0 +1,123 @@ +using System.Collections.Generic; +using HotChocolate.Execution.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace HotChocolate.ApolloFederation.Types; + +public static class LinkDescriptorExtensions +{ + /// + /// Applies @link directive definitions to link the document to external schemas. + /// External schemas are identified by their url, which optionally ends with a name and version with + /// the following format: `{NAME}/v{MAJOR}.{MINOR}` + /// + /// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive + /// should be namespaced as federation__key) unless they are explicitly imported. We automatically + /// import ALL federation directives to avoid the need for namespacing. + /// + /// NOTE: We currently DO NOT support full @link directive capability as it requires support for + /// namespacing and renaming imports. This functionality may be added in the future releases. + /// See @link specification for details. + /// + /// + /// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) + /// + /// type Query { + /// foo: Foo! + /// } + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// name: String + /// } + /// + /// + /// + /// The GraphQL request executor builder. + /// + /// + /// Url of specification to be imported + /// + /// + /// Optional list of imported elements. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static IRequestExecutorBuilder AddLink( + this IRequestExecutorBuilder builder, + string url, + IReadOnlyList? imports) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentException.ThrowIfNullOrEmpty(url); + return AddLink(builder, new Uri(url), imports); + } + + /// + /// Applies @link directive definitions to link the document to external schemas. + /// External schemas are identified by their url, which optionally ends with a name and version with + /// the following format: `{NAME}/v{MAJOR}.{MINOR}` + /// + /// By default, external types should be namespaced (prefixed with namespace__, e.g. key directive + /// should be namespaced as federation__key) unless they are explicitly imported. We automatically + /// import ALL federation directives to avoid the need for namespacing. + /// + /// NOTE: We currently DO NOT support full @link directive capability as it requires support for + /// namespacing and renaming imports. This functionality may be added in the future releases. + /// See @link specification for details. + /// + /// + /// extend schema @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) + /// + /// type Query { + /// foo: Foo! + /// } + /// + /// type Foo @key(fields: "id") { + /// id: ID! + /// name: String + /// } + /// + /// + /// + /// The GraphQL request executor builder. + /// + /// + /// Url of specification to be imported + /// + /// + /// Optional list of imported elements. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static IRequestExecutorBuilder AddLink( + this IRequestExecutorBuilder builder, + Uri url, + IReadOnlyList? imports) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentNullException.ThrowIfNull(url); + + builder.ConfigureSchema( + sb => + { + sb.AddSchemaConfiguration(d => d.Directive(new LinkDirective(url, imports))); + }); + + return builder; + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs new file mode 100644 index 00000000000..d078a4e8278 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using static HotChocolate.ApolloFederation.FederationTypeNames; + +namespace HotChocolate.ApolloFederation; + +/// +/// Object representation of @link directive. +/// +[DirectiveType(LinkDirective_Name, DirectiveLocation.Schema, IsRepeatable = true)] +public sealed class LinkDirective +{ + /// + /// Initializes new instance of + /// + /// + /// Url of specification to be imported + /// + /// + /// Optional list of imported elements. + /// + public LinkDirective(Uri url, IReadOnlyList? import) + { + Url = url; + Import = import; + } + + /// + /// Gets imported specification url. + /// + public Uri Url { get; } + + /// + /// Gets optional list of imported element names. + /// + public IReadOnlyList? Import { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs index 9fdff5420f5..5c5a1943cb4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/OverrideDirective.cs @@ -1,3 +1,7 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -16,8 +20,9 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(DirectiveLocation.FieldDefinition)] -[GraphQLDescription(Descriptions.OverrideDirective_Description)] +[Package(Federation20)] +[DirectiveType(OverrideDirective_Name, DirectiveLocation.FieldDefinition)] +[GraphQLDescription(OverrideDirective_Description)] public sealed class OverrideDirective(string from) { public string From { get; } = from; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/PackageAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/PackageAttribute.cs new file mode 100644 index 00000000000..87e361fd098 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/PackageAttribute.cs @@ -0,0 +1,7 @@ +namespace HotChocolate.ApolloFederation; + +[AttributeUsage(AttributeTargets.Class)] +public sealed class PackageAttribute(string url) : Attribute +{ + public string Url { get; } = url; +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs index e47442f2946..6812dc046a0 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ProvidesDirective.cs @@ -1,5 +1,6 @@ -using static HotChocolate.ApolloFederation.Types.Descriptions; -using static HotChocolate.Types.DirectiveLocation; +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.ApolloFederation.Types; @@ -30,7 +31,8 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(FieldDefinition)] +[Package(Federation20)] +[DirectiveType(ProvidesDirective_Name, DirectiveLocation.FieldDefinition)] [GraphQLDescription(ProvidesDirective_Description)] public sealed class ProvidesDirective(string fieldSet) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs index efb8d0e1de5..277b4bdf090 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresDirective.cs @@ -1,3 +1,7 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -20,8 +24,9 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(DirectiveLocation.FieldDefinition)] -[GraphQLDescription(Descriptions.RequiresDirective_Description)] +[Package(Federation20)] +[DirectiveType(RequiresDirective_Name, DirectiveLocation.FieldDefinition)] +[GraphQLDescription(RequiresDirective_Description)] public sealed class RequiresDirective(string fieldSet) { [FieldSet] diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDirective.cs index 96ed62c0807..099b6b6295c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ShareableDirective.cs @@ -1,3 +1,7 @@ +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + namespace HotChocolate.ApolloFederation.Types; /// @@ -22,8 +26,13 @@ namespace HotChocolate.ApolloFederation.Types; /// } /// /// -[DirectiveType(DirectiveLocation.FieldDefinition | DirectiveLocation.Object, IsRepeatable = true)] -[GraphQLDescription(Descriptions.ShareableDirective_Description)] +[Package(Federation20)] +[DirectiveType( + ShareableDirective_Name, + DirectiveLocation.FieldDefinition | + DirectiveLocation.Object, + IsRepeatable = true)] +[GraphQLDescription(ShareableDirective_Description)] public sealed class ShareableDirective { public static ShareableDirective Default { get; } = new(); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs index 3e9015ab4cb..3a7178dee4d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs @@ -14,6 +14,7 @@ namespace HotChocolate.ApolloFederation.Types; /// This means it can represent a single field "upc", multiple fields "id countryCode", /// and even nested selection sets "id organization { id }". /// +[Package(FederationVersionUrls.Federation20)] public sealed class FieldSetType : ScalarType { /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs deleted file mode 100644 index 6ff7888b7af..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/WellKnownTypeNames.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace HotChocolate.ApolloFederation.Constants; - -internal static class WellKnownTypeNames -{ - public const string AuthenticatedDirective = "authenticated"; - // public const string ContactDirective = "contact"; - public const string ComposeDirective = "composeDirective"; - // public const string Extends = "extends"; - //public const string External = "external"; - public const string Inaccessible = "inaccessible"; - - // public const string InterfaceObject = "interfaceObject"; - - //public const string Key = "key"; - public const string Link = "link"; - - // public const string Override = "override"; - - //public const string Provides = "provides"; - //public const string Requires = "requires"; - public const string RequiresScopes = "requiresScopes"; - // public const string Shareable = "shareable"; - public const string Tag = "tag"; - public const string FieldSet = "FieldSet"; - public const string Scope = "Scope"; - public const string Any = "_Any"; - public const string Entity = "_Entity"; - public const string Service = "_Service"; - public const string PolicyDirective = "policy"; - public const string PolicyCollection = "policyCollection"; -} \ No newline at end of file From 14db52bb9b6eb60f027f775f3761ab2216a300de Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 14:31:45 +0100 Subject: [PATCH 78/89] edits --- .../_remove/ComposeDirectiveAttribute.cs | 57 -------- ...rationDescriptorExtensions.Inaccessible.cs | 108 ---------------- ...loFederationDescriptorExtensions.Policy.cs | 92 ------------- .../ApolloFederationDescriptorExtensions.cs | 122 ------------------ .../ApolloFederation/FederationTypeNames.cs | 6 +- .../HotChocolate.ApolloFederation.csproj | 6 + .../src/ApolloFederation/Types/AnyType.cs | 4 +- .../ComposeDirectiveDescriptorExtensions.cs | 54 ++++++++ .../Directives/ContactDescriptorExtensions.cs | 2 +- .../src/ApolloFederation/Types/EntityType.cs | 11 +- .../ApolloFederation/Types/FieldSetType.cs | 2 +- .../GraphQLNonNullTypeAttribute.cs | 4 +- 12 files changed, 76 insertions(+), 392 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ComposeDirectiveAttribute.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ComposeDirectiveDescriptorExtensions.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ComposeDirectiveAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ComposeDirectiveAttribute.cs deleted file mode 100644 index 98334462f69..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/ComposeDirectiveAttribute.cs +++ /dev/null @@ -1,57 +0,0 @@ -using HotChocolate.Types.Descriptors; -using static HotChocolate.ApolloFederation.ThrowHelper; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @composeDirective(name: String!) repeatable on SCHEMA -/// -/// -/// By default, Supergraph schema excludes all custom directives. The @composeDirective is used to specify -/// custom directives that should be exposed in the Supergraph schema. -/// -/// -/// extend schema @composeDirective(name: "@custom") -/// @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) -/// @link(url: "https://myspecs.dev/custom/v1.0", import: ["@custom"]) -/// -/// directive @custom on FIELD_DEFINITION -/// -/// type Query { -/// helloWorld: String! @custom -/// } -/// -/// -[AttributeUsage( - AttributeTargets.Class - | AttributeTargets.Struct, - Inherited = true, - AllowMultiple = true)] -public sealed class ComposeDirectiveAttribute : SchemaTypeDescriptorAttribute -{ - /// - /// Initializes new instance of - /// - /// - /// Name of the directive that should be preserved in the supergraph composition. - /// - public ComposeDirectiveAttribute(string name) - { - Name = name; - } - - /// - /// Gets the composed directive name. - /// - public string Name { get; } - - public override void OnConfigure(IDescriptorContext context, ISchemaTypeDescriptor descriptor, Type type) - { - if (string.IsNullOrEmpty(Name)) - { - throw ComposeDirective_Name_CannotBeEmpty(type); - } - descriptor.ComposeDirective(Name); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs deleted file mode 100644 index 6874dad8485..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Inaccessible.cs +++ /dev/null @@ -1,108 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; - -namespace HotChocolate.Types; - -/// -/// Provides extensions for applying @inaccessible directive on type system descriptors. -/// -public static partial class ApolloFederationDescriptorExtensions -{ - /// - /// Applies the @inaccessible directive which is used to mark location within schema as inaccessible - /// from the GraphQL Router. While @inaccessible fields are not exposed by the router to the clients, - /// they are still available for query plans and can be referenced from @key and @requires directives. - /// This allows you to not expose sensitive fields to your clients but still make them available for - /// computations. Inaccessible can also be used to incrementally add schema elements (e.g. fields) to - /// multiple subgraphs without breaking composition. - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// hidden: String @inaccessible - /// } - /// - /// - /// - /// The type descriptor on which this directive shall be annotated. - /// - /// - /// Returns the type descriptor. - /// - /// - /// The is null. - /// - public static IEnumTypeDescriptor Inaccessible( - this IEnumTypeDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IEnumValueDescriptor Inaccessible( - this IEnumValueDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IInterfaceFieldDescriptor Inaccessible( - this IInterfaceFieldDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IInterfaceTypeDescriptor Inaccessible( - this IInterfaceTypeDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IInputObjectTypeDescriptor Inaccessible( - this IInputObjectTypeDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IInputFieldDescriptor Inaccessible( - this IInputFieldDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IObjectFieldDescriptor Inaccessible( - this IObjectFieldDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IObjectTypeDescriptor Inaccessible( - this IObjectTypeDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - /// - public static IUnionTypeDescriptor Inaccessible( - this IUnionTypeDescriptor descriptor) - { - ValidateDescriptor(descriptor); - return descriptor.Directive(WellKnownTypeNames.Inaccessible); - } - - private static void ValidateDescriptor(IDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs deleted file mode 100644 index 55ebdc620eb..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.Policy.cs +++ /dev/null @@ -1,92 +0,0 @@ -using HotChocolate.ApolloFederation; -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Types; -using HotChocolate.Language; - -namespace HotChocolate.Types; - -/// -/// Provides extensions for applying @policy directive on type system descriptors. -/// -public static partial class ApolloFederationDescriptorExtensions -{ - /// - /// Indicates to composition that the target element is restricted based on authorization policies - /// that are evaluated in a Rhai script or coprocessor. - /// - /// type Foo { - /// description: String @policy(policies: [["policy1Or", "policy2"], ["andPolicy3"]]) - /// } - /// - /// - /// - /// The type descriptor on which this directive shall be annotated. - /// - /// The policy collection - /// - /// Returns the type descriptor. - /// - /// - /// The is null. - /// - public static IEnumTypeDescriptor Policy( - this IEnumTypeDescriptor descriptor, - string[][] policies) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive( - WellKnownTypeNames.PolicyDirective, - ParsePoliciesArgument(policies)); - } - - /// - public static IInterfaceFieldDescriptor Policy( - this IInterfaceFieldDescriptor descriptor, - string[][] policies) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive( - WellKnownTypeNames.PolicyDirective, - ParsePoliciesArgument(policies)); - } - - /// - public static IInterfaceTypeDescriptor Policy( - this IInterfaceTypeDescriptor descriptor, - string[][] policies) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive( - WellKnownTypeNames.PolicyDirective, - ParsePoliciesArgument(policies)); - } - - /// - public static IObjectFieldDescriptor Policy( - this IObjectFieldDescriptor descriptor, - string[][] policies) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive( - WellKnownTypeNames.PolicyDirective, - ParsePoliciesArgument(policies)); - } - - /// - public static IObjectTypeDescriptor Policy( - this IObjectTypeDescriptor descriptor, - string[][] policies) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive( - WellKnownTypeNames.PolicyDirective, - ParsePoliciesArgument(policies)); - } - - private static ArgumentNode ParsePoliciesArgument(string[][] policies) - { - var list = PolicyParsingHelper.ParseValue(policies); - var result = new ArgumentNode(WellKnownArgumentNames.Policies, list); - return result; - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs deleted file mode 100644 index 4d7db8ac50f..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.cs +++ /dev/null @@ -1,122 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.Language; -using System.Collections.Generic; -using System.Linq; -using HotChocolate.ApolloFederation; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; -using static HotChocolate.ApolloFederation.Properties.FederationResources; - -namespace HotChocolate.Types; - -/// -/// Provides extensions for type system descriptors. -/// -public static partial class ApolloFederationDescriptorExtensions -{ - /// - /// Applies @composeDirective which is used to specify custom directives that should be exposed in the - /// Supergraph schema. If not specified, by default, Supergraph schema excludes all custom directives. - /// - /// extend schema @composeDirective(name: "@custom") - /// @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) - /// @link(url: "https://myspecs.dev/custom/v1.0", import: ["@custom"]) - /// - /// directive @custom on FIELD_DEFINITION - /// - /// type Query { - /// helloWorld: String! @custom - /// } - /// - /// - /// - /// The object type descriptor on which this directive shall be annotated. - /// - /// - /// Name of the directive that should be preserved in the supergraph composition. - /// - /// - /// Returns the object type descriptor. - /// - /// - /// is null. - /// - /// - /// is null. - /// - public static ISchemaTypeDescriptor ComposeDirective(this ISchemaTypeDescriptor descriptor, string name) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(name); - - return descriptor.Directive( - WellKnownTypeNames.ComposeDirective, - new ArgumentNode( - WellKnownArgumentNames.Name, - new StringValueNode(name))); - } - - /// - /// Applies the @provides directive which is a router optimization hint specifying field set that - /// can be resolved locally at the given subgraph through this particular query path. This - /// allows you to expose only a subset of fields from the underlying entity type to be selectable - /// from the federated schema without the need to call other subgraphs. Provided fields specified - /// in the directive field set should correspond to a valid field on the underlying GraphQL - /// interface/object type. @provides directive can only be used on fields returning entities. - /// - /// type Foo @key(fields: "id") { - /// id: ID! - /// # implies name field can be resolved locally - /// bar: Bar @provides(fields: "name") - /// # name fields are external - /// # so will be fetched from other subgraphs - /// bars: [Bar] - /// } - /// - /// type Bar @key(fields: "id") { - /// id: ID! - /// name: String @external - /// } - /// - /// - /// - /// The object field descriptor on which this directive shall be annotated. - /// - /// - /// The fields that are guaranteed to be selectable by the gateway. - /// Grammatically, a field set is a selection set minus the braces. - /// - /// - /// Returns the object field descriptor. - /// - /// - /// is null. - /// - /// - /// is null or . - /// - public static IObjectFieldDescriptor Provides( - this IObjectFieldDescriptor descriptor, - string fieldSet) - { - ArgumentNullException.ThrowIfNull(descriptor); - ArgumentException.ThrowIfNullOrEmpty(fieldSet); - - return descriptor.Directive( - WellKnownTypeNames.Provides, - new ArgumentNode( - WellKnownArgumentNames.Fields, - new StringValueNode(fieldSet))); - } - - - - - - - - - - - - -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs index 11b59d66b78..2f35f2a9228 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs @@ -17,10 +17,10 @@ internal static class FederationTypeNames public const string RequiresScopes_Name = "requiresScopes"; public const string ShareableDirective_Name = "shareable"; public const string Tag_Name = "tag"; - public const string FieldSet_Name = "FieldSet"; + public const string FieldSetType_Name = "FieldSet"; public const string Scope_Name = "Scope"; - public const string Any_Name = "_Any"; - public const string Entity_Name = "_Entity"; + public const string AnyType_Name = "_Any"; + public const string EntityType_Name = "_Entity"; public const string Service_Name = "_Service"; public const string PolicyDirective_Name = "policy"; public const string PolicyCollection_Name = "policyCollection"; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index be0b8b55214..b3c270d500c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -98,6 +98,12 @@ InaccessibleDirective.cs + + ComposeDirective.cs + + + FieldSetType.cs + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs index 101dfc2be76..a2fbc1f532e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs @@ -1,8 +1,8 @@ using System.Linq; -using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Properties; using HotChocolate.Language; using HotChocolate.Utilities; +using static HotChocolate.ApolloFederation.FederationTypeNames; using static HotChocolate.ApolloFederation.ThrowHelper; namespace HotChocolate.ApolloFederation.Types; @@ -19,7 +19,7 @@ public sealed class AnyType : ScalarType /// Initializes a new instance of . /// public AnyType() - : this(WellKnownTypeNames.Any) + : this(AnyType_Name) { } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ComposeDirectiveDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ComposeDirectiveDescriptorExtensions.cs new file mode 100644 index 00000000000..f4058a30f0b --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ComposeDirectiveDescriptorExtensions.cs @@ -0,0 +1,54 @@ +using HotChocolate.Execution.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace HotChocolate.ApolloFederation.Types; + +public static class ComposeDirectiveDescriptorExtensions +{ + /// + /// Applies @composeDirective which is used to specify custom directives that should be exposed in the + /// Supergraph schema. If not specified, by default, Supergraph schema excludes all custom directives. + /// + /// extend schema @composeDirective(name: "@custom") + /// @link(url: "https://specs.apollo.dev/federation/v2.5", import: ["@composeDirective"]) + /// @link(url: "https://myspecs.dev/custom/v1.0", import: ["@custom"]) + /// + /// directive @custom on FIELD_DEFINITION + /// + /// type Query { + /// helloWorld: String! @custom + /// } + /// + /// + /// + /// The GraphQL request executor builder. + /// + /// + /// Name of the directive that should be preserved in the supergraph composition. + /// + /// + /// Returns the object type descriptor. + /// + /// + /// is null. + /// + /// + /// is null. + /// + public static IRequestExecutorBuilder ExportDirective( + this IRequestExecutorBuilder builder, + string directiveName) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentException.ThrowIfNullOrEmpty(directiveName); + + builder.ConfigureSchema( + sb => + { + sb.AddSchemaConfiguration( + d => d.Directive(new ComposeDirective(directiveName))); + }); + + return builder; + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs index 47ed4cc7bc7..555b5894e25 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/ContactDescriptorExtensions.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using HotChocolate.Execution.Configuration; using Microsoft.Extensions.DependencyInjection; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; +using static HotChocolate.ApolloFederation.FederationContextData; namespace HotChocolate.ApolloFederation.Types; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs index 310b567bb00..38730c58f7e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs @@ -1,5 +1,6 @@ using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.ApolloFederation.Types; @@ -10,7 +11,9 @@ namespace HotChocolate.ApolloFederation.Types; public sealed class EntityType : UnionType { protected override void Configure(IUnionTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Entity) - .Description(FederationResources.EntityType_Description); + { + descriptor + .Name(EntityType_Name) + .Description(EntityType_Description); + } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs index 3a7178dee4d..52a9690ce09 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs @@ -20,7 +20,7 @@ public sealed class FieldSetType : ScalarType /// /// Initializes a new instance of . /// - public FieldSetType() : this(WellKnownTypeNames.FieldSet) + public FieldSetType() : this(FederationTypeNames.FieldSetType_Name) { } diff --git a/src/HotChocolate/Core/src/Abstractions/GraphQLNonNullTypeAttribute.cs b/src/HotChocolate/Core/src/Abstractions/GraphQLNonNullTypeAttribute.cs index cfff5181a9c..23af757b9b5 100644 --- a/src/HotChocolate/Core/src/Abstractions/GraphQLNonNullTypeAttribute.cs +++ b/src/HotChocolate/Core/src/Abstractions/GraphQLNonNullTypeAttribute.cs @@ -12,12 +12,12 @@ public sealed class GraphQLNonNullTypeAttribute : Attribute { public GraphQLNonNullTypeAttribute() { - Nullable = new[] { false }; + Nullable = [false]; } public GraphQLNonNullTypeAttribute(params bool[] nullable) { - Nullable = nullable.Length == 0 ? new[] { false } : nullable; + Nullable = nullable.Length == 0 ? [false] : nullable; } internal bool[] Nullable { get; } From 79281a3d3ba6611f74110f223bcb54e1174f194b Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 15:07:59 +0100 Subject: [PATCH 79/89] edits --- .../src/ApolloFederation/FederationTypeNames.cs | 9 +++------ .../Types/OptionsDescriptorExtensions.cs | 2 +- .../src/ApolloFederation/Types/ScopeType.cs | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs index 2f35f2a9228..6b9a29c7efb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeNames.cs @@ -14,14 +14,11 @@ internal static class FederationTypeNames public const string OverrideDirective_Name = "override"; public const string ProvidesDirective_Name = "provides"; public const string RequiresDirective_Name = "requires"; - public const string RequiresScopes_Name = "requiresScopes"; + public const string RequiresScopesDirective_Name = "requiresScopes"; public const string ShareableDirective_Name = "shareable"; - public const string Tag_Name = "tag"; public const string FieldSetType_Name = "FieldSet"; - public const string Scope_Name = "Scope"; + public const string ScopeType_Name = "Scope"; public const string AnyType_Name = "_Any"; public const string EntityType_Name = "_Entity"; - public const string Service_Name = "_Service"; - public const string PolicyDirective_Name = "policy"; - public const string PolicyCollection_Name = "policyCollection"; + public const string ServiceType_Name = "_Service"; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs index 4c24d845a0e..ad786975c69 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs @@ -9,7 +9,7 @@ public static FederationVersion GetFederationVersion( where T : DefinitionBase { var contextData = descriptor.Extend().Context.ContextData; - if (contextData.TryGetValue(Constants.FederationContextData.FederationVersion, out var value) && + if (contextData.TryGetValue(FederationContextData.FederationVersion, out var value) && value is FederationVersion version and > FederationVersion.Unknown) { return version; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs index c4f942662c7..3596ea00771 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ScopeType.cs @@ -12,7 +12,7 @@ public sealed class ScopeType : ScalarType /// /// Initializes a new instance of . /// - public ScopeType() : this(WellKnownTypeNames.Scope) + public ScopeType() : this(FederationTypeNames.ScopeType_Name) { } From e15d078b0a75739881830e5155880ca603dfc1ef Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 15:50:50 +0100 Subject: [PATCH 80/89] edits --- .../FederationTypeInterceptor.cs | 26 +++++------ ...ions.cs => FederationVersionExtensions.cs} | 2 +- .../FederationResources.Designer.cs | 6 --- .../Properties/FederationResources.cs | 5 +++ .../Properties/FederationResources.resx | 3 -- .../EntitiesResolver.cs | 4 +- .../src/ApolloFederation/Types/Service.cs | 22 ++++++++++ .../src/ApolloFederation/Types/ServiceType.cs | 43 ------------------- 8 files changed, 41 insertions(+), 70 deletions(-) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Initialization => }/FederationTypeInterceptor.cs (94%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Types/OptionsDescriptorExtensions.cs => FederationVersionExtensions.cs} (92%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Helpers => Resolvers}/EntitiesResolver.cs (95%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Service.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServiceType.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs similarity index 94% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs index 97d724a88ce..e11d0832ddd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Initialization/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs @@ -14,7 +14,7 @@ using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; using static HotChocolate.ApolloFederation.ThrowHelper; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; +using static HotChocolate.ApolloFederation.FederationContextData; using static HotChocolate.Types.TagHelper; using AnyType = HotChocolate.ApolloFederation.Types.AnyType; @@ -46,6 +46,7 @@ internal sealed class FederationTypeInterceptor : TypeInterceptor private IDescriptorContext _context = default!; private ITypeInspector _typeInspector = default!; private ObjectType _queryType = default!; + private ExtendedTypeDirectiveReference _keyDirectiveReference = default!; internal override void InitializeContext( IDescriptorContext context, @@ -56,6 +57,7 @@ internal override void InitializeContext( { _typeInspector = context.TypeInspector; _context = context; + _keyDirectiveReference = new ExtendedTypeDirectiveReference(_typeInspector.GetType(typeof(KeyDirective))); ModifyOptions(context, o => o.Mode = TagMode.ApolloFederation); } @@ -198,7 +200,7 @@ private void AddServiceTypeToQueryType( _context, WellKnownFieldNames.Service); serviceFieldDescriptor - .Type>() + .Type>>() .Resolve(_empty); objectTypeDefinition.Fields.Add(serviceFieldDescriptor.CreateDefinition()); @@ -260,9 +262,8 @@ private void AddToUnionIfHasTypeLevelKeyDirective( ObjectType objectType, ObjectTypeDefinition objectTypeDefinition) { - if (objectTypeDefinition.Directives.Any( - d => d.Value is DirectiveNode { Name.Value: WellKnownTypeNames.Key }) || - objectTypeDefinition.Fields.Any(f => f.ContextData.ContainsKey(WellKnownTypeNames.Key))) + if (objectTypeDefinition.Directives.Any(d => d.Value is KeyDirective) || + objectTypeDefinition.Fields.Any(f => f.ContextData.ContainsKey(KeyMarker))) { _entityTypes.Add(objectType); } @@ -276,8 +277,7 @@ private void AggregatePropertyLevelKeyDirectives( // if we find key markers on our fields, we need to construct the key directive // from the annotated fields. { - bool foundMarkers = objectTypeDefinition.Fields - .Any(f => f.ContextData.ContainsKey(KeyMarker)); + var foundMarkers = objectTypeDefinition.Fields.Any(f => f.ContextData.ContainsKey(KeyMarker)); if (!foundMarkers) { return; @@ -334,17 +334,13 @@ private void AddMemberTypesToTheEntityUnionType( } } - private static void AddKeyDirective( + private void AddKeyDirective( ObjectTypeDefinition objectTypeDefinition, string fieldSet) { - var directiveNode = new DirectiveNode( - WellKnownTypeNames.Key, - new ArgumentNode( - WellKnownArgumentNames.Fields, - fieldSet)); - objectTypeDefinition.Directives.Add( - new DirectiveDefinition(directiveNode)); + new DirectiveDefinition( + new KeyDirective(fieldSet), + _keyDirectiveReference)); } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionExtensions.cs similarity index 92% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionExtensions.cs index ad786975c69..3dae1c89b2b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/OptionsDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionExtensions.cs @@ -2,7 +2,7 @@ namespace HotChocolate.ApolloFederation.Types; -internal static class OptionsDescriptorExtensions +internal static class FederationVersionExtensions { public static FederationVersion GetFederationVersion( this IDescriptor descriptor) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs index 465fe5afa47..359b0538b47 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs @@ -171,12 +171,6 @@ internal static string ThrowHelper_EntityType_NoEntities { } } - internal static string ServiceType_Description { - get { - return ResourceManager.GetString("ServiceType_Description", resourceCulture); - } - } - internal static string ThrowHelper_EntityResolver_NoEntityResolverFound { get { return ResourceManager.GetString("ThrowHelper_EntityResolver_NoEntityResolverFound", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs index 40134ab2cf8..f80ec269b8b 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs @@ -39,4 +39,9 @@ internal partial class FederationResources public const string ComposeDirective_Description = "Marks underlying custom directive to be included in the Supergraph schema."; + public const string ServiceType_Description = + "This type provides a field named sdl: String! which exposes the SDL of the " + + "service's schema. This SDL (schema definition language) is a printed version " + + "of the service's schema including the annotations of federation directives. " + + "This SDL does not include the additions of the federation spec."; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx index cde777d2e99..2f59d1d4624 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx @@ -180,9 +180,6 @@ The schema has no types with a KeyDirective and therefore no entities. Apollo federation requires at least one entity. - - This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec. - The apollo gateway tries to resolve an entity for which no EntityResolver method was found. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/EntitiesResolver.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/EntitiesResolver.cs similarity index 95% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/EntitiesResolver.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/EntitiesResolver.cs index cca2211e591..b700eafbc15 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/EntitiesResolver.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/EntitiesResolver.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Threading.Tasks; using HotChocolate.Resolvers; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; +using static HotChocolate.ApolloFederation.FederationContextData; -namespace HotChocolate.ApolloFederation.Helpers; +namespace HotChocolate.ApolloFederation.Resolvers; /// /// This class contains the _entities resolver method. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Service.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Service.cs new file mode 100644 index 00000000000..91e3f5bf961 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Service.cs @@ -0,0 +1,22 @@ +using HotChocolate.ApolloFederation.Constants; +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.Properties.FederationResources; + +namespace HotChocolate.ApolloFederation.Types; + +/// +/// A new object type called _Service must be created. +/// This type must have an sdl: String! field which exposes the SDL of the service's schema. +/// +/// This SDL (schema definition language) is a printed version of the service's +/// schema including the annotations of federation directives. This SDL does not +/// include the additions of the federation spec. +/// +[ObjectType(ServiceType_Name)] +[GraphQLDescription(ServiceType_Description)] +public sealed class Service +{ + [GraphQLName(WellKnownFieldNames.Sdl)] + public string GetSdl(ISchema schema) + => SchemaPrinter.Print(schema); +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServiceType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServiceType.cs deleted file mode 100644 index 121fe876538..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServiceType.cs +++ /dev/null @@ -1,43 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; -using HotChocolate.Resolvers; - -namespace HotChocolate.ApolloFederation.Types; - -/// -/// A new object type called _Service must be created. -/// This type must have an sdl: String! field which exposes the SDL of the service's schema. -/// -/// This SDL (schema definition language) is a printed version of the service's -/// schema including the annotations of federation directives. This SDL does not -/// include the additions of the federation spec. -/// -public class ServiceType : ObjectType -{ - public ServiceType(bool isV2 = false) - { - IsV2 = isV2; - } - - public bool IsV2 { get; } - - protected override void Configure(IObjectTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.Service) - .Description(FederationResources.ServiceType_Description) - .Field(WellKnownFieldNames.Sdl) - .Type>() - .Resolve(resolver => PrintSchemaSdl(resolver, IsV2)); - - private string PrintSchemaSdl(IResolverContext resolver, bool isV2) - { - if (isV2) - { - return SchemaPrinter.Print(resolver.Schema); - } - else - { - return FederationSchemaPrinter.Print(resolver.Schema); - } - } -} From 29a37c9abc33e6762485bd4c5efc27785c2a46a5 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 16:02:39 +0100 Subject: [PATCH 81/89] edits --- .../FederationSchemaPrinter.DirectiveType.cs | 29 --- .../FederationSchemaPrinter.InputType.cs | 40 ---- .../FederationSchemaPrinter.LeafType.cs | 69 ------- .../FederationSchemaPrinter.OutputTypes.cs | 109 ---------- .../SchemaPrinter/FederationSchemaPrinter.cs | 186 ------------------ .../FederationTypeInterceptor.cs | 1 - .../FederationVersioning/FederatedSchema.cs | 51 ----- .../src/ApolloFederation/Helpers/MaybeList.cs | 25 --- .../HotChocolate.ApolloFederation.csproj | 4 + .../{Helpers => Resolvers}/ArgumentParser.cs | 4 +- .../ExternalSetterExpressionHelper.cs | 11 +- ...erenceResolverArgumentExpressionBuilder.cs | 10 +- .../ReferenceResolverHelper.cs | 4 +- .../Descriptors/EntityResolverDescriptor.cs | 2 +- .../EntitiesResolverTests.cs | 1 - .../Types/Contracts/IDirectiveCollection.cs | 17 ++ 16 files changed, 36 insertions(+), 527 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.DirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.InputType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Helpers => Resolvers}/ArgumentParser.cs (97%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Helpers => Resolvers}/ExternalSetterExpressionHelper.cs (88%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Helpers => Resolvers}/ReferenceResolverArgumentExpressionBuilder.cs (89%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Helpers => Resolvers}/ReferenceResolverHelper.cs (92%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.DirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.DirectiveType.cs deleted file mode 100644 index 78c49cf0d56..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.DirectiveType.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Linq; -using HotChocolate.Language; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static DirectiveDefinitionNode SerializeDirectiveTypeDefinition( - DirectiveType directiveType, - Context context) - { - var arguments = directiveType.Arguments - .Select(a => SerializeInputField(a, context)) - .ToList(); - - var locations = directiveType.Locations - .AsEnumerable() - .Select(l => new NameNode(l.MapDirectiveLocation().ToString())) - .ToList(); - - return new DirectiveDefinitionNode( - location: null, - new NameNode(directiveType.Name), - SerializeDescription(directiveType.Description), - directiveType.IsRepeatable, - arguments, - locations); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.InputType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.InputType.cs deleted file mode 100644 index 2f91678e34b..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.InputType.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Linq; -using HotChocolate.Language; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static InputObjectTypeDefinitionNode SerializeInputObjectType( - InputObjectType inputObjectType, - Context context) - { - var directives = SerializeDirectives(inputObjectType.Directives, context); - - var fields = inputObjectType.Fields - .Select(t => SerializeInputField(t, context)) - .ToList(); - - return new InputObjectTypeDefinitionNode( - location: null, - new NameNode(inputObjectType.Name), - SerializeDescription(inputObjectType.Description), - directives.ReadOnlyList, - fields); - } - - private static InputValueDefinitionNode SerializeInputField( - IInputField inputValue, - Context context) - { - var directives = SerializeDirectives(inputValue.Directives, context); - - return new InputValueDefinitionNode( - null, - new NameNode(inputValue.Name), - SerializeDescription(inputValue.Description), - SerializeType(inputValue.Type, context), - inputValue.DefaultValue, - directives.ReadOnlyList); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs deleted file mode 100644 index 3bc0b605710..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.LeafType.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Linq; -using HotChocolate.Language; -using static HotChocolate.Types.SpecifiedByDirectiveType.Names; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static EnumTypeDefinitionNode SerializeEnumType( - EnumType enumType, - Context context) - { - var directives = SerializeDirectives(enumType.Directives, context); - - var values = enumType.Values - .Select(t => SerializeEnumValue(t, context)) - .ToList(); - - return new EnumTypeDefinitionNode( - location: null, - new NameNode(enumType.Name), - SerializeDescription(enumType.Description), - directives.ReadOnlyList, - values); - } - - private static EnumValueDefinitionNode SerializeEnumValue( - IEnumValue enumValue, - Context context) - { - var directives = SerializeDirectives(enumValue.Directives, context); - - if (enumValue.IsDeprecated) - { - var deprecateDirective = DeprecatedDirective.CreateNode(enumValue.DeprecationReason); - var temp = directives.GetOrCreateList(); - temp.Add(deprecateDirective); - } - - return new EnumValueDefinitionNode( - location: null, - new NameNode(enumValue.Name), - SerializeDescription(enumValue.Description), - directives.ReadOnlyList); - } - - private static ScalarTypeDefinitionNode SerializeScalarType( - ScalarType scalarType, - Context context) - { - var directives = SerializeDirectives(scalarType.Directives, context); - - if (scalarType.SpecifiedBy is not null) - { - directives.GetOrCreateList().Add( - new DirectiveNode( - SpecifiedBy, - new ArgumentNode( - Url, - new StringValueNode(scalarType.SpecifiedBy.ToString())))); - } - - return new( - location: null, - new NameNode(scalarType.Name), - SerializeDescription(scalarType.Description), - directives.ReadOnlyList); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs deleted file mode 100644 index a568ede70d5..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.OutputTypes.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System.Linq; -using HotChocolate.Language; - -namespace HotChocolate.ApolloFederation; - -public static partial class FederationSchemaPrinter -{ - private static IDefinitionNode? SerializeObjectType( - ObjectType objectType, - Context context) - { - var fields = objectType.Fields - .Where(IncludeField) - .Select(t => SerializeObjectField(t, context)) - .ToList(); - - if (fields.Count == 0) - { - return null; - } - - var directives = SerializeDirectives(objectType.Directives, context); - - var interfaces = objectType.Implements - .Select(t => SerializeNamedType(t, context)) - .ToList(); - - if (objectType.ContextData.ContainsKey(Constants.FederationContextData.ExtendMarker)) - { - return new ObjectTypeExtensionNode( - location: null, - new NameNode(objectType.Name), - directives.ReadOnlyList, - interfaces, - fields); - } - - return new ObjectTypeDefinitionNode( - location: null, - new NameNode(objectType.Name), - SerializeDescription(objectType.Description), - directives.ReadOnlyList, - interfaces, - fields); - } - - private static InterfaceTypeDefinitionNode SerializeInterfaceType( - InterfaceType interfaceType, - Context context) - { - var directives = SerializeDirectives(interfaceType.Directives, context); - - var fields = interfaceType.Fields - .Select(t => SerializeObjectField(t, context)) - .ToList(); - - return new InterfaceTypeDefinitionNode( - location: null, - new NameNode(interfaceType.Name), - SerializeDescription(interfaceType.Description), - directives.ReadOnlyList, - Array.Empty(), - fields); - } - - private static UnionTypeDefinitionNode SerializeUnionType( - UnionType unionType, - Context context) - { - var directives = SerializeDirectives(unionType.Directives, context); - - var types = unionType.Types.Values - .Select(t => SerializeNamedType(t, context)) - .ToList(); - - return new UnionTypeDefinitionNode( - location: null, - new NameNode(unionType.Name), - SerializeDescription(unionType.Description), - directives.ReadOnlyList, - types); - } - - private static FieldDefinitionNode SerializeObjectField( - IOutputField field, - Context context) - { - var arguments = field.Arguments - .Select(t => SerializeInputField(t, context)) - .ToList(); - - var directives = SerializeDirectives(field.Directives, context); - - if (field.IsDeprecated) - { - var deprecateDirective = DeprecatedDirective.CreateNode(field.DeprecationReason); - var temp = directives.GetOrCreateList(); - temp.Add(deprecateDirective); - } - - return new FieldDefinitionNode( - location: null, - new NameNode(field.Name), - SerializeDescription(field.Description), - arguments, - SerializeType(field.Type, context), - directives.ReadOnlyList); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs deleted file mode 100644 index e6707a44779..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/SchemaPrinter/FederationSchemaPrinter.cs +++ /dev/null @@ -1,186 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Helpers; -using HotChocolate.ApolloFederation.Types; -using HotChocolate.Language; -using HotChocolate.Types.Introspection; -using HotChocolate.Utilities; -using HotChocolate.Utilities.Introspection; - -namespace HotChocolate.ApolloFederation; - -/// -/// The apollo federation schema printer. -/// -public static partial class FederationSchemaPrinter -{ - private static readonly HashSet _builtInDirectives = - [ - WellKnownTypeNames.External, - WellKnownTypeNames.Requires, - WellKnownTypeNames.Provides, - WellKnownTypeNames.Key, - WellKnownDirectives.Defer, - WellKnownDirectives.Stream, - WellKnownDirectives.Skip, - WellKnownDirectives.Include, - WellKnownDirectives.Deprecated, - SpecifiedByDirectiveType.Names.SpecifiedBy, - ]; - - /// - /// Creates a representation of the given - /// . - /// - /// - /// The schema object. - /// - /// - /// Returns the representation of the given - /// . - /// - public static string Print(ISchema schema) - { - ArgumentNullException.ThrowIfNull(schema); - - return SerializeSchema(schema).ToString(); - } - - private static DocumentNode SerializeSchema(ISchema schema) - { - var context = new Context(); - var definitionNodes = new List(); - - foreach (var directive in schema.DirectiveTypes) - { - if (directive.IsPublic) - { - context.DirectiveNames.Add(directive.Name); - } - } - - foreach (var namedType in GetRelevantTypes(schema)) - { - if (TrySerializeType(namedType, context, out var definitionNode)) - { - definitionNodes.Add(definitionNode); - } - } - - foreach (var directive in schema.DirectiveTypes) - { - if (!_builtInDirectives.Contains(directive.Name) && directive.IsPublic) - { - definitionNodes.Add(SerializeDirectiveTypeDefinition(directive, context)); - } - } - - return new DocumentNode(null, definitionNodes); - } - - private static IEnumerable GetRelevantTypes(ISchema schema) - => schema.Types - .Where(IncludeType) - .OrderBy(t => t.Name, StringComparer.Ordinal); - - private static bool TrySerializeType( - INamedType namedType, - Context context, - [NotNullWhen(true)] out IDefinitionNode? definitionNode) - { - definitionNode = namedType switch - { - ObjectType type => SerializeObjectType(type, context), - InterfaceType type => SerializeInterfaceType(type, context), - InputObjectType type => SerializeInputObjectType(type, context), - UnionType type => SerializeUnionType(type, context), - EnumType type => SerializeEnumType(type, context), - ScalarType type => SerializeScalarType(type, context), - _ => throw new NotSupportedException(), - }; - return definitionNode is not null; - } - - private static ITypeNode SerializeType( - IType type, - Context context) - { - return type switch - { - NonNullType nt => new NonNullTypeNode( - (INullableTypeNode)SerializeType(nt.Type, context)), - ListType lt => new ListTypeNode(SerializeType(lt.ElementType, context)), - INamedType namedType => SerializeNamedType(namedType, context), - _ => throw new NotSupportedException(), - }; - } - - private static NamedTypeNode SerializeNamedType( - INamedType namedType, - Context context) - { - context.TypeNames.Add(namedType.Name); - return new NamedTypeNode( - location: null, - new NameNode(namedType.Name)); - } - - private static MaybeList SerializeDirectives( - IReadOnlyCollection directives, - Context context) - { - if (directives.Count == 0) - { - return default; - } - - List? directiveNodes = null; - - foreach (var directive in directives) - { - if (context.DirectiveNames.Contains(directive.Type.Name)) - { - var node = directive.AsSyntaxNode(removeDefaults: true); - (directiveNodes ??= new()).Add(node); - } - } - - if (directiveNodes is not null) - { - return new(directiveNodes); - } - - return default; - } - - private static StringValueNode? SerializeDescription(string? description) - => description is { Length: > 0 } - ? new StringValueNode(description) - : null; - - private static bool IncludeType(INamedType type) - => !IsBuiltInType(type) && - !IsApolloFederationType(type); - - private static bool IncludeField(IOutputField field) - => !field.IsIntrospectionField && - !IsApolloFederationType(field.Type.NamedType()); - - private static bool IsApolloFederationType(INamedType type) - => type is EntityType or ServiceType || - type.Name.EqualsOrdinal(WellKnownTypeNames.Any) || - type.Name.EqualsOrdinal(WellKnownTypeNames.FieldSet); - - private static bool IsBuiltInType(INamedType type) => - IntrospectionTypes.IsIntrospectionType(type.Name) || - BuiltInTypes.IsBuiltInType(type.Name); - - private sealed class Context - { - // ReSharper disable once CollectionNeverQueried.Local - public HashSet TypeNames { get; } = new(); - public HashSet DirectiveNames { get; } = new(_builtInDirectives); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs index e11d0832ddd..bb3d9197991 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs @@ -5,7 +5,6 @@ using System.Text; using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Helpers; using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Configuration; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs deleted file mode 100644 index d1703bf543c..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederatedSchema.cs +++ /dev/null @@ -1,51 +0,0 @@ -using HotChocolate.Configuration; -using HotChocolate.Types.Descriptors; -using HotChocolate.Types.Descriptors.Definitions; - -namespace HotChocolate.ApolloFederation; - -/// -/// Apollo Federation base schema object that allows users to apply custom schema directives (e.g. @composeDirective) -/// -public abstract class FederatedSchema : Schema -{ - /// - /// Initializes new instance of - /// - /// - /// Supported Apollo Federation version - /// - protected FederatedSchema(FederationVersion version = FederationVersion.Latest) - { - FederationVersion = version; - } - - /// - /// Retrieve supported Apollo Federation version - /// - public FederationVersion FederationVersion { get; } - - private IDescriptorContext _context = default!; - protected override void OnAfterInitialize(ITypeDiscoveryContext context, DefinitionBase definition) - { - base.OnAfterInitialize(context, definition); - _context = context.DescriptorContext; - } - - protected override void Configure(ISchemaTypeDescriptor descriptor) - { - var schemaType = this.GetType(); - if (schemaType.IsDefined(typeof(SchemaTypeDescriptorAttribute), inherit: true)) - { - foreach (var attribute in schemaType.GetCustomAttributes(inherit: true)) - { - if (attribute is SchemaTypeDescriptorAttribute casted) - { - casted.OnConfigure(_context, descriptor, schemaType); - } - } - } - var link = FederationUtils.GetFederationLink(FederationVersion); - descriptor.Link(link.Url, link.Import); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs deleted file mode 100644 index be6036790c7..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/MaybeList.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; - -namespace HotChocolate.ApolloFederation.Helpers; - -internal struct MaybeList -{ - public MaybeList(List? list) - { - _list = list; - } - - private List? _list; - public List GetOrCreateList() => _list ??= new(); - public readonly IReadOnlyList ReadOnlyList - { - get - { - if (_list is not null) - { - return _list; - } - return Array.Empty(); - } - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index b3c270d500c..4f2bb9a3597 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -111,4 +111,8 @@ + + + + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ArgumentParser.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ArgumentParser.cs similarity index 97% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ArgumentParser.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ArgumentParser.cs index f5a6994343a..f4a3da4f568 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ArgumentParser.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ArgumentParser.cs @@ -3,7 +3,7 @@ using HotChocolate.Language; using HotChocolate.Utilities; -namespace HotChocolate.ApolloFederation.Helpers; +namespace HotChocolate.ApolloFederation.Resolvers; /// /// A helper for getting field values from a representation object. @@ -21,7 +21,7 @@ public static bool TryGetValue( IType type, string[] path, out T? value) - => TryGetValue(valueNode, type, path, 0, out value); + => TryGetValue(valueNode, type, path, 0, out value); [MethodImpl(MethodImplOptions.AggressiveOptimization)] private static bool TryGetValue( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ExternalSetterExpressionHelper.cs similarity index 88% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ExternalSetterExpressionHelper.cs index 784339d7585..04de4e3c05f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ExternalSetterExpressionHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ExternalSetterExpressionHelper.cs @@ -1,14 +1,13 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; -using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using HotChocolate.Types.Descriptors.Definitions; using static System.Linq.Expressions.Expression; using static System.Reflection.BindingFlags; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; -namespace HotChocolate.ApolloFederation.Helpers; +namespace HotChocolate.ApolloFederation.Resolvers; /// /// This class contains helpers to generate external field setters. @@ -32,7 +31,7 @@ public static void TryAddExternalSetter(ObjectType type, ObjectTypeDefinition ty foreach (var field in type.Fields) { - if (field.Directives.ContainsDirective(WellKnownTypeNames.External) && + if (field.Directives.ContainsDirective() && field.Member is PropertyInfo { SetMethod: { } } property) { var expression = CreateTrySetValue(type.RuntimeType, property, field.Name); @@ -42,7 +41,7 @@ public static void TryAddExternalSetter(ObjectType type, ObjectTypeDefinition ty if (block is not null) { - typeDef.ContextData[ExternalSetter] = + typeDef.ContextData[FederationContextData.ExternalSetter] = Lambda>( Block(block), _type, _data, _entity) .Compile(); @@ -65,7 +64,7 @@ private static Expression CreateSetValue( PropertyInfo property) => (Expression)_createSetValueExpression .MakeGenericMethod(property.PropertyType) - .Invoke(null, new object[] { runtimeType, property })!; + .Invoke(null, [runtimeType, property])!; private static Expression CreateSetValueExpression( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverArgumentExpressionBuilder.cs similarity index 89% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverArgumentExpressionBuilder.cs index 0c098af2c0e..4ae12c7919a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverArgumentExpressionBuilder.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverArgumentExpressionBuilder.cs @@ -1,13 +1,11 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.Internal; using HotChocolate.Language; using HotChocolate.Resolvers.Expressions.Parameters; -namespace HotChocolate.ApolloFederation.Helpers; +namespace HotChocolate.ApolloFederation.Resolvers; internal sealed class ReferenceResolverArgumentExpressionBuilder : LocalStateParameterExpressionBuilder @@ -50,20 +48,22 @@ public override Expression Build(ParameterExpressionBuilderContext context) // NOTE: It will use the default handler without these two. public override bool IsDefaultHandler => true; + public override bool CanHandle(ParameterInfo parameter) => true; private string[] RequirePathAndGetSeparatedPath(ParameterInfo parameter) { var path = parameter.GetCustomAttribute() is { } attr ? attr.Path.Split('.') - : new[] { parameter.Name! }; + : [parameter.Name!]; _requiredPaths.Add(path); return path; } - private readonly List _requiredPaths = new(); + private readonly List _requiredPaths = []; + public IReadOnlyList Required => _requiredPaths; protected override bool ResolveDefaultIfNotExistsParameterValue( diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverHelper.cs similarity index 92% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverHelper.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverHelper.cs index 9a5dfc84e5b..69d97be3ac6 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Helpers/ReferenceResolverHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Resolvers/ReferenceResolverHelper.cs @@ -2,9 +2,9 @@ using System.Threading.Tasks; using HotChocolate.Language; using HotChocolate.Resolvers; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; +using static HotChocolate.ApolloFederation.FederationContextData; -namespace HotChocolate.ApolloFederation.Helpers; +namespace HotChocolate.ApolloFederation.Resolvers; /// /// This class provides helpers for the reference resolver expression generators. diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs index cf083165270..00d2c9ca79e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Descriptors/EntityResolverDescriptor.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Reflection; -using HotChocolate.ApolloFederation.Helpers; using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.Internal; using HotChocolate.Resolvers; using HotChocolate.Types.Descriptors; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs index f5a9c723872..f59fa4e6080 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs @@ -3,7 +3,6 @@ using System.Threading; using System.Threading.Tasks; using GreenDonut; -using HotChocolate.ApolloFederation.Helpers; using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; diff --git a/src/HotChocolate/Core/src/Types/Types/Contracts/IDirectiveCollection.cs b/src/HotChocolate/Core/src/Types/Types/Contracts/IDirectiveCollection.cs index df8ff895052..c2628ac2d2c 100644 --- a/src/HotChocolate/Core/src/Types/Types/Contracts/IDirectiveCollection.cs +++ b/src/HotChocolate/Core/src/Types/Types/Contracts/IDirectiveCollection.cs @@ -29,6 +29,14 @@ public interface IDirectiveCollection : IReadOnlyCollection /// Returns the first directive that matches the given name or null. /// Directive? FirstOrDefault(string directiveName); + + /// + /// Gets the first directive that matches the given or null. + /// + /// + /// Returns the first directive that matches the given or null. + /// + Directive? FirstOrDefault(); /// /// Checks if a directive with the specified exists. @@ -41,4 +49,13 @@ public interface IDirectiveCollection : IReadOnlyCollection /// exists; otherwise, false will be returned. /// bool ContainsDirective(string directiveName); + + /// + /// Checks if a directive with the specified exists. + /// + /// + /// Returns true if a directive with the specified + /// exists; otherwise, false will be returned. + /// + bool ContainsDirective(); } From 6ca7698c4b0fada0ea9a36b63a2dc2455b9d20b4 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 16:08:42 +0100 Subject: [PATCH 82/89] edits --- .../src/ApolloFederation/FederationVersion.cs | 10 ---- .../ApolloFederation/FederationVersionUrls.cs | 11 ++++ .../{AnyTypeTests.cs => AnyTypeTests.txt} | 0 ...iveTests.cs => ExternalDirectiveTests.txt} | 0 ...irectiveTests.cs => KeyDirectiveTests.txt} | 0 ...ctiveTests.cs => PolicyDirectiveTests.txt} | 0 ...iveTests.cs => ProvidesDirectiveTests.txt} | 0 ...iveTests.cs => RequiresDirectiveTests.txt} | 0 ...lverTests.cs => EntitiesResolverTests.txt} | 0 ...EntityTypeTests.cs => EntityTypeTests.txt} | 0 ...ts.cs => FederationSchemaPrinterTests.txt} | 0 .../FieldSetTypeTests.cs | 4 +- .../ReferenceResolverAttributeTests.cs | 3 +- .../ServiceTypeTests.cs | 60 ++----------------- 14 files changed, 18 insertions(+), 70 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionUrls.cs rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/{AnyTypeTests.cs => AnyTypeTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/{ExternalDirectiveTests.cs => ExternalDirectiveTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/{KeyDirectiveTests.cs => KeyDirectiveTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/{PolicyDirectiveTests.cs => PolicyDirectiveTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/{ProvidesDirectiveTests.cs => ProvidesDirectiveTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/{RequiresDirectiveTests.cs => RequiresDirectiveTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/{EntitiesResolverTests.cs => EntitiesResolverTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/{EntityTypeTests.cs => EntityTypeTests.txt} (100%) rename src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/{FederationSchemaPrinterTests.cs => FederationSchemaPrinterTests.txt} (100%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs index 07a402d9e7d..07083ec56af 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersion.cs @@ -15,14 +15,4 @@ public enum FederationVersion Federation25 = 2_5, Federation26 = 2_6, Latest = Federation26, -} - -internal static class FederationVersionUrls -{ - public const string Federation20 = "https://specs.apollo.dev/federation/v2.0"; - public const string Federation21 = "https://specs.apollo.dev/federation/v2.1"; - public const string Federation22 = "https://specs.apollo.dev/federation/v2.2"; - public const string Federation23 = "https://specs.apollo.dev/federation/v2.3"; - public const string Federation24 = "https://specs.apollo.dev/federation/v2.4"; - public const string Federation25 = "https://specs.apollo.dev/federation/v2.5"; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionUrls.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionUrls.cs new file mode 100644 index 00000000000..054b96ce3cb --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionUrls.cs @@ -0,0 +1,11 @@ +namespace HotChocolate.ApolloFederation; + +internal static class FederationVersionUrls +{ + public const string Federation20 = "https://specs.apollo.dev/federation/v2.0"; + public const string Federation21 = "https://specs.apollo.dev/federation/v2.1"; + public const string Federation22 = "https://specs.apollo.dev/federation/v2.2"; + public const string Federation23 = "https://specs.apollo.dev/federation/v2.3"; + public const string Federation24 = "https://specs.apollo.dev/federation/v2.4"; + public const string Federation25 = "https://specs.apollo.dev/federation/v2.5"; +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/AnyTypeTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/KeyDirectiveTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntitiesResolverTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/EntityTypeTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.txt similarity index 100% rename from src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.cs rename to src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FederationSchemaPrinterTests.txt diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs index 07da23f66ee..9e4130a489a 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/FieldSetTypeTests.cs @@ -1,7 +1,7 @@ -using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using HotChocolate.Types; +using static HotChocolate.ApolloFederation.FederationTypeNames; using static HotChocolate.Language.Utf8GraphQLParser; namespace HotChocolate.ApolloFederation; @@ -16,7 +16,7 @@ public void Ensure_Type_Name_Is_Correct() var type = new FieldSetType(); // assert - Assert.Equal(WellKnownTypeNames.FieldSet, type.Name); + Assert.Equal(FieldSetType_Name, type.Name); } [Fact] diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs index a2b2e68ba1f..a07a63513e5 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs @@ -5,7 +5,7 @@ using HotChocolate.Language; using HotChocolate.Resolvers; using HotChocolate.Types; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; +using static HotChocolate.ApolloFederation.FederationContextData; using static HotChocolate.ApolloFederation.TestHelper; namespace HotChocolate.ApolloFederation; @@ -314,7 +314,6 @@ public static Task GetAsync(string id) [Key("id")] [Key("sku")] - public sealed class ExternalMultiKeyResolver { public string Id { get; set; } = default!; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs index b188943624d..c1ff0b7ea3d 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs @@ -1,67 +1,15 @@ using System.Threading.Tasks; using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Types; +using HotChocolate.Types; using Snapshooter.Xunit; +using static HotChocolate.ApolloFederation.FederationTypeNames; using static HotChocolate.ApolloFederation.TestHelper; namespace HotChocolate.ApolloFederation; public class ServiceTypeTests { - [Fact] - public async Task TestServiceTypeEmptyQueryTypeSchemaFirst() - { - // arrange - var schema = SchemaBuilder.New() - .AddApolloFederation() - .AddDocumentFromString( - @"type Query { - - } - - type Address @key(fields: ""matchCode"") { - matchCode: String! - }") - .Use(_ => _ => default) - .Create(); - - // act - var entityType = schema.GetType(WellKnownTypeNames.Service); - - // assert - var value = await entityType.Fields[WellKnownFieldNames.Sdl].Resolver!( - CreateResolverContext(schema)); - value.MatchSnapshot(); - } - - [Fact] - public async Task TestServiceTypeTypeSchemaFirst() - { - // arrange - var schema = SchemaBuilder.New() - .AddApolloFederation() - .AddDocumentFromString(@" - type Query { - address: Address! - } - - type Address @key(fields: ""matchCode"") { - matchCode: String! - } - ") - .Use(_ => _ => default) - .Create(); - - // act - var entityType = schema.GetType(WellKnownTypeNames.Service); - - // assert - var value = await entityType.Fields[WellKnownFieldNames.Sdl].Resolver!( - CreateResolverContext(schema)); - value.MatchSnapshot(); - } - - [Fact] public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() { @@ -73,7 +21,7 @@ public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() .Create(); // act - var entityType = schema.GetType(WellKnownTypeNames.Service); + var entityType = schema.GetType(ServiceType_Name); // assert var value = await entityType.Fields[WellKnownFieldNames.Sdl].Resolver!( @@ -91,7 +39,7 @@ public async Task TestServiceTypeTypePureCodeFirst() .Create(); // act - var entityType = schema.GetType(WellKnownTypeNames.Service); + var entityType = schema.GetType(ServiceType_Name); // assert var value = await entityType.Fields[WellKnownFieldNames.Sdl].Resolver!( From 03311def9a3a27357a29bd384d88ce5bc4de1008 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 17:24:35 +0100 Subject: [PATCH 83/89] it-compiles --- .../Directives/RequiresScopesDirectiveType.cs | 62 ----- ...escriptorExtensions.ApolloAuthenticated.cs | 61 ----- ...tionDescriptorExtensions.RequiresScopes.cs | 74 ------ ...erationRequestExecutorBuilderExtensions.cs | 11 +- ...ApolloFederationSchemaBuilderExtensions.cs | 42 +--- .../HotChocolate.ApolloFederation.csproj | 37 ++- .../Directives}/AuthenticatedAttribute.cs | 13 +- .../AuthenticatedDescriptionExtensions.cs | 59 +++++ .../Directives/AuthenticatedDirective.cs} | 28 ++- .../Directives}/FederationContextData.cs | 1 - .../FederationResources.Designer.cs | 12 - .../Directives}/FederationResources.cs | 8 + .../Directives}/FederationResources.resx | 6 - .../Types/Directives/KeyAttribute.cs | 2 +- .../Directives}/RequiresScopesAttribute.cs | 54 ++-- .../RequiresScopesDescriptorExtensions.cs | 230 ++++++++++++++++++ .../Directives/RequiresScopesDirective.cs | 45 ++++ .../src/ApolloFederation/Types/Scope.cs | 2 +- .../FederationUtils.txt} | 38 --- .../src/Types/Types/DirectiveCollection.cs | 27 ++ 20 files changed, 445 insertions(+), 367 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes/_remove => Types/Directives}/AuthenticatedAttribute.cs (81%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedDescriptionExtensions.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Directives/AuthenticatedDirectiveType.cs => Types/Directives/AuthenticatedDirective.cs} (52%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{ => Types/Directives}/FederationContextData.cs (88%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Properties => Types/Directives}/FederationResources.Designer.cs (94%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Properties => Types/Directives}/FederationResources.cs (84%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Properties => Types/Directives}/FederationResources.resx (95%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{Configuration/Attributes => Types/Directives}/RequiresScopesAttribute.cs (58%) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDescriptorExtensions.cs create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDirective.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/{FederationVersioning/FederationUtils.cs => _remove/FederationUtils.txt} (71%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs deleted file mode 100644 index afb913272b1..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/RequiresScopesDirectiveType.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Collections.Generic; -using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.ApolloFederation; - -/// -/// -/// directive @@requiresScopes(scopes: [[Scope!]!]!) on -/// ENUM -/// | FIELD_DEFINITION -/// | INTERFACE -/// | OBJECT -/// | SCALAR -/// -/// -/// Directive that is used to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. -/// Refer to the Apollo Router article for additional details. -/// -/// type Foo @key(fields: "id") { -/// id: ID -/// description: String @requiresScopes(scopes: [["scope1"]]) -/// } -/// -/// -public sealed class RequiresScopesDirectiveType : DirectiveType -{ - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .BindArgumentsImplicitly() - .Name(WellKnownTypeNames.RequiresScopes) - .Description(FederationResources.RequiresScopesDirective_Description) - .Location( - DirectiveLocation.Enum | - DirectiveLocation.FieldDefinition | - DirectiveLocation.Interface | - DirectiveLocation.Object | - DirectiveLocation.Scalar); -} - -/// -/// Object representation of @requiresScopes directive. -/// -public sealed class RequiresScopes -{ - /// - /// Initializes new instance of - /// - /// - /// List of a list of required JWT scopes. - /// - public RequiresScopes(List> scopes) - { - Scopes = scopes; - } - - /// - /// Retrieves list of a list of required JWT scopes. - /// - public List> Scopes { get; } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs deleted file mode 100644 index 9199d06dd90..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.ApolloAuthenticated.cs +++ /dev/null @@ -1,61 +0,0 @@ -using HotChocolate.ApolloFederation.Constants; - -namespace HotChocolate.Types; - -/// -/// Provides extensions for applying @authenticated directive on type system descriptors. -/// -public static partial class ApolloFederationDescriptorExtensions -{ - /// - /// Applies @authenticated directive to indicate that the target element is accessible only to the authenticated supergraph users. - /// - /// type Foo @key(fields: "id") { - /// id: ID - /// description: String @authenticated - /// } - /// - /// - /// - /// The type descriptor on which this directive shall be annotated. - /// - /// - /// Returns the type descriptor. - /// - /// - /// The is null. - /// - public static IEnumTypeDescriptor ApolloAuthenticated(this IEnumTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); - } - - /// - public static IInterfaceFieldDescriptor ApolloAuthenticated(this IInterfaceFieldDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); - } - - /// - public static IInterfaceTypeDescriptor ApolloAuthenticated(this IInterfaceTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); - } - - /// - public static IObjectFieldDescriptor ApolloAuthenticated(this IObjectFieldDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); - } - - /// - public static IObjectTypeDescriptor ApolloAuthenticated(this IObjectTypeDescriptor descriptor) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(WellKnownTypeNames.AuthenticatedDirective); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs deleted file mode 100644 index 2c5e65c3f32..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationDescriptorExtensions.RequiresScopes.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections.Generic; -using HotChocolate.ApolloFederation; -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate.Types; - -/// -/// Provides extensions for applying @requiresScopes directive on type system descriptors. -/// -public static partial class ApolloFederationDescriptorExtensions -{ - /// - /// Applies @requiresScopes directive to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. - /// - /// type Foo @key(fields: "id") { - /// id: ID - /// description: String @requiresScopes(scopes: [["scope1"]]) - /// } - /// - /// - /// - /// The type descriptor on which this directive shall be annotated. - /// - /// Required JWT scopes - /// - /// Returns the type descriptor. - /// - /// - /// The is null. - /// - public static IEnumTypeDescriptor RequiresScopes( - this IEnumTypeDescriptor descriptor, - List> scopes) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(new RequiresScopes(scopes)); - } - - /// - public static IInterfaceFieldDescriptor RequiresScopes( - this IInterfaceFieldDescriptor descriptor, - List> scopes) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(new RequiresScopes(scopes)); - } - - /// - public static IInterfaceTypeDescriptor RequiresScopes( - this IInterfaceTypeDescriptor descriptor, - List> scopes) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(new RequiresScopes(scopes)); - } - - /// - public static IObjectFieldDescriptor RequiresScopes( - this IObjectFieldDescriptor descriptor, - List> scopes) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(new RequiresScopes(scopes)); - } - - /// - public static IObjectTypeDescriptor RequiresScopes( - this IObjectTypeDescriptor descriptor, - List> scopes) - { - ArgumentNullException.ThrowIfNull(descriptor); - return descriptor.Directive(new RequiresScopes(scopes)); - } -} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs index 4578c81bee6..c2daa91a1b2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs @@ -1,3 +1,4 @@ +using HotChocolate.ApolloFederation; using HotChocolate.Execution.Configuration; namespace Microsoft.Extensions.DependencyInjection; @@ -13,6 +14,9 @@ public static class ApolloFederationRequestExecutorBuilderExtensions /// /// The . /// + /// + /// The apollo federation version to use. + /// /// /// Returns the . /// @@ -20,10 +24,11 @@ public static class ApolloFederationRequestExecutorBuilderExtensions /// The is null. /// public static IRequestExecutorBuilder AddApolloFederation( - this IRequestExecutorBuilder builder) + this IRequestExecutorBuilder builder, + FederationVersion version = FederationVersion.Latest) { ArgumentNullException.ThrowIfNull(builder); - - return builder.ConfigureSchema(s => s.AddApolloFederation()); + builder.TryAddTypeInterceptor(); + return builder; } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index f1a259b3eb7..a3278b71574 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -22,56 +22,18 @@ public static partial class ApolloFederationSchemaBuilderExtensions /// /// Target Federation version /// - /// /// /// The is null. /// public static ISchemaBuilder AddApolloFederation( this ISchemaBuilder builder, - FederationVersion version = FederationVersion.Latest, - Action? schemaConfiguration = null) + FederationVersion version = FederationVersion.Latest) { ArgumentNullException.ThrowIfNull(builder); - - // TODO : we will move this to the type interceptor. - builder.SetSchema(s => - { - var link = FederationUtils.GetFederationLink(version); - s.Link(link.Url, link.Import); - schemaConfiguration?.Invoke(s); - }); AddApolloFederationDefinitions(builder, version); return builder; } - /// - /// Adds support for Apollo Federation to the schema. - /// - /// - /// The . - /// - /// - /// Federated schema object. - /// - /// - /// Returns the . - /// - /// - /// The is null. - /// - /// - /// The is null. - /// - public static ISchemaBuilder AddApolloFederation(this ISchemaBuilder builder, FederatedSchema schema) - { - ArgumentNullException.ThrowIfNull(builder); - ArgumentNullException.ThrowIfNull(schema); - - builder.SetSchema(schema); - AddApolloFederationDefinitions(builder, schema.FederationVersion); - return builder; - } - /// /// Adds support for Apollo Federation to the schema. /// @@ -89,6 +51,7 @@ private static void AddApolloFederationDefinitions( this ISchemaBuilder builder, FederationVersion version = FederationVersion.Latest) { + /* ArgumentNullException.ThrowIfNull(builder); builder.TryAddTypeInterceptor(); @@ -162,5 +125,6 @@ private static void AddApolloFederationDefinitions( } builder.TryAddTypeInterceptor(); + */ } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index 4f2bb9a3597..a880678ccb4 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -23,15 +23,6 @@ - - True - True - FederationResources.resx - - - ResXFileCodeGenerator - FederationResources.Designer.cs - ProvidesDirective.cs @@ -104,6 +95,23 @@ FieldSetType.cs + + AuthenticatedDirective.cs + + + AuthenticatedDirective.cs + + + RequiresScopesDirective.cs + + + True + True + FederationResources.resx + + + RequiresScopesDirective.cs + @@ -112,7 +120,16 @@ - + + + + + + + + ResXFileCodeGenerator + FederationResources.Designer.cs + diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/AuthenticatedAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedAttribute.cs similarity index 81% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/AuthenticatedAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedAttribute.cs index 0f00622f67c..a7610812f41 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/_remove/AuthenticatedAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedAttribute.cs @@ -1,4 +1,5 @@ using System.Reflection; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Types.Descriptors; namespace HotChocolate.ApolloFederation; @@ -15,7 +16,7 @@ namespace HotChocolate.ApolloFederation; /// /// The @authenticated directive is used to indicate that the target element is accessible only to the /// authenticated supergraph users. For more granular access control, see the -/// RequiresScopeDirectiveType directive usage. +/// RequiresScopeDirectiveType directive usage. /// Refer to the /// Apollo Router article for additional details. /// @@ -44,27 +45,27 @@ protected internal override void TryConfigure( { case IEnumTypeDescriptor enumTypeDescriptor: { - enumTypeDescriptor.ApolloAuthenticated(); + enumTypeDescriptor.Authenticated(); break; } case IObjectTypeDescriptor objectFieldDescriptor: { - objectFieldDescriptor.ApolloAuthenticated(); + objectFieldDescriptor.Authenticated(); break; } case IObjectFieldDescriptor objectFieldDescriptor: { - objectFieldDescriptor.ApolloAuthenticated(); + objectFieldDescriptor.Authenticated(); break; } case IInterfaceTypeDescriptor interfaceTypeDescriptor: { - interfaceTypeDescriptor.ApolloAuthenticated(); + interfaceTypeDescriptor.Authenticated(); break; } case IInterfaceFieldDescriptor interfaceFieldDescriptor: { - interfaceFieldDescriptor.ApolloAuthenticated(); + interfaceFieldDescriptor.Authenticated(); break; } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedDescriptionExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedDescriptionExtensions.cs new file mode 100644 index 00000000000..cdf22caef1b --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedDescriptionExtensions.cs @@ -0,0 +1,59 @@ +namespace HotChocolate.ApolloFederation.Types; + +/// +/// Provides extensions for applying @authenticated directive on type system descriptors. +/// +public static class AuthenticatedDescriptionExtensions +{ + /// + /// Applies @authenticated directive to indicate that the target element is accessible only to the authenticated supergraph users. + /// + /// type Foo @key(fields: "id") { + /// id: ID + /// description: String @authenticated + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor Authenticated(this IEnumTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(AuthenticatedDirective.Default); + } + + /// + public static IInterfaceFieldDescriptor Authenticated(this IInterfaceFieldDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(AuthenticatedDirective.Default); + } + + /// + public static IInterfaceTypeDescriptor Authenticated(this IInterfaceTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(AuthenticatedDirective.Default); + } + + /// + public static IObjectFieldDescriptor Authenticated(this IObjectFieldDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(AuthenticatedDirective.Default); + } + + /// + public static IObjectTypeDescriptor Authenticated(this IObjectTypeDescriptor descriptor) + { + ArgumentNullException.ThrowIfNull(descriptor); + return descriptor.Directive(AuthenticatedDirective.Default); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/AuthenticatedDirectiveType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedDirective.cs similarity index 52% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/AuthenticatedDirectiveType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedDirective.cs index ae097f1c16e..d7678acf5bb 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Directives/AuthenticatedDirectiveType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/AuthenticatedDirective.cs @@ -1,5 +1,7 @@ using HotChocolate.ApolloFederation.Constants; -using HotChocolate.ApolloFederation.Properties; +using static HotChocolate.ApolloFederation.FederationTypeNames; +using static HotChocolate.ApolloFederation.FederationVersionUrls; +using static HotChocolate.ApolloFederation.Properties.FederationResources; namespace HotChocolate.ApolloFederation; @@ -14,7 +16,7 @@ namespace HotChocolate.ApolloFederation; /// /// /// The @authenticated directive is used to indicate that the target element is accessible only to the authenticated supergraph users. -/// For more granular access control, see the RequiresScopeDirectiveType directive usage. +/// For more granular access control, see the RequiresScopeDirectiveType directive usage. /// Refer to the Apollo Router article /// for additional details. /// @@ -24,16 +26,16 @@ namespace HotChocolate.ApolloFederation; /// } /// /// -public sealed class AuthenticatedDirectiveType : DirectiveType +[Package(Federation24)] +[DirectiveType( + AuthenticatedDirective_Name, + DirectiveLocation.Enum | + DirectiveLocation.FieldDefinition | + DirectiveLocation.Interface | + DirectiveLocation.Object | + DirectiveLocation.Scalar)] +[GraphQLDescription(AuthenticatedDirective_Description)] +public sealed class AuthenticatedDirective { - protected override void Configure(IDirectiveTypeDescriptor descriptor) - => descriptor - .Name(WellKnownTypeNames.AuthenticatedDirective) - .Description(FederationResources.AuthenticatedDirective_Description) - .Location( - DirectiveLocation.Enum | - DirectiveLocation.FieldDefinition | - DirectiveLocation.Interface | - DirectiveLocation.Object | - DirectiveLocation.Scalar); + public static AuthenticatedDirective Default { get; } = new(); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationContextData.cs similarity index 88% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationContextData.cs index 11c9ecdbd17..76d401a3f85 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationContextData.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationContextData.cs @@ -3,7 +3,6 @@ namespace HotChocolate.ApolloFederation; internal static class FederationContextData { public const string KeyMarker = "HotChocolate.ApolloFederation.Key"; - public const string ExtendMarker = "HotChocolate.ApolloFederation.Extend"; public const string ContactMarker = "HotChocolate.ApolloFederation.Contact"; public const string ExternalSetter = "HotChocolate.ApolloFederation.ExternalSetter"; public const string EntityResolver = "HotChocolate.ApolloFederation.EntityResolver"; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.Designer.cs similarity index 94% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.Designer.cs index 359b0538b47..64465d4a006 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.Designer.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.Designer.cs @@ -45,24 +45,12 @@ internal static System.Globalization.CultureInfo Culture { } } - internal static string AuthenticatedDirective_Description { - get { - return ResourceManager.GetString("AuthenticatedDirective_Description", resourceCulture); - } - } - internal static string FieldsetType_Description { get { return ResourceManager.GetString("FieldsetType_Description", resourceCulture); } } - internal static string RequiresScopesDirective_Description { - get { - return ResourceManager.GetString("RequiresScopesDirective_Description", resourceCulture); - } - } - internal static string ScopeType_Description { get { return ResourceManager.GetString("ScopeType_Description", resourceCulture); diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.cs similarity index 84% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.cs index f80ec269b8b..f37f2257f5c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.cs @@ -44,4 +44,12 @@ internal partial class FederationResources "service's schema. This SDL (schema definition language) is a printed version " + "of the service's schema including the annotations of federation directives. " + "This SDL does not include the additions of the federation spec."; + + public const string AuthenticatedDirective_Description = + "Indicates to composition that the target element is accessible " + + "only to the authenticated supergraph users."; + + public const string RequiresScopesDirective_Description = + "Indicates to composition that the target element is accessible only " + + "to the authenticated supergraph users with the appropriate JWT scopes."; } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.resx similarity index 95% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.resx index 2f59d1d4624..73302292ad2 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Properties/FederationResources.resx +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/FederationResources.resx @@ -117,15 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Indicates to composition that the target element is accessible only to the authenticated supergraph users. - Scalar representing a set of fields. - - Indicates to composition that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. - Scalar representing a JWT scope diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs index 581b89cd84c..9d0968f9f0c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs @@ -2,7 +2,7 @@ using System.Reflection; using HotChocolate.Types.Descriptors; using static System.Reflection.MemberTypes; -using static HotChocolate.ApolloFederation.Constants.FederationContextData; +using static HotChocolate.ApolloFederation.FederationContextData; using static HotChocolate.ApolloFederation.ThrowHelper; namespace HotChocolate.ApolloFederation.Types; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesAttribute.cs similarity index 58% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesAttribute.cs index 30b5e7bc9c0..ed4b5143b7f 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Configuration/Attributes/RequiresScopesAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesAttribute.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Linq; using System.Reflection; using HotChocolate.ApolloFederation.Types; @@ -59,52 +58,27 @@ protected internal override void TryConfigure( IDescriptor descriptor, ICustomAttributeProvider element) { - void AddScopes( - IHasDirectiveDefinition definition) - { - var existingScopes = definition - .Directives - .Select(t => t.Value) - .OfType() - .FirstOrDefault(); - - if (existingScopes is null) - { - existingScopes = new(new()); - definition.AddDirective(existingScopes, context.TypeInspector); - } - - var newScopes = Scopes.Select(s => new Scope(s)).ToList(); - existingScopes.Scopes.Add(newScopes); - } - switch (descriptor) { - case IEnumTypeDescriptor enumTypeDescriptor: - { - AddScopes(enumTypeDescriptor.ToDefinition()); + case IEnumTypeDescriptor desc: + desc.RequiresScopes(Scopes); break; - } - case IObjectTypeDescriptor objectFieldDescriptor: - { - AddScopes(objectFieldDescriptor.ToDefinition()); + + case IObjectTypeDescriptor desc: + desc.RequiresScopes(Scopes); break; - } - case IObjectFieldDescriptor objectFieldDescriptor: - { - AddScopes(objectFieldDescriptor.ToDefinition()); + + case IObjectFieldDescriptor desc: + desc.RequiresScopes(Scopes); break; - } - case IInterfaceTypeDescriptor interfaceTypeDescriptor: - { - AddScopes(interfaceTypeDescriptor.ToDefinition()); + + case IInterfaceTypeDescriptor desc: + desc.RequiresScopes(Scopes); break; - } - case IInterfaceFieldDescriptor interfaceFieldDescriptor: - { - AddScopes(interfaceFieldDescriptor.ToDefinition()); + + case IInterfaceFieldDescriptor desc: + desc.RequiresScopes(Scopes); break; - } } } } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDescriptorExtensions.cs new file mode 100644 index 00000000000..74c41624f28 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDescriptorExtensions.cs @@ -0,0 +1,230 @@ +using System.Collections.Generic; +using System.Linq; +using HotChocolate.Types.Descriptors; +using HotChocolate.Types.Descriptors.Definitions; +using HotChocolate.Types.Helpers; + +namespace HotChocolate.ApolloFederation.Types; + +/// +/// Provides extensions for applying @requiresScopes directive on type system descriptors. +/// +public static class RequiresScopesDescriptorExtensions +{ + /// + /// Applies @requiresScopes directive to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. + /// + /// type Foo @key(fields: "id") { + /// id: ID + /// description: String @requiresScopes(scopes: [["scope1"]]) + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// Required JWT scopes + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor RequiresScopes( + this IEnumTypeDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes, def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + /// Applies @requiresScopes directive to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. + /// + /// type Foo @key(fields: "id") { + /// id: ID + /// description: String @requiresScopes(scopes: [["scope1"]]) + /// } + /// + /// + /// + /// The type descriptor on which this directive shall be annotated. + /// + /// Required JWT scopes + /// + /// Returns the type descriptor. + /// + /// + /// The is null. + /// + public static IEnumTypeDescriptor RequiresScopes( + this IEnumTypeDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes.Select(s => new Scope(s)).ToArray(), def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IInterfaceFieldDescriptor RequiresScopes( + this IInterfaceFieldDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes, def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IInterfaceFieldDescriptor RequiresScopes( + this IInterfaceFieldDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes.Select(s => new Scope(s)).ToArray(), def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IInterfaceTypeDescriptor RequiresScopes( + this IInterfaceTypeDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes, def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IInterfaceTypeDescriptor RequiresScopes( + this IInterfaceTypeDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes.Select(s => new Scope(s)).ToArray(), def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IObjectFieldDescriptor RequiresScopes( + this IObjectFieldDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes, def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IObjectFieldDescriptor RequiresScopes( + this IObjectFieldDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes.Select(s => new Scope(s)).ToArray(), def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IObjectTypeDescriptor RequiresScopes( + this IObjectTypeDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes, def, ctx.TypeInspector); + }); + + return descriptor; + } + + /// + public static IObjectTypeDescriptor RequiresScopes( + this IObjectTypeDescriptor descriptor, + IReadOnlyList scopes) + { + ArgumentNullException.ThrowIfNull(descriptor); + + descriptor.Extend().OnBeforeCreate( + (ctx, def) => + { + AddScopes(scopes.Select(s => new Scope(s)).ToArray(), def, ctx.TypeInspector); + }); + + return descriptor; + } + + private static void AddScopes( + IReadOnlyList scopes, + IHasDirectiveDefinition definition, + ITypeInspector typeInspector) + { + var directive = definition + .Directives + .Select(t => t.Value) + .OfType() + .FirstOrDefault(); + + if (directive is null) + { + directive = new RequiresScopesDirective([]); + definition.AddDirective(directive, typeInspector); + } + + var newScopes = scopes.ToHashSet(); + directive.Scopes.Add(newScopes); + } +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDirective.cs new file mode 100644 index 00000000000..f1a50739b3d --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/RequiresScopesDirective.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using HotChocolate.ApolloFederation.Properties; +using HotChocolate.ApolloFederation.Types; +using static HotChocolate.ApolloFederation.FederationTypeNames; + +namespace HotChocolate.ApolloFederation; + +/// +/// +/// directive @@requiresScopes(scopes: [[Scope!]!]!) on +/// ENUM +/// | FIELD_DEFINITION +/// | INTERFACE +/// | OBJECT +/// | SCALAR +/// +/// +/// Directive that is used to indicate that the target element is accessible only to the authenticated supergraph users with the appropriate JWT scopes. +/// Refer to the Apollo Router article for additional details. +/// +/// type Foo @key(fields: "id") { +/// id: ID +/// description: String @requiresScopes(scopes: [["scope1"]]) +/// } +/// +/// +/// +/// List of a list of required JWT scopes. +/// +[Package(FederationVersionUrls.Federation24)] +[DirectiveType( + RequiresScopesDirective_Name, + DirectiveLocation.Enum | + DirectiveLocation.FieldDefinition | + DirectiveLocation.Interface | + DirectiveLocation.Object | + DirectiveLocation.Scalar)] +[GraphQLDescription(FederationResources.RequiresScopesDirective_Description)] +public sealed class RequiresScopesDirective(List> scopes) +{ + /// + /// Retrieves list of a list of required JWT scopes. + /// + public List> Scopes { get; } = scopes; +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs index 7d742fdebc1..fa07cdde81c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Scope.cs @@ -3,7 +3,7 @@ namespace HotChocolate.ApolloFederation.Types; /// /// Scalar Scope representation. /// -public sealed class Scope +public readonly record struct Scope { /// /// Initializes a new instance of . diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/_remove/FederationUtils.txt similarity index 71% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/_remove/FederationUtils.txt index dae113ca3f8..3ef2d850c59 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersioning/FederationUtils.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/_remove/FederationUtils.txt @@ -3,44 +3,6 @@ namespace HotChocolate.ApolloFederation; -internal readonly struct FederationVersionValues -{ - public required T[] Values { get; init; } - - public bool IsValidVersion(FederationVersion v) - { - return (int)v > 0 && (int)v < Values.Length; - } - - public ref T this[FederationVersion v] - { - get => ref Values[(int)v]; - } - - public ref T V20 => ref this[FederationVersion.Federation20]; - public ref T V21 => ref this[FederationVersion.Federation21]; - public ref T V22 => ref this[FederationVersion.Federation22]; - public ref T V23 => ref this[FederationVersion.Federation23]; - public ref T V24 => ref this[FederationVersion.Federation24]; - public ref T V25 => ref this[FederationVersion.Federation25]; - public ref T V26 => ref this[FederationVersion.Federation26]; - - public bool AllSet - { - get - { - foreach (var v in Values) - { - if (v == null) - { - return false; - } - } - return true; - } - } -} - /// /// Utility class to help calculate different Apollo Federation @link imports based on the supported version. /// diff --git a/src/HotChocolate/Core/src/Types/Types/DirectiveCollection.cs b/src/HotChocolate/Core/src/Types/Types/DirectiveCollection.cs index 98d6ae292b7..b6e89334db5 100644 --- a/src/HotChocolate/Core/src/Types/Types/DirectiveCollection.cs +++ b/src/HotChocolate/Core/src/Types/Types/DirectiveCollection.cs @@ -81,11 +81,38 @@ private static IEnumerable FindDirectives(Directive[] directives, str return null; } + + /// + public Directive? FirstOrDefault() + { + var span = _directives.AsSpan(); + ref var start = ref MemoryMarshal.GetReference(span); + ref var end = ref Unsafe.Add(ref start, span.Length); + + while (Unsafe.IsAddressLessThan(ref start, ref end)) + { + if (start.AsValue() is TRuntimeType) + { + return start; + } + + // move pointer +#pragma warning disable CS8619 + start = ref Unsafe.Add(ref start, 1); +#pragma warning restore CS8619 + } + + return null; + } /// public bool ContainsDirective(string directiveName) => FirstOrDefault(directiveName) is not null; + /// + public bool ContainsDirective() + => FirstOrDefault() is not null; + internal static DirectiveCollection CreateAndComplete( ITypeCompletionContext context, object source, From 539522b3320a27e661a7cc739f60f286f55b93c8 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 18:24:34 +0100 Subject: [PATCH 84/89] something-works --- ...erationRequestExecutorBuilderExtensions.cs | 3 ++ ...ApolloFederationSchemaBuilderExtensions.cs | 1 - .../FederationTypeInterceptor.cs | 45 ++++++++---------- .../src/ApolloFederation/ThrowHelper.cs | 3 +- .../Types/Directives/KeyAttribute.cs | 8 +++- .../Types/Directives/KeyDirective.cs | 24 ++++++++-- .../ApolloFederation/Types/FieldSetType.cs | 2 +- .../ApolloFederation/Types/ServerFields.cs | 47 +++++++++++++++++++ .../Types/{AnyType.cs => _AnyType.cs} | 11 +++-- .../Types/{EntityType.cs => _EntityType.cs} | 3 +- .../Types/{Service.cs => _Service.cs} | 3 +- ...HotChocolate.ApolloFederation.Tests.csproj | 1 + .../ServiceTypeTests.cs | 27 +++++++---- 13 files changed, 127 insertions(+), 51 deletions(-) create mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServerFields.cs rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{AnyType.cs => _AnyType.cs} (90%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{EntityType.cs => _EntityType.cs} (87%) rename src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/{Service.cs => _Service.cs} (91%) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs index c2daa91a1b2..511735be58d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationRequestExecutorBuilderExtensions.cs @@ -1,5 +1,7 @@ using HotChocolate.ApolloFederation; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Execution.Configuration; +using FederationVersion = HotChocolate.ApolloFederation.FederationVersion; namespace Microsoft.Extensions.DependencyInjection; @@ -28,6 +30,7 @@ public static IRequestExecutorBuilder AddApolloFederation( FederationVersion version = FederationVersion.Latest) { ArgumentNullException.ThrowIfNull(builder); + builder.SetContextData(FederationContextData.FederationVersion, version); builder.TryAddTypeInterceptor(); return builder; } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs index a3278b71574..1738e0a49dd 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs @@ -1,6 +1,5 @@ using HotChocolate.ApolloFederation; using HotChocolate.ApolloFederation.Types; -using ApolloAnyType = HotChocolate.ApolloFederation.Types.AnyType; namespace HotChocolate; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs index bb3d9197991..00a661c3e7e 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs @@ -15,7 +15,6 @@ using static HotChocolate.ApolloFederation.ThrowHelper; using static HotChocolate.ApolloFederation.FederationContextData; using static HotChocolate.Types.TagHelper; -using AnyType = HotChocolate.ApolloFederation.Types.AnyType; namespace HotChocolate.ApolloFederation; @@ -46,6 +45,7 @@ internal sealed class FederationTypeInterceptor : TypeInterceptor private ITypeInspector _typeInspector = default!; private ObjectType _queryType = default!; private ExtendedTypeDirectiveReference _keyDirectiveReference = default!; + private bool _registeredTypes; internal override void InitializeContext( IDescriptorContext context, @@ -82,6 +82,21 @@ public override void OnAfterInitialize( } } + public override IEnumerable RegisterMoreTypes( + IReadOnlyCollection discoveryContexts) + { + if (_registeredTypes) + { + yield break; + } + + _registeredTypes = true; + yield return _typeInspector.GetTypeRef(typeof(_Service)); + yield return _typeInspector.GetTypeRef(typeof(_EntityType)); + yield return _typeInspector.GetTypeRef(typeof(_AnyType)); + yield return _typeInspector.GetTypeRef(typeof(FieldSetType)); + } + internal override void OnAfterResolveRootType( ITypeCompletionContext completionContext, ObjectTypeDefinition definition, @@ -194,30 +209,8 @@ private void AddServiceTypeToQueryType( } var objectTypeDefinition = (ObjectTypeDefinition)definition!; - - var serviceFieldDescriptor = ObjectFieldDescriptor.New( - _context, - WellKnownFieldNames.Service); - serviceFieldDescriptor - .Type>>() - .Resolve(_empty); - objectTypeDefinition.Fields.Add(serviceFieldDescriptor.CreateDefinition()); - - var entitiesFieldDescriptor = ObjectFieldDescriptor.New( - _context, - WellKnownFieldNames.Entities); - entitiesFieldDescriptor - .Type>>() - .Argument( - WellKnownArgumentNames.Representations, - descriptor => descriptor.Type>>>()) - .Resolve( - c => EntitiesResolver.ResolveAsync( - c.Schema, - c.ArgumentValue>( - WellKnownArgumentNames.Representations), - c)); - objectTypeDefinition.Fields.Add(entitiesFieldDescriptor.CreateDefinition()); + objectTypeDefinition.Fields.Add(ServerFields.CreateServiceField(_context)); + objectTypeDefinition.Fields.Add(ServerFields.CreateEntitiesField(_context)); } private void ApplyMethodLevelReferenceResolvers( @@ -323,7 +316,7 @@ private void AddMemberTypesToTheEntityUnionType( ITypeCompletionContext completionContext, DefinitionBase? definition) { - if (completionContext.Type is EntityType && + if (completionContext.Type is _EntityType && definition is UnionTypeDefinition unionTypeDefinition) { foreach (var objectType in _entityTypes) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs index bf0382824cc..da07894b425 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/ThrowHelper.cs @@ -1,7 +1,6 @@ using System.Reflection; using HotChocolate.ApolloFederation.Types; using static HotChocolate.ApolloFederation.Properties.FederationResources; -using AnyType = HotChocolate.ApolloFederation.Types.AnyType; namespace HotChocolate.ApolloFederation; @@ -29,7 +28,7 @@ public static SerializationException FieldSet_InvalidFormat( /// node value has an invalid format. /// public static SerializationException Any_InvalidFormat( - AnyType anyType) => + _AnyType anyType) => new SerializationException( ErrorBuilder.New() .SetMessage(ThrowHelper_Any_HasInvalidFormat) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs index 9d0968f9f0c..5b64eeacc86 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyAttribute.cs @@ -88,7 +88,11 @@ protected internal override void TryConfigure( ConfigureType(type, descriptor); break; - case MemberInfo { MemberType: Property | Method } member: + case PropertyInfo member: + ConfigureField(member, descriptor); + break; + + case MethodInfo member: ConfigureField(member, descriptor); break; } @@ -115,7 +119,7 @@ private void ConfigureType(Type type, IDescriptor descriptor) private void ConfigureField(MemberInfo member, IDescriptor descriptor) { - if (string.IsNullOrEmpty(FieldSet)) + if (!string.IsNullOrEmpty(FieldSet)) { throw Key_FieldSet_MustBeEmpty(member); } diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs index 89298be74f0..f220893d6a1 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/KeyDirective.cs @@ -1,6 +1,8 @@ +using HotChocolate.Language; using static HotChocolate.ApolloFederation.FederationTypeNames; using static HotChocolate.ApolloFederation.FederationVersionUrls; using static HotChocolate.ApolloFederation.Properties.FederationResources; +using DirectiveLocation = HotChocolate.Types.DirectiveLocation; namespace HotChocolate.ApolloFederation.Types; @@ -28,12 +30,26 @@ namespace HotChocolate.ApolloFederation.Types; IsRepeatable = true)] [GraphQLDescription(KeyDirective_Description)] [KeyLegacySupport] -public sealed class KeyDirective(string fieldSet, bool resolvable = true) +public sealed class KeyDirective { + public KeyDirective(string fieldSet, bool resolvable = true) + { + ArgumentException.ThrowIfNullOrEmpty(fieldSet); + FieldSet = FieldSetType.ParseSelectionSet(fieldSet); + Resolvable = resolvable; + } + + public KeyDirective(SelectionSetNode fieldSet, bool resolvable = true) + { + ArgumentNullException.ThrowIfNull(fieldSet); + FieldSet = fieldSet; + Resolvable = resolvable; + } + [FieldSet] - public string FieldSet { get; } = fieldSet; + public SelectionSetNode FieldSet { get; } [GraphQLType] [DefaultValue(true)] - public bool Resolvable { get; } = resolvable; -} \ No newline at end of file + public bool Resolvable { get; } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs index 52a9690ce09..3c2252a2f5c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/FieldSetType.cs @@ -129,7 +129,7 @@ public override bool TryDeserialize(object? resultValue, out object? runtimeValu return false; } - private static SelectionSetNode ParseSelectionSet(string s) + internal static SelectionSetNode ParseSelectionSet(string s) => Utf8GraphQLParser.Syntax.ParseSelectionSet($"{{{s}}}"); private static string SerializeSelectionSet(SelectionSetNode selectionSet) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServerFields.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServerFields.cs new file mode 100644 index 00000000000..83e27885dc5 --- /dev/null +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/ServerFields.cs @@ -0,0 +1,47 @@ +using System.Collections.Generic; +using HotChocolate.ApolloFederation.Constants; +using HotChocolate.ApolloFederation.Resolvers; +using HotChocolate.ApolloFederation.Types; +using HotChocolate.Resolvers; +using HotChocolate.Types.Descriptors; +using HotChocolate.Types.Descriptors.Definitions; + +#nullable enable + +namespace HotChocolate.ApolloFederation; + +public static class ServerFields +{ + private static readonly _Service _service = new(); + + internal static ObjectFieldDefinition CreateServiceField(IDescriptorContext context) + { + var descriptor = ObjectFieldDescriptor.New(context, WellKnownFieldNames.Service); + descriptor.Resolve(_service); + descriptor.Definition.PureResolver = Resolve; + + static _Service Resolve(IPureResolverContext ctx) + => _service; + + return descriptor.CreateDefinition(); + } + + internal static ObjectFieldDefinition CreateEntitiesField(IDescriptorContext context) + { + var descriptor = ObjectFieldDescriptor.New(context, WellKnownFieldNames.Entities); + + descriptor + .Type>>() + .Argument( + WellKnownArgumentNames.Representations, + d => d.Type>>>()) + .Resolve( + c => EntitiesResolver.ResolveAsync( + c.Schema, + c.ArgumentValue>( + WellKnownArgumentNames.Representations), + c)); + + return descriptor.CreateDefinition(); + } +} diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_AnyType.cs similarity index 90% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_AnyType.cs index a2fbc1f532e..c971db3dd35 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/AnyType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_AnyType.cs @@ -11,20 +11,21 @@ namespace HotChocolate.ApolloFederation.Types; /// The _Any scalar is used to pass representations of entities /// from external services into the root _entities field for execution. /// -public sealed class AnyType : ScalarType +// ReSharper disable once InconsistentNaming +public sealed class _AnyType : ScalarType { public const string TypeNameField = "__typename"; /// - /// Initializes a new instance of . + /// Initializes a new instance of . /// - public AnyType() + public _AnyType() : this(AnyType_Name) { } /// - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// /// The name the scalar shall have. @@ -32,7 +33,7 @@ public AnyType() /// /// Defines if this scalar shall bind implicitly to . /// - public AnyType(string name, BindingBehavior bind = BindingBehavior.Explicit) + public _AnyType(string name, BindingBehavior bind = BindingBehavior.Explicit) : base(name, bind) { Description = FederationResources.Any_Description; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_EntityType.cs similarity index 87% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_EntityType.cs index 38730c58f7e..b60f2859f69 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/EntityType.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_EntityType.cs @@ -8,7 +8,8 @@ namespace HotChocolate.ApolloFederation.Types; /// A union called _Entity which is a union of all types that use the @key directive, /// including both types native to the schema and extended types. /// -public sealed class EntityType : UnionType +// ReSharper disable once InconsistentNaming +public sealed class _EntityType : UnionType { protected override void Configure(IUnionTypeDescriptor descriptor) { diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Service.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_Service.cs similarity index 91% rename from src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Service.cs rename to src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_Service.cs index 91e3f5bf961..453d6a2f91c 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Service.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/_Service.cs @@ -14,7 +14,8 @@ namespace HotChocolate.ApolloFederation.Types; /// [ObjectType(ServiceType_Name)] [GraphQLDescription(ServiceType_Description)] -public sealed class Service +// ReSharper disable once InconsistentNaming +public sealed class _Service { [GraphQLName(WellKnownFieldNames.Sdl)] public string GetSdl(ISchema schema) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/HotChocolate.ApolloFederation.Tests.csproj b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/HotChocolate.ApolloFederation.Tests.csproj index 3ea8e790156..6f1d4c2b469 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/HotChocolate.ApolloFederation.Tests.csproj +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/HotChocolate.ApolloFederation.Tests.csproj @@ -6,6 +6,7 @@ + diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs index c1ff0b7ea3d..8a002d86d89 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs @@ -1,8 +1,10 @@ using System.Threading.Tasks; +using CookieCrumble; using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Types; +using HotChocolate.Execution; using HotChocolate.Types; -using Snapshooter.Xunit; +using Microsoft.Extensions.DependencyInjection; using static HotChocolate.ApolloFederation.FederationTypeNames; using static HotChocolate.ApolloFederation.TestHelper; @@ -14,19 +16,28 @@ public class ServiceTypeTests public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() { // arrange - var schema = SchemaBuilder.New() + var executor = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() - .AddType
() .AddQueryType() - .Create(); + .AddType
() + .BuildRequestExecutorAsync(); // act - var entityType = schema.GetType(ServiceType_Name); + var result = await executor.ExecuteAsync( + """ + { + _service { + sdl + } + } + """); // assert - var value = await entityType.Fields[WellKnownFieldNames.Sdl].Resolver!( - CreateResolverContext(schema)); - value.MatchSnapshot(); + result.MatchInlineSnapshot( + """ + + """); } [Fact] From 4e0c5cc24a6862c61a55875b5134c07cafa75cbd Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 18:42:10 +0100 Subject: [PATCH 85/89] something-more-works --- .../ServiceTypeTests.cs | 57 ++++++++++++++----- .../test/ApolloFederation.Tests/TestHelper.cs | 3 + 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs index 8a002d86d89..08129c895ac 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs @@ -3,6 +3,7 @@ using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Types; using HotChocolate.Execution; +using HotChocolate.Language; using HotChocolate.Types; using Microsoft.Extensions.DependencyInjection; using static HotChocolate.ApolloFederation.FederationTypeNames; @@ -16,28 +17,56 @@ public class ServiceTypeTests public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() { // arrange - var executor = await new ServiceCollection() + var schema = await new ServiceCollection() .AddGraphQL() .AddApolloFederation() .AddQueryType() .AddType
() - .BuildRequestExecutorAsync(); + .BuildSchemaAsync(); + var entityType = schema.GetType(ServiceType_Name); + var sdlResolver = entityType.Fields[WellKnownFieldNames.Sdl].Resolver!; + // act - var result = await executor.ExecuteAsync( - """ - { - _service { - sdl - } - } - """); + var value = await sdlResolver(CreateResolverContext(schema)); // assert - result.MatchInlineSnapshot( - """ - - """); + Utf8GraphQLParser + .Parse((string)value!) + .MatchInlineSnapshot( + """ + schema { + query: EmptyQuery + } + + type Address @key(fieldSet: "matchCode") { + matchCode: String + } + + type EmptyQuery { + _service: _Service + _entities(representations: [_Any!]!): [_Entity]! + } + + "This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." + type _Service { + sdl: String! + } + + "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." + union _Entity = Address + + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." + directive @key(fieldSet: FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + + directive @tag(name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + + "Scalar representing a set of fields." + scalar FieldSet + + "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." + scalar _Any + """); } [Fact] diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs index baad0d09fa4..33216fb9152 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/TestHelper.cs @@ -3,6 +3,7 @@ using System.Collections.Immutable; using System.Linq; using System.Threading; +using HotChocolate.ApolloFederation.Types; using HotChocolate.Language; using HotChocolate.Resolvers; using HotChocolate.Types; @@ -24,8 +25,10 @@ public static IResolverContext CreateResolverContext( mock.SetupGet(c => c.ContextData).Returns(contextData); mock.SetupProperty(c => c.ScopedContextData); mock.SetupProperty(c => c.LocalContextData); + mock.Setup(c => c.Parent<_Service>()).Returns(new _Service()); mock.Setup(c => c.Clone()).Returns(mock.Object); mock.SetupGet(c => c.Schema).Returns(schema); + if (type is not null) { From 3a81bded58c4634a6a3d157df4f8d974f1d359f8 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 20:21:04 +0100 Subject: [PATCH 86/89] edits --- .../FederationTypeInterceptor.cs | 65 ++++++++++++++++++- .../FederationVersionExtensions.cs | 14 ++++ .../Types/Directives/LinkDirective.cs | 4 +- 3 files changed, 79 insertions(+), 4 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs index 00a661c3e7e..0f88952e71a 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs @@ -41,10 +41,12 @@ internal sealed class FederationTypeInterceptor : TypeInterceptor BindingFlags.Static | BindingFlags.Public)!; private readonly List _entityTypes = new(); + private readonly Dictionary> _imports = new(); private IDescriptorContext _context = default!; private ITypeInspector _typeInspector = default!; private ObjectType _queryType = default!; private ExtendedTypeDirectiveReference _keyDirectiveReference = default!; + private SchemaTypeDefinition _schemaTypeDefinition = default!; private bool _registeredTypes; internal override void InitializeContext( @@ -95,6 +97,61 @@ public override IEnumerable RegisterMoreTypes( yield return _typeInspector.GetTypeRef(typeof(_EntityType)); yield return _typeInspector.GetTypeRef(typeof(_AnyType)); yield return _typeInspector.GetTypeRef(typeof(FieldSetType)); + + if (_context.GetFederationVersion() > FederationVersion.Federation10) + { + yield return _typeInspector.GetTypeRef(typeof(LinkDirective)); + } + } + + public override void OnBeforeCompleteName( + ITypeCompletionContext completionContext, + DefinitionBase definition) + { + if (definition is SchemaTypeDefinition schemaDef) + { + _schemaTypeDefinition = schemaDef; + } + } + + public override void OnAfterCompleteName( + ITypeCompletionContext completionContext, + DefinitionBase definition) + { + if (definition is not ITypeDefinition typeDef) + { + return; + } + + if (typeDef.RuntimeType != typeof(object) && + typeDef.RuntimeType.IsDefined(typeof(PackageAttribute))) + { + RegisterImport(typeDef.RuntimeType); + return; + } + + var type = completionContext.Type.GetType(); + + if (type.IsDefined(typeof(PackageAttribute))) + { + RegisterImport(type); + } + + void RegisterImport(MemberInfo element) + { + var package = element.GetCustomAttribute(); + + if (package is not null) + { + if (!_imports.TryGetValue(package.Url, out var types)) + { + types = new HashSet(); + _imports[package.Url] = types; + } + + types.Add(completionContext.Type.Name); + } + } } internal override void OnAfterResolveRootType( @@ -141,6 +198,8 @@ public override void OnAfterCompleteType( } } + internal override void OnAfterCreateSchemaInternal(IDescriptorContext context, ISchema schema) { } + private void CompleteExternalFieldSetters(ObjectType type, ObjectTypeDefinition typeDef) => ExternalSetterExpressionHelper.TryAddExternalSetter(type, typeDef); @@ -149,6 +208,7 @@ private void CompleteReferenceResolver(ObjectTypeDefinition typeDef) IReadOnlyList resolvers; { var contextData = typeDef.GetContextData(); + if (!contextData.TryGetValue(EntityResolver, out var resolversObject)) { return; @@ -270,6 +330,7 @@ private void AggregatePropertyLevelKeyDirectives( // from the annotated fields. { var foundMarkers = objectTypeDefinition.Fields.Any(f => f.ContextData.ContainsKey(KeyMarker)); + if (!foundMarkers) { return; @@ -332,7 +393,7 @@ private void AddKeyDirective( { objectTypeDefinition.Directives.Add( new DirectiveDefinition( - new KeyDirective(fieldSet), + new KeyDirective(fieldSet), _keyDirectiveReference)); } -} +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionExtensions.cs index 3dae1c89b2b..1a0ad9772ab 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationVersionExtensions.cs @@ -1,3 +1,4 @@ +using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; namespace HotChocolate.ApolloFederation.Types; @@ -18,4 +19,17 @@ public static FederationVersion GetFederationVersion( // TODO : resources throw new InvalidOperationException("The configuration state is invalid."); } + + public static FederationVersion GetFederationVersion( + this IDescriptorContext context) + { + if (context.ContextData.TryGetValue(FederationContextData.FederationVersion, out var value) && + value is FederationVersion version and > FederationVersion.Unknown) + { + return version; + } + + // TODO : resources + throw new InvalidOperationException("The configuration state is invalid."); + } } \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs index d078a4e8278..36c73f67fc1 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs @@ -18,7 +18,7 @@ public sealed class LinkDirective /// /// Optional list of imported elements. /// - public LinkDirective(Uri url, IReadOnlyList? import) + public LinkDirective(Uri url, IReadOnlySet? import) { Url = url; Import = import; @@ -32,5 +32,5 @@ public LinkDirective(Uri url, IReadOnlyList? import) /// /// Gets optional list of imported element names. /// - public IReadOnlyList? Import { get; } + public IReadOnlySet? Import { get; } } From a228a217c47773dcbc0ec1c965b6ef20eab70188 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 22:06:47 +0100 Subject: [PATCH 87/89] edits --- .../FederationTypeInterceptor.cs | 66 +- .../HotChocolate.ApolloFederation.csproj | 2 - .../Directives/LinkDescriptorExtensions.cs | 3 +- .../Types/Directives/LinkDirective.cs | 1 + .../src/ApolloFederation/packages.lock.json | 269 +--- .../ServiceTypeTests.cs | 15 +- .../ApolloFederation.Tests/packages.lock.json | 1385 +---------------- .../Types.Analyzers.Tests/packages.lock.json | 4 +- .../Fusion/src/CommandLine/packages.lock.json | 8 +- .../Fusion/test/Shared/packages.lock.json | 4 +- .../src/dotnet-graphql/packages.lock.json | 6 +- 11 files changed, 100 insertions(+), 1663 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs index 0f88952e71a..688f1079b7d 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/FederationTypeInterceptor.cs @@ -4,7 +4,6 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; -using HotChocolate.ApolloFederation.Constants; using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; using HotChocolate.Configuration; @@ -12,6 +11,7 @@ using HotChocolate.Resolvers; using HotChocolate.Types.Descriptors; using HotChocolate.Types.Descriptors.Definitions; +using HotChocolate.Types.Helpers; using static HotChocolate.ApolloFederation.ThrowHelper; using static HotChocolate.ApolloFederation.FederationContextData; using static HotChocolate.Types.TagHelper; @@ -20,8 +20,6 @@ namespace HotChocolate.ApolloFederation; internal sealed class FederationTypeInterceptor : TypeInterceptor { - private static readonly object _empty = new(); - private static readonly MethodInfo _matches = typeof(ReferenceResolverHelper) .GetMethod( @@ -47,6 +45,7 @@ internal sealed class FederationTypeInterceptor : TypeInterceptor private ObjectType _queryType = default!; private ExtendedTypeDirectiveReference _keyDirectiveReference = default!; private SchemaTypeDefinition _schemaTypeDefinition = default!; + private RegisteredType _schemaType = default!; private bool _registeredTypes; internal override void InitializeContext( @@ -104,12 +103,15 @@ public override IEnumerable RegisterMoreTypes( } } + + public override void OnBeforeCompleteName( ITypeCompletionContext completionContext, DefinitionBase definition) { if (definition is SchemaTypeDefinition schemaDef) { + _schemaType = (RegisteredType)completionContext; _schemaTypeDefinition = schemaDef; } } @@ -118,42 +120,74 @@ public override void OnAfterCompleteName( ITypeCompletionContext completionContext, DefinitionBase definition) { - if (definition is not ITypeDefinition typeDef) + if (definition is not ITypeDefinition and not DirectiveTypeDefinition) { return; } - if (typeDef.RuntimeType != typeof(object) && - typeDef.RuntimeType.IsDefined(typeof(PackageAttribute))) + var hasRuntimeType = (IHasRuntimeType)definition; + var type = hasRuntimeType.RuntimeType; + + if (type != typeof(object) && + type.IsDefined(typeof(PackageAttribute))) { - RegisterImport(typeDef.RuntimeType); + RegisterImport(type); return; } - var type = completionContext.Type.GetType(); - + type = completionContext.Type.GetType(); if (type.IsDefined(typeof(PackageAttribute))) { RegisterImport(type); } - + return; + void RegisterImport(MemberInfo element) { var package = element.GetCustomAttribute(); - if (package is not null) + if (package is null) { - if (!_imports.TryGetValue(package.Url, out var types)) - { - types = new HashSet(); - _imports[package.Url] = types; - } + return; + } + + if (!_imports.TryGetValue(package.Url, out var types)) + { + types = new HashSet(); + _imports[package.Url] = types; + } + if (completionContext.Type is DirectiveType) + { + types.Add($"@{completionContext.Type.Name}"); + } + else + { types.Add(completionContext.Type.Name); } } } + public override void OnTypesCompletedName() + { + if (_imports.Count == 0) + { + return; + } + + var dependency = new TypeDependency( + _typeInspector.GetTypeRef(typeof(LinkDirective)), + TypeDependencyFulfilled.Completed); + _schemaType.Dependencies.Add(dependency); + + foreach (var import in _imports) + { + _schemaTypeDefinition + .GetLegacyDefinition() + .AddDirective(new LinkDirective(new Uri(import.Key), import.Value), _typeInspector); + } + } + internal override void OnAfterResolveRootType( ITypeCompletionContext completionContext, ObjectTypeDefinition definition, diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj index a880678ccb4..575aca762f6 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/HotChocolate.ApolloFederation.csproj @@ -120,8 +120,6 @@ - - diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs index 98d2acb3c3e..abf47d2fc09 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDescriptorExtensions.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using HotChocolate.Execution.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -115,7 +116,7 @@ public static IRequestExecutorBuilder AddLink( builder.ConfigureSchema( sb => { - sb.AddSchemaConfiguration(d => d.Directive(new LinkDirective(url, imports))); + sb.AddSchemaConfiguration(d => d.Directive(new LinkDirective(url, imports?.ToHashSet()))); }); return builder; diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs index 36c73f67fc1..75de8ce71d6 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Types/Directives/LinkDirective.cs @@ -27,6 +27,7 @@ public LinkDirective(Uri url, IReadOnlySet? import) /// /// Gets imported specification url. /// + [GraphQLType>] public Uri Url { get; } /// diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json b/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json index 72ac1deb814..29eb4b6d081 100644 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json +++ b/src/HotChocolate/ApolloFederation/src/ApolloFederation/packages.lock.json @@ -1,273 +1,6 @@ { "version": 1, "dependencies": { - "net6.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Microsoft.Bcl.AsyncInterfaces": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "7hR9FU0JJHOCLmn/Ary31pLLAhlzoMptBKs5CJmNUzD87dXjl+/NqVkyCTl6cT2JAfTK0G39HpvCOv1fhsX3BQ==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Runtime.CompilerServices.Unsafe": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "6.0.7", - "contentHash": "/Tf/9XjprpHolbcDOrxsKVYy/mUG/FS7aGd9YUgBVEiHeQH4kAE0T1sMbde7q6B5xcrNUsJ5iW7D1RvHudQNqA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==" - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "csAJe24tWCOTO/rXoJAuBGuOq7ZdHY60XtC6b/hNMHT9tuX+2J9HK7nciLEtNvnrRLMxBACLXO3R4y5+kCduMA==" - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.Diagnostics.DiagnosticSource": "[6.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[6.0.0, )", - "System.Collections.Immutable": "[6.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[6.0.0, )", - "System.Threading.Channels": "[6.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[6.0.7, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.utilities.dependencyinjection": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[6.0.0, )" - } - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.Options": "[6.0.0, )" - } - } - }, "net7.0": { "Microsoft.SourceLink.GitHub": { "type": "Direct", @@ -753,4 +486,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs index 08129c895ac..5630d0ed6a2 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs @@ -20,7 +20,7 @@ public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() var schema = await new ServiceCollection() .AddGraphQL() .AddApolloFederation() - .AddQueryType() + .AddQueryType() .AddType
() .BuildSchemaAsync(); @@ -35,15 +35,15 @@ public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() .Parse((string)value!) .MatchInlineSnapshot( """ - schema { - query: EmptyQuery + schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.0", import: [ "@key", "FieldSet" ]) { + query: Query } type Address @key(fieldSet: "matchCode") { matchCode: String } - type EmptyQuery { + type Query { _service: _Service _entities(representations: [_Any!]!): [_Entity]! } @@ -59,7 +59,8 @@ type _Service { "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." directive @key(fieldSet: FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE - directive @tag(name: String!) repeatable on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | INTERFACE | UNION | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + "Object representation of @link directive." + directive @link("Gets imported specification url." url: String! "Gets optional list of imported element names." import: [String!]) repeatable on SCHEMA "Scalar representing a set of fields." scalar FieldSet @@ -87,10 +88,6 @@ public async Task TestServiceTypeTypePureCodeFirst() value.MatchSnapshot(); } - public class EmptyQuery - { - } - public class Query { public Address GetAddress(int id) => default!; diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json index 0d0491365a2..f76e572603b 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/packages.lock.json @@ -1,1335 +1,6 @@ { "version": 1, "dependencies": { - "net6.0": { - "ChilliCream.Testing.Utilities": { - "type": "Direct", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "gqRu5DNIt6FphQX4EZYlkOI3QmyzatQhuqf3zNXYBmmvmVQ0KaJStDvrANosxlrlVtVX+L5q/s4z9gZMCeuwkA==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "xunit": "2.3.1" - } - }, - "coverlet.msbuild": { - "type": "Direct", - "requested": "[3.1.2, )", - "resolved": "3.1.2", - "contentHash": "QhM0fnDtmIMImY7oxyQ/kh1VYtRxPyRVeLwRUGuUvI6Xp83pSYG9gerK8WgJj4TzUl7ISziADUGtIWKhtlbkbQ==" - }, - "Microsoft.NET.Test.Sdk": { - "type": "Direct", - "requested": "[17.1.0, )", - "resolved": "17.1.0", - "contentHash": "MVKvOsHIfrZrvg+8aqOF5dknO/qWrR1sWZjMPQ1N42MKMlL/zQL30FQFZxPeWfmVKWUWAOmAHYsqB5OerTKziw==", - "dependencies": { - "Microsoft.CodeCoverage": "17.1.0", - "Microsoft.TestPlatform.TestHost": "17.1.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[1.1.1, )", - "resolved": "1.1.1", - "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "Moq": { - "type": "Direct", - "requested": "[4.18.1, )", - "resolved": "4.18.1", - "contentHash": "MmZIKNyvn8VrivSaqA8tqy5DmwUievC9zsuNTrcb00oY4IeGq6fXT5BQK329lZ05/tyi5vp30AWe9fl0d2PZQg==", - "dependencies": { - "Castle.Core": "5.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Snapshooter.Xunit": { - "type": "Direct", - "requested": "[0.5.4, )", - "resolved": "0.5.4", - "contentHash": "gE9VlseOySUSwwAKCXastwxJ7qYpVHwIEi+QbzRVmdOvV6Ry/vE1WqyuolRHwhjx2QZY8+YuO4L/cKJGrt2H6w==", - "dependencies": { - "Snapshooter": "0.5.4", - "xunit.assert": "2.4.1", - "xunit.core": "2.4.1" - } - }, - "xunit": { - "type": "Direct", - "requested": "[2.4.1, )", - "resolved": "2.4.1", - "contentHash": "XNR3Yz9QTtec16O0aKcO6+baVNpXmOnPUxDkCY97J+8krUYxPvXT1szYYEUdKk4sB8GOI2YbAjRIOm8ZnXRfzQ==", - "dependencies": { - "xunit.analyzers": "0.10.0", - "xunit.assert": "[2.4.1]", - "xunit.core": "[2.4.1]" - } - }, - "xunit.runner.visualstudio": { - "type": "Direct", - "requested": "[2.4.3, )", - "resolved": "2.4.3", - "contentHash": "kZZSmOmKA8OBlAJaquPXnJJLM9RwQ27H7BMVqfMLUcTi9xHinWGJiWksa3D4NEtz0wZ/nxd2mogObvBgJKCRhQ==" - }, - "Castle.Core": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "edc8jjyXqzzy8jFdhs36FZdwmlDDTgqPb2Zy1Q5F/f2uAc88bu/VS/0Tpvgupmpl9zJOvOo5ZizVANb0ltN1NQ==", - "dependencies": { - "System.Diagnostics.EventLog": "6.0.0" - } - }, - "Microsoft.Bcl.AsyncInterfaces": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==" - }, - "Microsoft.CodeCoverage": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "0N/ZJ71ncCxQWhgtkEYKOgu2oMHa8h1tsOUbhmIKXF8UwtSUCe4vHAsJ3DVcNWRwNfQzSTy263ZE+QF6MdIhhQ==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "k6PWQMuoBDGGHOQTtyois2u4AwyVcIwL2LaSLlTZQm2CYcJ1pxbt6jfAnpWmzENA/wfrYRI/X9DTLoUkE4AsLw==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "xlzi2IYREJH3/m6+lUrQlujzX8wDitm4QGnUu6kUXTQAWPuZY8i+ticFJbzfqaetLA6KR/rO6Ew/HuYD+bxifg==" - }, - "Microsoft.Extensions.ObjectPool": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "7hR9FU0JJHOCLmn/Ary31pLLAhlzoMptBKs5CJmNUzD87dXjl+/NqVkyCTl6cT2JAfTK0G39HpvCOv1fhsX3BQ==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" - }, - "Microsoft.TestPlatform.ObjectModel": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "OMo/FYnKGy3lZEK0gfitskRM3ga/YBt6MyCyFPq0xNLeybGOQ6HnYNAAvzyePo5WPuMiw3LX+HiuRWNjnas1fA==", - "dependencies": { - "NuGet.Frameworks": "5.11.0", - "System.Reflection.Metadata": "1.6.0" - } - }, - "Microsoft.TestPlatform.TestHost": { - "type": "Transitive", - "resolved": "17.1.0", - "contentHash": "JS0JDLniDhIzkSPLHz7N/x1CG8ywJOtwInFDYA3KQvbz+ojGoT5MT2YDVReL1b86zmNRV8339vsTSm/zh0RcMg==", - "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Microsoft.Win32.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "NETStandard.Library": { - "type": "Transitive", - "resolved": "1.6.1", - "contentHash": "WcSp3+vP+yHNgS8EV5J7pZ9IRpeDuARBPN28by8zqff1wJQXm26PVU8L3/fYLBJVU7BtDyqNVWq2KlCVvSSR4A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.Win32.Primitives": "4.3.0", - "System.AppContext": "4.3.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Console": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.Compression.ZipFile": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.Net.Http": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Net.Sockets": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.InteropServices.RuntimeInformation": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Timer": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0", - "System.Xml.XDocument": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "12.0.1", - "contentHash": "pBR3wCgYWZGiaZDYP+HHYnalVnPJlpP1q55qvVb+adrDHmFMDc1NAKio61xTwftK3Pw5h7TZJPJEEVMd6ty8rg==" - }, - "NuGet.Frameworks": { - "type": "Transitive", - "resolved": "5.11.0", - "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" - }, - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "HdSSp5MnJSsg08KMfZThpuLPJpPwE5hBXvHwoKWosyHHfe8Mh5WKT0ylEOf6yNzX6Ngjxe4Whkafh5q7Ymac4Q==" - }, - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "+yH1a49wJMy8Zt4yx5RhJrxO/DBDByAiCzNwiETI+1S4mPdCu0OY4djdciC7Vssk0l22wQaDLrXxXkp+3+7bVA==" - }, - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c3YNH1GQJbfIPJeCnr4avseugSqPrxwIqzthYyZDN6EuOyNOzq+y2KSUfRcXauya1sF4foESTgwM5e1A8arAKw==" - }, - "runtime.native.System": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "INBPonS5QPEgn7naufQFXJEp3zX6L4bwHgJ/ZH78aBTpeNfQMtf7C6VrAFhlq2xxWBveIOWyFzQjJ8XzHMhdOQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==", - "dependencies": { - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0" - } - }, - "runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "NS1U+700m4KFRHR5o4vo9DSlTmlCKu/u7dtE5sUHVIPB+xpXxYQvgBgA6wEIeCz6Yfn0Z52/72WYsToCEPJnrw==", - "dependencies": { - "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0", - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "b3pthNgxxFcD+Pc0WSEoC0+md3MyhRS6aCEeenvNE3Fdw1HyJ18ZhRFVJJzIeR/O/jpxPboB805Ho0T3Ul7w8A==" - }, - "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KeLz4HClKf+nFS7p/6Fi/CqyLXh81FpiGzcmuS8DGi9lUqSnZ6Es23/gv2O+1XVGfrbNmviF7CckBpavkBoIFQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==" - }, - "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X7IdhILzr4ROXd8mI1BUCQMSHSQwelUlBjF1JyTKCjXaOGn2fB4EKBxQbCK2VjO3WaWIdlXZL3W6TiIVnrhX4g==" - }, - "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "nyFNiCk/r+VOiIqreLix8yN+q3Wga9+SE8BCgkf+2BwEKiNx6DyvFjCgkfV743/grxv8jHJ8gUK4XEQw7yzRYg==" - }, - "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ytoewC6wGorL7KoCAvRfsgoJPJbNq+64k2SqW6JcOAebWsFUvCCYgfzQMrnpvPiEl4OrblUlhF2ji+Q1+SVLrQ==" - }, - "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "I8bKw2I8k58Wx7fMKQJn2R8lamboCAiHfHeV/pS65ScKWMMI0+wJkLYlEKvgW1D/XvSl/221clBoR2q9QNNM7A==" - }, - "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" - }, - "Snapshooter": { - "type": "Transitive", - "resolved": "0.5.4", - "contentHash": "znayjnxtFjFcRFdS4W8KyeODS/FOVkIzlAD8hRfrrf3fd3hJ9k+XMNRYCARtzrN3ueIpF4USQbAhWrO73Z9z6w==", - "dependencies": { - "Newtonsoft.Json": "12.0.1" - } - }, - "System.AppContext": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "fKC+rmaLfeIzUhagxY17Q9siv/sPrjjKcfNg1Ic8IlQkZLipo8ljcaZQu4VtI4Jqbzjc2VTjzGLF6WmsRXAEgA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ratu44uTIHgeBeI0dE8DWvmXVBSo4u7ozRZZHOMmK/JPpYyo0dAfgSiHlpiObMQ5lEtEyIXA40sKRYg5J6A8uQ==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Collections.Concurrent": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.ComponentModel.Annotations": { - "type": "Transitive", - "resolved": "5.0.0", - "contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg==" - }, - "System.Console": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "DHDrIxiqk1h03m6khKWV2X8p/uvN79rgSqpilL6uzpmSfxfU5ng8VcPtW4qsDsQDHiTv6IPV9TmD5M/vElPNLg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Diagnostics.EventLog": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "lcyUiXTsETK2ALsZrX+nWuHSIQeazhqPphLfaRxzdGaG93+0kELqpgEHtwWOlQe7+jSFnKwaCAgL4kjeZCQJnw==" - }, - "System.Diagnostics.Tools": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "UUvkJfSYJMM6x527dJg2VyWPSRqIVB0Z7dbjHst1zmwTXz5CcXSYJFWRpuigfbO1Lf7yfZiIaEUesfnl/g5EyA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Tracing": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Calendars": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Globalization.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.Compression": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YHndyoiV90iu4iKG115ibkhrG+S3jBm8Ap9OwoUAzO5oPDAWcr0SFwQFm0HjM8WkEZWo0zvLTyLmbvTkW1bXgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Buffers": "4.3.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.IO.Compression": "4.3.0" - } - }, - "System.IO.Compression.ZipFile": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "G4HwjEsgIwy3JFBduZ9quBkAu+eUwjIdJleuNSgmUojbH6O3mlvEIme+GHx/cLlTAPcrnnL7GqvB9pTlWRfhOg==", - "dependencies": { - "System.Buffers": "4.3.0", - "System.IO": "4.3.0", - "System.IO.Compression": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.IO.FileSystem": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.IO.FileSystem.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Net.Http": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "sYg+FtILtRQuYWSIAuNOELwVuVsxVyJGWQyOnlAzhV4xvhyFnON1bAzYYC+jjRW8JREM45R0R5Dgi8MTC5sEwA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.DiagnosticSource": "4.3.0", - "System.Diagnostics.Tracing": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Extensions": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Security.Cryptography.X509Certificates": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Net.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Net.Sockets": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Net.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.CompilerServices.Unsafe": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Runtime.InteropServices.RuntimeInformation": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0" - } - }, - "System.Runtime.Numerics": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==", - "dependencies": { - "System.Globalization": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Security.Cryptography.Algorithms": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.Apple": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Cng": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Security.Cryptography.Csp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Security.Cryptography.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Collections.Concurrent": "4.3.0", - "System.Linq": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.OpenSsl": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==", - "dependencies": { - "System.Collections": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Security.Cryptography.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==", - "dependencies": { - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Security.Cryptography.X509Certificates": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.Globalization.Calendars": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.Handles": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Runtime.Numerics": "4.3.0", - "System.Security.Cryptography.Algorithms": "4.3.0", - "System.Security.Cryptography.Cng": "4.3.0", - "System.Security.Cryptography.Csp": "4.3.0", - "System.Security.Cryptography.Encoding": "4.3.0", - "System.Security.Cryptography.OpenSsl": "4.3.0", - "System.Security.Cryptography.Primitives": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "runtime.native.System": "4.3.0", - "runtime.native.System.Net.Http": "4.3.0", - "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Text.Encoding.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "YVMK0Bt/A43RmwizJoZ22ei2nmrhobgeiYwFzC4YAN+nue8RF6djXDMog0UCn+brerQoYVyaS+ghy9P/MUVcmw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0" - } - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "6.0.7", - "contentHash": "/Tf/9XjprpHolbcDOrxsKVYy/mUG/FS7aGd9YUgBVEiHeQH4kAE0T1sMbde7q6B5xcrNUsJ5iW7D1RvHudQNqA==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encodings.Web": "6.0.0" - } - }, - "System.Text.RegularExpressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "RpT2DA+L660cBt1FssIE9CAGpLFdFPuheB7pLpKpn6ZXNby7jDERe8Ua/Ne2xGiwLVG2JOqziiaVCGDon5sKFA==", - "dependencies": { - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "TY8/9+tI0mNaUMgntOxxaq2ndTkdXqLSxvPmas7XEqOlv9lQtB7wLjYGd756lOaO7Dvb5r/WXhluM+0Xe87v5Q==" - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==" - }, - "System.Threading.Timer": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "Z6YfyYTCg7lOZjJzBjONJTFKGN9/NIYKSxhU5GRd+DTwHSZyvWp1xuI5aR+dLg+ayyC5Xv57KiY4oJ0tMO89fQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Xml.ReaderWriter": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.IO.FileSystem": "4.3.0", - "System.IO.FileSystem.Primitives": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Text.Encoding.Extensions": "4.3.0", - "System.Text.RegularExpressions": "4.3.0", - "System.Threading.Tasks": "4.3.0", - "System.Threading.Tasks.Extensions": "4.3.0" - } - }, - "System.Xml.XDocument": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5zJ0XDxAIg8iy+t4aMnQAu0MqVbqyvfoUVl1yDV61xdo3Vth45oA2FoY4pPkxYAH5f8ixpmTqXeEIya95x0aCQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Diagnostics.Tools": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading": "4.3.0", - "System.Xml.ReaderWriter": "4.3.0" - } - }, - "xunit.abstractions": { - "type": "Transitive", - "resolved": "2.0.3", - "contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg==" - }, - "xunit.analyzers": { - "type": "Transitive", - "resolved": "0.10.0", - "contentHash": "4/IDFCJfIeg6bix9apmUtIMwvOsiwqdEexeO/R2D4GReIGPLIRODTpId/l4LRSrAJk9lEO3Zx1H0Zx6uohJDNg==" - }, - "xunit.assert": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "O/Oe0BS5RmSsM+LQOb041TzuPo5MdH2Rov+qXGS37X+KFG1Hxz7kopYklM5+1Y+tRGeXrOx5+Xne1RuqLFQoyQ==", - "dependencies": { - "NETStandard.Library": "1.6.1" - } - }, - "xunit.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "Zsj5OMU6JasNGERXZy8s72+pcheG6Q15atS5XpZXqAtULuyQiQ6XNnUsp1gyfC6WgqScqMvySiEHmHcOG6Eg0Q==", - "dependencies": { - "xunit.extensibility.core": "[2.4.1]", - "xunit.extensibility.execution": "[2.4.1]" - } - }, - "xunit.extensibility.core": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "yKZKm/8QNZnBnGZFD9SewkllHBiK0DThybQD/G4PiAmQjKtEZyHi6ET70QPU9KtSMJGRYS6Syk7EyR2EVDU4Kg==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.abstractions": "2.0.3" - } - }, - "xunit.extensibility.execution": { - "type": "Transitive", - "resolved": "2.4.1", - "contentHash": "7e/1jqBpcb7frLkB6XDrHCGXAbKN4Rtdb88epYxCSRQuZDRW8UtTfdTEVpdTl8s4T56e07hOBVd4G0OdCxIY2A==", - "dependencies": { - "NETStandard.Library": "1.6.1", - "xunit.extensibility.core": "[2.4.1]" - } - }, - "greendonut": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.Diagnostics.DiagnosticSource": "[6.0.0, )", - "System.Threading.Tasks.Extensions": "[4.5.0, )" - } - }, - "greendonut.tests": { - "type": "Project", - "dependencies": { - "ChilliCream.Testing.Utilities": "[0.2.0, )", - "GreenDonut": "[0.0.0, )", - "Microsoft.NET.Test.Sdk": "[17.1.0, )", - "Moq": "[4.18.1, )", - "Snapshooter.Xunit": "[0.5.4, )", - "System.Diagnostics.DiagnosticSource": "[6.0.0, )", - "xunit": "[2.4.1, )" - } - }, - "HotChocolate": { - "type": "Project", - "dependencies": { - "HotChocolate.Authorization": "[0.0.0, )", - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Types.CursorPagination": "[0.0.0, )", - "HotChocolate.Types.Mutations": "[0.0.0, )", - "HotChocolate.Types.OffsetPagination": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )" - } - }, - "hotchocolate.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Language": "[0.0.0, )", - "Microsoft.Bcl.AsyncInterfaces": "[6.0.0, )", - "System.Collections.Immutable": "[6.0.0, )" - } - }, - "hotchocolate.apollofederation": { - "type": "Project", - "dependencies": { - "HotChocolate": "[0.0.0, )" - } - }, - "hotchocolate.authorization": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )" - } - }, - "hotchocolate.execution": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Execution.Abstractions": "[0.0.0, )", - "HotChocolate.Fetching": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", - "HotChocolate.Validation": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection": "[6.0.0, )", - "System.Threading.Channels": "[6.0.0, )" - } - }, - "hotchocolate.execution.abstractions": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )" - } - }, - "hotchocolate.fetching": { - "type": "Project", - "dependencies": { - "GreenDonut": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.language": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Language.Utf8": "[0.0.0, )", - "HotChocolate.Language.Visitors": "[0.0.0, )", - "HotChocolate.Language.Web": "[0.0.0, )" - } - }, - "hotchocolate.language.syntaxtree": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.ObjectPool": "[6.0.0, )" - } - }, - "hotchocolate.language.utf8": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.visitors": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.language.web": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.Utf8": "[0.0.0, )" - } - }, - "hotchocolate.types": { - "type": "Project", - "dependencies": { - "HotChocolate.Abstractions": "[0.0.0, )", - "HotChocolate.Types.Shared": "[0.0.0, )", - "HotChocolate.Utilities": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.ObjectPool": "[6.0.0, )", - "System.ComponentModel.Annotations": "[5.0.0, )", - "System.Text.Json": "[6.0.7, )" - } - }, - "hotchocolate.types.cursorpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.mutations": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.offsetpagination": { - "type": "Project", - "dependencies": { - "HotChocolate.Execution": "[0.0.0, )", - "HotChocolate.Types": "[0.0.0, )" - } - }, - "hotchocolate.types.shared": { - "type": "Project", - "dependencies": { - "HotChocolate.Language.SyntaxTree": "[0.0.0, )" - } - }, - "hotchocolate.utilities": { - "type": "Project" - }, - "hotchocolate.utilities.dependencyinjection": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "[6.0.0, )" - } - }, - "hotchocolate.validation": { - "type": "Project", - "dependencies": { - "HotChocolate.Types": "[0.0.0, )", - "Microsoft.Extensions.DependencyInjection.Abstractions": "[6.0.0, )", - "Microsoft.Extensions.Options": "[6.0.0, )" - } - } - }, "net7.0": { "ChilliCream.Testing.Utilities": { "type": "Direct", @@ -1407,8 +78,8 @@ }, "BananaCakePop.Middleware": { "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", + "resolved": "13.0.0", + "contentHash": "6Zj/vfmnCXLjBG7WNdtOgZZ5ZDR3Sy1FQSshZUonIYs3OdzozmsFmqPXMd9XJ0QE9aAildgVGq/lDLpLrMI4Yw==", "dependencies": { "Yarp.ReverseProxy": "2.0.1" } @@ -2549,9 +1220,9 @@ "dependencies": { "DiffPlex": "[1.7.1, )", "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "Microsoft.AspNetCore.WebUtilities": "[2.2.0, )", "Newtonsoft.Json": "[13.0.2, )", "Xunit": "[2.4.1, )" @@ -2606,11 +1277,12 @@ "hotchocolate.aspnetcore": { "type": "Project", "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", + "BananaCakePop.Middleware": "[13.0.0, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )" } }, "hotchocolate.authorization": { @@ -2650,10 +1322,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection.Abstractions": "[7.0.0, )", "Microsoft.Extensions.Http": "[7.0.0, )", "System.Reactive": "[5.0.0, )" @@ -2726,7 +1398,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[7.0.0, )" } @@ -2741,8 +1413,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[7.0.0, )", "System.Text.Json": "[7.0.0, )" @@ -2888,8 +1560,8 @@ }, "BananaCakePop.Middleware": { "type": "Transitive", - "resolved": "10.0.7", - "contentHash": "vksP+PnWLFnsNe3PrD9MufF3zb9y6OcHEmEFjLG87sYaVowzBhos7r+beF0OJleidTeAsinNop9Lt/yMGqKkCA==", + "resolved": "13.0.0", + "contentHash": "6Zj/vfmnCXLjBG7WNdtOgZZ5ZDR3Sy1FQSshZUonIYs3OdzozmsFmqPXMd9XJ0QE9aAildgVGq/lDLpLrMI4Yw==", "dependencies": { "Yarp.ReverseProxy": "2.0.1" } @@ -4097,9 +2769,9 @@ "dependencies": { "DiffPlex": "[1.7.1, )", "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "Microsoft.AspNetCore.WebUtilities": "[8.0.0, )", "Newtonsoft.Json": "[13.0.2, )", "Xunit": "[2.4.1, )" @@ -4154,11 +2826,12 @@ "hotchocolate.aspnetcore": { "type": "Project", "dependencies": { - "BananaCakePop.Middleware": "[10.0.7, )", + "BananaCakePop.Middleware": "[13.0.0, )", "HotChocolate": "[0.0.0, )", "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", - "HotChocolate.Types.Scalars.Upload": "[0.0.0, )" + "HotChocolate.Transport.Sockets": "[0.0.0, )", + "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )" } }, "hotchocolate.authorization": { @@ -4198,10 +2871,10 @@ "type": "Project", "dependencies": { "HotChocolate": "[0.0.0, )", - "HotChocolate.AspNetCore": "[14.0.0-preview.build.0, )", + "HotChocolate.AspNetCore": "[0.0.0, )", "HotChocolate.Fusion.Abstractions": "[0.0.0, )", - "HotChocolate.Transport.Http": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets.Client": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Http": "[0.0.0, )", + "HotChocolate.Transport.Sockets.Client": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", "Microsoft.Extensions.Http": "[8.0.0, )", "System.Reactive": "[5.0.0, )" @@ -4274,7 +2947,7 @@ "hotchocolate.transport.http": { "type": "Project", "dependencies": { - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.IO.Pipelines": "[8.0.0, )" } @@ -4289,8 +2962,8 @@ "type": "Project", "dependencies": { "HotChocolate.Language.SyntaxTree": "[0.0.0, )", - "HotChocolate.Transport.Abstractions": "[14.0.0-preview.build.0, )", - "HotChocolate.Transport.Sockets": "[14.0.0-preview.build.0, )", + "HotChocolate.Transport.Abstractions": "[0.0.0, )", + "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Utilities": "[0.0.0, )", "System.Collections.Immutable": "[8.0.0, )", "System.Text.Json": "[8.0.0, )" @@ -4360,4 +3033,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json index eec800d57db..617d7a3e939 100644 --- a/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json +++ b/src/HotChocolate/Core/test/Types.Analyzers.Tests/packages.lock.json @@ -1252,7 +1252,7 @@ "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )" + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )" } }, "hotchocolate.authorization": { @@ -1268,7 +1268,7 @@ "HotChocolate.Execution.Abstractions": "[0.0.0, )", "HotChocolate.Fetching": "[0.0.0, )", "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", "HotChocolate.Validation": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[6.0.0, )", "System.Threading.Channels": "[6.0.0, )" diff --git a/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json b/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json index 0b7eeeaf40c..4e5750e56e3 100644 --- a/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json +++ b/src/HotChocolate/Fusion/src/CommandLine/packages.lock.json @@ -225,7 +225,7 @@ "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )" + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )" } }, "hotchocolate.authorization": { @@ -241,7 +241,7 @@ "HotChocolate.Execution.Abstractions": "[0.0.0, )", "HotChocolate.Fetching": "[0.0.0, )", "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", "HotChocolate.Validation": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[7.0.0, )", "System.Threading.Channels": "[7.0.0, )" @@ -726,7 +726,7 @@ "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )" + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )" } }, "hotchocolate.authorization": { @@ -742,7 +742,7 @@ "HotChocolate.Execution.Abstractions": "[0.0.0, )", "HotChocolate.Fetching": "[0.0.0, )", "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", "HotChocolate.Validation": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", "System.Threading.Channels": "[8.0.0, )" diff --git a/src/HotChocolate/Fusion/test/Shared/packages.lock.json b/src/HotChocolate/Fusion/test/Shared/packages.lock.json index 201cdb518a0..88b2e4f15c8 100644 --- a/src/HotChocolate/Fusion/test/Shared/packages.lock.json +++ b/src/HotChocolate/Fusion/test/Shared/packages.lock.json @@ -1270,7 +1270,7 @@ "HotChocolate.Subscriptions.InMemory": "[0.0.0, )", "HotChocolate.Transport.Sockets": "[0.0.0, )", "HotChocolate.Types.Scalars.Upload": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )" + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )" } }, "hotchocolate.aspnetcore.tests.utilities": { @@ -1302,7 +1302,7 @@ "HotChocolate.Execution.Abstractions": "[0.0.0, )", "HotChocolate.Fetching": "[0.0.0, )", "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", "HotChocolate.Validation": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[7.0.0, )", "System.Threading.Channels": "[7.0.0, )" diff --git a/src/StrawberryShake/Tooling/src/dotnet-graphql/packages.lock.json b/src/StrawberryShake/Tooling/src/dotnet-graphql/packages.lock.json index 39a1712a7ae..44e4a60bb69 100644 --- a/src/StrawberryShake/Tooling/src/dotnet-graphql/packages.lock.json +++ b/src/StrawberryShake/Tooling/src/dotnet-graphql/packages.lock.json @@ -1242,7 +1242,7 @@ "HotChocolate.Execution.Abstractions": "[0.0.0, )", "HotChocolate.Fetching": "[0.0.0, )", "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", "HotChocolate.Validation": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[6.0.0, )", "System.Threading.Channels": "[6.0.0, )" @@ -2628,7 +2628,7 @@ "HotChocolate.Execution.Abstractions": "[0.0.0, )", "HotChocolate.Fetching": "[0.0.0, )", "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", "HotChocolate.Validation": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[7.0.0, )", "System.Threading.Channels": "[7.0.0, )" @@ -4014,7 +4014,7 @@ "HotChocolate.Execution.Abstractions": "[0.0.0, )", "HotChocolate.Fetching": "[0.0.0, )", "HotChocolate.Types": "[0.0.0, )", - "HotChocolate.Utilities.DependencyInjection": "[14.0.0-preview.build.0, )", + "HotChocolate.Utilities.DependencyInjection": "[0.0.0, )", "HotChocolate.Validation": "[0.0.0, )", "Microsoft.Extensions.DependencyInjection": "[8.0.0, )", "System.Threading.Channels": "[8.0.0, )" From 560cff493c42b6f98c62f13d66177149dee5a899 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 22:10:44 +0100 Subject: [PATCH 88/89] tests --- .../ServiceTypeTests.cs | 74 ++++++++++++++----- 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs index 5630d0ed6a2..8d772634ef6 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ServiceTypeTests.cs @@ -26,7 +26,7 @@ public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() var entityType = schema.GetType(ServiceType_Name); var sdlResolver = entityType.Fields[WellKnownFieldNames.Sdl].Resolver!; - + // act var value = await sdlResolver(CreateResolverContext(schema)); @@ -38,33 +38,33 @@ public async Task TestServiceTypeEmptyQueryTypePureCodeFirst() schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.0", import: [ "@key", "FieldSet" ]) { query: Query } - + type Address @key(fieldSet: "matchCode") { matchCode: String } - + type Query { _service: _Service _entities(representations: [_Any!]!): [_Entity]! } - + "This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." type _Service { sdl: String! } - + "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." union _Entity = Address - + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." directive @key(fieldSet: FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE - + "Object representation of @link directive." directive @link("Gets imported specification url." url: String! "Gets optional list of imported element names." import: [String!]) repeatable on SCHEMA - + "Scalar representing a set of fields." scalar FieldSet - + "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." scalar _Any """); @@ -74,18 +74,57 @@ scalar _Any public async Task TestServiceTypeTypePureCodeFirst() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); - // act var entityType = schema.GetType(ServiceType_Name); + var sdlResolver = entityType.Fields[WellKnownFieldNames.Sdl].Resolver!; + + // act + var value = await sdlResolver(CreateResolverContext(schema)); // assert - var value = await entityType.Fields[WellKnownFieldNames.Sdl].Resolver!( - CreateResolverContext(schema)); - value.MatchSnapshot(); + Utf8GraphQLParser + .Parse((string)value!) + .MatchInlineSnapshot( + """ + schema @link(url: "https:\/\/specs.apollo.dev\/federation\/v2.0", import: [ "@key", "FieldSet" ]) { + query: Query + } + + type Address @key(fieldSet: "matchCode") { + matchCode: String + } + + type Query { + address(id: Int!): Address! + _service: _Service + _entities(representations: [_Any!]!): [_Entity]! + } + + "This type provides a field named sdl: String! which exposes the SDL of the service's schema. This SDL (schema definition language) is a printed version of the service's schema including the annotations of federation directives. This SDL does not include the additions of the federation spec." + type _Service { + sdl: String! + } + + "Union of all types that key directive applied. This information is needed by the Apollo federation gateway." + union _Entity = Address + + "Used to indicate a combination of fields that can be used to uniquely identify and fetch an object or interface." + directive @key(fieldSet: FieldSet! resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + + "Object representation of @link directive." + directive @link("Gets imported specification url." url: String! "Gets optional list of imported element names." import: [String!]) repeatable on SCHEMA + + "Scalar representing a set of fields." + scalar FieldSet + + "The _Any scalar is used to pass representations of entities from external services into the root _entities field for execution. Validation of the _Any scalar is done by matching the __typename and @external fields defined in the schema." + scalar _Any + """); } public class Query @@ -95,7 +134,6 @@ public class Query public class Address { - [Key] - public string? MatchCode { get; set; } + [Key] public string? MatchCode { get; set; } } -} +} \ No newline at end of file From 3c27293d3ac970c19c9bd3b0efd8dbbfe954b161 Mon Sep 17 00:00:00 2001 From: Michael Staib Date: Wed, 17 Jan 2024 22:16:21 +0100 Subject: [PATCH 89/89] tests --- ...ApolloFederationSchemaBuilderExtensions.cs | 129 ------------------ .../ReferenceResolverAttributeTests.cs | 59 ++++---- 2 files changed, 35 insertions(+), 153 deletions(-) delete mode 100644 src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs diff --git a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs b/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs deleted file mode 100644 index 1738e0a49dd..00000000000 --- a/src/HotChocolate/ApolloFederation/src/ApolloFederation/Extensions/ApolloFederationSchemaBuilderExtensions.cs +++ /dev/null @@ -1,129 +0,0 @@ -using HotChocolate.ApolloFederation; -using HotChocolate.ApolloFederation.Types; - -namespace HotChocolate; - -// TODO : This we need to completly rewrite. -/// -/// Provides extensions to . -/// -public static partial class ApolloFederationSchemaBuilderExtensions -{ - /// - /// Adds support for Apollo Federation to the schema. - /// - /// - /// The . - /// - /// - /// Returns the . - /// - /// - /// Target Federation version - /// - /// - /// The is null. - /// - public static ISchemaBuilder AddApolloFederation( - this ISchemaBuilder builder, - FederationVersion version = FederationVersion.Latest) - { - ArgumentNullException.ThrowIfNull(builder); - AddApolloFederationDefinitions(builder, version); - return builder; - } - - /// - /// Adds support for Apollo Federation to the schema. - /// - /// - /// The . - /// - /// - /// - /// Returns the . - /// - /// - /// The is null. - /// - private static void AddApolloFederationDefinitions( - this ISchemaBuilder builder, - FederationVersion version = FederationVersion.Latest) - { - /* - ArgumentNullException.ThrowIfNull(builder); - builder.TryAddTypeInterceptor(); - - // Disable hot chocolate tag directive - // specify default Query type name if not specified - builder.ModifyOptions(opt => - { - opt.EnableTag = false; - opt.QueryTypeName ??= "Query"; - }); - - // Scalars - builder.AddType(); - builder.AddType(); - - // Types - builder.AddType(); - builder.AddType(new ServiceType(true)); - - // Directives - switch (version) - { - case FederationVersion.Federation20: - { - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.AddType(); - break; - } - - case FederationVersion.Federation21: - case FederationVersion.Federation22: - { - builder.AddType(); - goto case FederationVersion.Federation20; - } - - case FederationVersion.Federation23: - case FederationVersion.Federation24: - { - builder.AddType(); - goto case FederationVersion.Federation22; - } - - case FederationVersion.Federation25: - { - builder.AddType(); - builder.AddType(); - builder.AddType(); - builder.BindRuntimeType(); - goto case FederationVersion.Federation24; - } - - case FederationVersion.Federation26: - { - builder.AddType(); - goto case FederationVersion.Federation25; - } - - default: - { - break; - } - } - - builder.TryAddTypeInterceptor(); - */ - } -} diff --git a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs index a07a63513e5..bc099cc2552 100644 --- a/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs +++ b/src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/ReferenceResolverAttributeTests.cs @@ -2,9 +2,11 @@ using System.Threading.Tasks; using HotChocolate.ApolloFederation.Resolvers; using HotChocolate.ApolloFederation.Types; +using HotChocolate.Execution; using HotChocolate.Language; using HotChocolate.Resolvers; using HotChocolate.Types; +using Microsoft.Extensions.DependencyInjection; using static HotChocolate.ApolloFederation.FederationContextData; using static HotChocolate.ApolloFederation.TestHelper; @@ -16,10 +18,11 @@ public class ReferenceResolverAttributeTests public async void InClassRefResolver_PureCodeFirst() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); // act var type = schema.GetType(nameof(InClassRefResolver)); @@ -35,10 +38,11 @@ public async void InClassRefResolver_PureCodeFirst() public async void ExternalRefResolver_PureCodeFirst() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); // act var type = schema.GetType(nameof(ExternalRefResolver)); @@ -55,11 +59,12 @@ public async void ExternalRefResolver_PureCodeFirst() public async void SingleKey_CompiledResolver() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); - + .BuildSchemaAsync(); + // act var type = schema.GetType(nameof(ExternalSingleKeyResolver)); @@ -73,10 +78,11 @@ public async void SingleKey_CompiledResolver() public async void ExternalFields_Set() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); // act var type = schema.GetType(nameof(ExternalFields)); @@ -94,10 +100,11 @@ public async void ExternalFields_Set() public async void ExternalFields_Not_Set() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); // act var type = schema.GetType(nameof(ExternalFields)); @@ -113,10 +120,11 @@ public async void ExternalFields_Not_Set() public async void MultiKey_CompiledResolver() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); var type = schema.GetType(nameof(ExternalMultiKeyResolver)); @@ -133,11 +141,12 @@ public async void MultiKey_CompiledResolver() public async void ExternalRefResolver_RenamedMethod_PureCodeFirst() { // arrange - var schema = SchemaBuilder.New() + var schema = await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); - + .BuildSchemaAsync(); + // act var type = schema.GetType(nameof(ExternalRefResolverRenamedMethod)); @@ -152,34 +161,36 @@ public async void ExternalRefResolver_RenamedMethod_PureCodeFirst() public void InClassRefResolver_RenamedMethod_InvalidName_PureCodeFirst() { // arrange - void SchemaCreation() + async Task SchemaCreation() { - SchemaBuilder.New() + await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); } // act // assert - Assert.Throws((Action)SchemaCreation); + Assert.ThrowsAsync(SchemaCreation); } [Fact] public void ExternalRefResolver_RenamedMethod_InvalidName_PureCodeFirst() { // arrange - void SchemaCreation() + async Task SchemaCreation() { - SchemaBuilder.New() + await new ServiceCollection() + .AddGraphQL() .AddApolloFederation() .AddQueryType() - .Create(); + .BuildSchemaAsync(); } // act // assert - Assert.Throws((Action)SchemaCreation); + Assert.ThrowsAsync(SchemaCreation); } private ValueTask ResolveRef(ISchema schema, ObjectType type)