starwars

package
v0.0.0-...-76ac328 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoQueryWithCheck

func DoQueryWithCheck(q string, variables map[string]interface{}, expectedRes interface{}, t *testing.T)

func GetShips

func GetShips(factionId string) []interface{}

func NewRouter

func NewRouter() *tools.Router

Types

type Faction

type Faction struct {
	Node  `graphql:"interface"`
	Id    string         `json:"id" "graphql:id"`
	Name  string         `json:"name"`
	Ships ShipConnection `json:"ships"`
}

func GetFaction

func GetFaction(Id string) Faction

type IntroduceShipInput

type IntroduceShipInput struct {
	ClientMutationId *string `json:"clientMutationId"`
	ShipName         *string `json:"shipName"`
	FactionId        *string `json:"factionId" graphql:"id"`
}

type IntroduceShipPayload

type IntroduceShipPayload struct {
	ClientMutationId *string `json:"clientMutationId"`
	Ship             Ship    `json:"ship"`
	Faction          Faction `json:"faction"`
}

type Mutation

type Mutation struct {
	IntroduceShip IntroduceShipPayload `json:"introduceShip"`
}

func (Mutation) ArgsForIntroduceShip

func (m Mutation) ArgsForIntroduceShip() MutationIntroduceShipArgs

type MutationIntroduceShipArgs

type MutationIntroduceShipArgs struct {
	Input *IntroduceShipInput `json:"input" graphql:"input"`
}

type Node

type Node struct {
	Id string `json:"id" "graphql:id"`
}

func (Node) IsInterface

func (n Node) IsInterface() bool

type PageInfo

type PageInfo struct {
	HasNextPage     *bool  `json:"hasNextPage"`
	HasPreviousPage *bool  `json:"hasPreviousPage"`
	StartCursor     string `json:"startCursor"`
	EndCursor       string `json:"endCursor"`
}

type Query

type Query struct {
	Rebels Faction `json:"rebels"`
	Empire Faction `json:"empire"`
	Node   Node    `json:"node"`
}

func (Query) ArgsForNode

func (q Query) ArgsForNode() QueryNodeArgs

type QueryNodeArgs

type QueryNodeArgs struct {
	Id string `json:"id" graphql:"id"`
}

type Ship

type Ship struct {
	Id   string `json:"id" graphql:"id"`
	Name string `json:"name"`
}

type ShipConnection

type ShipConnection struct {
	Edges    []ShipEdge `json:"edges"`
	PageInfo *PageInfo  `json:"pageInfo"`
}

type ShipEdge

type ShipEdge struct {
	Cursor *string `json:"cursor"`
	Node   Ship    `json:"node"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL