Documentation ¶
Index ¶
- func NewExecutableSchema(cfg Config) graphql.ExecutableSchema
- type ComplexityRoot
- type Config
- type DatumResolver
- type DirectiveRoot
- type FilterStepArgsResolver
- type MessageStepArgsResolver
- type MutationResolver
- type ParticipantResolver
- type ParticipationResolver
- type ProjectResolver
- type ProviderIDResolver
- type QueryResolver
- type ResolverRoot
- type RunResolver
- type StepResolver
- type StepRunResolver
- type SubscriptionResolver
- type TemplateResolver
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 { Admin struct { CreatedAt func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int UpdatedAt func(childComplexity int) int Username func(childComplexity int) int } AuthResp struct { Token func(childComplexity int) int } CompValue struct { Boolean func(childComplexity int) int Float func(childComplexity int) int Int func(childComplexity int) int String func(childComplexity int) int } Condition struct { And func(childComplexity int) int Comparator func(childComplexity int) int Key func(childComplexity int) int Or func(childComplexity int) int Values func(childComplexity int) int } Datum struct { CreatedAt func(childComplexity int) int Current func(childComplexity int) int DeletedAt func(childComplexity int) int ID func(childComplexity int) int Index func(childComplexity int) int Key func(childComplexity int) int UpdatedAt func(childComplexity int) int Val func(childComplexity int) int Versions func(childComplexity int) int } FilterStepArgs struct { Condition func(childComplexity int) int Filter func(childComplexity int) int Js func(childComplexity int) int Type func(childComplexity int) int } HITStepArgs struct { Description func(childComplexity int) int Duration func(childComplexity int) int Keywords func(childComplexity int) int Microbatch func(childComplexity int) int Reward func(childComplexity int) int Timeout func(childComplexity int) int Title func(childComplexity int) int WorkersCount func(childComplexity int) int } InternalCriteria struct { All func(childComplexity int) int Condition func(childComplexity int) int } MTurkCriteria struct { Qualifications func(childComplexity int) int } MTurkLocale struct { Country func(childComplexity int) int Subdivision func(childComplexity int) int } MTurkQualificationCriteria struct { Comparator func(childComplexity int) int ID func(childComplexity int) int Locales func(childComplexity int) int Values func(childComplexity int) int } MTurkQulificationType struct { Description func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Type func(childComplexity int) int } MessageStepArgs struct { Lobby func(childComplexity int) int LobbyExpiration func(childComplexity int) int LobbyType func(childComplexity int) int Message func(childComplexity int) int MessageType func(childComplexity int) int Subject func(childComplexity int) int URL func(childComplexity int) int } Mutation struct { AddParticipants func(childComplexity int, input *model.AddParticipantsInput) int Auth func(childComplexity int, input *model.AuthInput) int CancelRun func(childComplexity int, input *model.CancelRunInput) int CreateProject func(childComplexity int, input *model.CreateProjectInput) int CreateRun func(childComplexity int, input *model.CreateRunInput) int CreateTemplate func(childComplexity int, input *model.CreateTemplateInput) int DeleteDatum func(childComplexity int, input *model.DeleteDatumInput) int DuplicateRun func(childComplexity int, input *model.DuplicateRunInput) int ScheduleRun func(childComplexity int, input *model.ScheduleRunInput) int StartRun func(childComplexity int, input *model.StartRunInput) int UnscheduleRun func(childComplexity int, input *model.UnscheduleRunInput) int UpdateDatum func(childComplexity int, input *model.UpdateDatumInput) int UpdateRun func(childComplexity int, input *model.UpdateRunInput) int UpdateTemplate func(childComplexity int, input *model.UpdateTemplateInput) int } Page struct { Content func(childComplexity int) int ContentType func(childComplexity int) int Props func(childComplexity int) int Redirect func(childComplexity int) int } Participant struct { CreatedAt func(childComplexity int) int CreatedBy func(childComplexity int) int Data func(childComplexity int, keys []string, deleted *bool) int ID func(childComplexity int) int MturkWorkerID func(childComplexity int) int ProviderIDs func(childComplexity int) int Steps func(childComplexity int) int UpdatedAt func(childComplexity int) int } Participation struct { MturkAcceptedAt func(childComplexity int) int MturkAssignmentID func(childComplexity int) int MturkHitID func(childComplexity int) int MturkSubmittedAt func(childComplexity int) int MturkWorkerID func(childComplexity int) int Participant func(childComplexity int) int Step func(childComplexity int) int } Project struct { CreatedAt func(childComplexity int) int Creator func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Participants func(childComplexity int) int ProjectID func(childComplexity int) int Runs func(childComplexity int, runID *string, statuses []model.Status, limit *int) int Templates func(childComplexity int) int UpdatedAt func(childComplexity int) int } ProviderID struct { CreatedAt func(childComplexity int) int Provider func(childComplexity int) int ProviderID func(childComplexity int) int } Query struct { Me func(childComplexity int) int MturkLocales func(childComplexity int, sandbox *bool) int MturkQualificationTypes func(childComplexity int, sandbox *bool) int Page func(childComplexity int, token string, participantID string) int ParticipantCount func(childComplexity int) int Participants func(childComplexity int, first *int, after *string) int Project func(childComplexity int, id *string, projectID *string) int Projects func(childComplexity int) int } Run struct { CreatedAt func(childComplexity int) int Creator func(childComplexity int) int CurrentStep func(childComplexity int) int EndedAt func(childComplexity int) int Error func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int StartAt func(childComplexity int) int StartedAt func(childComplexity int) int Status func(childComplexity int) int Steps func(childComplexity int) int Template func(childComplexity int) int UpdatedAt func(childComplexity int) int } Step struct { CreatedAt func(childComplexity int) int Creator func(childComplexity int) int Duration func(childComplexity int) int FilterArgs func(childComplexity int) int HitArgs func(childComplexity int) int ID func(childComplexity int) int Index func(childComplexity int) int MsgArgs func(childComplexity int) int Type func(childComplexity int) int UpdatedAt func(childComplexity int) int } StepRun struct { CreatedAt func(childComplexity int) int Creator func(childComplexity int) int EndedAt func(childComplexity int) int ID func(childComplexity int) int Index func(childComplexity int) int Participants func(childComplexity int) int ParticipantsCount func(childComplexity int) int Participations func(childComplexity int, first *int, after *string) int StartedAt func(childComplexity int) int Status func(childComplexity int) int Step func(childComplexity int) int UpdatedAt func(childComplexity int) int } Subscription struct { Me func(childComplexity int) int } Template struct { Adult func(childComplexity int) int CreatedAt func(childComplexity int) int Creator func(childComplexity int) int ID func(childComplexity int) int InternalCriteria func(childComplexity int) int MturkCriteria func(childComplexity int) int Name func(childComplexity int) int ParticipantCount func(childComplexity int) int Sandbox func(childComplexity int) int SelectionType func(childComplexity int) int Steps func(childComplexity int) int UpdatedAt func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DatumResolver ¶
type DirectiveRoot ¶
type FilterStepArgsResolver ¶
type FilterStepArgsResolver interface {
Type(ctx context.Context, obj *model.FilterStepArgs) (*model.ParticipantFilterType, error)
}
type MessageStepArgsResolver ¶
type MessageStepArgsResolver interface { MessageType(ctx context.Context, obj *model.MessageStepArgs) (model.ContentType, error) LobbyType(ctx context.Context, obj *model.MessageStepArgs) (*model.ContentType, error) }
type MutationResolver ¶
type MutationResolver interface { UpdateDatum(ctx context.Context, input *model.UpdateDatumInput) (*ent.Datum, error) DeleteDatum(ctx context.Context, input *model.DeleteDatumInput) ([]*ent.Datum, error) Auth(ctx context.Context, input *model.AuthInput) (*model.AuthResp, error) CreateProject(ctx context.Context, input *model.CreateProjectInput) (*ent.Project, error) CreateTemplate(ctx context.Context, input *model.CreateTemplateInput) (*ent.Template, error) UpdateTemplate(ctx context.Context, input *model.UpdateTemplateInput) (*ent.Template, error) DuplicateRun(ctx context.Context, input *model.DuplicateRunInput) (*ent.Run, error) CreateRun(ctx context.Context, input *model.CreateRunInput) (*ent.Run, error) UpdateRun(ctx context.Context, input *model.UpdateRunInput) (*ent.Run, error) ScheduleRun(ctx context.Context, input *model.ScheduleRunInput) (*ent.Run, error) UnscheduleRun(ctx context.Context, input *model.UnscheduleRunInput) (*ent.Run, error) StartRun(ctx context.Context, input *model.StartRunInput) (*ent.Run, error) CancelRun(ctx context.Context, input *model.CancelRunInput) (*ent.Run, error) AddParticipants(ctx context.Context, input *model.AddParticipantsInput) ([]*ent.Participant, error) }
type ParticipantResolver ¶
type ParticipantResolver interface { CreatedBy(ctx context.Context, obj *ent.Participant) (*ent.StepRun, error) Steps(ctx context.Context, obj *ent.Participant) ([]*ent.StepRun, error) ProviderIDs(ctx context.Context, obj *ent.Participant) ([]*ent.ProviderID, error) Data(ctx context.Context, obj *ent.Participant, keys []string, deleted *bool) ([]*ent.Datum, error) }
type ParticipationResolver ¶
type ParticipationResolver interface { Step(ctx context.Context, obj *ent.Participation) (*ent.StepRun, error) Participant(ctx context.Context, obj *ent.Participation) (*ent.Participant, error) }
type ProjectResolver ¶
type ProjectResolver interface { Creator(ctx context.Context, obj *ent.Project) (*ent.Admin, error) Templates(ctx context.Context, obj *ent.Project) ([]*ent.Template, error) Runs(ctx context.Context, obj *ent.Project, runID *string, statuses []model.Status, limit *int) ([]*ent.Run, error) Participants(ctx context.Context, obj *ent.Project) ([]*ent.Participant, error) }
type ProviderIDResolver ¶
type QueryResolver ¶
type QueryResolver interface { Projects(ctx context.Context) ([]*ent.Project, error) Project(ctx context.Context, id *string, projectID *string) (*ent.Project, error) Participants(ctx context.Context, first *int, after *string) ([]*ent.Participant, error) ParticipantCount(ctx context.Context) (*int, error) Me(ctx context.Context) (model.User, error) Page(ctx context.Context, token string, participantID string) (*model.Page, error) MturkQualificationTypes(ctx context.Context, sandbox *bool) ([]*model.MTurkQulificationType, error) MturkLocales(ctx context.Context, sandbox *bool) ([]*model.MTurkLocale, error) }
type ResolverRoot ¶
type ResolverRoot interface { Datum() DatumResolver FilterStepArgs() FilterStepArgsResolver MessageStepArgs() MessageStepArgsResolver Mutation() MutationResolver Participant() ParticipantResolver Participation() ParticipationResolver Project() ProjectResolver ProviderID() ProviderIDResolver Query() QueryResolver Run() RunResolver Step() StepResolver StepRun() StepRunResolver Subscription() SubscriptionResolver Template() TemplateResolver }
type RunResolver ¶
type RunResolver interface { Creator(ctx context.Context, obj *ent.Run) (*ent.Admin, error) Template(ctx context.Context, obj *ent.Run) (*ent.Template, error) Status(ctx context.Context, obj *ent.Run) (model.Status, error) Steps(ctx context.Context, obj *ent.Run) ([]*ent.StepRun, error) CurrentStep(ctx context.Context, obj *ent.Run) (*ent.StepRun, error) }
type StepResolver ¶
type StepRunResolver ¶
type StepRunResolver interface { Creator(ctx context.Context, obj *ent.StepRun) (*ent.Admin, error) Step(ctx context.Context, obj *ent.StepRun) (*ent.Step, error) Status(ctx context.Context, obj *ent.StepRun) (model.Status, error) Participations(ctx context.Context, obj *ent.StepRun, first *int, after *string) ([]*ent.Participation, error) Participants(ctx context.Context, obj *ent.StepRun) ([]*ent.Participant, error) ParticipantsCount(ctx context.Context, obj *ent.StepRun) (int, error) }
type SubscriptionResolver ¶
Click to show internal directories.
Click to hide internal directories.