This repository has been archived by the owner on Nov 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from textileio/carson/query-api
[feat]: support graphql query api
- Loading branch information
Showing
14 changed files
with
10,893 additions
and
913 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@textile/core-storage": major | ||
"@textile/eth-storage": major | ||
"@textile/near-storage": major | ||
--- | ||
|
||
Support query by cid, fetch by cid, and new response types (breaking change) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ out/ | |
dist/ | ||
coverage/ | ||
docs/ | ||
packages/core/src/client.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,4 @@ | |
"html" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
schema: https://broker.staging.textile.dev/graphql | ||
documents: ./graphql/query.graphql | ||
generates: | ||
src/client.ts: | ||
plugins: | ||
- typescript | ||
- typescript-operations | ||
- typescript-graphql-request | ||
config: | ||
rawRequest: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
query statusByCid($dataCid: String!) { | ||
requests: allStorageRequests(condition: { dataCid: $dataCid }) { | ||
nodes { | ||
status | ||
id | ||
cid: dataCid | ||
batch: batchByStoragePayloadId { | ||
payload: storagePayloadByStoragePayloadId { | ||
deals: dealsByStoragePayloadId { | ||
nodes { | ||
deal_id: dealId | ||
miner: storageProviderId | ||
deal_expiration: dealExpiration | ||
deal_status: marketDealStatus | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
query statusById($id: String!) { | ||
requests: allStorageRequests(condition: { id: $id }) { | ||
nodes { | ||
status | ||
id | ||
cid: dataCid | ||
batch: batchByStoragePayloadId { | ||
payload: storagePayloadByStoragePayloadId { | ||
deals: dealsByStoragePayloadId { | ||
nodes { | ||
deal_id: dealId | ||
miner: storageProviderId | ||
deal_expiration: dealExpiration | ||
deal_status: marketDealStatus | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.