comments

package
v0.0.0-...-4b43d43 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCommentQuery

func CreateCommentQuery(db *sql.DB, commentType *graphql.Object) *graphql.Field

func CreateCommentsQuery

func CreateCommentsQuery(db *sql.DB, commentType *graphql.Object) *graphql.Field

func CreateType

func CreateType() *graphql.Object

Types

type Comment

type Comment struct {
	ID     int    `json:"id"`
	Author string `json:"author"`
	Body   string `json:"body"`
	PostID int    `json:"postId"`
}

func FetchCommentByID

func FetchCommentByID(db *sql.DB, id int) (*Comment, error)

func FetchComments

func FetchComments(db *sql.DB) ([]*Comment, error)

func FetchCommentsByPostID

func FetchCommentsByPostID(db *sql.DB, postId int) ([]*Comment, error)

Jump to

Keyboard shortcuts

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