-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Normalize.Object.Droid exposing (appearsIn, friends, id, name, primaryFunction, selection) 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 (SelectionSet) import Json.Decode as Decode import Normalize.Enum.Episode_ import Normalize.InputObject import Normalize.Interface import Normalize.Object import Normalize.Scalar import Normalize.Union {-| Select fields to build up a SelectionSet for this object. -} selection : (a -> constructor) -> SelectionSet (a -> constructor) Normalize.Object.Droid selection constructor = Object.selection constructor {-| Which movies they appear in. -} appearsIn : Field (List Normalize.Enum.Episode_.Episode_) Normalize.Object.Droid appearsIn = Object.fieldDecoder "appearsIn" [] (Normalize.Enum.Episode_.decoder |> Decode.list) {-| The friends of the droid, or an empty list if they have none. -} friends : SelectionSet decodesTo Normalize.Interface.Character -> Field (List decodesTo) Normalize.Object.Droid friends object_ = Object.selectionField "friends" [] object_ (identity >> Decode.list) {-| The ID of the droid. -} id : Field Normalize.Scalar.Id Normalize.Object.Droid id = Object.fieldDecoder "id" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Normalize.Scalar.Id) {-| The name of the droid. -} name : Field String Normalize.Object.Droid name = Object.fieldDecoder "name" [] Decode.string {-| The primary function of the droid. -} primaryFunction : Field (Maybe String) Normalize.Object.Droid primaryFunction = Object.fieldDecoder "primaryFunction" [] (Decode.string |> Decode.nullable)