generated

package
v0.0.0-...-ed3c475 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	CanJoinDiscussionResponse struct {
		Reason     func(childComplexity int) int
		ReasonCode func(childComplexity int) int
		Response   func(childComplexity int) int
	}

	Discussion struct {
		AccessRequests          func(childComplexity int) int
		AnonymityType           func(childComplexity int) int
		Archive                 func(childComplexity int) int
		CreatedAt               func(childComplexity int) int
		Description             func(childComplexity int) int
		DescriptionHistory      func(childComplexity int) int
		DiscussionAccessLink    func(childComplexity int) int
		DiscussionJoinability   func(childComplexity int) int
		ID                      func(childComplexity int) int
		IconURL                 func(childComplexity int) int
		LockStatus              func(childComplexity int) int
		MeAvailableParticipants func(childComplexity int) int
		MeCanJoinDiscussion     func(childComplexity int) int
		MeDiscussionStatus      func(childComplexity int) int
		MeNotificationSettings  func(childComplexity int) int
		MeParticipant           func(childComplexity int) int
		MeViewer                func(childComplexity int) int
		Moderator               func(childComplexity int) int
		Participants            func(childComplexity int) int
		Posts                   func(childComplexity int) int
		PostsConnection         func(childComplexity int, after *string) int
		SecondsUntilShuffle     func(childComplexity int) int
		ShuffleCount            func(childComplexity int) int
		Title                   func(childComplexity int) int
		TitleHistory            func(childComplexity int) int
		UpdatedAt               func(childComplexity int) int
	}

	DiscussionAccessLink struct {
		CreatedAt  func(childComplexity int) int
		Discussion func(childComplexity int) int
		IsDeleted  func(childComplexity int) int
		LinkSlug   func(childComplexity int) int
		URL        func(childComplexity int) int
		UpdatedAt  func(childComplexity int) int
	}

	DiscussionAccessRequest struct {
		CreatedAt   func(childComplexity int) int
		Discussion  func(childComplexity int) int
		ID          func(childComplexity int) int
		IsDeleted   func(childComplexity int) int
		Status      func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		UserProfile func(childComplexity int) int
	}

	DiscussionArchive struct {
		Archive   func(childComplexity int) int
		CreatedAt func(childComplexity int) int
	}

	DiscussionSubscriptionEvent struct {
		Entity    func(childComplexity int) int
		EventType func(childComplexity int) int
	}

	DiscussionUserAccess struct {
		CreatedAt  func(childComplexity int) int
		Discussion func(childComplexity int) int
		IsDeleted  func(childComplexity int) int
		Request    func(childComplexity int) int
		State      func(childComplexity int) int
		UpdatedAt  func(childComplexity int) int
		User       func(childComplexity int) int
	}

	HistoricalString struct {
		CreatedAt func(childComplexity int) int
		Value     func(childComplexity int) int
	}

	Media struct {
		AssetLocation     func(childComplexity int) int
		CreatedAt         func(childComplexity int) int
		DeletedReasonCode func(childComplexity int) int
		ID                func(childComplexity int) int
		IsDeleted         func(childComplexity int) int
		MediaSize         func(childComplexity int) int
		MediaType         func(childComplexity int) int
	}

	MediaSize struct {
		Height func(childComplexity int) int
		SizeKb func(childComplexity int) int
		Width  func(childComplexity int) int
	}

	Moderator struct {
		Discussion  func(childComplexity int) int
		ID          func(childComplexity int) int
		UserProfile func(childComplexity int) int
	}

	Mutation struct {
		AddDiscussionParticipant     func(childComplexity int, discussionID string, userID string, discussionParticipantInput model.AddDiscussionParticipantInput) int
		AddPost                      func(childComplexity int, discussionID string, participantID string, postContent model.PostContentInput) int
		BanParticipant               func(childComplexity int, discussionID string, participantID string) int
		CreateDiscussion             func(childComplexity int, anonymityType model.AnonymityType, title string, description *string, publicAccess *bool, discussionSettings model.DiscussionCreationSettings) int
		DeletePost                   func(childComplexity int, discussionID string, postID string) int
		MuteParticipants             func(childComplexity int, discussionID string, participantIDs []string, mutedForSeconds int) int
		RequestAccessToDiscussion    func(childComplexity int, discussionID string) int
		RespondToRequestAccess       func(childComplexity int, requestID string, response model.InviteRequestStatus) int
		SetLastPostViewed            func(childComplexity int, viewerID string, postID string) int
		ShuffleDiscussion            func(childComplexity int, discussionID string, inFutureSeconds *int) int
		UnmuteParticipants           func(childComplexity int, discussionID string, participantIDs []string) int
		UpdateDiscussion             func(childComplexity int, discussionID string, input model.DiscussionInput) int
		UpdateDiscussionUserSettings func(childComplexity int, discussionID string, settings model.DiscussionUserSettings) int
		UpdateParticipant            func(childComplexity int, discussionID string, participantID string, updateInput model.UpdateParticipantInput) int
		UpsertUserDevice             func(childComplexity int, userID *string, platform model.Platform, deviceID string, token *string) int
	}

	PageInfo struct {
		EndCursor   func(childComplexity int) int
		HasNextPage func(childComplexity int) int
		StartCursor func(childComplexity int) int
	}

	Participant struct {
		AnonDisplayName func(childComplexity int) int
		Discussion      func(childComplexity int) int
		GradientColor   func(childComplexity int) int
		HasJoined       func(childComplexity int) int
		ID              func(childComplexity int) int
		Inviter         func(childComplexity int) int
		IsAnonymous     func(childComplexity int) int
		IsBanned        func(childComplexity int) int
		MutedForSeconds func(childComplexity int) int
		ParticipantID   func(childComplexity int) int
		Posts           func(childComplexity int) int
		UserProfile     func(childComplexity int) int
		Viewer          func(childComplexity int) int
	}

	ParticipantProfile struct {
		GradientColor func(childComplexity int) int
		IsAnonymous   func(childComplexity int) int
	}

	ParticipantsConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	ParticipantsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Post struct {
		Content           func(childComplexity int) int
		CreatedAt         func(childComplexity int) int
		DeletedReasonCode func(childComplexity int) int
		Discussion        func(childComplexity int) int
		ID                func(childComplexity int) int
		IsDeleted         func(childComplexity int) int
		Media             func(childComplexity int) int
		MentionedEntities func(childComplexity int) int
		Participant       func(childComplexity int) int
		PostType          func(childComplexity int) int
		QuotedPost        func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
	}

	PostsConnection struct {
		Edges    func(childComplexity int) int
		PageInfo func(childComplexity int) int
	}

	PostsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Query struct {
		Discussion           func(childComplexity int, id string) int
		DiscussionByLinkSlug func(childComplexity int, slug string) int
		ListDiscussions      func(childComplexity int, state model.DiscussionUserAccessState) int
		Me                   func(childComplexity int) int
		User                 func(childComplexity int, id string) int
	}

	Subscription struct {
		OnDiscussionEvent func(childComplexity int, discussionID string) int
		PostAdded         func(childComplexity int, discussionID string) int
	}

	URL struct {
		DisplayText func(childComplexity int) int
		URL         func(childComplexity int) int
	}

	UnknownEntity struct {
		ID func(childComplexity int) int
	}

	User struct {
		Devices                      func(childComplexity int) int
		Discussions                  func(childComplexity int, state model.DiscussionUserAccessState) int
		ID                           func(childComplexity int) int
		ModeratedDiscussions         func(childComplexity int) int
		Participants                 func(childComplexity int) int
		Profile                      func(childComplexity int) int
		SentDiscussionAccessRequests func(childComplexity int) int
		Viewers                      func(childComplexity int) int
	}

	UserDevice struct {
		ID       func(childComplexity int) int
		LastSeen func(childComplexity int) int
		Platform func(childComplexity int) int
		User     func(childComplexity int) int
	}

	UserProfile struct {
		AuthenticatedWithTwitter func(childComplexity int) int
		DisplayName              func(childComplexity int) int
		ID                       func(childComplexity int) int
		ProfileImageURL          func(childComplexity int) int
		TwitterURL               func(childComplexity int) int
	}

	Viewer struct {
		Discussion     func(childComplexity int) int
		ID             func(childComplexity int) int
		LastViewed     func(childComplexity int) int
		LastViewedPost func(childComplexity int) int
	}

	ViewersConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	ViewersEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type DiscussionAccessLinkResolver

type DiscussionAccessLinkResolver interface {
	Discussion(ctx context.Context, obj *model.DiscussionAccessLink) (*model.Discussion, error)

	URL(ctx context.Context, obj *model.DiscussionAccessLink) (string, error)

	IsDeleted(ctx context.Context, obj *model.DiscussionAccessLink) (bool, error)
}

type DiscussionAccessRequestResolver

type DiscussionAccessRequestResolver interface {
	UserProfile(ctx context.Context, obj *model.DiscussionAccessRequest) (*model.UserProfile, error)
	Discussion(ctx context.Context, obj *model.DiscussionAccessRequest) (*model.Discussion, error)
}

type DiscussionArchiveResolver

type DiscussionArchiveResolver interface {
	Archive(ctx context.Context, obj *model.DiscussionArchive) (string, error)
}

type DiscussionResolver

type DiscussionResolver interface {
	Moderator(ctx context.Context, obj *model.Discussion) (*model.Moderator, error)

	Posts(ctx context.Context, obj *model.Discussion) ([]*model.Post, error)
	PostsConnection(ctx context.Context, obj *model.Discussion, after *string) (*model.PostsConnection, error)

	Participants(ctx context.Context, obj *model.Discussion) ([]*model.Participant, error)

	TitleHistory(ctx context.Context, obj *model.Discussion) ([]*model.HistoricalString, error)
	DescriptionHistory(ctx context.Context, obj *model.Discussion) ([]*model.HistoricalString, error)
	CreatedAt(ctx context.Context, obj *model.Discussion) (string, error)
	UpdatedAt(ctx context.Context, obj *model.Discussion) (string, error)
	MeParticipant(ctx context.Context, obj *model.Discussion) (*model.Participant, error)
	MeAvailableParticipants(ctx context.Context, obj *model.Discussion) ([]*model.Participant, error)
	MeCanJoinDiscussion(ctx context.Context, obj *model.Discussion) (*model.CanJoinDiscussionResponse, error)
	MeViewer(ctx context.Context, obj *model.Discussion) (*model.Viewer, error)
	MeNotificationSettings(ctx context.Context, obj *model.Discussion) (*model.DiscussionUserNotificationSetting, error)
	MeDiscussionStatus(ctx context.Context, obj *model.Discussion) (*model.DiscussionUserAccessState, error)
	AccessRequests(ctx context.Context, obj *model.Discussion) ([]*model.DiscussionAccessRequest, error)
	DiscussionAccessLink(ctx context.Context, obj *model.Discussion) (*model.DiscussionAccessLink, error)
	DiscussionJoinability(ctx context.Context, obj *model.Discussion) (model.DiscussionJoinabilitySetting, error)

	SecondsUntilShuffle(ctx context.Context, obj *model.Discussion) (*int, error)

	Archive(ctx context.Context, obj *model.Discussion) (*model.DiscussionArchive, error)
}

type DiscussionUserAccessResolver

type DiscussionUserAccessResolver interface {
	Discussion(ctx context.Context, obj *model.DiscussionUserAccess) (*model.Discussion, error)
	User(ctx context.Context, obj *model.DiscussionUserAccess) (*model.User, error)

	IsDeleted(ctx context.Context, obj *model.DiscussionUserAccess) (bool, error)
	Request(ctx context.Context, obj *model.DiscussionUserAccess) (*model.DiscussionAccessRequest, error)
}

type ModeratorResolver

type ModeratorResolver interface {
	Discussion(ctx context.Context, obj *model.Moderator) (*model.Discussion, error)
	UserProfile(ctx context.Context, obj *model.Moderator) (*model.UserProfile, error)
}

type MutationResolver

type MutationResolver interface {
	AddDiscussionParticipant(ctx context.Context, discussionID string, userID string, discussionParticipantInput model.AddDiscussionParticipantInput) (*model.Participant, error)
	AddPost(ctx context.Context, discussionID string, participantID string, postContent model.PostContentInput) (*model.Post, error)
	CreateDiscussion(ctx context.Context, anonymityType model.AnonymityType, title string, description *string, publicAccess *bool, discussionSettings model.DiscussionCreationSettings) (*model.Discussion, error)
	UpdateParticipant(ctx context.Context, discussionID string, participantID string, updateInput model.UpdateParticipantInput) (*model.Participant, error)
	UpsertUserDevice(ctx context.Context, userID *string, platform model.Platform, deviceID string, token *string) (*model.UserDevice, error)
	UpdateDiscussion(ctx context.Context, discussionID string, input model.DiscussionInput) (*model.Discussion, error)
	UpdateDiscussionUserSettings(ctx context.Context, discussionID string, settings model.DiscussionUserSettings) (*model.DiscussionUserAccess, error)
	RequestAccessToDiscussion(ctx context.Context, discussionID string) (*model.DiscussionAccessRequest, error)
	RespondToRequestAccess(ctx context.Context, requestID string, response model.InviteRequestStatus) (*model.DiscussionAccessRequest, error)
	DeletePost(ctx context.Context, discussionID string, postID string) (*model.Post, error)
	BanParticipant(ctx context.Context, discussionID string, participantID string) (*model.Participant, error)
	ShuffleDiscussion(ctx context.Context, discussionID string, inFutureSeconds *int) (*model.Discussion, error)
	SetLastPostViewed(ctx context.Context, viewerID string, postID string) (*model.Viewer, error)
	MuteParticipants(ctx context.Context, discussionID string, participantIDs []string, mutedForSeconds int) ([]*model.Participant, error)
	UnmuteParticipants(ctx context.Context, discussionID string, participantIDs []string) ([]*model.Participant, error)
}

type ParticipantResolver

type ParticipantResolver interface {
	Discussion(ctx context.Context, obj *model.Participant) (*model.Discussion, error)
	Viewer(ctx context.Context, obj *model.Participant) (*model.Viewer, error)
	Posts(ctx context.Context, obj *model.Participant) ([]*model.Post, error)

	GradientColor(ctx context.Context, obj *model.Participant) (*model.GradientColor, error)
	Inviter(ctx context.Context, obj *model.Participant) (*model.Participant, error)

	UserProfile(ctx context.Context, obj *model.Participant) (*model.UserProfile, error)

	AnonDisplayName(ctx context.Context, obj *model.Participant) (*string, error)
	MutedForSeconds(ctx context.Context, obj *model.Participant) (*int, error)
}

type ParticipantsConnectionResolver

type ParticipantsConnectionResolver interface {
	Edges(ctx context.Context, obj *model.ParticipantsConnection) ([]*model.ParticipantsEdge, error)
}

type PostResolver

type PostResolver interface {
	IsDeleted(ctx context.Context, obj *model.Post) (bool, error)

	Content(ctx context.Context, obj *model.Post) (*string, error)
	Discussion(ctx context.Context, obj *model.Post) (*model.Discussion, error)
	Participant(ctx context.Context, obj *model.Post) (*model.Participant, error)
	CreatedAt(ctx context.Context, obj *model.Post) (string, error)
	UpdatedAt(ctx context.Context, obj *model.Post) (string, error)

	MentionedEntities(ctx context.Context, obj *model.Post) ([]model.Entity, error)
	Media(ctx context.Context, obj *model.Post) (*model.Media, error)
}

type QueryResolver

type QueryResolver interface {
	Discussion(ctx context.Context, id string) (*model.Discussion, error)
	DiscussionByLinkSlug(ctx context.Context, slug string) (*model.Discussion, error)
	ListDiscussions(ctx context.Context, state model.DiscussionUserAccessState) ([]*model.Discussion, error)
	User(ctx context.Context, id string) (*model.User, error)
	Me(ctx context.Context) (*model.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Discussion() DiscussionResolver
	DiscussionAccessLink() DiscussionAccessLinkResolver
	DiscussionAccessRequest() DiscussionAccessRequestResolver
	DiscussionArchive() DiscussionArchiveResolver
	DiscussionUserAccess() DiscussionUserAccessResolver
	Moderator() ModeratorResolver
	Mutation() MutationResolver
	Participant() ParticipantResolver
	ParticipantsConnection() ParticipantsConnectionResolver
	Post() PostResolver
	Query() QueryResolver
	Subscription() SubscriptionResolver
	User() UserResolver
	UserDevice() UserDeviceResolver
	UserProfile() UserProfileResolver
	Viewer() ViewerResolver
	ViewersConnection() ViewersConnectionResolver
}

type SubscriptionResolver

type SubscriptionResolver interface {
	PostAdded(ctx context.Context, discussionID string) (<-chan *model.Post, error)
	OnDiscussionEvent(ctx context.Context, discussionID string) (<-chan *model.DiscussionSubscriptionEvent, error)
}

type UserDeviceResolver

type UserDeviceResolver interface {
	Platform(ctx context.Context, obj *model.UserDevice) (model.Platform, error)
}

type UserProfileResolver

type UserProfileResolver interface {
	ProfileImageURL(ctx context.Context, obj *model.UserProfile) (string, error)
	AuthenticatedWithTwitter(ctx context.Context, obj *model.UserProfile) (bool, error)
}

type UserResolver

type UserResolver interface {
	Participants(ctx context.Context, obj *model.User) ([]*model.Participant, error)
	Viewers(ctx context.Context, obj *model.User) ([]*model.Viewer, error)
	Profile(ctx context.Context, obj *model.User) (*model.UserProfile, error)
	Devices(ctx context.Context, obj *model.User) ([]*model.UserDevice, error)
	ModeratedDiscussions(ctx context.Context, obj *model.User) ([]*model.Discussion, error)
	Discussions(ctx context.Context, obj *model.User, state model.DiscussionUserAccessState) ([]*model.Discussion, error)
	SentDiscussionAccessRequests(ctx context.Context, obj *model.User) ([]*model.DiscussionAccessRequest, error)
}

type ViewerResolver

type ViewerResolver interface {
	Discussion(ctx context.Context, obj *model.Viewer) (*model.Discussion, error)

	LastViewedPost(ctx context.Context, obj *model.Viewer) (*model.Post, error)
}

type ViewersConnectionResolver

type ViewersConnectionResolver interface {
	Edges(ctx context.Context, obj *model.ViewersConnection) ([]*model.ViewersEdge, error)
}

Jump to

Keyboard shortcuts

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