-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Github.Interface.Lockable exposing (activeLockReason, commonSelection, locked, onIssue, onPullRequest, selection) import Github.Enum.LockReason import Github.InputObject import Github.Interface import Github.Object import Github.Scalar import Github.Union import Graphql.Field as Field exposing (Field) import Graphql.Internal.Builder.Argument as Argument exposing (Argument) import Graphql.Internal.Builder.Object as Object import Graphql.Internal.Encode as Encode exposing (Value) import Graphql.OptionalArgument exposing (OptionalArgument(..)) import Graphql.SelectionSet exposing (FragmentSelectionSet(..), SelectionSet(..)) import Json.Decode as Decode {-| Select only common fields from the interface. -} commonSelection : (a -> constructor) -> SelectionSet (a -> constructor) Github.Interface.Lockable commonSelection constructor = Object.selection constructor {-| Select both common and type-specific fields from the interface. -} selection : (Maybe typeSpecific -> a -> constructor) -> List (FragmentSelectionSet typeSpecific Github.Interface.Lockable) -> SelectionSet (a -> constructor) Github.Interface.Lockable selection constructor typeSpecificDecoders = Object.interfaceSelection typeSpecificDecoders constructor onIssue : SelectionSet decodesTo Github.Object.Issue -> FragmentSelectionSet decodesTo Github.Interface.Lockable onIssue (SelectionSet fields decoder) = FragmentSelectionSet "Issue" fields decoder onPullRequest : SelectionSet decodesTo Github.Object.PullRequest -> FragmentSelectionSet decodesTo Github.Interface.Lockable onPullRequest (SelectionSet fields decoder) = FragmentSelectionSet "PullRequest" fields decoder {-| Reason that the conversation was locked. -} activeLockReason : Field (Maybe Github.Enum.LockReason.LockReason) Github.Interface.Lockable activeLockReason = Object.fieldDecoder "activeLockReason" [] (Github.Enum.LockReason.decoder |> Decode.nullable) {-| `true` if the object is locked -} locked : Field Bool Github.Interface.Lockable locked = Object.fieldDecoder "locked" [] Decode.bool