-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(graph): update schema to represent correct structure in preparat…
…ion of transition to kadindexer.io/graphql
- Loading branch information
Showing
45 changed files
with
285 additions
and
201 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,74 @@ | ||
--- | ||
'@kadena/graph': major | ||
--- | ||
|
||
BREAKING CHANGES: we've introduced a number of breaking changes to prepare to | ||
transition to kadindexer.io/graphql | ||
|
||
Changes and their resolution | ||
|
||
## Breaking Changes | ||
|
||
### Without alternative | ||
|
||
- ✖ Field `Block.target` changed type from `Decimal!` to `String!` | ||
- ✖ Field `Block.weight` changed type from `Decimal!` to `String!` | ||
- ✖ Field `incrementedId` was removed from object type `Event` | ||
- ✖ Field `parameterText` was removed from object type `Event` | ||
- ✖ Type `MinerKey` was removed | ||
- ✖ Type `PositiveFloat` was removed | ||
- ✖ Field `metadata` was removed from object type `TransactionResult` | ||
|
||
### With Alternatives | ||
|
||
- ✖ Field `Query.fungibleChainAccount` changed type from `FungibleChainAccount` | ||
to [FungibleChainAccount!] | ||
- ✖ Argument `chainId`: String! was removed from field | ||
`Query.fungibleChainAccount` | ||
- `chainId` was replaced by `chainIds: [String!]` with a default value | ||
- ✖ Field `blockHash` was removed from object type `Transfer` | ||
- can be retrieved via `block.hash` | ||
- ✖ Field `chainId` was removed from object type `Transfer` | ||
- can be retrieved via `block.chainId` | ||
- ✖ Field `height` was removed from object type `Transfer` | ||
- can be retrieved via `block.height` | ||
|
||
## Improvements | ||
|
||
These shouldn't affect how it's being used. We changed the value for | ||
|
||
- `chainIds` to include all chains as the default value, | ||
- `fungibleName` to include `coin` as the default value | ||
|
||
and represented as such by GraphQL instead of a optional argument with a hidden | ||
default value. | ||
|
||
- ⚠ Default value | ||
`[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was | ||
added to argument `chainIds` on field `Query.blocksFromDepth` | ||
- ⚠ Default value | ||
`[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was | ||
added to argument `chainIds` on field `Query.blocksFromHeight` | ||
- ⚠ Default value | ||
`[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was | ||
added to argument `chainIds` on field `Query.completedBlockHeights` | ||
- ⚠ Default value `coin` was added to argument fungibleName on field | ||
`Query.fungibleAccount` | ||
- ⚠ Argument `chainIds: [String!]!` (with default value) added to field | ||
`Query.fungibleChainAccount` | ||
- ⚠ Default value `coin` was added to argument fungibleName on field | ||
`Query.fungibleChainAccount` | ||
- ⚠ Default value | ||
`[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was | ||
added to argument `chainIds` on field `Subscription.newBlocks` | ||
- ⚠ Default value | ||
`[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]` was | ||
added to argument `chainIds` on field `Subscription.newBlocksFromDepth` | ||
|
||
## Other Changes | ||
|
||
- ✔ Directive oneOf was added | ||
- ✔ Directive deprecated was added to field IGuard.keys | ||
- ✔ Directive deprecated was added to field IGuard.predicate | ||
- ✔ Type for argument chainIds on field Subscription.newBlocksFromDepth changed | ||
from [String!]! to [String!] |
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,21 @@ | ||
// .graphqlrc.ts or graphql.config.ts | ||
export default { | ||
projects: { | ||
'graph-client': { | ||
schema: ['./packages/apps/graph/generated-schema.graphql'], | ||
documents: ['./packages/apps/graph-client/src/**/*.graph.ts'], | ||
}, | ||
explorer: { | ||
schema: ['./packages/apps/graph/generated-schema.graphql'], | ||
documents: ['./packages/apps/explorer/src/**/*.graph.ts'], | ||
}, | ||
'proof-of-us': { | ||
schema: ['./packages/apps/graph/generated-schema.graphql'], | ||
documents: ['./packages/apps/proof-of-us/src/**/*.graph.ts'], | ||
}, | ||
'rwa-demo': { | ||
schema: ['./packages/apps/graph/generated-schema.graphql'], | ||
documents: ['./packages/apps/rwa-demo/src/**/*.graph.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
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
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
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
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
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
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
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
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
20 changes: 0 additions & 20 deletions
20
packages/apps/graph-client/src/graphql/fields/miner-key.graph.ts
This file was deleted.
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
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.