graphql

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractWhereClause

func ExtractWhereClause(args []*ast.Argument, store utils.M) (map[string]interface{}, error)

ExtractWhereClause return the where arg of graphql schema

func ParseValue

func ParseValue(value ast.Value, store utils.M) (interface{}, error)

ParseValue returns an interface that can be casted to string

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module is the object for the GraphQL module

func New

func New(a *auth.Module, c *crud.Module, f *functions.Module, s *schema.Schema) *Module

New creates a new GraphQL module

func (*Module) ExecGraphQLQuery

func (graph *Module) ExecGraphQLQuery(ctx context.Context, req *model.GraphQLRequest, token string, cb callback)

ExecGraphQLQuery executes the provided graphql query

func (*Module) GetDBAlias added in v0.15.0

func (graph *Module) GetDBAlias(field *ast.Field) (string, error)

GetDBAlias returns the dbType of the request

func (*Module) GetProjectID

func (graph *Module) GetProjectID() string

GetProjectID sets the project configuration

func (*Module) SetConfig

func (graph *Module) SetConfig(project string)

SetConfig sets the project configuration

Jump to

Keyboard shortcuts

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