diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy.graphql index d11a5accec3..3f5905e32a0 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_AfterResolver.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_AfterResolver.graphql index 44d4bec242a..b5de7f96eff 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_AfterResolver.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_AfterResolver.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_BeforeResolver.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_BeforeResolver.graphql index d11a5accec3..3f5905e32a0 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_BeforeResolver.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_BeforeResolver.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_Validation.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_Validation.graphql index e4b149bba48..64bd9bb4a9f 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_Validation.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_Validation.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy.graphql index aba2e7fde96..4c2b252cd5b 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_AfterResolver.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_AfterResolver.graphql index c66f8f8877e..e6a396db62c 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_AfterResolver.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_AfterResolver.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_BeforeResolver.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_BeforeResolver.graphql index aba2e7fde96..4c2b252cd5b 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_BeforeResolver.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_BeforeResolver.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_Validation.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_Validation.graphql index 4104134e688..66d4bd89f81 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_Validation.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_Validation.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithRoles.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithRoles.graphql index dd3e6d9f319..0ce572f6b3e 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithRoles.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithRoles.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_DefaultPolicy.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_DefaultPolicy.graphql index 9043c2dc6b3..582b3318f00 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_DefaultPolicy.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_DefaultPolicy.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithPolicy.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithPolicy.graphql index e170aafdb79..a270b3a71a0 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithPolicy.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithPolicy.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithRoles.graphql b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithRoles.graphql index 48a06008790..10c14b1d0e6 100644 --- a/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithRoles.graphql +++ b/src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithRoles.graphql @@ -17,4 +17,4 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION diff --git a/src/HotChocolate/Core/src/Authorization/AuthorizeDirectiveType.cs b/src/HotChocolate/Core/src/Authorization/AuthorizeDirectiveType.cs index 32756dbbb3e..d6059b3aed8 100644 --- a/src/HotChocolate/Core/src/Authorization/AuthorizeDirectiveType.cs +++ b/src/HotChocolate/Core/src/Authorization/AuthorizeDirectiveType.cs @@ -45,8 +45,8 @@ protected override void Configure(IDirectiveTypeDescriptor d .Argument(t => t.Apply) .Name(Names.Apply) .Description( - "Defines when when the authorize directive shall be applied." - + "By default the authorize directives are applied during the validation phase.") + "Defines when the authorize directive shall be applied." + + " By default the authorize directive is applied before the resolver is executed.") .Type>() .DefaultValue(ApplyPolicy.BeforeResolver); diff --git a/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/AnnotationBasedAuthorizationTests.Authorize_Node_Field_Schema.graphql b/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/AnnotationBasedAuthorizationTests.Authorize_Node_Field_Schema.graphql index 8b00dfa4bee..6d935f3f4bc 100644 --- a/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/AnnotationBasedAuthorizationTests.Authorize_Node_Field_Schema.graphql +++ b/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/AnnotationBasedAuthorizationTests.Authorize_Node_Field_Schema.graphql @@ -58,7 +58,7 @@ enum ApplyPolicy { directive @allowAnonymous repeatable on FIELD_DEFINITION "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION "The purpose of the `cost` directive is to define a `weight` for GraphQL types, fields, and arguments. Static analysis can use these weights when calculating the overall cost of a query or response." directive @cost("The `weight` argument defines what value to add to the overall cost for every appearance, or possible appearance, of a type, field, argument, etc." weight: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM | INPUT_FIELD_DEFINITION diff --git a/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/SchemaFirstAuthorizationTests.Authorize_Apply_Can_Be_Omitted.graphql b/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/SchemaFirstAuthorizationTests.Authorize_Apply_Can_Be_Omitted.graphql index 12d7fb99ac1..564b70cb72f 100644 --- a/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/SchemaFirstAuthorizationTests.Authorize_Apply_Can_Be_Omitted.graphql +++ b/src/HotChocolate/Core/test/Authorization.Tests/__snapshots__/SchemaFirstAuthorizationTests.Authorize_Apply_Can_Be_Omitted.graphql @@ -17,7 +17,7 @@ enum ApplyPolicy { } "The authorize directive." -directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the authorize directive shall be applied.By default the authorize directives are applied during the validation phase." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION +directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when the authorize directive shall be applied. By default the authorize directive is applied before the resolver is executed." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on OBJECT | FIELD_DEFINITION "The purpose of the `cost` directive is to define a `weight` for GraphQL types, fields, and arguments. Static analysis can use these weights when calculating the overall cost of a query or response." directive @cost("The `weight` argument defines what value to add to the overall cost for every appearance, or possible appearance, of a type, field, argument, etc." weight: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM | INPUT_FIELD_DEFINITION