social

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: BSD-2-Clause Imports: 6 Imported by: 6 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Social App

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

To run this server:

go run ./example/social/server/server.go

and go to http://localhost:8080 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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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