profusion / sgqlc

Simple GraphQL Client
https://sgqlc.readthedocs.io/
ISC License
513 stars 85 forks source link

Added --exclude-default-types argument to schema codegen #226

Closed volga closed 1 year ago

volga commented 1 year ago

We are testing Golang services that use the library https://github.com/99designs/gqlgen to generate the code. This library also uses a custom scalar Time type, but, unlike the sgqlc library, in it the Time type is a complete representation of the timestamp.

With the current changes, it is proposed to add the --disable-datetime-types argument to the client generation utility, which provides the ability to deactivate the use of custom datetimes types in the generated client.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4659342919


Totals Coverage Status
Change from base Build 4285805311: 0.0%
Covered Lines: 1574
Relevant Lines: 1574

💛 - Coveralls
volga commented 1 year ago

Hi, @barbieri! Coverage action broke on this request and I opened a new request instead. I propose to close the current request and continue working in a new request. PR #227

barbieri commented 1 year ago

@Volga thanks for your help, let me know if the argparse change makes sense (if you could use it, otherwise let me know how we could make it usable instead of just disabling the types).

Other than that, please squash both commits, since the first one is not relevant to be merged as is (it's being replaced by the second one).

volga commented 1 year ago

@barbieri Great idea! I've committed it. I am closing the current request. Please review the code in PR #227.