Skip to content

Releases: hasura/ndc-sdk-go

v1.10.0

18 May 16:43
137ef56
Compare
Choose a tag to compare

What's Changed

  • Added a ServerMaxBodyMegabytes (HASURA_SERVER_MAX_BODY_MEGABYTES) configuration to limit the maximum request body size, with a default value of 30 MB
  • Added a ServerDefaultHTTPErrorStatus (HASURA_SERVER_DEFAULT_HTTP_ERROR_STATUS ) configuration to return the default HTTP error status if developers don't explicitly set it, with a default value of 422.
  • Enhanced tracing in AcquireCredentials to include a new attribute for internal visibility.
  • Fix documentationPage link and hide concurrency settings in the connector definition.

Full Changelog: v1.9.1...v1.10.0

v1.9.1

19 Mar 14:09
9efb7f0
Compare
Choose a tag to compare

What's Changed

  • fix: must decode JSON the credentials response from by @m-Bilal in #185

Full Changelog: v1.9.0...v1.9.1

v1.9.0

18 Mar 16:11
4033419
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.8.0...v1.9.0

v1.8.0

27 Feb 04:34
2ac80cb
Compare
Choose a tag to compare

What's Changed

  • cmd: support generating predicate arguments by @hgiasac in #178
  • cmd: add server options to ndctest by @hgiasac in #179
  • sdk: DurationString and DurationInt64 scalars by @hgiasac in #180
  • add --skip-version-upgrade (SKIP_VERSION_UPGRADE) setting to skip version upgrade by @hgiasac in #181

Full Changelog: v1.7.0...v1.8.0

v1.7.0

06 Jan 09:17
6486aa7
Compare
Choose a tag to compare

What's Changed

  • sdk: support OpenTelemetry logs exporter and upgrade dependencies. The exporter is disabled by default. Enable it by setting OTEL_LOGS_EXPORTER=otlp (#173)
  • cli: fetch test snapshot responses from connector server (#172)
  • cli: fix quote schema description and expose security utils for telemetry (#174)
  • cli: fix scalar error message typo and parse directories recursively (#175)
  • cli: add the nested field selection to the command context. Use the utils.CommandSelectionFieldFromContext to get the field in custom logic functions (#177)
  • connector-definition: change the base golang image version to v1.23 and add the upgradeConfiguration command

Full Changelog: v1.6.3...v1.7.0

v1.6.3

03 Dec 03:34
5b68650
Compare
Choose a tag to compare

What's Changed

  • enhancement: improve error message for env variable utilities by @hgiasac in #170
  • fix: unused imports if there is only one function by @hgiasac in #171

Full Changelog: v1.6.2...v1.6.3

v1.6.2

11 Nov 04:07
0310e6b
Compare
Choose a tag to compare

What's Changed

  • utils: support more formats for the parseDateTime function by @hgiasac in #167
  • utils: add DecodeDateReflection function by @hgiasac in #168
  • utils: accept both env and value as default by @hgiasac in #169

Full Changelog: v1.6.1...v1.6.2

v1.6.1

04 Nov 14:41
7b41e67
Compare
Choose a tag to compare

What's Changed

  • cli: skip validating scalar result types by @hgiasac in #165
  • utils: add options for time and duration decoding helpers by @hgiasac in #166

Full Changelog: v1.6.0...v1.6.1

v1.6.0

29 Oct 07:54
3b6d7ce
Compare
Choose a tag to compare

Highlights

Support generating generic type parameters and ignore unexported fields in the struct:

type GetCustomHeadersArguments[T any, S int | int8 | int16 | int32 | int64] struct {
	Headers map[string]string                   `json:"headers"`
	Input   *T                                                  `json:"input"`
	Other   *GetCustomHeadersOther[S] `json:"other"`
}

type GetCustomHeadersOther[T int | int8 | int16 | int32 | int64] struct {
	Value T `json:"value"`
}

type GetCustomHeadersResult[T any, O int | int8 | int16 | int32 | int64] struct {
	Headers  map[string]string `json:"headers"`
	Response T
	Other    *GetCustomHeadersOther[O] `json:"other"`
}

func FunctionGetCustomHeaders(ctx context.Context, state *types.State, arguments *GetCustomHeadersArguments[BaseAuthor, int]) (GetCustomHeadersResult[HelloResult, int64], error) {
    // ...
}

Support options of the json tag:

  • omitempty: if this option is set, the field schema will be nullable even if the field type isn't a pointer.
  • - the object field is ignored.
type SomeObject struct {
  Headers map[string]string `json:"omitempty"`
  IgnoredField string `json:"-"`
}

What's Changed

  • utils: Expose reflection decode utilities by @hgiasac in #156
  • utils: fix non-null return types for decoding utilities and improve linter by @hgiasac in #157
  • cli: support generating generic type parameters by @hgiasac in #158
  • cli: support omitempty and ignore - json tags by @hgiasac in #159
  • utils: add environment value utilities by @hgiasac in #161
  • utils: add Duration scalar by @hgiasac in #162
  • utils: use the ParseDuration function of prometheus model by @hgiasac in #163
  • cli: improve generic decoders and type generation by @hgiasac in #164

Full Changelog: v1.5.1...v1.6.0

v1.5.1

07 Oct 09:52
e6a7fd8
Compare
Choose a tag to compare

What's Changed

  • cmd: should upgrade the latest SDK after introspection by @hgiasac in #155

Full Changelog: v1.5.0...v1.5.1