From 3531435d15f563062f8c1eedc46be577251fdf26 Mon Sep 17 00:00:00 2001 From: Raphael Darley Date: Tue, 17 Sep 2024 13:02:27 +0100 Subject: [PATCH] Fix typo in graphql error (#4792) --- core/src/gql/cache.rs | 4 ++-- core/src/gql/error.rs | 4 ++-- core/src/gql/schema.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/gql/cache.rs b/core/src/gql/cache.rs index 4280fb7e..bfaf052f 100644 --- a/core/src/gql/cache.rs +++ b/core/src/gql/cache.rs @@ -82,8 +82,8 @@ impl SchemaCache { } } pub async fn get_schema(&self, session: &Session) -> Result { - let ns = session.ns.as_ref().ok_or(GqlError::UnpecifiedNamespace)?; - let db = session.db.as_ref().ok_or(GqlError::UnpecifiedDatabase)?; + let ns = session.ns.as_ref().ok_or(GqlError::UnspecifiedNamespace)?; + let db = session.db.as_ref().ok_or(GqlError::UnspecifiedDatabase)?; { let guard = self.inner.read().await; if let Some(cand) = guard.get(&(ns.to_owned(), db.to_owned())) { diff --git a/core/src/gql/error.rs b/core/src/gql/error.rs index a38400a7..c8182038 100644 --- a/core/src/gql/error.rs +++ b/core/src/gql/error.rs @@ -14,9 +14,9 @@ pub enum GqlError { #[error("Error resolving request: {0}")] ResolverError(String), #[error("No Namespace specified")] - UnpecifiedNamespace, + UnspecifiedNamespace, #[error("No Database specified")] - UnpecifiedDatabase, + UnspecifiedDatabase, #[error("GraphQL has not been configured for this database")] NotConfigured, #[error("Internal Error: {0}")] diff --git a/core/src/gql/schema.rs b/core/src/gql/schema.rs index 3ea4d84e..bcd2a52c 100644 --- a/core/src/gql/schema.rs +++ b/core/src/gql/schema.rs @@ -84,8 +84,8 @@ pub async fn generate_schema( ) -> Result { let kvs = datastore; let tx = kvs.transaction(TransactionType::Read, LockType::Optimistic).await?; - let ns = session.ns.as_ref().ok_or(GqlError::UnpecifiedNamespace)?; - let db = session.db.as_ref().ok_or(GqlError::UnpecifiedDatabase)?; + let ns = session.ns.as_ref().ok_or(GqlError::UnspecifiedNamespace)?; + let db = session.db.as_ref().ok_or(GqlError::UnspecifiedDatabase)?; let cg = tx.get_db_config(ns, db, "graphql").await.map_err(|e| match e { crate::err::Error::CgNotFound {