- 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)
*SelectionSetis now properly passed into FieldFuncs.Uniontype__typenameattributes 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).Countreceiver 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)
ErrorCauseis a new exported function that can be used to unwrap pathErrors returned from middlleware. (#191)FieldFuncnow supports Pagination option,PaginateFieldFuncis 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.Testerinto protobuf message.
reactive.AddDependencyaccepts a serializable object to be added to dependency set tracker. (#165)
sqlgen.Testernow comparesdriver.Values. (#170)- Support converting the zero value of fields to NULL in the db with tag
sql:",implicitnull". (#181) - Support non-pointer protobuf structs. (#185)
BuildStructis added back and defined onsqlgen.Schema. (#195)UnbuildStructis now definedsqlgen.Schema. It's not a package level function anymore. (#195)
- Deprecated
PaginateFieldFuncin favor ofFieldFunc(..., schemabuilder.Paginated) - When you embed
PaginationArgsand returnPaginationInfo(between list and error) your paginated endpoint is seen as "externally managed", meaningthunderwill 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.
BuildStructis no longer necessary and was removed.
- Handle MySQL
time.Timetypes by convertingtime.Timeusinggithub.com/go-sql-driver/mysql.NullTime.DATE/DATETIMEare returned as formatted strings.
- Pointer scanners are no longer allowed to handle
nil, are forcefully set tonilinstead.
- 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/Unmarshalmethods (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.Scanneranddriver.Valuerinterfaces 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/uint64and all sub-types (eg:type foo int16) are coerced intoint64.float32/float64and all sub-types (eg:type foo float32) are coerced intofloat64.
- all sub-types of bool (eg:
- Removed manual registration of types:
MustRegisterCustomScalarRegisterCustomScalarMustRegisterSimpleScalarRegisterSimpleScalar
First entry