IMT.purs 692 Bytes
Newer Older
1 2 3 4 5 6 7 8
module Gargantext.Components.GraphQL.IMT where

import Gargantext.Prelude

import Affjax.RequestBody (RequestBody(..))
import Data.Array as A
import Data.Lens (Lens', lens)
import Data.Maybe (Maybe(..), fromMaybe, maybe)
9 10
import Gargantext.Utils.GraphQL as GGQL
import Type.Proxy (Proxy(..))
11 12 13 14 15 16 17 18


type School
  = { school_id        :: String
    , school_longName  :: String
    , school_shortName :: String
    }

19 20 21 22 23 24 25
type SchoolsQuery
  = { imt_schools ::
         { school_id :: Unit
         , school_longName :: Unit
         , school_shortName :: Unit } }

schoolsQuery :: SchoolsQuery
26
schoolsQuery = { imt_schools:
27
                 GGQL.getFieldsStandard (Proxy :: _ School)
28
                }