graphql

package
v0.0.0-...-82f818e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateUserModel = gql.FieldConfigArgument{
	"name": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"surname": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"username": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"email": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"password": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
}

CreateUserModel args graphql create user query

View Source
var FindUserByIDModel = gql.FieldConfigArgument{
	"id": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
}

FindUserByIDModel args graphql

View Source
var FindUserByUsernameModel = gql.FieldConfigArgument{
	"username": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
}

FindUserByUsernameModel args graphql

View Source
var UpdateUserModel = gql.FieldConfigArgument{
	"userID": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"name": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"surname": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"fullName": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"username": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"email": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.String),
	},
	"verified": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.Boolean),
	},
	"active": &gql.ArgumentConfig{
		Type: gql.NewNonNull(gql.Boolean),
	},
}

UpdateUserModel args graphql update user query

View Source
var UserOutputModel = gql.NewObject(gql.ObjectConfig{
	Name: "User",
	Fields: gql.Fields{
		"_id": &gql.Field{
			Type: gql.String,
		},
		"name": &gql.Field{
			Type: gql.String,
		},
		"surname": &gql.Field{
			Type: gql.String,
		},
		"fullName": &gql.Field{
			Type: gql.String,
		},
		"username": &gql.Field{
			Type: gql.String,
		},
		"email": &gql.Field{
			Type: gql.String,
		},
		"verified": &gql.Field{
			Type: gql.Boolean,
		},
		"active": &gql.Field{
			Type: gql.Boolean,
		},
		"created": &gql.Field{
			Type: gql.Int,
		},
	},
})

UserOutputModel _

Functions

func CreateRootMutators

func CreateRootMutators(fields gql.Fields) *gql.Object

func CreateRootQueries

func CreateRootQueries(fields gql.Fields) *gql.Object

func New

func New(graphql_config GraphqlConfig, graphql_schema_conf gql.SchemaConfig) (*gqlhandler.Handler, *gql.Schema)

Types

type GraphqlConfig

type GraphqlConfig struct {
	Playground bool
	GraphiQL   bool
	Pretty     bool
}

Jump to

Keyboard shortcuts

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