Versions in this module Expand all Collapse all v0 v0.17.19 Apr 6, 2022 Changes in this version + const UserIDKey + const UserIDProviderKey + const UserIDRawKey + const UserRoleKey + func GetConfigName() string + type Column struct + Array bool + ForeignKey string + ID int32 + Name string + Primary bool + Type string + type Config struct + Blocklist []string + ConfigPath string + DBSchemaPollDuration time.Duration + DBType string + Debug bool + DefaultBlock bool + DefaultLimit int + DisableAgg bool + DisableAllowList bool + DisableFuncs bool + EnableCamelcase bool + EnableInflection bool + HeaderVars map[string]string + Inflections []string + Production bool + Resolvers []ResolverConfig + Roles []Role + RolesQuery string + ScriptPath string + SecretKey string + SetUserID bool + SingularSuffix string + SubsPollDuration time.Duration + Tables []Table + Vars map[string]string + func ReadInConfig(configFile string) (*Config, error) + func ReadInConfigFS(configFile string, fs afero.Fs) (*Config, error) + func (c *Config) AddRoleTable(role, table string, conf interface{}) error + func (c *Config) RemoveRoleTable(role, table string) error + func (c *Config) SetResolver(name string, fn refunc) error + type Delete struct + Block bool + Columns []string + Filters []string + type Error struct + Message string + type GraphJin struct + func NewGraphJin(conf *Config, db *sql.DB, options ...Option) (*GraphJin, error) + func (g *GraphJin) GraphQL(c context.Context, query string, vars json.RawMessage, rc *ReqConfig) (*Result, error) + func (g *GraphJin) IsProd() bool + func (g *GraphJin) Reload() error + func (g *GraphJin) Subscribe(c context.Context, query string, vars json.RawMessage, rc *ReqConfig) (*Member, error) + type Insert struct + Block bool + Columns []string + Filters []string + Presets map[string]string + type Member struct + Result chan *Result + func (m *Member) String() string + func (m *Member) Unsubscribe() + type OpType int + const OpMutation + const OpQuery + const OpSubscription + const OpUnknown + func Operation(query string) (OpType, string) + type Option func(*graphjin) error + func OptionSetFS(fs afero.Fs) Option + type Query struct + Block bool + Columns []string + DisableFunctions bool + Filters []string + Limit int + type ReqConfig struct + APQKey string + Vars map[string]interface{} + type Resolver interface + Resolve func(ResolverReq) ([]byte, error) + type ResolverConfig struct + Column string + Name string + Props ResolverProps + Schema string + StripPath string + Table string + Type string + type ResolverProps map[string]interface + type ResolverReq struct + ID string + Log *log.Logger + Sel *qcode.Select + type Result struct + Data json.RawMessage + Errors []Error + Extensions *extensions + func (r *Result) CacheControl() string + func (r *Result) Operation() OpType + func (r *Result) OperationName() string + func (r *Result) QueryName() string + func (r *Result) Role() string + func (r *Result) SQL() string + type Role struct + Match string + Name string + Tables []RoleTable + func (r *Role) GetTable(schema, name string) *RoleTable + type RoleTable struct + Delete *Delete + Insert *Insert + Name string + Query *Query + ReadOnly bool + Schema string + Update *Update + Upsert *Upsert + type Table struct + Blocklist []string + Columns []Column + Name string + OrderBy map[string][]string + Schema string + Table string + Type string + type Update struct + Block bool + Columns []string + Filters []string + Presets map[string]string + type Upsert struct + Block bool + Columns []string + Filters []string + Presets map[string]string