Documentation ¶
Index ¶
Constants ¶
View Source
const IntrospectionQueryField = "_xgen_introspection"
Variables ¶
View Source
var GraphqlContextKey = ContextKey("GRAPHQL_CONTEXT")
View Source
var ( MainDirectiveDefinitionBundle = &directives.DirectiveDefinitionBundle{ Object: []*directives.ObjectDirectiveDefinition{ &resource2.Directive, }, InputObject: []*directives.InputObjectDirectiveDefinition{ &singular.ActionDirective, &list.ActionDirective, &common.ExcludeArgumentFromTypeDirective, &common.ToObjectType, }, Field: []*directives.FieldDirectiveDefinition{ &field2.Directive, }, InputField: []*directives.InputFieldDirectiveDefinition{ &field.ActionFieldDirective, }, } )
Functions ¶
func PrepareContext ¶
func PrepareContext(ctx context.Context, gqlgenContext GraphqlContext) context.Context
PrepareContext returns a new context with the graphql context.
Types ¶
type GraphqlContext ¶
type GraphqlContext struct { ParentPackageName string GeneratedFilePrefix string ConfigOverrideCallback func(cfg *config.Config) error CustomDirectivesDefinitions []*ast.DirectiveDefinition CustomSchemaFiles config.StringList SchemaInjectorHooks []InjectorHook GeneratorApiOptions []api.Option }
func GetGraphqlContext ¶
func GetGraphqlContext(ctx context.Context) (*GraphqlContext, error)
GetGraphqlContext returns the graphql context from the context.
type InjectorHook ¶
type InjectorHook func(schema *ast.Schema) generator.SchemaHook
Click to show internal directories.
Click to hide internal directories.