GraphQL¶
NEON serves a public GraphQL endpoint at https://data.neonscience.org/graphql
(not under /api/v0) for product, site, location and prototype metadata1.
neon_graphql runs your own query there when the
dedicated tools do not produce the shape you need.
{"query": "{ filterSites(filter: {siteCodes: [\"HARV\"], productCodes: [\"DP1.10003.001\"]}) { siteCode dataProducts { dataProductCode availableMonths } } }"}
Guard rails, all checked before the request:
- read-only:
queryoperations only (no mutations or subscriptions); - allowed roots:
products,product,demoProduct,filterProducts,sites,site,filterSites,location,locationHierarchy,findLocations,prototypeDatasets,prototypeDataset, and one__typeor__schema(NEON rejects more asBadFaithIntrospection); - at most 8000 characters and a selection depth of 8;
- no NEON token is ever sent; results are never cached.
Responses larger than max_bytes (50 KB by default, up to 200 KB) have their largest
lists shortened; truncatedPaths says where. introspect_type="Site" describes one
type. The neon://reference/graphql-schema resource summarises the schema, including
the availableReleases windowing caveat and the fields GraphQL lacks.
-
NEON Data API — GraphQL. https://data.neonscience.org/data-api/graphql/ ↩