Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
karatakis committed Oct 10, 2023
1 parent 9b9129e commit d7fae64
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/builder.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
use async_graphql::{dynamic::{Enum, Field, InputObject, Object, Schema, SchemaBuilder, TypeRef, FieldFuture}, dataloader::DataLoader};
use async_graphql::{
dataloader::DataLoader,
dynamic::{Enum, Field, FieldFuture, InputObject, Object, Schema, SchemaBuilder, TypeRef},
};
use sea_orm::{ActiveEnum, ActiveModelTrait, EntityTrait, IntoActiveModel};

use crate::{
ActiveEnumBuilder, ActiveEnumFilterInputBuilder, BuilderContext, ConnectionObjectBuilder,
CursorInputBuilder, EdgeObjectBuilder, EntityCreateBatchMutationBuilder,
EntityCreateOneMutationBuilder, EntityInputBuilder, EntityObjectBuilder,
EntityQueryFieldBuilder, EntityUpdateMutationBuilder, FilterInputBuilder, FilterTypesMapHelper,
OffsetInputBuilder, OrderByEnumBuilder, OrderInputBuilder, PageInfoObjectBuilder,
PageInputBuilder, PaginationInfoObjectBuilder, PaginationInputBuilder, OneToOneLoader, OneToManyLoader,
OffsetInputBuilder, OneToManyLoader, OneToOneLoader, OrderByEnumBuilder, OrderInputBuilder,
PageInfoObjectBuilder, PageInputBuilder, PaginationInfoObjectBuilder, PaginationInputBuilder,
};

/// The Builder is used to create the Schema for GraphQL
Expand Down Expand Up @@ -44,11 +47,11 @@ impl Builder {
/// Used to create a new Builder from the given configuration context
pub fn new(context: &'static BuilderContext, connection: sea_orm::DatabaseConnection) -> Self {
let query: Object = Object::new("Query");
let mutation = Object::new("Mutation").field(Field::new("_ping", TypeRef::named(TypeRef::STRING), |_| {
FieldFuture::new(async move {
Ok(Some(async_graphql::Value::from("pong")))
})
}));
let mutation = Object::new("Mutation").field(Field::new(
"_ping",
TypeRef::named(TypeRef::STRING),
|_| FieldFuture::new(async move { Ok(Some(async_graphql::Value::from("pong"))) }),
));
let schema = Schema::build(query.type_name(), Some(mutation.type_name()), None);

Self {
Expand Down

0 comments on commit d7fae64

Please sign in to comment.