Skip to content

Commit b5b45e8

Browse files
authored
Merge pull request #516 from supabase/fix_490
disable sync_writes to fix #490
2 parents 9113aaf + 093d14a commit b5b45e8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/graphql.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,7 @@ pub enum __Type {
544544
#[cached(
545545
type = "SizedCache<u64, HashMap<String, __Field>>",
546546
create = "{ SizedCache::with_size(1000) }",
547-
convert = r#"{ calculate_hash(type_) }"#,
548-
sync_writes = true
547+
convert = r#"{ calculate_hash(type_) }"#
549548
)]
550549
pub fn field_map(type_: &__Type) -> HashMap<String, __Field> {
551550
let mut hmap = HashMap::new();
@@ -570,8 +569,7 @@ pub fn field_map(type_: &__Type) -> HashMap<String, __Field> {
570569
#[cached(
571570
type = "SizedCache<u64, HashMap<String, __InputValue>>",
572571
create = "{ SizedCache::with_size(1000) }",
573-
convert = r#"{ calculate_hash(type_) }"#,
574-
sync_writes = true
572+
convert = r#"{ calculate_hash(type_) }"#
575573
)]
576574
pub fn input_field_map(type_: &__Type) -> HashMap<String, __InputValue> {
577575
let mut hmap = HashMap::new();
@@ -3875,8 +3873,7 @@ pub struct __Schema {
38753873
#[cached(
38763874
type = "SizedCache<String, HashMap<String, __Type>>",
38773875
create = "{ SizedCache::with_size(200) }",
3878-
convert = r#"{ serde_json::ser::to_string(&schema.context.config).expect("schema config should be a string") }"#,
3879-
sync_writes = true
3876+
convert = r#"{ serde_json::ser::to_string(&schema.context.config).expect("schema config should be a string") }"#
38803877
)]
38813878
pub fn type_map(schema: &__Schema) -> HashMap<String, __Type> {
38823879
let tmap: HashMap<String, __Type> = schema

src/sql_types.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,7 @@ pub fn calculate_hash<T: Hash>(t: &T) -> u64 {
791791
#[cached(
792792
type = "SizedCache<u64, Result<Arc<Context>, String>>",
793793
create = "{ SizedCache::with_size(250) }",
794-
convert = r#"{ calculate_hash(_config) }"#,
795-
sync_writes = true
794+
convert = r#"{ calculate_hash(_config) }"#
796795
)]
797796
pub fn load_sql_context(_config: &Config) -> Result<Arc<Context>, String> {
798797
// cache value for next query

0 commit comments

Comments
 (0)