Skip to content

Commit

Permalink
fix(graphql-printer): Default value `Settings::isNormalizeArguments()…
Browse files Browse the repository at this point in the history
…` set to `false` because the order of arguments may be important.
  • Loading branch information
LastDragon-ru committed Oct 18, 2023
1 parent 5b9e5b2 commit 5198e6e
Show file tree
Hide file tree
Showing 22 changed files with 178 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ input InputUnused {
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ implements
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ union Union =
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down Expand Up @@ -139,12 +139,12 @@ scalar Scalar

type Mutation {
mutate(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): [TypeB!]
}

Expand All @@ -161,13 +161,13 @@ type Query {
scalar: Scalar

type(
a: InputA

scalar: Int! = 123
@directive(
hidden: null
location: "argument"
hidden: null
)

a: InputA
): TypeA!

union: Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ scalar Scalar

type Mutation {
mutate(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): [TypeB!]
}

Expand All @@ -148,13 +148,13 @@ type Query {
scalar: Scalar

type(
a: InputA

scalar: Int! = 123
@directive(
hidden: null
location: "argument"
hidden: null
)

a: InputA
): TypeA!

union: Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ on
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down Expand Up @@ -174,12 +174,12 @@ scalar String

type Mutation {
mutate(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): [TypeB!]
}

Expand All @@ -196,13 +196,13 @@ type Query {
scalar: Scalar

type(
a: InputA

scalar: Int! = 123
@directive(
hidden: null
location: "argument"
hidden: null
)

a: InputA
): TypeA!

union: Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ scalar Scalar

type Mutation {
mutate(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): [TypeB!]
}

Expand All @@ -133,13 +133,13 @@ type Query {
scalar: Scalar

type(
a: InputA

scalar: Int! = 123
@directive(
hidden: null
location: "argument"
hidden: null
)

a: InputA
): TypeA!

union: Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down Expand Up @@ -139,12 +139,12 @@ scalar Scalar

type Mutation {
mutate(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): [TypeB!]
}

Expand All @@ -161,13 +161,13 @@ type Query {
scalar: Scalar

type(
a: InputA

scalar: Int! = 123
@directive(
hidden: null
location: "argument"
hidden: null
)

a: InputA
): TypeA!

union: Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ scalar Scalar

type Mutation {
mutate(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): [TypeB!]
}

Expand All @@ -149,12 +149,12 @@ type Query {
scalar: Scalar

type(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): TypeA!

union: Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Directive description
"""
directive @directive(
hidden: InputHidden
location: String
hidden: InputHidden
)
repeatable on
| ARGUMENT_DEFINITION
Expand Down Expand Up @@ -139,12 +139,12 @@ scalar Scalar

type Mutation {
mutate(
a: InputA

scalar: Int! = 123
@directive(
location: "argument"
)

a: InputA
): [TypeB!]
}

Expand All @@ -161,13 +161,13 @@ type Query {
scalar: Scalar

type(
a: InputA

scalar: Int! = 123
@directive(
hidden: null
location: "argument"
hidden: null
)

a: InputA
): TypeA!

union: Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class ImmutableSettings implements Settings {
protected bool $normalizeEnums = true;
protected bool $normalizeInterfaces = true;
protected bool $normalizeFields = true;
protected bool $normalizeArguments = true;
protected bool $normalizeArguments = false;
protected bool $normalizeDescription = true;
protected bool $normalizeDirectiveLocations = true;
protected bool $alwaysMultilineUnions = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-printer/src/Testing/TestSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestSettings extends ImmutableSettings {
protected bool $normalizeEnums = true;
protected bool $normalizeInterfaces = true;
protected bool $normalizeFields = true;
protected bool $normalizeArguments = true;
protected bool $normalizeArguments = false;
protected bool $normalizeDescription = true;
protected bool $normalizeDirectiveLocations = true;
protected bool $alwaysMultilineUnions = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
directive @codeDirective(
custom: [CodeDirectiveScalarCustomClass]
enum: CodeDirectiveEnum
input: CodeDirectiveInput
scalar: CodeDirectiveScalar!
custom: [CodeDirectiveScalarCustomClass]
)
repeatable on
| INTERFACE
Expand Down Expand Up @@ -202,17 +202,17 @@ type Query {

c(
a: SchemaInput = {
a: "aaa"
b: A
c: "ccc"
d: A
e: {
a: "aaa"
b: A
c: "ccc"
d: A
f: ["aaa", "bbb", "ccc", "ddd"]
d: A
c: "ccc"
b: A
a: "aaa"
}
d: A
c: "ccc"
b: A
a: "aaa"
}
): CodeScalar
@mock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,17 @@ type Query {

c(
a: SchemaInput = {
a: "aaa"
b: A
c: "ccc"
d: A
e: {
a: "aaa"
b: A
c: "ccc"
d: A
f: ["aaa", "bbb", "ccc", "ddd"]
d: A
c: "ccc"
b: A
a: "aaa"
}
d: A
c: "ccc"
b: A
a: "aaa"
}
): CodeScalar
@mock
Expand Down
Loading

0 comments on commit 5198e6e

Please sign in to comment.