I was planning to build one helper package which will generate types from struct.
Anyone has tried it before?
I am new to graphql, any suggestions will be helpful.
Thanks.
though it for another package, you may find this helpful.
https://github.com/neelance/graphql-go/issues/28#issuecomment-263068537
@sogko, @chris-ramon, @bbuck : Have you guys seen following packages?
https://github.com/arvitaly/go-graphql-tools
https://github.com/xinhuang327/gographer
They are doing the work using reflection.
I am planning to write a generator package like https://github.com/mholt/binding
cc @arvitaly @xinhuang327
is there a way to do something like this:
schema := ParseSchema(type Person { name String! }
It says there is a schema parser in the readme but I see no examples anywhere of it.
I've finished a basic generator for graphql using reflect package. You can find it here:
https://github.com/incu6us/gostruct2graphql
I have a created a generator which generate it in runtime
https://github.com/SonicRoshan/straf
at work we might need that in the near future, so I wrote this package
it works straight out of the box for 99% of our packages usecases
https://github.com/cescoferraro/structql
Most helpful comment
@sogko, @chris-ramon, @bbuck : Have you guys seen following packages?
https://github.com/arvitaly/go-graphql-tools
https://github.com/xinhuang327/gographer
They are doing the work using reflection.
I am planning to write a generator package like https://github.com/mholt/binding
cc @arvitaly @xinhuang327