Skip to content

Commit

Permalink
Merge pull request #13 from DeloitteDigitalAPAC/mm/fix-enumerate-args
Browse files Browse the repository at this point in the history
Fix enumeration of arguments
  • Loading branch information
mmiller-max authored Feb 26, 2022
2 parents 3157bb8 + 5ffd5de commit 81ac5b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GraphQLClient"
uuid = "09d831e3-9c21-47a9-bfd8-076871817219"
version = "0.7.3"
version = "0.7.4"

[deps]
GraphQLParser = "0ae10fbf-af58-4883-b66b-ff0ac82d20dd"
Expand Down
2 changes: 1 addition & 1 deletion src/args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function get_query_args_str(args::AbstractDict)
end
if enumerate > 0
name = fieldname * "__" * string(enumerate)
str *= string(enumerate)
str *= "__" *string(enumerate)
end

# Add to tracker
Expand Down
2 changes: 2 additions & 0 deletions test/args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ end
])
str, arg_names = GraphQLClient.get_query_args_str(args)
@test length(unique(vcat(collect(values(arg_names["vec"][1])), collect(values(arg_names["vec"][2]))))) == 4 # four unique names
@test all(key -> occursin(key, str), keys(arg_names["vec"][1])) # Check all arg_names are in str
@test all(key -> occursin(key, str), keys(arg_names["vec"][2])) # Check all arg_names are in str

# Different fields with same keys
args = Dict(
Expand Down

2 comments on commit 81ac5b2

@mmiller-max
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/55519

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.4 -m "<description of version>" 81ac5b23b89c6d05c51759cced8a027a46daa315
git push origin v0.7.4

Please sign in to comment.