{"id":19375070,"url":"https://github.com/phihos/puppet-graphql","last_synced_at":"2025-02-24T15:27:27.231Z","repository":{"id":61773642,"uuid":"551031259","full_name":"phihos/puppet-graphql","owner":"phihos","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-25T21:09:55.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T23:11:25.948Z","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":null,"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":"2022-10-13T18:20:22.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,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240502599,"owners_count":19811840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-02-24T15:27:27.214Z","avatar_url":"https://github.com/phihos.png","language":"Python","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 occured\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\nThis 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","funding_links":[],"categories":[],"sub_categories":[],"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"}