diff --git a/src/GraphQL.IntrospectionModel.Tests/ASTConverterTests.cs b/src/GraphQL.IntrospectionModel.Tests/ASTConverterTests.cs index 5690633..16631c4 100644 --- a/src/GraphQL.IntrospectionModel.Tests/ASTConverterTests.cs +++ b/src/GraphQL.IntrospectionModel.Tests/ASTConverterTests.cs @@ -407,6 +407,7 @@ public void Should_Build_Schema_With_QueryType() schema { query: MyQuery } + """); } @@ -427,6 +428,7 @@ public void Should_Build_Schema_With_MutationType() schema { mutation: MyMutation } + """); } @@ -447,6 +449,7 @@ public void Should_Build_Schema_With_SubscriptionType() schema { subscription: MySubscription } + """); } @@ -537,6 +540,7 @@ public void Should_Build_Empty_Enum() string sdl1 = schema.Print(); sdl1.ShouldBe(""" enum Color + """); } @@ -558,6 +562,7 @@ public void Should_Build_Empty_Union() string sdl1 = schema.Print(); sdl1.ShouldBe(""" union Reason + """); } @@ -579,6 +584,7 @@ public void Should_Build_Empty_Input() string sdl1 = schema.Print(); sdl1.ShouldBe(""" input Person + """); } diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic.graphql index 20869a9..a9b92f5 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic.graphql @@ -32,9 +32,9 @@ type Mutation { } input Person { - name: String! + name: String age: Int! - jobTitle: String! + jobTitle: String } type Query { @@ -45,4 +45,4 @@ type Query { type Subscription { values: [Int] -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic_draft.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic_draft.graphql index d037240..bc75d1d 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic_draft.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/classic_draft.graphql @@ -32,11 +32,11 @@ type Mutation { } input Person { - name: String! + name: String age: Int! isDeveloper: Boolean @deprecated(reason: "Use job title instead") isManager: Boolean @deprecated(reason: "Use job title instead") - jobTitle: String! + jobTitle: String } type Query { @@ -47,4 +47,4 @@ type Query { type Subscription { values: [Int] -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern.graphql index d646b17..a321549 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern.graphql @@ -32,9 +32,9 @@ type Mutation { } input Person { - name: String! + name: String age: Int! - jobTitle: String! + jobTitle: String } type Query { @@ -45,4 +45,4 @@ type Query { type Subscription { values: [Int] -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern_draft.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern_draft.graphql index 6ff509d..892b0a8 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern_draft.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/Introspection/modern_draft.graphql @@ -32,11 +32,11 @@ type Mutation { } input Person { - name: String! + name: String age: Int! isDeveloper: Boolean @deprecated(reason: "Use job title instead") isManager: Boolean @deprecated(reason: "Use job title instead") - jobTitle: String! + jobTitle: String } type Query { @@ -47,4 +47,4 @@ type Query { type Subscription { values: [Int] -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/deprecations.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/deprecations.graphql index 196497d..2fd3ec0 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/deprecations.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/deprecations.graphql @@ -8,4 +8,4 @@ input PersonFilter { type Query { persons(filter: PersonFilter @deprecated(reason: "Do not use this arg")): [Person] -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/directives.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/directives.graphql index 56fcfc9..f97321a 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/directives.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/directives.graphql @@ -12,4 +12,4 @@ directive @my_with_args(if: Boolean) on | QUERY directive @your_with_args(if: Boolean) repeatable on - | ENUM \ No newline at end of file + | ENUM diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/enums.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/enums.graphql index 60077b9..61629e1 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/enums.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/enums.graphql @@ -7,4 +7,4 @@ enum Color { enum Status @v2 { Ok Error -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/enums_without_directives.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/enums_without_directives.graphql index a6e05a0..0bdfc7b 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/enums_without_directives.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/enums_without_directives.graphql @@ -7,4 +7,4 @@ enum Color { enum Status { Ok Error -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/escaped.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/escaped.graphql index 4a063e8..338b960 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/escaped.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/escaped.graphql @@ -1,4 +1,4 @@ type Query { field1: String @deprecated(reason: "Reason that should be escaped: \", \\, \b, \f, \n, \r, \t \u0005 ") field2: String @deprecated(reason: "Reason that should be escaped: \", \\, \b, \f, \n, \r, \t \u0005 ") -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/interfaces.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/interfaces.graphql index 738b847..e400a59 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/interfaces.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/interfaces.graphql @@ -8,4 +8,4 @@ interface IPerson2 interface IPerson3 -type Person implements IPerson1 & IPerson2 & IPerson3 \ No newline at end of file +type Person implements IPerson1 & IPerson2 & IPerson3 diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/person.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/person.graphql index 2fe8bf4..3cafda6 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/person.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/person.graphql @@ -5,4 +5,4 @@ schema { type Person { Age: Int! Name: String -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/scalars.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/scalars.graphql index ac4b240..6f210e6 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/scalars.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/scalars.graphql @@ -1,3 +1,3 @@ scalar Xml -scalar JSON @some \ No newline at end of file +scalar JSON @some diff --git a/src/GraphQL.IntrospectionModel.Tests/Files/test1.graphql b/src/GraphQL.IntrospectionModel.Tests/Files/test1.graphql index d4570bf..c75ca21 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Files/test1.graphql +++ b/src/GraphQL.IntrospectionModel.Tests/Files/test1.graphql @@ -56,4 +56,4 @@ type Query { checkControlWithoutCheckRequired: String @control(getOperInfo: "getMessage") checkPaintedTokenWithPermission(scalarInput: Int, paintedToken: PaintedTokenInput): String @authorize(domain: 1, operationId: 10, operationCode: "TST.CheckAuthorization") @checkPaintedToken(pathToClientId: "paintedToken.client.id", domain: 1, operationId: 10, operationCode: "TST.CheckAuthorization") checkPaintedTokenWithoutPermission(scalarInput: Int, clientId: Int): String @checkPaintedToken(pathToClientId: "clientId") @authorize(domain: 1, operationId: 10, operationCode: "TST.CheckAuthorization") -} \ No newline at end of file +} diff --git a/src/GraphQL.IntrospectionModel.Tests/GraphQL.IntrospectionModel.Tests.csproj b/src/GraphQL.IntrospectionModel.Tests/GraphQL.IntrospectionModel.Tests.csproj index 33c2b9c..e0b6257 100644 --- a/src/GraphQL.IntrospectionModel.Tests/GraphQL.IntrospectionModel.Tests.csproj +++ b/src/GraphQL.IntrospectionModel.Tests/GraphQL.IntrospectionModel.Tests.csproj @@ -6,14 +6,14 @@ - - + + - - + + all runtime; build; native; contentfiles; analyzers diff --git a/src/GraphQL.IntrospectionModel.Tests/Introspection/Schema/Query.cs b/src/GraphQL.IntrospectionModel.Tests/Introspection/Schema/Query.cs index 6e77e35..82c76d7 100644 --- a/src/GraphQL.IntrospectionModel.Tests/Introspection/Schema/Query.cs +++ b/src/GraphQL.IntrospectionModel.Tests/Introspection/Schema/Query.cs @@ -6,8 +6,8 @@ internal sealed class Query : ObjectGraphType { public Query() { - Field("hello").Resolve(_ => "Hello, World!").Directive("author", "name", "Alice"); - Field>("word").Resolve(_ => "abcdef").Directive("revert").Directive("revert"); + Field("hello").Resolve(_ => "Hello, World!").ApplyDirective("author", "name", "Alice"); + Field>("word").Resolve(_ => "abcdef").ApplyDirective("revert").ApplyDirective("revert"); Field("catOrDog"); } }