Skip to content

Commit 81ac5b2

Browse files
authored
Merge pull request #13 from DeloitteDigitalAPAC/mm/fix-enumerate-args
Fix enumeration of arguments
2 parents 3157bb8 + 5ffd5de commit 81ac5b2

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "GraphQLClient"
22
uuid = "09d831e3-9c21-47a9-bfd8-076871817219"
3-
version = "0.7.3"
3+
version = "0.7.4"
44

55
[deps]
66
GraphQLParser = "0ae10fbf-af58-4883-b66b-ff0ac82d20dd"

src/args.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function get_query_args_str(args::AbstractDict)
8484
end
8585
if enumerate > 0
8686
name = fieldname * "__" * string(enumerate)
87-
str *= string(enumerate)
87+
str *= "__" *string(enumerate)
8888
end
8989

9090
# Add to tracker

test/args.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ end
5757
])
5858
str, arg_names = GraphQLClient.get_query_args_str(args)
5959
@test length(unique(vcat(collect(values(arg_names["vec"][1])), collect(values(arg_names["vec"][2]))))) == 4 # four unique names
60+
@test all(key -> occursin(key, str), keys(arg_names["vec"][1])) # Check all arg_names are in str
61+
@test all(key -> occursin(key, str), keys(arg_names["vec"][2])) # Check all arg_names are in str
6062

6163
# Different fields with same keys
6264
args = Dict(

0 commit comments

Comments
 (0)