Collect types once the schema is created
This commit is contained in:
@ -26,12 +26,7 @@ import Text.Megaparsec (parse)
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
philosopherSchema :: Schema (Either SomeException)
|
||||
philosopherSchema = Schema
|
||||
{ query = queryType
|
||||
, mutation = Nothing
|
||||
, subscription = Just subscriptionType
|
||||
, directives = HashMap.empty
|
||||
}
|
||||
philosopherSchema = schema queryType Nothing (Just subscriptionType) mempty
|
||||
|
||||
queryType :: Out.ObjectType (Either SomeException)
|
||||
queryType = Out.ObjectType "Query" Nothing []
|
||||
|
@ -22,12 +22,7 @@ import Text.Megaparsec (parse)
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
petSchema :: Schema IO
|
||||
petSchema = Schema
|
||||
{ query = queryType
|
||||
, mutation = Nothing
|
||||
, subscription = Just subscriptionType
|
||||
, directives = HashMap.empty
|
||||
}
|
||||
petSchema = schema queryType Nothing (Just subscriptionType) mempty
|
||||
|
||||
queryType :: ObjectType IO
|
||||
queryType = ObjectType "Query" Nothing [] $ HashMap.fromList
|
||||
|
Reference in New Issue
Block a user