Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #67 #86

Merged
merged 6 commits into from
Sep 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions plugins/modules/query_graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,23 @@
site_name: den
query_string: |
query ($site_name:String!) {
sites (name: $site_name) {
sites (name: $site_name) {
id
name
region {
name
}
}
}
}

# Get Response with variables
# Get Response with variables and set to root keys
- name: Obtain list of devices at site in variables from Nautobot
networktocode.nautobot.query_graphql:
url: http://nautobot.local
token: thisIsMyToken
query: "{{ query_string }}"
variables: "{{ variables }}"
populate_root: "yes"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't that be boolean true ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In ansible they are equivalent

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I know, unquoted yes is also evaluated as bool True.
This is more about documentation consistency, it's described as type bool in DOCUMENTATION section.
I was looking form a static-typing perspective, where bool is True or False without making assumptions about ansible internals, maybe unnecessarily. Anyway I don't have any issue with it, just a friendly suggestion.

"""

RETURN = """
Expand Down