-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Github.Object.PullRequestReviewComment exposing (ReactionsOptionalArguments, UserContentEditsOptionalArguments, author, authorAssociation, body, bodyHTML, bodyText, commit, createdAt, createdViaEmail, databaseId, diffHunk, draftedAt, editor, id, lastEditedAt, originalCommit, originalPosition, path, position, publishedAt, pullRequest, pullRequestReview, reactionGroups, reactions, replyTo, repository, resourcePath, updatedAt, url, userContentEdits, viewerCanDelete, viewerCanReact, viewerCanUpdate, viewerCannotUpdateReasons, viewerDidAuthor) import Github.Enum.CommentAuthorAssociation import Github.Enum.CommentCannotUpdateReason import Github.Enum.ReactionContent 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 (SelectionSet) import Json.Decode as Decode {-| The actor who authored the comment. -} author : SelectionSet decodesTo Github.Interface.Actor -> SelectionSet (Maybe decodesTo) Github.Object.PullRequestReviewComment author object_ = Object.selectionForCompositeField "author" [] object_ (identity >> Decode.nullable) {-| Author's association with the subject of the comment. -} authorAssociation : SelectionSet Github.Enum.CommentAuthorAssociation.CommentAuthorAssociation Github.Object.PullRequestReviewComment authorAssociation = Object.selectionForField "Enum.CommentAuthorAssociation.CommentAuthorAssociation" "authorAssociation" [] Github.Enum.CommentAuthorAssociation.decoder {-| The comment body of this review comment. -} body : SelectionSet String Github.Object.PullRequestReviewComment body = Object.selectionForField "String" "body" [] Decode.string {-| The comment body of this review comment rendered to HTML. -} bodyHTML : SelectionSet Github.ScalarCodecs.Html Github.Object.PullRequestReviewComment bodyHTML = Object.selectionForField "ScalarCodecs.Html" "bodyHTML" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecHtml |> .decoder) {-| The comment body of this review comment rendered as plain text. -} bodyText : SelectionSet String Github.Object.PullRequestReviewComment bodyText = Object.selectionForField "String" "bodyText" [] Decode.string {-| Identifies the commit associated with the comment. -} commit : SelectionSet decodesTo Github.Object.Commit -> SelectionSet decodesTo Github.Object.PullRequestReviewComment commit object_ = Object.selectionForCompositeField "commit" [] object_ identity {-| Identifies when the comment was created. -} createdAt : SelectionSet Github.ScalarCodecs.DateTime Github.Object.PullRequestReviewComment createdAt = Object.selectionForField "ScalarCodecs.DateTime" "createdAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder) {-| Check if this comment was created via an email reply. -} createdViaEmail : SelectionSet Bool Github.Object.PullRequestReviewComment createdViaEmail = Object.selectionForField "Bool" "createdViaEmail" [] Decode.bool {-| Identifies the primary key from the database. -} databaseId : SelectionSet (Maybe Int) Github.Object.PullRequestReviewComment databaseId = Object.selectionForField "(Maybe Int)" "databaseId" [] (Decode.int |> Decode.nullable) {-| The diff hunk to which the comment applies. -} diffHunk : SelectionSet String Github.Object.PullRequestReviewComment diffHunk = Object.selectionForField "String" "diffHunk" [] Decode.string {-| Identifies when the comment was created in a draft state. -} draftedAt : SelectionSet Github.ScalarCodecs.DateTime Github.Object.PullRequestReviewComment draftedAt = Object.selectionForField "ScalarCodecs.DateTime" "draftedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder) {-| The actor who edited the comment. -} editor : SelectionSet decodesTo Github.Interface.Actor -> SelectionSet (Maybe decodesTo) Github.Object.PullRequestReviewComment editor object_ = Object.selectionForCompositeField "editor" [] object_ (identity >> Decode.nullable) id : SelectionSet Github.ScalarCodecs.Id Github.Object.PullRequestReviewComment id = Object.selectionForField "ScalarCodecs.Id" "id" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecId |> .decoder) {-| The moment the editor made the last edit -} lastEditedAt : SelectionSet (Maybe Github.ScalarCodecs.DateTime) Github.Object.PullRequestReviewComment lastEditedAt = Object.selectionForField "(Maybe ScalarCodecs.DateTime)" "lastEditedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder |> Decode.nullable) {-| Identifies the original commit associated with the comment. -} originalCommit : SelectionSet decodesTo Github.Object.Commit -> SelectionSet (Maybe decodesTo) Github.Object.PullRequestReviewComment originalCommit object_ = Object.selectionForCompositeField "originalCommit" [] object_ (identity >> Decode.nullable) {-| The original line index in the diff to which the comment applies. -} originalPosition : SelectionSet Int Github.Object.PullRequestReviewComment originalPosition = Object.selectionForField "Int" "originalPosition" [] Decode.int {-| The path to which the comment applies. -} path : SelectionSet String Github.Object.PullRequestReviewComment path = Object.selectionForField "String" "path" [] Decode.string {-| The line index in the diff to which the comment applies. -} position : SelectionSet (Maybe Int) Github.Object.PullRequestReviewComment position = Object.selectionForField "(Maybe Int)" "position" [] (Decode.int |> Decode.nullable) {-| Identifies when the comment was published at. -} publishedAt : SelectionSet (Maybe Github.ScalarCodecs.DateTime) Github.Object.PullRequestReviewComment publishedAt = Object.selectionForField "(Maybe ScalarCodecs.DateTime)" "publishedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder |> Decode.nullable) {-| The pull request associated with this review comment. -} pullRequest : SelectionSet decodesTo Github.Object.PullRequest -> SelectionSet decodesTo Github.Object.PullRequestReviewComment pullRequest object_ = Object.selectionForCompositeField "pullRequest" [] object_ identity {-| The pull request review associated with this review comment. -} pullRequestReview : SelectionSet decodesTo Github.Object.PullRequestReview -> SelectionSet (Maybe decodesTo) Github.Object.PullRequestReviewComment pullRequestReview object_ = Object.selectionForCompositeField "pullRequestReview" [] object_ (identity >> Decode.nullable) {-| A list of reactions grouped by content left on the subject. -} reactionGroups : SelectionSet decodesTo Github.Object.ReactionGroup -> SelectionSet (Maybe (List decodesTo)) Github.Object.PullRequestReviewComment reactionGroups object_ = Object.selectionForCompositeField "reactionGroups" [] object_ (identity >> Decode.list >> Decode.nullable) type alias ReactionsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String , content : OptionalArgument Github.Enum.ReactionContent.ReactionContent , orderBy : OptionalArgument Github.InputObject.ReactionOrder } {-| A list of Reactions left on the Issue. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. - content - Allows filtering Reactions by emoji. - orderBy - Allows specifying the order in which reactions are returned. -} reactions : (ReactionsOptionalArguments -> ReactionsOptionalArguments) -> SelectionSet decodesTo Github.Object.ReactionConnection -> SelectionSet decodesTo Github.Object.PullRequestReviewComment reactions fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent, content = Absent, orderBy = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string, Argument.optional "content" filledInOptionals.content (Encode.enum Github.Enum.ReactionContent.toString), Argument.optional "orderBy" filledInOptionals.orderBy Github.InputObject.encodeReactionOrder ] |> List.filterMap identity in Object.selectionForCompositeField "reactions" optionalArgs object_ identity {-| The comment this is a reply to. -} replyTo : SelectionSet decodesTo Github.Object.PullRequestReviewComment -> SelectionSet (Maybe decodesTo) Github.Object.PullRequestReviewComment replyTo object_ = Object.selectionForCompositeField "replyTo" [] object_ (identity >> Decode.nullable) {-| The repository associated with this node. -} repository : SelectionSet decodesTo Github.Object.Repository -> SelectionSet decodesTo Github.Object.PullRequestReviewComment repository object_ = Object.selectionForCompositeField "repository" [] object_ identity {-| The HTTP path permalink for this review comment. -} resourcePath : SelectionSet Github.ScalarCodecs.Uri Github.Object.PullRequestReviewComment resourcePath = Object.selectionForField "ScalarCodecs.Uri" "resourcePath" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecUri |> .decoder) {-| Identifies when the comment was last updated. -} updatedAt : SelectionSet Github.ScalarCodecs.DateTime Github.Object.PullRequestReviewComment updatedAt = Object.selectionForField "ScalarCodecs.DateTime" "updatedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder) {-| The HTTP URL permalink for this review comment. -} url : SelectionSet Github.ScalarCodecs.Uri Github.Object.PullRequestReviewComment url = Object.selectionForField "ScalarCodecs.Uri" "url" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecUri |> .decoder) type alias UserContentEditsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String } {-| A list of edits to this content. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. -} userContentEdits : (UserContentEditsOptionalArguments -> UserContentEditsOptionalArguments) -> SelectionSet decodesTo Github.Object.UserContentEditConnection -> SelectionSet (Maybe decodesTo) Github.Object.PullRequestReviewComment userContentEdits fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string ] |> List.filterMap identity in Object.selectionForCompositeField "userContentEdits" optionalArgs object_ (identity >> Decode.nullable) {-| Check if the current viewer can delete this object. -} viewerCanDelete : SelectionSet Bool Github.Object.PullRequestReviewComment viewerCanDelete = Object.selectionForField "Bool" "viewerCanDelete" [] Decode.bool {-| Can user react to this subject -} viewerCanReact : SelectionSet Bool Github.Object.PullRequestReviewComment viewerCanReact = Object.selectionForField "Bool" "viewerCanReact" [] Decode.bool {-| Check if the current viewer can update this object. -} viewerCanUpdate : SelectionSet Bool Github.Object.PullRequestReviewComment viewerCanUpdate = Object.selectionForField "Bool" "viewerCanUpdate" [] Decode.bool {-| Reasons why the current viewer can not update this comment. -} viewerCannotUpdateReasons : SelectionSet (List Github.Enum.CommentCannotUpdateReason.CommentCannotUpdateReason) Github.Object.PullRequestReviewComment viewerCannotUpdateReasons = Object.selectionForField "(List Enum.CommentCannotUpdateReason.CommentCannotUpdateReason)" "viewerCannotUpdateReasons" [] (Github.Enum.CommentCannotUpdateReason.decoder |> Decode.list) {-| Did the viewer author this comment. -} viewerDidAuthor : SelectionSet Bool Github.Object.PullRequestReviewComment viewerDidAuthor = Object.selectionForField "Bool" "viewerDidAuthor" [] Decode.bool