Integration Snippets
Short, copy/pasteable examples for consuming Green Goods data from different environments.
Node.js (fetch)
import fetch from "node-fetch";
const query = `
query Gardens {
Garden {
id
name
location
}
}
`;
const response = await fetch("https://indexer.hyperindex.xyz/0bf0e0f/v1/graphql", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query }),
});
const { data } = await response.json();
console.log(data.Garden);Python (requests)
React (urql)
viem + EAS Attestation Lookup
GraphQL Client Helpers
Use graphql-request for minimal clients.
Showcase these recipes in CLI scripts to export CSV via
json2csv.
Looking for more? Open a PR with additional snippets and link them here. See Contributing to Documentation.
Last updated