Skip to content

Commit

Permalink
Fixed snapshots in data (#5026)
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSenn committed May 3, 2022
1 parent 2276541 commit be8310e
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 32 deletions.
Expand Up @@ -23,14 +23,22 @@ public static class HotChocolateDataRequestBuilderExtensions
/// <param name="name">
/// The filter convention name.
/// </param>
/// <param name="compatabilityMode">
/// If true uses the old naming convention
/// </param>
/// <returns>
/// Returns the <see cref="IRequestExecutorBuilder"/>.
/// </returns>
public static IRequestExecutorBuilder AddFiltering(
this IRequestExecutorBuilder builder,
string? name = null,
bool compatabilityMode = false) =>
builder.ConfigureSchema(s => s.AddFiltering(name, compatabilityMode));
bool compatabilityMode = false)
{
builder.Services.AddSingleton<IParameterExpressionBuilder>(
new FilterContextParameterExpressionBuilder());

return builder.ConfigureSchema(s => s.AddFiltering(name, compatabilityMode));
}

/// <summary>
/// Adds filtering support.
Expand Down
@@ -1,7 +1,7 @@
{
"errors": [
{
"message": "The provided value for filter \u0060eq\u0060 of type ComparableInt32OperationFilterInput is invalid. Null values are not supported.",
"message": "The provided value for filter \u0060eq\u0060 of type IntOperationFilterInput is invalid. Null values are not supported.",
"locations": [
{
"line": 1,
Expand All @@ -14,7 +14,7 @@
"extensions": {
"code": "HC0026",
"expectedType": "Int!",
"filterType": "ComparableInt32OperationFilterInput"
"filterType": "IntOperationFilterInput"
}
}
],
Expand Down
@@ -1,7 +1,7 @@
{
"errors": [
{
"message": "The provided value for filter \u0060eq\u0060 of type ComparableInt32OperationFilterInput is invalid. Null values are not supported.",
"message": "The provided value for filter \u0060eq\u0060 of type IntOperationFilterInput is invalid. Null values are not supported.",
"locations": [
{
"line": 1,
Expand All @@ -14,7 +14,7 @@
"extensions": {
"code": "HC0026",
"expectedType": "Int!",
"filterType": "ComparableInt32OperationFilterInput"
"filterType": "IntOperationFilterInput"
}
}
],
Expand Down
Expand Up @@ -7,7 +7,7 @@ type Query {
}

input BookAuthorFilterInput @Foobar {
id: ComparableInt32OperationFilterInput
id: IntOperationFilterInput
}

input BookChaptersFilterInput @Foobar {
Expand All @@ -21,11 +21,11 @@ input BookFilterInput {
author: BookAuthorFilterInput
}

input ComparableInt32OperationFilterInput {
input IntOperationFilterInput {
eq: Int
neq: Int
in: [Int!]
nin: [Int!]
in: [Int]
nin: [Int]
gt: Int
ngt: Int
gte: Int
Expand Down
Expand Up @@ -9,7 +9,7 @@ type Query {
input BookAuthorFilterInput {
and: [BookAuthorFilterInput!]
or: [BookAuthorFilterInput!]
id: ComparableInt32OperationFilterInput
id: IntOperationFilterInput
}

input BookChaptersFilterInput {
Expand All @@ -24,11 +24,11 @@ input BookFilterInput {
author: BookAuthorFilterInput
}

input ComparableInt32OperationFilterInput {
input IntOperationFilterInput {
eq: Int
neq: Int
in: [Int!]
nin: [Int!]
in: [Int]
nin: [Int]
gt: Int
ngt: Int
gte: Int
Expand Down
Expand Up @@ -7,7 +7,7 @@ type Query {
}

input AuthorInput {
id: ComparableInt32OperationFilterInput
id: IntOperationFilterInput
}

input BookFilterInput {
Expand All @@ -21,11 +21,11 @@ input ChaptersInput {
eq: Int
}

input ComparableInt32OperationFilterInput {
input IntOperationFilterInput {
eq: Int
neq: Int
in: [Int!]
nin: [Int!]
in: [Int]
nin: [Int]
gt: Int
ngt: Int
gte: Int
Expand Down
Expand Up @@ -8,7 +8,7 @@ type Query {

"Test"
input BookAuthorFilterInput {
id: ComparableInt32OperationFilterInput
id: IntOperationFilterInput
}

"Test"
Expand All @@ -23,11 +23,11 @@ input BookFilterInput {
author: BookAuthorFilterInput
}

input ComparableInt32OperationFilterInput {
input IntOperationFilterInput {
eq: Int
neq: Int
in: [Int!]
nin: [Int!]
in: [Int]
nin: [Int]
gt: Int
ngt: Int
gte: Int
Expand Down
Expand Up @@ -16,7 +16,7 @@ input AddressFilterInput {
}

input BookAuthorFilterInput {
id: ComparableInt32OperationFilterInput
id: IntOperationFilterInput
name: StringOperationFilterInput
address: AddressFilterInput
}
Expand All @@ -27,11 +27,17 @@ input BookFilterInput {
author: BookAuthorFilterInput
}

input ComparableInt32OperationFilterInput {
input CountryFilterInput {
and: [CountryFilterInput!]
or: [CountryFilterInput!]
name: StringOperationFilterInput
}

input IntOperationFilterInput {
eq: Int
neq: Int
in: [Int!]
nin: [Int!]
in: [Int]
nin: [Int]
gt: Int
ngt: Int
gte: Int
Expand All @@ -42,12 +48,6 @@ input ComparableInt32OperationFilterInput {
nlte: Int
}

input CountryFilterInput {
and: [CountryFilterInput!]
or: [CountryFilterInput!]
name: StringOperationFilterInput
}

input StringOperationFilterInput {
and: [StringOperationFilterInput!]
or: [StringOperationFilterInput!]
Expand Down

0 comments on commit be8310e

Please sign in to comment.