-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Github.Interface.Closable exposing (Fragments, closed, closedAt, fragments, maybeFragments) import Github.InputObject import Github.Interface import Github.Object import Github.Scalar import Github.ScalarCodecs import Github.Union 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.Operation exposing (RootMutation, RootQuery, RootSubscription) import Graphql.OptionalArgument exposing (OptionalArgument(..)) import Graphql.SelectionSet exposing (FragmentSelectionSet(..), SelectionSet(..)) import Json.Decode as Decode type alias Fragments decodesTo = { onIssue : SelectionSet decodesTo Github.Object.Issue , onMilestone : SelectionSet decodesTo Github.Object.Milestone , onProject : SelectionSet decodesTo Github.Object.Project , onPullRequest : SelectionSet decodesTo Github.Object.PullRequest } {-| Build an exhaustive selection of type-specific fragments. -} fragments : Fragments decodesTo -> SelectionSet decodesTo Github.Interface.Closable fragments selections = Object.exhuastiveFragmentSelection [ Object.buildFragment "Issue" selections.onIssue , Object.buildFragment "Milestone" selections.onMilestone , Object.buildFragment "Project" selections.onProject , Object.buildFragment "PullRequest" selections.onPullRequest ] {-| Can be used to create a non-exhuastive set of fragments by using the record update syntax to add `SelectionSet`s for the types you want to handle. -} maybeFragments : Fragments (Maybe decodesTo) maybeFragments = { onIssue = Graphql.SelectionSet.empty |> Graphql.SelectionSet.map (\_ -> Nothing) , onMilestone = Graphql.SelectionSet.empty |> Graphql.SelectionSet.map (\_ -> Nothing) , onProject = Graphql.SelectionSet.empty |> Graphql.SelectionSet.map (\_ -> Nothing) , onPullRequest = Graphql.SelectionSet.empty |> Graphql.SelectionSet.map (\_ -> Nothing) } {-| `true` if the object is closed (definition of closed may depend on type) -} closed : SelectionSet Bool Github.Interface.Closable closed = Object.selectionForField "Bool" "closed" [] Decode.bool {-| Identifies the date and time when the object was closed. -} closedAt : SelectionSet (Maybe Github.ScalarCodecs.DateTime) Github.Interface.Closable closedAt = Object.selectionForField "(Maybe ScalarCodecs.DateTime)" "closedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder |> Decode.nullable)