social

package
Version: v0.0.0-...-ba60edf Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: BSD-2-Clause Imports: 6 Imported by: 0

README

Social App

A simple example of how to use struct fields as resolvers instead of methods.

To run this server

go run ./example/field-resolvers/server/server.go

and go to localhost:9011 to interact

Documentation

Index

Constants

View Source
const Schema = `` /* 583-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct{}

func (*Resolver) Admin

func (r *Resolver) Admin(ctx context.Context, args struct {
	ID   string
	Role string
}) (*adminResolver, error)

func (*Resolver) Search

func (r *Resolver) Search(ctx context.Context, args struct{ Text string }) ([]*searchResult, error)

func (*Resolver) User

func (r *Resolver) User(ctx context.Context, args struct{ Id string }) (user, error)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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