Versions in this module Expand all Collapse all v0 v0.0.3 Apr 14, 2023 v0.0.2 Apr 13, 2023 v0.0.1 Apr 13, 2023 Changes in this version + const OrderDirectionEnum + const QueryType + const RelayCursor + const RelayNode + const RelayPageInfo + var AllTemplates = []*gen.Template + var CollectionTemplate = parseT("template/collection.tmpl") + var EdgeTemplate = parseT("template/edge.tmpl") + var EnumTemplate = parseT("template/enum.tmpl") + var ErrRelaySpecDisabled = errors.New("entgql: must enable relay specification via the WithRelaySpec option") + var MutationInputTemplate = parseT("template/mutation_input.tmpl").SkipIf(skipMutationTemplate) + var NodeDescriptorTemplate = parseT("template/node_descriptor.tmpl") + var NodeTemplate = parseT("template/node.tmpl") + var PaginationTemplate = parseT("template/pagination.tmpl") + var TemplateFuncs = template.FuncMap + var TransactionTemplate = parseT("template/transaction.tmpl") + var WhereTemplate = parseT("template/where_input.tmpl") + var WithWhereFilters = WithWhereInputs + func CursorsPredicate(after, before *Cursor[T], idField, field string, direction OrderDirection) []func(s *sql.Selector) + func ErrNodeNotFound(id interface{}) *gqlerror.Error + func MultiCursorsPredicate(after, before *Cursor[T], opts *MultiCursorsOptions) ([]func(s *sql.Selector), error) + func QueryField(name ...string) queryFieldAnnotation + type Annotation struct + Directives []Directive + Implements []string + Mapping []string + MultiOrder bool + MutationInputs []MutationConfig + OrderField string + QueryField *FieldConfig + RelayConnection bool + Skip SkipMode + Type string + Unbind bool + func Bind() Annotation + func Directives(directives ...Directive) Annotation + func Implements(interfaces ...string) Annotation + func MapsTo(names ...string) Annotation + func MultiOrder() Annotation + func Mutations(inputs ...MutationOption) Annotation + func OrderField(name string) Annotation + func RelayConnection() Annotation + func Skip(flags ...SkipMode) Annotation + func Type(name string) Annotation + func Unbind() Annotation + func (Annotation) Name() string + func (a *Annotation) Decode(annotation interface{}) error + func (a Annotation) Merge(other schema.Annotation) schema.Annotation + type Cursor struct + ID T + Value ent.Value + func (c *Cursor[T]) UnmarshalGQL(v interface{}) error + func (c Cursor[T]) MarshalGQL(w io.Writer) + type Directive struct + Arguments []*ast.Argument + Name string + func Deprecated(reason string) Directive + func NewDirective(name string, args ...*ast.Argument) Directive + type Extension struct + func NewExtension(opts ...ExtensionOption) (*Extension, error) + func (e *Extension) BuildSchema(g *gen.Graph) (s *ast.Schema, err error) + func (e *Extension) Hooks() []gen.Hook + func (e *Extension) Options() []entc.Option + func (e *Extension) Templates() []*gen.Template + type ExtensionOption func(*Extension) error + func WithConfigPath(path string, gqlgenOptions ...api.Option) ExtensionOption + func WithMapScalarFunc(scalarFunc func(*gen.Field, gen.Op) string) ExtensionOption + func WithNodeDescriptor(b bool) ExtensionOption + func WithOutputWriter(w func(*ast.Schema) error) ExtensionOption + func WithRelaySpec(enabled bool) ExtensionOption + func WithSchemaGenerator() ExtensionOption + func WithSchemaHook(hooks ...SchemaHook) ExtensionOption + func WithSchemaPath(path string) ExtensionOption + func WithTemplates(templates ...*gen.Template) ExtensionOption + func WithWhereInputs(b bool) ExtensionOption + type FieldConfig struct + Description string + Directives []Directive + Name string + type InputFieldDescriptor struct + AppendOp bool + ClearOp bool + Nullable bool + func (f *InputFieldDescriptor) IsPointer() bool + type MultiCursorsOptions struct + DirectionID OrderDirection + Directions []OrderDirection + FieldID string + Fields []string + type MutationConfig struct + Description string + IsCreate bool + type MutationDescriptor struct + IsCreate bool + func (m *MutationDescriptor) Builders() []string + func (m *MutationDescriptor) Input() (string, error) + func (m *MutationDescriptor) InputEdges() ([]*gen.Edge, error) + func (m *MutationDescriptor) InputFields() ([]*InputFieldDescriptor, error) + type MutationOption interface + Description func(string) MutationOption + GetDescription func() string + IsCreate func() bool + func MutationCreate() MutationOption + func MutationUpdate() MutationOption + type OrderDirection string + const OrderDirectionAsc + const OrderDirectionDesc + func (o *OrderDirection) UnmarshalGQL(val interface{}) error + func (o OrderDirection) MarshalGQL(w io.Writer) + func (o OrderDirection) Reverse() OrderDirection + func (o OrderDirection) String() string + func (o OrderDirection) Validate() error + type PageInfo struct + EndCursor *Cursor[T] + HasNextPage bool + HasPreviousPage bool + StartCursor *Cursor[T] + type PaginationNames struct + Connection string + Edge string + Node string + Order string + OrderField string + WhereInput string + func (p *PaginationNames) ConnectionField(name string, hasOrderBy, multiOrder, hasWhereInput bool) *ast.FieldDefinition + func (p *PaginationNames) OrderInputDef() *ast.Definition + func (p *PaginationNames) TypeDefs() []*ast.Definition + type SchemaHook func(*gen.Graph, *ast.Schema) error + type SkipMode int + const SkipAll + const SkipEnumField + const SkipMutationCreateInput + const SkipMutationUpdateInput + const SkipOrderField + const SkipType + const SkipWhereInput + func (f SkipMode) Any() bool + func (f SkipMode) Is(mode SkipMode) bool + type Transactioner struct + func (Transactioner) ExtensionName() string + func (Transactioner) MutateOperationContext(_ context.Context, oc *graphql.OperationContext) *gqlerror.Error + func (t Transactioner) InterceptResponse(ctx context.Context, next graphql.ResponseHandler) *graphql.Response + func (t Transactioner) Validate(graphql.ExecutableSchema) error + type TxOpener interface + OpenTx func(ctx context.Context) (context.Context, driver.Tx, error) + type TxOpenerFunc func(ctx context.Context) (context.Context, driver.Tx, error) + func (f TxOpenerFunc) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)