Skip to content

Commit

Permalink
Merge 41683ea into 6f4c45e
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Aug 10, 2023
2 parents 6f4c45e + 41683ea commit adf15d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ curl -X POST \
```


### Supported requests
### Supported request and response format examples


```
Expand All @@ -155,7 +155,11 @@ Ready to roll!
# Subgraph queries
# Checks for receipts and authorization
✗ curl -X POST -H 'Content-Type: application/json' -H 'Authorization: token-for-graph-node-query-endpoint' --data '{"query": "{_meta{block{number}}}"}' http://localhost:7300/subgraphs/id/QmVhiE4nax9i86UBnBmQCYDzvjWuwHShYh7aspGPQhU5Sj
✗ curl -X POST -H 'Content-Type: application/json' -H 'Authorization: token-for-graph-node-query-endpoint' --data '{"query": "{_meta{block{number}}}"}' http://localhost:7300/subgraphs/id/QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB
"{\"data\":{\"_meta\":{\"block\":{\"number\":9425787}}}}"
# Takes hex representation for subgraphs deployment id aside from IPFS hash representation
✗ curl -X POST -H 'Content-Type: application/json' -H 'Authorization: token-for-graph-node-query-endpoint' --data '{"query": "{_meta{block{number}}}"}' http://localhost:7300/subgraphs/id/0xb655ca6f49e73728a102219726ff678d61d8fb792874792e9f0d9887dc616600
"{\"data\":{\"_meta\":{\"block\":{\"number\":9425787}}}}"
# Subgraph health check
Expand Down
2 changes: 2 additions & 0 deletions service/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ impl ServerOptions {
network_subgraph_auth_token: Option<String>,
serve_network_subgraph: bool,
) -> Self {
let free_query_auth_token = free_query_auth_token.map(|token| format!("Bearer {}", token));

ServerOptions {
port,
release,
Expand Down

0 comments on commit adf15d6

Please sign in to comment.