Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AST ¶
type AST struct {
// Scalars describe a list of scalar types, such as Int, String, DateTime, etc.
Scalars []string `json:"scalars"`
// Enums contains all enums
Enums []Enum `json:"enums"`
// Models contains top-level information including fields and their respective filters
Models []Model `json:"models"`
// ReadFilters describe a list of scalar types and the respective read operations
ReadFilters []Filter `json:"readFilters"`
// WriteFilters describe a list of scalar types and the respective read operations
WriteFilters []Filter `json:"writeFilters"`
// OrderBys describe a list of what FindMany operations can order by
OrderBys []OrderBy `json:"orderBys"`
// contains filtered or unexported fields
}
func (*AST) ReadFilter ¶
ReadFilter returns a filter for a read operation by scalar
type Filter ¶
type Filter struct {
// Name of a filter, which can be a scala like `Int`, or a field name like `Age`
Name string
// Methods describe filter methods, such as `Equals`, `In` or `Contains`
Methods []Method
}
Filter defines the data struct for the virtual types method
type Method ¶
type Method struct {
// Name of the filter method ot use publicly, such as `Equals` or `Contains`
Name string
// Action of the filter for internal use in the query engine, e.g. `equals` or `contains`
Action string
// IsList defines whether the filter accepts a scalar or a slice of scalars
IsList bool
// Deprecated contains a description of what else to use, as this method will be removed in the future
// If empty, this method is not deprecated
Deprecated string
// Type describes the type for this method. If empty, default to the parent scalar type.
Type types.Type
}
Method defines the method for the virtual types method
Click to show internal directories.
Click to hide internal directories.