Skip to content

Commit

Permalink
Update formatting to match new gqlparser formatter behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStarich committed Jun 22, 2024
1 parent 58d2e54 commit f4a92d4
Showing 1 changed file with 42 additions and 17 deletions.
59 changes: 42 additions & 17 deletions merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ func TestMergeSchema_objectTypes(t *testing.T) {
return
}
assert.Equal(t, "String!", lastNameDefinition.Type.String())

})

// the table we are testing
Expand Down Expand Up @@ -731,7 +730,6 @@ func TestMergeSchema_interfaces(t *testing.T) {
assert.True(t, visited["Foo"], "did not have Foo in possible type")
assert.True(t, visited["User"], "did not have User in possible type")
assert.True(t, visited["NotUser"], "did not have NotUser in possible type")

})

// the table we are testing
Expand Down Expand Up @@ -849,7 +847,6 @@ func testMergeSchemas(t *testing.T, schema1 *ast.Schema, schema2Str string) (*as
{Schema: schema1, URL: "url1"},
{Schema: schema2, URL: "url2"},
})

if err != nil {
return nil, err
}
Expand Down Expand Up @@ -940,7 +937,9 @@ type Query {
node(id: ID!): Node
}
type User {
"""description"""
"""
description
"""
firstName: String!
}
`,
Expand Down Expand Up @@ -968,7 +967,9 @@ type Query {
node(id: ID!): Node
}
type User {
"""description"""
"""
description
"""
firstName: String!
}
`,
Expand Down Expand Up @@ -996,7 +997,9 @@ interface Node {
type Query {
node(id: ID!): Node
}
"""User represents a customer"""
"""
User represents a customer
"""
type User {
firstName: String!
}
Expand Down Expand Up @@ -1024,7 +1027,9 @@ interface Node {
type Query {
node(id: ID!): Node
}
"""User represents a customer"""
"""
User represents a customer
"""
type User {
firstName: String!
}
Expand All @@ -1043,7 +1048,9 @@ type User {
`,
},
expectSchema: `
"""other-description"""
"""
other-description
"""
directive @foo on FIELD_DEFINITION
interface Node {
id: ID!
Expand All @@ -1065,7 +1072,9 @@ type Query {
`,
},
expectSchema: `
"""description"""
"""
description
"""
directive @foo on FIELD_DEFINITION
interface Node {
id: ID!
Expand Down Expand Up @@ -1093,7 +1102,9 @@ type Query {
},
expectSchema: `
enum Foo {
"""description"""
"""
description
"""
Bar
}
interface Node {
Expand Down Expand Up @@ -1121,7 +1132,9 @@ type Query {
},
expectSchema: `
enum Foo {
"""description"""
"""
description
"""
Bar
}
interface Node {
Expand Down Expand Up @@ -1149,7 +1162,9 @@ type Query {
`,
},
expectSchema: `
"""description"""
"""
description
"""
enum Foo {
Bar
}
Expand Down Expand Up @@ -1177,7 +1192,9 @@ type Query {
`,
},
expectSchema: `
"""description"""
"""
description
"""
enum Foo {
Bar
}
Expand Down Expand Up @@ -1206,7 +1223,9 @@ type Query {
`,
},
expectSchema: `
"""description"""
"""
description
"""
interface Foo {
name: String
}
Expand Down Expand Up @@ -1234,7 +1253,9 @@ type Query {
`,
},
expectSchema: `
"""description"""
"""
description
"""
interface Foo {
name: String
}
Expand Down Expand Up @@ -1269,7 +1290,9 @@ type Query {
expectSchema: `
type Foo {
name(
"""description"""
"""
description
"""
arg1: String
): String
}
Expand Down Expand Up @@ -1303,7 +1326,9 @@ type Query {
expectSchema: `
type Foo {
name(
"""description"""
"""
description
"""
arg1: String
): String
}
Expand Down

0 comments on commit f4a92d4

Please sign in to comment.