Skip to content

Commit

Permalink
Test multiple args
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Mar 25, 2024
1 parent b438976 commit cab3e8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion schema_test.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema {

type Query {
foo: [String!]!
bar(key: Int): String
bar(a: Int, b: Float): String
person(id: ID!): Person
}

Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ t.test("query_get_body", () => {
const query_foo = gql.query_get_body_foo({})
assert.equal(query_foo, "query{foo}")

const query_bat = gql.query_get_body_bar({key: 1})
assert.equal(query_bat, "query{bar(key:1)}")
const query_bat = gql.query_get_body_bar({a: 1, b: 2.3})
assert.equal(query_bat, "query{bar(a:1 b:2.3)}")

const query_person = gql.query_get_body_person({id: "123"})
assert.equal(query_person, "query{person(id:\"123\"){id name age}}")
Expand Down

0 comments on commit cab3e8b

Please sign in to comment.