{"id":19375070,"url":"https://github.com/phihos/puppet-graphql","last_synced_at":"2026-06-11T01:31:14.295Z","repository":{"id":61773642,"uuid":"551031259","full_name":"phihos/puppet-graphql","owner":"phihos","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-10T11:39:36.000Z","size":109,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-30T06:08:52.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phihos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-13T18:19:24.000Z","updated_at":"2026-04-04T07:55:04.000Z","dependencies_parsed_at":"2023-01-23T17:31:27.351Z","dependency_job_id":null,"html_url":"https://github.com/phihos/puppet-graphql","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/phihos/puppet-graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phihos%2Fpuppet-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phihos%2Fpuppet-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phihos%2Fpuppet-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phihos%2Fpuppet-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phihos","download_url":"https://codeload.github.com/phihos/puppet-graphql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phihos%2Fpuppet-graphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34178819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T08:37:01.243Z","updated_at":"2026-06-11T01:31:14.289Z","avatar_url":"https://github.com/phihos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppet-graphql\n\nThis module provides a helper function to retrieve information from a GraphQL endpoint during catalog compilation.\n\n## Table of Contents\n\n1. [Description](#description)\n1. [Setup - The basics of getting started with graphql](#setup)\n1. [Usage - Configuration options and additional functionality](#usage)\n1. [Limitations - OS compatibility, etc.](#limitations)\n1. [Development - Guide for contributing to the module](#development)\n\n## Description\n\nThis module has been implemented mainly for the use-case of retrieving IP addresses from Netbox IPAM.\nBut it can be used for any kind of GraphQL HTTP API.\n\n## Setup\n\nThis module only needs Ruby's built-in Net::HTTP library. No further setup needed\n\n## Usage\n\nCurrently there is only a single function you can use in your puppet code:\n\n```puppet\n$query = @(EOT)\n    {\n      site_list {\n        id,\n        slug,\n        name,\n      }\n    }\n    | EOT\n\n$result = graphql::graphql_query({\n    'url'     =\u003e 'https://netbox.tld/graphql/',\n    'headers' =\u003e { 'Authorization' =\u003e \"Token somenetboxtoken\" },\n    'query'   =\u003e $query,\n})\n\n# $result could be undef in case an error occurred\n# the error will be logged to the puppetserver logs and a notify resource will be created\nif $result {\n  $my_sites = $result['data']['site_list']\n}\n\n\n# ...\n```\n\n## Limitations\n\nThe functions in this module - as all Puppet functions - can only be executed on the puppetmaster host during\ncatalog compile time.\n\n## Development\n\nPull requests welcome.\n\nIf you submit a change to this module, be sure to regenerate the reference documentation as follows:\n\n```bash\npuppet strings generate --format markdown --out REFERENCE.md\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphihos%2Fpuppet-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphihos%2Fpuppet-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphihos%2Fpuppet-graphql/lists"}