Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions sample_annotator/clients/nmdc/graphql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This folder contains GraphQL queries written to explore the capabilities of the graphql endpoint provided by the NEON API.

The queries are based on examples available here: https://data.neonscience.org/data-api/graphql/#examples

A suitable sandbox to test the queries is here: https://data.neonscience.org/data-api/graphql/explorer/
9 changes: 9 additions & 0 deletions sample_annotator/clients/nmdc/graphql/query1.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Get all products and include the product code, name, and description for each

query Products {
products {
productCode
productName
productDescription
}
}
14 changes: 14 additions & 0 deletions sample_annotator/clients/nmdc/graphql/query2.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Get data products based on the releaseTag value supplied in the query parameters

query Products ($release: String!) {
products (release: $release) {
productCode
productName
productDescription
releases {
release
generationDate
url
}
}
}
11 changes: 11 additions & 0 deletions sample_annotator/clients/nmdc/graphql/query3.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Get one or many data products with availability information.

query Product ($productCode: String!) {
product (productCode: $productCode) {
productCode
productName
siteCodes {
siteCode
}
}
}
12 changes: 12 additions & 0 deletions sample_annotator/clients/nmdc/graphql/query4.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Get a data product and filter by availability

query filterProducts ($filter: DataProductFilter!) {
products: filterProducts(filter: $filter) {
productCode
productName
productDescription
siteCodes {
siteCode
}
}
}