Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit bd5d878

Browse files
committed
make test a little bit more clear
1 parent 3b30ceb commit bd5d878

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/local/directives.test.lua

+8-8
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ local gql_wrapper = graphql.new({
4848
-- -----------
4949

5050
local query_1 = [[
51-
query user_by_order($first_name: String, $description: String, $is: Boolean) {
51+
query user_by_order($first_name: String, $description: String, $include: Boolean) {
5252
order_collection(description: $description) {
5353
order_id
5454
description
55-
user_connection @include(if: $is, first_name: $first_name) {
55+
user_connection @include(if: $include, first_name: $first_name) {
5656
user_id
5757
last_name
5858
first_name
@@ -68,7 +68,7 @@ utils.show_trace(function()
6868
local variables_1_1 = {
6969
first_name = 'Ivan',
7070
description = 'first order of Ivan',
71-
is = true
71+
include = true
7272
}
7373
local result = gql_query_1:execute(variables_1_1)
7474
print(('RESULT\n%s'):format(yaml.encode(result)))
@@ -78,18 +78,18 @@ utils.show_trace(function()
7878
local variables_1_2 = {
7979
first_name = 'Ivan',
8080
description = 'first order of Ivan',
81-
is = false
81+
include = false
8282
}
8383
local result = gql_query_1:execute(variables_1_2)
8484
print(('RESULT\n%s'):format(yaml.encode(result)))
8585
end)
8686

8787
local query_2 = [[
88-
query user_by_order($first_name: String, $description: String, $is: Boolean) {
88+
query user_by_order($first_name: String, $description: String, $skip: Boolean) {
8989
order_collection(description: $description) {
9090
order_id
9191
description
92-
user_connection @skip(if: $is, first_name: $first_name) {
92+
user_connection @skip(if: $skip, first_name: $first_name) {
9393
user_id
9494
last_name
9595
first_name
@@ -104,7 +104,7 @@ utils.show_trace(function()
104104
local variables_2_1 = {
105105
first_name = 'Ivan',
106106
description = 'first order of Ivan',
107-
is = true
107+
skip = true
108108
}
109109
local result = gql_query_2:execute(variables_2_1)
110110
print(('RESULT\n%s'):format(yaml.encode(result)))
@@ -114,7 +114,7 @@ utils.show_trace(function()
114114
local variables_2_2 = {
115115
first_name = 'Ivan',
116116
description = 'first order of Ivan',
117-
is = false
117+
skip = false
118118
}
119119
local result = gql_query_2:execute(variables_2_2)
120120
print(('RESULT\n%s'):format(yaml.encode(result)))

0 commit comments

Comments
 (0)