Skip to content

Commit

Permalink
Apply "go fmt" in master. (dgraph-io#5749)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored and dna2github committed Jul 18, 2020
1 parent 20769c9 commit 84e695a
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions graphql/e2e/common/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -1221,19 +1221,19 @@ func typenameForInterface(t *testing.T) {
func queryOnlyTypename(t *testing.T) {

newCountry1 := addCountry(t, postExecutor)
newCountry2 := addCountry(t, postExecutor)
newCountry3 := addCountry(t, postExecutor)
newCountry2 := addCountry(t, postExecutor)
newCountry3 := addCountry(t, postExecutor)

getCountryParams := &GraphQLParams{
Query: `query {
Query: `query {
queryCountry(filter: { name: {eq: "Testland"}}) {
__typename
}
}`,
}
gqlResponse := getCountryParams.ExecuteAsPost(t, graphqlURL)
RequireNoGQLErrors(t, gqlResponse)
}

gqlResponse := getCountryParams.ExecuteAsPost(t, graphqlURL)
RequireNoGQLErrors(t, gqlResponse)

expected := `{
"queryCountry": [
Expand All @@ -1249,33 +1249,33 @@ func queryOnlyTypename(t *testing.T) {
]
}`
require.JSONEq(t, expected, string(gqlResponse.Data))
cleanUp(t, []*country{newCountry1,newCountry2,newCountry3}, []*author{}, []*post{})

require.JSONEq(t, expected, string(gqlResponse.Data))
cleanUp(t, []*country{newCountry1, newCountry2, newCountry3}, []*author{}, []*post{})
}

func querynestedOnlyTypename(t *testing.T) {

newCountry := addCountry(t, postExecutor)
newAuthor := addAuthor(t, newCountry.ID, postExecutor)
newPost1 := addPost(t, newAuthor.ID, newCountry.ID, postExecutor)
newPost2 := addPost(t, newAuthor.ID, newCountry.ID, postExecutor)
newPost3 := addPost(t, newAuthor.ID, newCountry.ID, postExecutor)
getCountryParams := &GraphQLParams{
newAuthor := addAuthor(t, newCountry.ID, postExecutor)
newPost1 := addPost(t, newAuthor.ID, newCountry.ID, postExecutor)
newPost2 := addPost(t, newAuthor.ID, newCountry.ID, postExecutor)
newPost3 := addPost(t, newAuthor.ID, newCountry.ID, postExecutor)

getCountryParams := &GraphQLParams{
Query: `query {
queryAuthor(filter: { name: { eq: "Test Author" } }) {
posts {
__typename
}
}
}`,
}
gqlResponse := getCountryParams.ExecuteAsPost(t, graphqlURL)
RequireNoGQLErrors(t, gqlResponse)
}

gqlResponse := getCountryParams.ExecuteAsPost(t, graphqlURL)
RequireNoGQLErrors(t, gqlResponse)

expected := `{
expected := `{
"queryAuthor": [
{
"posts": [
Expand All @@ -1293,11 +1293,10 @@ func querynestedOnlyTypename(t *testing.T) {
}
]
}`
require.JSONEq(t, expected, string(gqlResponse.Data))
cleanUp(t, []*country{newCountry}, []*author{newAuthor}, []*post{newPost1,newPost2,newPost3})
require.JSONEq(t, expected, string(gqlResponse.Data))
cleanUp(t, []*country{newCountry}, []*author{newAuthor}, []*post{newPost1, newPost2, newPost3})
}


func onlytypenameForInterface(t *testing.T) {
newStarship := addStarship(t)
humanID := addHuman(t, newStarship.ID)
Expand Down Expand Up @@ -1343,7 +1342,6 @@ func onlytypenameForInterface(t *testing.T) {
cleanupStarwars(t, newStarship.ID, humanID, droidID)
}


func defaultEnumFilter(t *testing.T) {
newStarship := addStarship(t)
humanID := addHuman(t, newStarship.ID)
Expand Down

0 comments on commit 84e695a

Please sign in to comment.