mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 04:24:35 +03:00
23e1cb218a
This PR simplifies the types that represent a remote relationship in IR so that they can be reused in other parts (in remote schema types) which could have remote relationships. The comments on the PR explain the main changes. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2979 GitOrigin-RevId: 559c51d9d6ae79e2183ce4347018741b9096ac74
27 lines
813 B
Haskell
27 lines
813 B
Haskell
module Hasura.RQL.IR.RemoteSchema
|
|
( RemoteFieldArgument (..),
|
|
RemoteSchemaSelect (..),
|
|
)
|
|
where
|
|
|
|
import Hasura.GraphQL.Parser.Schema (InputValue)
|
|
import Hasura.Prelude
|
|
import Hasura.RQL.Types.Relationships.ToSchema
|
|
import Hasura.RQL.Types.RemoteSchema
|
|
import Hasura.RQL.Types.ResultCustomization
|
|
import Language.GraphQL.Draft.Syntax qualified as G
|
|
|
|
data RemoteFieldArgument = RemoteFieldArgument
|
|
{ _rfaArgument :: !G.Name,
|
|
_rfaValue :: !(InputValue RemoteSchemaVariable)
|
|
}
|
|
deriving (Eq, Show)
|
|
|
|
data RemoteSchemaSelect = RemoteSchemaSelect
|
|
{ _rselArgs :: ![RemoteFieldArgument],
|
|
_rselResultCustomizer :: !ResultCustomizer,
|
|
_rselSelection :: !(G.SelectionSet G.NoFragments RemoteSchemaVariable),
|
|
_rselFieldCall :: !(NonEmpty FieldCall),
|
|
_rselRemoteSchema :: !RemoteSchemaInfo
|
|
}
|