Documentation ¶
Index ¶
- Constants
- type AllResultsQuery
- type AllResultsQueryData
- type Boolean
- type CreateResultMutation
- type CustomDate
- type Errors
- type FilterOpMutation
- type FilterOpQuery
- type FilterOpQueryData
- type Float
- type GraphQLRequest
- type ID
- type Identified
- type Int
- type ListOpMutation
- type ListOpQuery
- type ListOpQueryData
- type NoArgOpMutation
- type NoArgOpQuery
- type NoArgOpQueryData
- type OneArgOpMutation
- type OneArgOpQuery
- type OneArgOpQueryData
- type PlusArrayOpMutation
- type PlusArrayOpQuery
- type PlusArrayOpQueryData
- type PlusOpMutation
- type PlusOpQuery
- type PlusOpQueryData
- type Result
- type ResultExplanationFunction
- type ResultInput
- type String
- type URL
Constants ¶
const SchemaVersion = "v1.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllResultsQuery ¶
type AllResultsQuery struct { Errors Errors `json:"errors"` Data []AllResultsQueryData `graphql:"query"` }
AllResultsQuery is used for both specifying the query and capturing the response.
func (AllResultsQuery) Build ¶
func (_q AllResultsQuery) Build( operationName string, _before CustomDate, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type AllResultsQueryData ¶
type AllResultsQueryData struct {
Result `graphql:"allResults(before: $before)" json:"allResults"`
}
type CreateResultMutation ¶
type CreateResultMutation struct { Errors Errors `json:"errors"` Data struct { // createResult(input:ResultInput!):ID! ID `graphql:"createResult(input: $input)" json:"createResult"` } `graphql:"mutation"` }
CreateResultMutation defines: create a Result
func (CreateResultMutation) Build ¶
func (_m CreateResultMutation) Build( _input ResultInput, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type CustomDate ¶
type CustomDate string
type Errors ¶
type Errors struct { Message string `json:"message,omitempty"` Locations []struct { Line int `json:"line"` Column int `json:"column"` } `json:"locations,omitempty"` Extensions map[string]interface{} `json:"extensions,omitempty"` }
Errors is a response field to capture server reported problems
type FilterOpMutation ¶
type FilterOpMutation struct { Errors Errors `json:"errors"` Data []struct { // filterOp(sort:String!):[Result] Result `graphql:"filterOp(sort: $sort)" json:"filterOp"` } `graphql:"mutation"` }
FilterOpMutation defines:
func (FilterOpMutation) Build ¶
func (_m FilterOpMutation) Build( _sort string, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type FilterOpQuery ¶
type FilterOpQuery struct { Errors Errors `json:"errors"` Data []FilterOpQueryData `graphql:"query"` }
FilterOpQuery is used for both specifying the query and capturing the response.
func (FilterOpQuery) Build ¶
func (_q FilterOpQuery) Build( operationName string, _sort string, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type FilterOpQueryData ¶
type FilterOpQueryData struct {
Result `graphql:"filterOp(sort: $sort)" json:"filterOp"`
}
type GraphQLRequest ¶
type GraphQLRequest struct { Query string `json:"query"` OperationName string `json:"operationName"` Variables map[string]interface{} `json:"variables"` }
GraphQLRequest is used to model both a query or a mutation request
func NewGraphQLRequest ¶
func NewGraphQLRequest(query, operation string, vars ...map[string]interface{}) GraphQLRequest
NewGraphQLRequest returns a new Request (for query or mutation) with optional or empty variables.
type Identified ¶
type Identified struct {
ID interface{} `graphql:"id" json:"id,omitempty"`
}
Identified is a INTERFACE.
type ListOpMutation ¶
type ListOpMutation struct { Errors Errors `json:"errors"` Data []struct { // ListOp(limit:Int,prefix:String!):[Result] Result `graphql:"ListOp(limit: $limit,prefix: $prefix)" json:"ListOp"` } `graphql:"mutation"` }
ListOpMutation defines:
func (ListOpMutation) Build ¶
func (_m ListOpMutation) Build( _limit int32, _prefix string, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type ListOpQuery ¶
type ListOpQuery struct { Errors Errors `json:"errors"` Data []ListOpQueryData `graphql:"query"` }
ListOpQuery is used for both specifying the query and capturing the response.
func (ListOpQuery) Build ¶
func (_q ListOpQuery) Build( operationName string, _limit int32, _prefix string, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type ListOpQueryData ¶
type ListOpQueryData struct {
Result `graphql:"ListOp(limit: $limit,prefix: $prefix)" json:"ListOp"`
}
type NoArgOpMutation ¶
type NoArgOpMutation struct { Errors Errors `json:"errors"` Data struct { // noArgOp():Int! Int `graphql:"noArgOp()" json:"noArgOp"` } `graphql:"mutation"` }
NoArgOpMutation defines:
func (NoArgOpMutation) Build ¶
func (_m NoArgOpMutation) Build() GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type NoArgOpQuery ¶
type NoArgOpQuery struct { Errors Errors `json:"errors"` Data NoArgOpQueryData `graphql:"query"` }
NoArgOpQuery is used for both specifying the query and capturing the response.
func (NoArgOpQuery) Build ¶
func (_q NoArgOpQuery) Build( operationName string, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type NoArgOpQueryData ¶
type NoArgOpQueryData struct {
// contains filtered or unexported fields
}
type OneArgOpMutation ¶
type OneArgOpMutation struct { Errors Errors `json:"errors"` Data struct { // oneArgOp(required:Boolean!):String String `graphql:"oneArgOp(required: $required)" json:"oneArgOp"` } `graphql:"mutation"` }
OneArgOpMutation defines:
func (OneArgOpMutation) Build ¶
func (_m OneArgOpMutation) Build( _required bool, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type OneArgOpQuery ¶
type OneArgOpQuery struct { Errors Errors `json:"errors"` Data OneArgOpQueryData `graphql:"query"` }
OneArgOpQuery is used for both specifying the query and capturing the response.
func (OneArgOpQuery) Build ¶
func (_q OneArgOpQuery) Build( operationName string, _required bool, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type OneArgOpQueryData ¶
type OneArgOpQueryData struct {
// contains filtered or unexported fields
}
type PlusArrayOpMutation ¶
type PlusArrayOpMutation struct { Errors Errors `json:"errors"` Data []struct { // plusArrayOp(as:[Int]!,bs:[Int!]):[Int] Int `graphql:"plusArrayOp(as: $as,bs: $bs)" json:"plusArrayOp"` } `graphql:"mutation"` }
PlusArrayOpMutation defines:
func (PlusArrayOpMutation) Build ¶
func (_m PlusArrayOpMutation) Build( _as []int32, _bs []int32, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type PlusArrayOpQuery ¶
type PlusArrayOpQuery struct { Errors Errors `json:"errors"` Data []PlusArrayOpQueryData `graphql:"query"` }
PlusArrayOpQuery is used for both specifying the query and capturing the response.
func (PlusArrayOpQuery) Build ¶
func (_q PlusArrayOpQuery) Build( operationName string, _as []int32, _bs []int32, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type PlusArrayOpQueryData ¶
type PlusArrayOpQueryData struct {
// contains filtered or unexported fields
}
type PlusOpMutation ¶
type PlusOpMutation struct { Errors Errors `json:"errors"` Data struct { // plusOp(a:Int!,b:Int!):Int Int `graphql:"plusOp(a: $a,b: $b)" json:"plusOp"` } `graphql:"mutation"` }
PlusOpMutation defines:
func (PlusOpMutation) Build ¶
func (_m PlusOpMutation) Build( _a int32, _b int32, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type PlusOpQuery ¶
type PlusOpQuery struct { Errors Errors `json:"errors"` Data PlusOpQueryData `graphql:"query"` }
PlusOpQuery is used for both specifying the query and capturing the response.
func (PlusOpQuery) Build ¶
func (_q PlusOpQuery) Build( operationName string, _a int32, _b int32, ) GraphQLRequest
Build returns a GraphQLRequest with all the parts to send the HTTP request.
type PlusOpQueryData ¶
type PlusOpQueryData struct {
// contains filtered or unexported fields
}
type Result ¶
type Result struct { // will map to CustomDate When *CustomDate `graphql:"when" json:"when,omitempty"` Explanation *ResultExplanationFunction `graphql:"explanation" json:"explanation,omitempty"` ID interface{} `graphql:"id" json:"id,omitempty"` }
Result is a OBJECT.
type ResultExplanationFunction ¶
type ResultExplanationFunction struct { Language string `graphql-function-arg:"language" graphql-function-type:"String!"` Long *bool `graphql-function-arg:"long" graphql-function-type:"Boolean"` // Result captures the query response part of this function. Result string `graphql:"inline"` }
explanation(language:String!,long:Boolean):String!
func (*ResultExplanationFunction) UnmarshalJSON ¶
func (f *ResultExplanationFunction) UnmarshalJSON(data []byte) error
type ResultInput ¶
type ResultInput map[string]interface{}
ResultInput is an INPUT_OBJECT. comment for ResultInput
func (ResultInput) MarshalJSON ¶ added in v0.3.0
func (i ResultInput) MarshalJSON() ([]byte, error)