-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Torii graphql namepsace for transaction, query, and subscription types
- Loading branch information
Showing
14 changed files
with
55 additions
and
40 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,30 @@ | ||
pub const DEFAULT_LIMIT: u64 = 10; | ||
pub const BOOLEAN_TRUE: i64 = 1; | ||
|
||
pub const ENTITY_TABLE: &str = "entities"; | ||
pub const EVENT_TABLE: &str = "events"; | ||
pub const MODEL_TABLE: &str = "models"; | ||
pub const TRANSACTION_TABLE: &str = "transactions"; | ||
pub const METADATA_TABLE: &str = "metadata"; | ||
|
||
pub const ID_COLUMN: &str = "id"; | ||
pub const EVENT_ID_COLUMN: &str = "event_id"; | ||
pub const ENTITY_ID_COLUMN: &str = "entity_id"; | ||
|
||
pub const INTERNAL_ENTITY_ID_KEY: &str = "$entity_id$"; | ||
|
||
// objects namespaced to avoid conflicts with user models | ||
pub const ENTITY_TYPE_NAME: &str = "World__Entity"; | ||
pub const MODEL_TYPE_NAME: &str = "World__Model"; | ||
pub const EVENT_TYPE_NAME: &str = "World__Event"; | ||
pub const METADATA_TYPE_NAME: &str = "World__Metadata"; | ||
pub const TRANSACTION_TYPE_NAME: &str = "World__Transaction"; | ||
pub const QUERY_TYPE_NAME: &str = "World__Query"; | ||
pub const SUBSCRIPTION_TYPE_NAME: &str = "World__Subscription"; | ||
|
||
// objects' single and plural names | ||
pub const ENTITY_NAMES: (&str, &str) = ("entity", "entities"); | ||
pub const MODEL_NAMES: (&str, &str) = ("model", "models"); | ||
pub const EVENT_NAMES: (&str, &str) = ("event", "events"); | ||
pub const METADATA_NAMES: (&str, &str) = ("metadata", "metadatas"); | ||
pub const TRANSACTION_NAMES: (&str, &str) = ("transaction", "transactions"); |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
pub mod object; | ||
|
||
mod constants; | ||
mod error; | ||
mod mapping; | ||
mod query; | ||
|
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 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