Documentation ¶
Index ¶
- Variables
- func ActionFunc(schema *proto.Schema, action *proto.Action) func(p graphql.ResolveParams) (interface{}, error)
- func NewGraphQLSchema(proto *proto.Schema, api *proto.Api) (*graphql.Schema, error)
- func NewHandler(s *proto.Schema, api *proto.Api) common.ApiHandlerFunc
- func ToGraphQLSchemaLanguage(response common.Response) string
- type GraphQLRequest
- type IntrospectionQueryResult
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BuiltInScalars = []string{
"Int",
"Float",
"String",
"Boolean",
"ID",
}
)
Functions ¶
func ActionFunc ¶
func NewGraphQLSchema ¶
NewGraphQLSchema creates a map of graphql.Schema objects where the keys are the API names from the provided proto.Schema
func NewHandler ¶
func ToGraphQLSchemaLanguage ¶
ToGraphQLSchemaLanguage converts the result of an introspection query into a GraphQL schema string Note: this implementation is not complete and only covers cases that are relevant to us, for example directives are not handled
Types ¶
type GraphQLRequest ¶
type IntrospectionQueryResult ¶
type IntrospectionQueryResult struct { Schema struct { MutationType struct { Name string `json:"name"` } `json:"mutationType"` QueryType struct { Name string `json:"name"` } `json:"queryType"` Types []struct { EnumValues []struct { Name string } `json:"enumValues"` Fields []introspectionField `json:"fields"` InputFields []introspectionField `json:"inputFields"` Interfaces interface{} `json:"interfaces"` Kind string `json:"kind"` Name string `json:"name"` PossibleTypes interface{} `json:"possibleTypes"` } `json:"types"` } `json:"__schema"` }
Represents the result of executing github.com/teamkeel/graphql/testutil.IntrospectionQuery
Click to show internal directories.
Click to hide internal directories.