Documentation
¶
Index ¶
- func ApplySort(query *gorm.DB, sortBy []string) (*gorm.DB, error)
- func CheckModelIsInSync(db *gorm.DB, model interface{}) error
- func GetGormFields(model interface{}, filter FieldsFilter) (map[string]*schema.Field, error)
- func GetNestedPreloads(ctx *graphql.OperationContext, fields []graphql.CollectedField, prefix string) []string
- func GetPreloadString(prefix, name string) string
- func GetPreloads(ctx context.Context) []string
- func HasAssociation(preloads []string, association string) bool
- type FieldsFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckModelIsInSync ¶
func GetGormFields ¶
func GetGormFields(model interface{}, filter FieldsFilter) (map[string]*schema.Field, error)
GetGormFields returns a map of fields of a model that are readable and match the filter The key of the map is the alias of the field in the graphql schema The value is the field itself.
func GetNestedPreloads ¶
func GetNestedPreloads( ctx *graphql.OperationContext, fields []graphql.CollectedField, prefix string, ) []string
func GetPreloadString ¶
func GetPreloads ¶
func HasAssociation ¶
Types ¶
type FieldsFilter ¶
Click to show internal directories.
Click to hide internal directories.