Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codegen: drop time.Duration support and update UUID scalar codegen #18

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

hgiasac
Copy link
Collaborator

@hgiasac hgiasac commented Mar 7, 2024

  • Rename the binary name to hasura-ndc-go to follow the NDC CLI plugin specification. The codegen tool may be developed as a plugin in the future.
  • The time.Duration type doesn't support JSON decoding from string, e.g. 1s, 1m. So the codegen tool shouldn't support that type. Users need to define a scalar wrapper to support it themselves.
  • Create a new Decoder type that wraps mapstructure.Encoder to support nested values mapping. Improve mapping from any types without falling back to JSON encoding/decoding.
  • uuid.UUID decoder is optionally generated if any argument or return type property contains this type.

Copy link

github-actions bot commented Mar 7, 2024

Code Coverage

Package Line Rate Health
github.com/hasura/ndc-sdk-go/cmd/ndc-go-sdk 74%
github.com/hasura/ndc-sdk-go/connector 62%
github.com/hasura/ndc-sdk-go/example/reference 63%
github.com/hasura/ndc-sdk-go/internal 46%
github.com/hasura/ndc-sdk-go/schema 39%
github.com/hasura/ndc-sdk-go/utils 45%
Summary 52% (3512 / 6743)

Minimum allowed line rate is 20%

@hgiasac hgiasac merged commit 24dbbb5 into v0 Mar 7, 2024
1 check passed
@hgiasac hgiasac deleted the codegen/drop-duration-and-uuid-support branch March 7, 2024 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant