generated

package
v0.0.0-...-70fadbe Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: GPL-3.0 Imports: 11 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 {
	Editor struct {
		CreatedAt   func(childComplexity int) int
		ID          func(childComplexity int) int
		ShowCounter func(childComplexity int) int
		ShowPrompt  func(childComplexity int) int
		ShowToolbar func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		User        func(childComplexity int) int
	}

	Entry struct {
		Content   func(childComplexity int) int
		CreatedAt func(childComplexity int) int
		GoalHit   func(childComplexity int) int
		ID        func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		User      func(childComplexity int) int
		WordCount func(childComplexity int) int
	}

	Mutation struct {
		CancelSubscription func(childComplexity int, id string) int
		CompleteUserSignup func(childComplexity int, input models.SignedUpUser) int
		CreateEditor       func(childComplexity int, input models.NewEditor) int
		CreateEntry        func(childComplexity int, input models.NewEntry) int
		CreateSubscription func(childComplexity int, input models.NewSubscription) int
		CreateUser         func(childComplexity int, input models.NewUser) int
		DeleteEntry        func(childComplexity int, id string) int
		UpdateEntry        func(childComplexity int, id string, input models.ExistingEntry, date string) int
		UpdateUser         func(childComplexity int, input models.UpdatedUser) int
	}

	Plan struct {
		ID       func(childComplexity int) int
		Nickname func(childComplexity int) int
		Product  func(childComplexity int) int
	}

	PreferredWritingTime struct {
		Count func(childComplexity int) int
		Hour  func(childComplexity int) int
	}

	Query struct {
		DailyEntry       func(childComplexity int, userID string, date string) int
		Editors          func(childComplexity int, id *string) int
		Entries          func(childComplexity int, id *string) int
		EntriesByUserID  func(childComplexity int, userID string, startDate *string, endDate *string) int
		Stats            func(childComplexity int, global bool) int
		User             func(childComplexity int, id *string) int
		UserByFirebaseID func(childComplexity int, firebaseID *string) int
		WordGoal         func(childComplexity int, userID string, date string) int
	}

	Stats struct {
		LongestEntry          func(childComplexity int) int
		LongestStreak         func(childComplexity int) int
		PreferredDayOfWeek    func(childComplexity int) int
		PreferredWritingTimes func(childComplexity int) int
		WordsWritten          func(childComplexity int) int
	}

	Streak struct {
		CreatedAt   func(childComplexity int) int
		DayCount    func(childComplexity int) int
		ID          func(childComplexity int) int
		LastEntryID func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		User        func(childComplexity int) int
	}

	StripeSubscription struct {
		CancelAt         func(childComplexity int) int
		CurrentPeriodEnd func(childComplexity int) int
		ID               func(childComplexity int) int
		Plan             func(childComplexity int) int
		Status           func(childComplexity int) int
		TrialEnd         func(childComplexity int) int
	}

	User struct {
		CreatedAt          func(childComplexity int) int
		Email              func(childComplexity int) int
		FirebaseID         func(childComplexity int) int
		FirstName          func(childComplexity int) int
		ID                 func(childComplexity int) int
		LastName           func(childComplexity int) int
		StripeID           func(childComplexity int) int
		StripeSubscription func(childComplexity int) int
		UpdatedAt          func(childComplexity int) int
		WordGoal           func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EditorResolver

type EditorResolver interface {
	User(ctx context.Context, obj *models.Editor) (*models.User, error)
}

type EntryResolver

type EntryResolver interface {
	User(ctx context.Context, obj *models.Entry) (*models.User, error)
}

type MutationResolver

type MutationResolver interface {
	CreateUser(ctx context.Context, input models.NewUser) (*models.User, error)
	UpdateUser(ctx context.Context, input models.UpdatedUser) (*models.User, error)
	CompleteUserSignup(ctx context.Context, input models.SignedUpUser) (*models.User, error)
	CreateEntry(ctx context.Context, input models.NewEntry) (*models.Entry, error)
	UpdateEntry(ctx context.Context, id string, input models.ExistingEntry, date string) (*models.Entry, error)
	DeleteEntry(ctx context.Context, id string) (*models.Entry, error)
	CreateEditor(ctx context.Context, input models.NewEditor) (*models.Editor, error)
	CreateSubscription(ctx context.Context, input models.NewSubscription) (*models.StripeSubscription, error)
	CancelSubscription(ctx context.Context, id string) (string, error)
}

type QueryResolver

type QueryResolver interface {
	User(ctx context.Context, id *string) (*models.User, error)
	UserByFirebaseID(ctx context.Context, firebaseID *string) (*models.User, error)
	Editors(ctx context.Context, id *string) ([]*models.Editor, error)
	Entries(ctx context.Context, id *string) ([]*models.Entry, error)
	EntriesByUserID(ctx context.Context, userID string, startDate *string, endDate *string) ([]*models.Entry, error)
	DailyEntry(ctx context.Context, userID string, date string) (*models.Entry, error)
	Stats(ctx context.Context, global bool) (*models.Stats, error)
	WordGoal(ctx context.Context, userID string, date string) (int, error)
}

type ResolverRoot

type ResolverRoot interface {
	Editor() EditorResolver
	Entry() EntryResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Streak() StreakResolver
	StripeSubscription() StripeSubscriptionResolver
	User() UserResolver
}

type StreakResolver

type StreakResolver interface {
	User(ctx context.Context, obj *models.Streak) (*models.User, error)
}

type StripeSubscriptionResolver

type StripeSubscriptionResolver interface {
	Status(ctx context.Context, obj *models.StripeSubscription) (string, error)
	Plan(ctx context.Context, obj *models.StripeSubscription) (*models.Plan, error)
}

type UserResolver

type UserResolver interface {
	StripeSubscription(ctx context.Context, obj *models.User) (*models.StripeSubscription, error)
}

Jump to

Keyboard shortcuts

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