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

Capitalize GQL field descriptions #256

Merged
merged 2 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions fuel-client/assets/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ type CoinEdge {
}
input CoinFilterInput {
"""
address of the owner
Address of the owner
"""
owner: Address!
"""
asset ID of the coins
Asset ID of the coins
"""
assetId: AssetId
}
Expand Down Expand Up @@ -144,11 +144,11 @@ type Mutation {
reset(id: ID!): Boolean!
execute(id: ID!, op: String!): Boolean!
"""
dry-run the transaction using a fork of current state, no changes are committed.
Execute a dry-run of the transaction using a fork of current state, no changes are committed.
"""
dryRun(tx: HexString!): [Receipt!]!
"""
Submits transaction to the pool
Submits transaction to the txpool
"""
submit(tx: HexString!): Transaction!
}
Expand Down Expand Up @@ -243,11 +243,11 @@ enum ReturnType {
scalar Salt
input SpendQueryElementInput {
"""
asset ID of the coins
Asset ID of the coins
"""
assetId: AssetId!
"""
address of the owner
Address of the owner
"""
amount: U64!
}
Expand Down
8 changes: 4 additions & 4 deletions fuel-core/src/schema/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ impl BlockQuery {
async fn block(
&self,
ctx: &Context<'_>,
#[graphql(desc = "id of the block")] id: Option<BlockId>,
#[graphql(desc = "height of the block")] height: Option<U64>,
#[graphql(desc = "Id of the block")] id: Option<BlockId>,
#[graphql(desc = "Height of the block")] height: Option<U64>,
) -> async_graphql::Result<Option<Block>> {
let db = ctx.data_unchecked::<Database>();
let id = match (id, height) {
Expand All @@ -83,10 +83,10 @@ impl BlockQuery {
));
} else {
db.get_block_id(height.try_into()?)?
.ok_or("block height non-existent")?
.ok_or("Block height non-existent")?
}
}
(None, None) => return Err(async_graphql::Error::new("missing either id or height")),
(None, None) => return Err(async_graphql::Error::new("Missing either id or height")),
};

let block = Storage::<fuel_types::Bytes32, FuelBlockDb>::get(db, &id)?
Expand Down
10 changes: 5 additions & 5 deletions fuel-core/src/schema/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ impl Coin {

#[derive(InputObject)]
struct CoinFilterInput {
/// address of the owner
/// Address of the owner
owner: Address,
/// asset ID of the coins
/// Asset ID of the coins
asset_id: Option<AssetId>,
}

#[derive(InputObject)]
struct SpendQueryElementInput {
/// asset ID of the coins
/// Asset ID of the coins
asset_id: AssetId,
/// address of the owner
/// Address of the owner
amount: U64,
}

Expand All @@ -69,7 +69,7 @@ impl CoinQuery {
async fn coin(
&self,
ctx: &Context<'_>,
#[graphql(desc = "utxo_id of the coin")] utxo_id: UtxoId,
#[graphql(desc = "The utxo_id of the coin")] utxo_id: UtxoId,
) -> async_graphql::Result<Option<Coin>> {
let utxo_id = utxo_id.0;
let db = ctx.data_unchecked::<Database>().clone();
Expand Down
6 changes: 3 additions & 3 deletions fuel-core/src/schema/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl TxQuery {
async fn transaction(
&self,
ctx: &Context<'_>,
#[graphql(desc = "id of the transaction")] id: TransactionId,
#[graphql(desc = "The id of the transaction")] id: TransactionId,
) -> async_graphql::Result<Option<Transaction>> {
let db = ctx.data_unchecked::<Database>();
let key = id.0;
Expand Down Expand Up @@ -244,7 +244,7 @@ pub struct TxMutation;

#[Object]
impl TxMutation {
/// dry-run the transaction using a fork of current state, no changes are committed.
/// Execute a dry-run of the transaction using a fork of current state, no changes are committed.
async fn dry_run(
&self,
ctx: &Context<'_>,
Expand All @@ -259,7 +259,7 @@ impl TxMutation {
Ok(receipts.into_iter().map(Into::into).collect())
}

/// Submits transaction to the pool
/// Submits transaction to the txpool
async fn submit(&self, ctx: &Context<'_>, tx: HexString) -> async_graphql::Result<Transaction> {
let tx_pool = ctx.data::<Arc<TxPool>>().unwrap();
let tx = FuelTx::from_bytes(&tx.0)?;
Expand Down