Documentation
¶
Overview ¶
Where all the magic happens
Index ¶
- func ConstructObjectFromPArgs(modelType reflect.Type, p *graphql.ResolveParams) *interface{}
- func FieldConfigArgs(model interface{}) *graphql.FieldConfigArgument
- func GenerateGraphQLSchema(db *database.Database, models ...interface{}) (graphql.Schema, error)
- func GetGraphQLObjType(model interface{}) *graphql.Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructObjectFromPArgs ¶
func ConstructObjectFromPArgs(modelType reflect.Type, p *graphql.ResolveParams) *interface{}
Reads out the GraphQL arguments and writes them into a new object. Consider this as a kind of deserialization.
func FieldConfigArgs ¶
func FieldConfigArgs(model interface{}) *graphql.FieldConfigArgument
func GenerateGraphQLSchema ¶
func GetGraphQLObjType ¶
Generates a GraphQL object based on a model. Uses a cache to speed up subsequent calls and make sure there are no duplicates. The cache is very important because otherwise GraphQL will spit out weird errors as it expects every type to only exist once and gets easily confused.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.