Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğ
Ğcli-v2s
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Rust
Ğcli-v2s
Commits
b2c9ed0a
Commit
b2c9ed0a
authored
1 year ago
by
Hugo Trentesaux
Committed by
Hugo Trentesaux
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
cli schema update
parent
fbf95014
No related branches found
No related tags found
1 merge request
!18
add info on idty view
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
res/README.md
+12
-1
12 additions, 1 deletion
res/README.md
res/indexer-schema.json
+27176
-0
27176 additions, 0 deletions
res/indexer-schema.json
src/indexer.rs
+5
-5
5 additions, 5 deletions
src/indexer.rs
with
27193 additions
and
6 deletions
res/README.md
+
12
−
1
View file @
b2c9ed0a
...
@@ -2,6 +2,15 @@
...
@@ -2,6 +2,15 @@
## Graphql schema and queries for Duniter indexer
## Graphql schema and queries for Duniter indexer
Update the schema with:
```
sh
# install graphql client cli
cargo
install
graphql_client_cli
# download schema from node
graphql-client introspect-schema https://subsquid.gdev.coinduf.eu/graphql
--output
./res/indexer-schema.json
```
...
...
## Metadata
## Metadata
...
@@ -9,6 +18,8 @@
...
@@ -9,6 +18,8 @@
To update the scale-encoded Duniter metadata, spawn a node and run the subxt command.
To update the scale-encoded Duniter metadata, spawn a node and run the subxt command.
```
sh
```
sh
# install subxt
cargo
install
subxt
# spawn a node listening on localhost:9944
# spawn a node listening on localhost:9944
duniter
--dev
duniter
--dev
# fetch the metadata with subxt
# fetch the metadata with subxt
...
...
This diff is collapsed.
Click to expand it.
res/indexer-schema.json
0 → 100644
+
27176
−
0
View file @
b2c9ed0a
This diff is collapsed.
Click to expand it.
src/indexer.rs
+
5
−
5
View file @
b2c9ed0a
...
@@ -10,7 +10,7 @@ use crate::*;
...
@@ -10,7 +10,7 @@ use crate::*;
// index → identity
// index → identity
#[derive(GraphQLQuery)]
#[derive(GraphQLQuery)]
#[graphql(
#[graphql(
schema_path
=
"res/indexer-schema.
graphql
"
,
schema_path
=
"res/indexer-schema.
json
"
,
query_path
=
"res/indexer-queries.graphql"
query_path
=
"res/indexer-queries.graphql"
)]
)]
pub
struct
IdentityByIndex
;
pub
struct
IdentityByIndex
;
...
@@ -18,7 +18,7 @@ pub struct IdentityByIndex;
...
@@ -18,7 +18,7 @@ pub struct IdentityByIndex;
// // name → identity
// // name → identity
// #[derive(GraphQLQuery)]
// #[derive(GraphQLQuery)]
// #[graphql(
// #[graphql(
// schema_path = "res/indexer-schema.
graphql
",
// schema_path = "res/indexer-schema.
json
",
// query_path = "res/indexer-queries.graphql"
// query_path = "res/indexer-queries.graphql"
// )]
// )]
// pub struct IdentityByName;
// pub struct IdentityByName;
...
@@ -26,21 +26,21 @@ pub struct IdentityByIndex;
...
@@ -26,21 +26,21 @@ pub struct IdentityByIndex;
// pubkey → identity
// pubkey → identity
#[derive(GraphQLQuery)]
#[derive(GraphQLQuery)]
#[graphql(
#[graphql(
schema_path
=
"res/indexer-schema.
graphql
"
,
schema_path
=
"res/indexer-schema.
json
"
,
query_path
=
"res/indexer-queries.graphql"
query_path
=
"res/indexer-queries.graphql"
)]
)]
pub
struct
IdentityByPubkey
;
pub
struct
IdentityByPubkey
;
#[derive(GraphQLQuery)]
#[derive(GraphQLQuery)]
#[graphql(
#[graphql(
schema_path
=
"res/indexer-schema.
graphql
"
,
schema_path
=
"res/indexer-schema.
json
"
,
query_path
=
"res/indexer-queries.graphql"
query_path
=
"res/indexer-queries.graphql"
)]
)]
pub
struct
LatestBlock
;
pub
struct
LatestBlock
;
#[derive(GraphQLQuery)]
#[derive(GraphQLQuery)]
#[graphql(
#[graphql(
schema_path
=
"res/indexer-schema.
graphql
"
,
schema_path
=
"res/indexer-schema.
json
"
,
query_path
=
"res/indexer-queries.graphql"
query_path
=
"res/indexer-queries.graphql"
)]
)]
pub
struct
GenesisHash
;
pub
struct
GenesisHash
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment