-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat!(crates): remove iota name service #1722
Conversation
efb06a1
to
a9cafb9
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a mention to NAME_SERVICE
in crates/iota-graphql-rpc/tests/snapshots/snapshot_tests__schema_sdl_export.snap
, do you know if we should remove?
@thibault-martinez good catch, removed by running |
Last few mentions of
|
is related to the ts-sdk and should be done in #1611 I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Thoralf-M, looks good in general. Left a few suggestions/questions of non-critical nature.
{ | ||
objects { | ||
nodes { | ||
version | ||
digest | ||
storageRebate | ||
previousTransactionBlock { | ||
digest | ||
sender { defaultIotansName } | ||
gasInput { | ||
gasPrice | ||
gasBudget | ||
} | ||
} | ||
} | ||
pageInfo { | ||
endCursor | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't have to remove the complete example. Suffice to refactor the sender
field query like so
sender { address }
instead of
sender { defaultIotansName }
@@ -68,8 +67,6 @@ pub(crate) fn graphql_error_at_pos( | |||
pub enum Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest making this #[non_exhaustive]
to allow readding the variant without this being a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Do you think we should overall make all public enums/errors #[non_exhaustive]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be lazy about it. That is I would limit this to whatever we touch and makes sense to make it so.
@@ -130,9 +129,6 @@ pub enum IndexerError { | |||
|
|||
#[error("Indexer failed to send item to channel with error: `{0}`")] | |||
MpscChannelError(String), | |||
|
|||
#[error(transparent)] | |||
NameServiceError(#[from] NameServiceError), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this enum #[non_exhaustive]
as well.
@@ -76,9 +76,6 @@ pub enum Error { | |||
|
|||
#[error("Unsupported Feature: {0}")] | |||
UnsupportedFeature(String), | |||
|
|||
#[error("transparent")] | |||
NameServiceError(#[from] NameServiceError), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the other error enums, this can be more future-proof if we render it as #[non_exhaustive]
restore object_connection.graphql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🌹
|
* feat!(crates): remove iota name service * Update openrpc.json * Add #[cfg(test)] for method that's only used in tests * Update snapshot_tests__schema_sdl_export.snap * Update snapshot_tests__populated_genesis_snapshot_matches-2.snap * Remove object_connection * Make error enums #[non_exhaustive]; restore object_connection.graphql
* feat!(crates): remove iota name service * Update openrpc.json * Add #[cfg(test)] for method that's only used in tests * Update snapshot_tests__schema_sdl_export.snap * Update snapshot_tests__populated_genesis_snapshot_matches-2.snap * Remove object_connection * Make error enums #[non_exhaustive]; restore object_connection.graphql
Description of change
Removed all iota name service related things from crates/* as we won't have a name service for now and later it might look a bit different. Remaining things will be done in another PR #1611
Graphql schema was updated with
cargo run generate-schema > schema/current_progress_schema.graphql
Links to any relevant issues
Fixes #1607
Type of change
How the change has been tested
cargo check