Versions in this module Expand all Collapse all v2 v2.0.1 Jan 7, 2024 Changes in this version + const InvalidOperation + const InvalidSubscriptionLiveMessages + const MutationSendMessage + const QueryGetMessages + const SubscriptionLiveMessages + func ChatGraphQLEndpointHandler() http.Handler + func GraphQLRequestForOperation(operation string) ([]byte, error) + func LoadSchemaFromExamplesDirectoryWithinPkg() ([]byte, error) + func NewExecutableSchema(cfg Config) graphql.ExecutableSchema + type Chatroom struct + Messages []Message + Name string + Observers map[string]struct{ ... } + type ComplexityRoot struct + Chatroom struct{ ... } + Message struct{ ... } + Mutation struct{ ... } + Query struct{ ... } + Subscription struct{ ... } + type Config struct + Complexity ComplexityRoot + Directives DirectiveRoot + Resolvers ResolverRoot + func New() Config + type DirectiveIsRepeatableResolver struct + func (d DirectiveIsRepeatableResolver) IsRepeatable(ctx context.Context, obj *introspection.Directive) (bool, error) + func (r DirectiveIsRepeatableResolver) Mutation() MutationResolver + func (r DirectiveIsRepeatableResolver) Query() QueryResolver + func (r DirectiveIsRepeatableResolver) Subscription() SubscriptionResolver + type DirectiveRoot struct + User func(ctx context.Context, obj interface{}, next graphql.Resolver, username string) (res interface{}, err error) + type Message struct + CreatedAt time.Time + CreatedBy string + ID string + Text string + type MutationResolver interface + Post func(ctx context.Context, text string, username string, roomName string) (*Message, error) + type QueryResolver interface + Room func(ctx context.Context, name string) (*Chatroom, error) + type ResolverRoot interface + Mutation func() MutationResolver + Query func() QueryResolver + Subscription func() SubscriptionResolver + type SubscriptionResolver interface + MessageAdded func(ctx context.Context, roomName string) (<-chan *Message, error)