Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more GraphQL docs to assist LLM agents. #3205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion linera-base/src/data_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,14 @@
}

doc_scalar!(Bytecode, "A WebAssembly module's bytecode");
doc_scalar!(Amount, "A non-negative amount of tokens.");
doc_scalar!(Amount, r#"
A non-negative amount of tokens.

An example of an `Amount`:
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json?

"1.234"
```
"#);
doc_scalar!(BlockHeight, "A block height to identify blocks in a chain");
doc_scalar!(
Timestamp,
Expand All @@ -1147,14 +1154,14 @@
);
doc_scalar!(OracleResponse, "A record of a single oracle response.");
doc_scalar!(BlobContent, "A blob of binary data.");
doc_scalar!(

Check warning on line 1157 in linera-base/src/data_types.rs

View workflow job for this annotation

GitHub Actions / lint-cargo-fmt

Diff in /home/runner/work/linera-protocol/linera-protocol/linera-base/src/data_types.rs
Blob,
"A blob of binary data, with its content-addressed blob ID."
);
doc_scalar!(
UserApplicationDescription,
"Description of the necessary information to run a user application"
);

Check warning on line 1164 in linera-base/src/data_types.rs

View workflow job for this annotation

GitHub Actions / lint-cargo-fmt

Diff in /home/runner/work/linera-protocol/linera-protocol/linera-base/src/data_types.rs

/// The time it takes to compress a bytecode.
#[cfg(with_metrics)]
Expand Down
13 changes: 12 additions & 1 deletion linera-execution/src/graphql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@
};

doc_scalar!(
Epoch,

Check warning on line 21 in linera-execution/src/graphql.rs

View workflow job for this annotation

GitHub Actions / lint-cargo-fmt

Diff in /home/runner/work/linera-protocol/linera-protocol/linera-execution/src/graphql.rs
"A number identifying the configuration of the chain (aka the committee)"
);
doc_scalar!(Recipient, "The recipient of a transfer");
doc_scalar!(Recipient, r#"
The recipient of a transfer.

An example of a `Recipient`:
```graphql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this is json. Perhaps the comment could mention GraphQL?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically I believe this is json. Perhaps the comment could mention GraphQL?

{
Account: {
chain_id: <chain_id>
}

Check warning on line 32 in linera-execution/src/graphql.rs

View workflow job for this annotation

GitHub Actions / lint-cargo-fmt

Diff in /home/runner/work/linera-protocol/linera-protocol/linera-execution/src/graphql.rs
}
```
"#);
doc_scalar!(UserData, "Optional user message attached to a transfer");
doc_scalar!(ValidatorName, "The identity of a validator");

Expand Down
Loading