Skip to content

Commit

Permalink
fix: move executable::DefinitionRecord into storage (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
obmarg authored Apr 11, 2024
1 parent f05f052 commit 23bdc74
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions cynic-parser/src/type_system/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::str::FromStr;

use ids::*;
use indexmap::IndexSet;

mod generated;
Expand Down Expand Up @@ -32,6 +31,7 @@ pub use self::{
types::Type,
values::Value,
};
use self::{ids::*, storage::DefinitionRecord};

#[derive(Default)]
pub struct TypeSystemDocument {
Expand Down Expand Up @@ -62,25 +62,6 @@ pub struct TypeSystemDocument {
arguments: Vec<storage::ArgumentRecord>,
}

#[derive(Clone, Copy)]
pub enum DefinitionRecord {
Schema(SchemaDefinitionId),
Scalar(ScalarDefinitionId),
Object(ObjectDefinitionId),
Interface(InterfaceDefinitionId),
Union(UnionDefinitionId),
Enum(EnumDefinitionId),
InputObject(InputObjectDefinitionId),
SchemaExtension(SchemaDefinitionId),
ScalarExtension(ScalarDefinitionId),
ObjectExtension(ObjectDefinitionId),
InterfaceExtension(InterfaceDefinitionId),
UnionExtension(UnionDefinitionId),
EnumExtension(EnumDefinitionId),
InputObjectExtension(InputObjectDefinitionId),
Directive(DirectiveDefinitionId),
}

#[derive(Clone, Copy, Debug)]
pub enum DirectiveLocation {
Query,
Expand Down Expand Up @@ -252,6 +233,26 @@ pub mod storage {
},
types::TypeRecord,
values::ValueRecord,
DefinitionRecord,
};

use super::ids::*;

#[derive(Clone, Copy)]
pub enum DefinitionRecord {
Schema(SchemaDefinitionId),
Scalar(ScalarDefinitionId),
Object(ObjectDefinitionId),
Interface(InterfaceDefinitionId),
Union(UnionDefinitionId),
Enum(EnumDefinitionId),
InputObject(InputObjectDefinitionId),
SchemaExtension(SchemaDefinitionId),
ScalarExtension(ScalarDefinitionId),
ObjectExtension(ObjectDefinitionId),
InterfaceExtension(InterfaceDefinitionId),
UnionExtension(UnionDefinitionId),
EnumExtension(EnumDefinitionId),
InputObjectExtension(InputObjectDefinitionId),
Directive(DirectiveDefinitionId),
}
}

0 comments on commit 23bdc74

Please sign in to comment.