Documentation ¶
Index ¶
- Variables
- func AssertPermissions(ctx context.Context, verb string, subject interface{}, args interface{}, ...) ([]qm.QueryMod, error)
- func QueryModPagination(sinceID *graphql.ID, pageNum, pageSize *int32) []qm.QueryMod
- func QueryModSearch(input interface{}) []qm.QueryMod
- type Base64
- type Comment
- func (o Comment) Author() string
- func (o Comment) Body() string
- func (o Comment) CreatedAt() *graphql.Time
- func (o Comment) ID() graphql.ID
- func (o Comment) Notes() *string
- func (o Comment) Post() *Post
- func (o Comment) PostID() int32
- func (o Comment) RowID() string
- func (o Comment) UpdatedAt() *graphql.Time
- type CommentsCollection
- type Int64
- type Post
- func (o Post) Author() string
- func (o Post) Body() string
- func (o Post) Comments() *CommentsCollection
- func (o Post) CreatedAt() *graphql.Time
- func (o Post) ID() graphql.ID
- func (o Post) Notes() *string
- func (o Post) RowID() string
- func (o Post) Title() string
- func (o Post) UpdatedAt() *graphql.Time
- type PostsCollection
- type Resolver
- func (r *Resolver) CommentByID(ctx context.Context, args struct{ ... }) (Comment, error)
- func (r *Resolver) CreateComment(ctx context.Context, args struct{ ... }) (Comment, error)
- func (r *Resolver) CreatePost(ctx context.Context, args struct{ ... }) (Post, error)
- func (r *Resolver) DeleteCommentByID(ctx context.Context, args struct{ ... }) (Comment, error)
- func (r *Resolver) DeletePostByID(ctx context.Context, args struct{ ... }) (Post, error)
- func (r *Resolver) PostByID(ctx context.Context, args struct{ ... }) (Post, error)
- func (r *Resolver) SearchComments(ctx context.Context, args struct{ ... }) (CommentsCollection, error)
- func (r *Resolver) SearchPosts(ctx context.Context, args struct{ ... }) (PostsCollection, error)
- func (r *Resolver) UpdateCommentByID(ctx context.Context, args struct{ ... }) (Comment, error)
- func (r *Resolver) UpdatePostByID(ctx context.Context, args struct{ ... }) (Post, error)
- type Text
Constants ¶
This section is empty.
Variables ¶
var Schema string
Schema is the GraphQL schema
Functions ¶
func AssertPermissions ¶
func QueryModPagination ¶
QueryModPagination returns SQLBoiler QueryMods for pagination Supports limit-offset and keyset pagination techniques based on the arguments provided
Limit-offset is used to paginate arbitrary queries. Please note that there are performance and inconsistency implications when using this technique. Sample: `QueryModPagination(nil, 5, 25)` Retrieves page 5 (from 125 - 150), using default order
Keyset pagination is used to paginate ordered queries (by indexed column - ID) Typically used if performance and page result consistency is important. Sample: `QueryModPagination("123", nil, 25)` Retrieves all next 25 records *after* ID 123, ordered by ID
Note: If both sinceID and pageNum is provided, sinceID (keyset pagination) will be used. Reference: https://www.citusdata.com/blog/2016/03/30/five-ways-to-paginate/
func QueryModSearch ¶
QueryModSearch returns a list of search QueryMod based on the struct values
Types ¶
type Base64 ¶
type Base64 string
Base64 represents a custom GraphQL "Base64" scalar type Implements graphql.Unmarshaler
func (Base64) ImplementsGraphQLType ¶
ImplementsGraphQLType returns the GraphQL type name
func (Base64) MarshalJSON ¶
MarshalJSON implements JSON marshalling
func (*Base64) UnmarshalGraphQL ¶
UnmarshalGraphQL unmarshals the GraphQL type
type Comment ¶
type Comment struct {
// contains filtered or unexported fields
}
Comment is an object to back GraphQL type
func NewComment ¶
NewComment returns a new Comment instance
type CommentsCollection ¶
type CommentsCollection struct {
// contains filtered or unexported fields
}
CommentsCollection is the struct representing a collection of GraphQL types
func NewCommentsCollection ¶
func NewCommentsCollection(db boil.Executor, slice dbmodel.CommentSlice) CommentsCollection
NewCommentsCollection returns a new CommentsCollection instance
type Int64 ¶
type Int64 string
Int64 represents a custom GraphQL "Int64" scalar type Implements graphql.Unmarshaler
func (Int64) ImplementsGraphQLType ¶
ImplementsGraphQLType returns the GraphQL type name
func (Int64) MarshalJSON ¶
MarshalJSON implements JSON marshalling
func (*Int64) UnmarshalGraphQL ¶
UnmarshalGraphQL unmarshals the GraphQL type
type Post ¶
type Post struct {
// contains filtered or unexported fields
}
Post is an object to back GraphQL type
func (Post) Comments ¶
func (o Post) Comments() *CommentsCollection
Comments returns the list of Comments that has a foreign key pointing to Post
type PostsCollection ¶
type PostsCollection struct {
// contains filtered or unexported fields
}
PostsCollection is the struct representing a collection of GraphQL types
func NewPostsCollection ¶
func NewPostsCollection(db boil.Executor, slice dbmodel.PostSlice) PostsCollection
NewPostsCollection returns a new PostsCollection instance
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver is the root GraphQL resolver
func NewResolver ¶
NewResolver returns a new root GraphQL resolver
func (*Resolver) CommentByID ¶
CommentByID retrieves Comment by ID
func (*Resolver) CreateComment ¶
func (r *Resolver) CreateComment(ctx context.Context, args struct { Input createCommentInput }) (Comment, error)
CreateComment creates a Comment based on the provided input
func (*Resolver) CreatePost ¶
func (r *Resolver) CreatePost(ctx context.Context, args struct { Input createPostInput }) (Post, error)
CreatePost creates a Post based on the provided input
func (*Resolver) DeleteCommentByID ¶
func (r *Resolver) DeleteCommentByID(ctx context.Context, args struct { ID graphql.ID }) (Comment, error)
DeleteCommentByID deletes a Comment based on the provided ID
func (*Resolver) DeletePostByID ¶
DeletePostByID deletes a Post based on the provided ID
func (*Resolver) SearchComments ¶
func (r *Resolver) SearchComments(ctx context.Context, args struct { SinceID *graphql.ID PageNumber *int32 PageSize *int32 Input *searchCommentInput }) (CommentsCollection, error)
SearchComments retrieves Comments based on the provided search parameters
func (*Resolver) SearchPosts ¶
func (r *Resolver) SearchPosts(ctx context.Context, args struct { SinceID *graphql.ID PageNumber *int32 PageSize *int32 Input *searchPostInput }) (PostsCollection, error)
SearchPosts retrieves Posts based on the provided search parameters
type Text ¶
type Text string
Text represents a custom GraphQL "Text" scalar type Implements graphql.Unmarshaler
func (Text) ImplementsGraphQLType ¶
ImplementsGraphQLType returns the GraphQL type name
func (Text) MarshalJSON ¶
MarshalJSON implements JSON marshalling
func (*Text) UnmarshalGraphQL ¶
UnmarshalGraphQL unmarshals the GraphQL type