]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/API/GraphQL/IMT.hs
Merge branch 'dev-codeOfConduct' into dev
[gargantext.git] / src / Gargantext / API / GraphQL / IMT.hs
1 {-# LANGUAGE DeriveAnyClass #-}
2 {-# LANGUAGE DuplicateRecordFields #-}
3
4 module Gargantext.API.GraphQL.IMT
5 ( School(..)
6 , SchoolsArgs(..)
7 , resolveSchools
8 )
9 where
10
11 import Data.Morpheus.Types
12 ( GQLType
13 , Resolver
14 , QUERY
15 )
16 import Gargantext.API.Prelude (GargM, GargError)
17 import Gargantext.Core.Ext.IMT (School(..), schools)
18 import Gargantext.Prelude
19 import GHC.Generics (Generic)
20
21 data SchoolsArgs
22 = SchoolsArgs
23 { } deriving (Generic, GQLType)
24
25 type GqlM e env = Resolver QUERY e (GargM env GargError)
26
27 resolveSchools
28 :: SchoolsArgs -> GqlM e env [School]
29 resolveSchools SchoolsArgs { } = pure $ schools